@astropay/payments-lib 2.0.0 → 2.0.2
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/astropay-payments-lib.es.js +1 -1
- package/dist/astropay-payments-lib.umd.js +196 -158
- package/dist/main-ZcUHJXUX.js +27563 -0
- package/dist/{profiler-CVMzUp0S.js → profiler-COmigUcA.js} +1 -1
- package/dist/{startRecording-DlN4lIUz.js → startRecording-BQf7KsKA.js} +1 -1
- package/dist/types/index.d.ts +11 -3
- package/package.json +2 -1
- package/dist/main-DhA4kci7.js +0 -19587
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Ke,he){typeof exports=="object"&&typeof module<"u"?he(exports):typeof define=="function"&&define.amd?define(["exports"],he):(Ke=typeof globalThis<"u"?globalThis:Ke||self,he(Ke.AstroPay={}))})(this,(function(Ke){"use strict";var w8=Object.defineProperty;var E8=(Ke,he,gn)=>he in Ke?w8(Ke,he,{enumerable:!0,configurable:!0,writable:!0,value:gn}):Ke[he]=gn;var S=(Ke,he,gn)=>E8(Ke,typeof he!="symbol"?he+"":he,gn);const he={xxsm:10,xsm:12,sm:14,base:16,md:20,lg:26,xl:32,xxl:40},gn={sm:{xSmall:he.xxsm,small:he.xsm,medium:he.sm,base:he.base,large:he.md,xLarge:he.lg},md:{xSmall:he.xsm,small:he.sm,medium:he.base,base:he.md,large:he.lg,xLarge:he.xl},lg:{xSmall:he.sm,small:he.base,medium:he.md,base:he.lg,large:he.xl,xLarge:he.xxl}},k={transparent:"transparent",surface_dark:"#041311",surface_light:"#FFFFFF",neutral_lightest:"#FFFFFF",neutral_light:"#F3F6F6",neutral_lighter:"#ECF1F0",neutral_base:"#B4C5C3",neutral_darker:"#7C9995",neutral_dark:"#536663",neutral_darkest:"#151E1D",primary_lightest:"#DBFFFB",primary_light:"#AAF6EC",primary_base:"#00DBBF",primary_darker:"#0FC3AC",primary_dark:"#059986",primary_darkest:"#07544A",warning_lightest:"#FFF7DB",warning_light:"#FFEBA8",warning_darker:"#DBA800",warning_darkest:"#755A00",error_lightest:"#FFDCD6",error_light:"#FFB0A3",error_lighter:"#FF8470",error_base:"#FF2C0A",error_dark:"#A31600",error_darkest:"#700F00",success_lightest:"#F0FAEB",success_light:"#D3EFC2",success_base:"#7CD049",success_darker:"#62B52F",success_dark:"#4D8E25",success_darkest:"#37651A"},oo={poppins:"Poppins"},H1=async()=>{try{const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap",e.rel="stylesheet",document.head.appendChild(e),await document.fonts.ready}catch(e){console.error("Font loading failed:",e)}},j1={backgroundColor:k.surface_dark,fontFamily:oo.poppins,textColor:k.neutral_light,fontScale:gn.md,primaryColor:k.primary_base,secondaryColor:k.primary_darkest,textPrimaryColor:k.neutral_lightest,textSecondaryColor:k.neutral_base,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:k.success_base},error:{textColor:k.error_lighter}},input:{normal:{textColor:k.neutral_lightest,backgroundColor:k.neutral_darkest,hintTextColor:k.neutral_darker,placeholderTextColor:k.neutral_dark,borderColor:k.transparent,borderRadius:8,borderWidth:3},focus:{textColor:k.neutral_lightest,backgroundColor:k.neutral_darkest,hintTextColor:k.neutral_darker,placeholderTextColor:k.neutral_darker,borderColor:k.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:k.neutral_darker,backgroundColor:k.neutral_dark,hintTextColor:k.neutral_darker,placeholderTextColor:k.neutral_base,borderColor:k.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:k.neutral_lightest,backgroundColor:k.neutral_darkest,hintTextColor:k.error_base,placeholderTextColor:k.neutral_darker,borderColor:k.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:k.neutral_lightest,backgroundColor:k.primary_base,borderColor:k.transparent,borderWidth:0},secondary:{textColor:k.primary_lightest,backgroundColor:k.primary_darkest,borderColor:k.transparent,borderWidth:0},text:{textColor:k.primary_base,backgroundColor:"unset",borderColor:k.primary_base,borderWidth:1},disabled:{textColor:k.neutral_dark,backgroundColor:k.neutral_base,borderColor:k.transparent,borderWidth:0}},divider:{color:k.neutral_darker,variant:"dashed",size:1},card:{padding:12,backgroundColor:k.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:k.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:k.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:k.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:k.neutral_light,backgroundColor:k.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:k.primary_light,backgroundColor:k.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:k.error_light,backgroundColor:k.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:k.success_light,backgroundColor:k.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:k.warning_light,backgroundColor:k.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:k.error_lightest,backgroundColor:k.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:oo.poppins,apPrimaryColor:k.primary_base,apButtonPrimaryBgColor:k.primary_base,apButtonPrimaryTxtColor:k.neutral_darkest,apButtonSecondaryBgColor:k.primary_darkest,apButtonSecondaryTxtColor:k.primary_base,apButtonTextTxtColor:k.primary_base,apButtonDisableBgColor:k.neutral_base,apButtonDisableTextColor:k.neutral_dark},Ad={backgroundColor:k.surface_light,fontFamily:oo.poppins,textColor:k.neutral_darkest,fontScale:gn.md,primaryColor:k.primary_base,secondaryColor:k.primary_lightest,textPrimaryColor:k.neutral_darkest,textSecondaryColor:k.neutral_dark,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:k.success_darker},error:{textColor:k.error_dark}},input:{normal:{textColor:k.neutral_darkest,backgroundColor:k.neutral_lighter,hintTextColor:k.neutral_dark,placeholderTextColor:k.neutral_dark,borderColor:k.transparent,borderRadius:8,borderWidth:3},focus:{textColor:k.neutral_darkest,backgroundColor:k.neutral_lighter,hintTextColor:k.neutral_dark,placeholderTextColor:k.neutral_dark,borderColor:k.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:k.neutral_dark,backgroundColor:k.neutral_base,hintTextColor:k.neutral_dark,placeholderTextColor:k.neutral_darker,borderColor:k.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:k.neutral_darkest,backgroundColor:k.neutral_lighter,hintTextColor:k.error_dark,placeholderTextColor:k.neutral_dark,borderColor:k.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:k.neutral_darkest,backgroundColor:k.primary_base,borderColor:k.transparent,borderWidth:0},secondary:{textColor:k.primary_darker,backgroundColor:k.primary_lightest,borderColor:k.transparent,borderWidth:0},text:{textColor:k.primary_base,backgroundColor:"unset",borderColor:k.primary_base,borderWidth:1},disabled:{textColor:k.neutral_dark,backgroundColor:k.neutral_base,borderColor:k.transparent,borderWidth:0}},divider:{color:k.neutral_base,variant:"dashed",size:1},card:{padding:12,backgroundColor:k.neutral_light,borderWidth:0,borderStyle:"none",borderColor:k.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:k.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:k.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:k.neutral_dark,backgroundColor:k.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:k.primary_dark,backgroundColor:k.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:k.error_dark,backgroundColor:k.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:k.success_dark,backgroundColor:k.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:k.warning_darker,backgroundColor:k.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:k.error_dark,backgroundColor:k.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:oo.poppins,apPrimaryColor:k.primary_base,apButtonPrimaryBgColor:k.primary_base,apButtonPrimaryTxtColor:k.neutral_darkest,apButtonSecondaryBgColor:k.primary_lightest,apButtonSecondaryTxtColor:k.primary_dark,apButtonTextTxtColor:k.primary_dark,apButtonDisableBgColor:k.neutral_base,apButtonDisableTextColor:k.neutral_dark},q1=["production","sandbox"],W1=["light","dark"],G1=["en","pt","es"],K1=["iso","symbol"],Y1=["sm","md","lg"],Xs=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).catch(t=>{console.error("Error to copy:",t)}):new Promise((t,n)=>{const r=document.createElement("textarea");r.value=e,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?t():n(new Error("Failed to copy text using execCommand"))}catch(i){n(i)}finally{document.body.removeChild(r)}}),Z1=async(e,t,n)=>{if(navigator.share)try{const r={title:e,text:t,...n&&{url:n}};await navigator.share(r)}catch(r){console.error("Failed to share information:",r)}else{console.warn("Web Share API not supported");const r=`${e}
|
|
2
2
|
${t}${n?`
|
|
3
|
-
${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),rm=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),tl=e=>{const t=JSON.stringify(e);return btoa(t)},sm=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.replace(/[^A-Za-z0-9]/g,"");let s="",i=0,o=!1;for(const a of n){if(o){s+=a,o=!1;continue}if(a==="\\"){o=!0;continue}if(i>=r.length)break;switch(a){case"#":if(/\d/.test(r[i]))s+=r[i++];else{i++;continue}break;case"A":if(/[A-Za-z]/.test(r[i]))s+=r[i++];else{i++;continue}break;case"*":if(/[A-Za-z0-9]/.test(r[i]))s+=r[i++];else{i++;continue}break;default:s+=a,r[i]===a&&i++;break}}return s},im=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.split("");let s="",i=!1,o=0;for(const a of n){if(i){i=!1,r[o]===a&&o++;continue}if(a==="\\"){i=!0;continue}if(o>=r.length)break;switch(a){case"#":/\d/.test(r[o])&&(s+=r[o]),o++;break;case"A":/[A-Za-z]/.test(r[o])&&(s+=r[o]),o++;break;case"*":/[A-Za-z0-9]/.test(r[o])&&(s+=r[o]),o++;break;default:r[o]===a&&o++;break}}return s},om=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3||8).toString(16)}),am=e=>e?e.startsWith("+")?e:`+${e}`:"",vn=Array.isArray,xt=e=>e!==null&&typeof e=="object"&&!vn(e),Kr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[nm(n)]:xt(r)?Kr(r):vn(r)?r.map(s=>xt(s)?Kr(s):s):r}),{}),cm=e=>{if(vn(e))return e.map(t=>xt(t)?Kr(t):t);throw new Error("Input is not an array")},Yr=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[rm(n)]:xt(r)?Yr(r):vn(r)?r.map(s=>xt(s)?Yr(s):s):r}),{}),lm=e=>{if(vn(e))return e.map(t=>xt(t)?Yr(t):t);throw new Error("Input is not an array")},mi=(e,t)=>vn(e)?t==="snake_case-to-camelCase"?cm(e):lm(e):xt(e)?t==="snake_case-to-camelCase"?Kr(e):Yr(e):e,nl=(e,t)=>{if(!t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=t[r],i=e[r];xt(s)&&xt(i)?n[r]=nl(i,s):s!==void 0&&(n[r]=s)}return n},um={light:el,dark:Zh},Yt=class Yt{static init(t){const n=Gr(t==null?void 0:t.theme,Xh,"light");Yt.currentTheme=n,Yt.styles=nl(um[n],t==null?void 0:t.styles)}static getStyles(){return Yt.styles}static getTheme(){return Yt.currentTheme}};S(Yt,"currentTheme","light"),S(Yt,"styles",el);let z=Yt;class se{constructor({tag:t,elementId:n,styles:r}){S(this,"element");if(this.element=document.createElement(t),n&&this.element.setAttribute("id",n),r){const s=z.getStyles(),i=r(s);this.element.className=i}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof se?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function dm(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function pm(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fm=(function(){function e(n){var r=this;this._insertTag=function(s){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,i),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(pm(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=dm(s);try{i.insertRule(r,i.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Ae="-ms-",Zr="-moz-",K="-webkit-",rl="comm",gi="rule",bi="decl",hm="@import",sl="@keyframes",mm="@layer",gm=Math.abs,Jr=String.fromCharCode,bm=Object.assign;function ym(e,t){return _e(e,0)^45?(((t<<2^_e(e,0))<<2^_e(e,1))<<2^_e(e,2))<<2^_e(e,3):0}function il(e){return e.trim()}function wm(e,t){return(e=t.exec(e))?e[0]:e}function Y(e,t,n){return e.replace(t,n)}function yi(e,t){return e.indexOf(t)}function _e(e,t){return e.charCodeAt(t)|0}function ir(e,t,n){return e.slice(t,n)}function ft(e){return e.length}function wi(e){return e.length}function Xr(e,t){return t.push(e),e}function vm(e,t){return e.map(t).join("")}var Qr=1,Sn=1,ol=0,Fe=0,me=0,_n="";function es(e,t,n,r,s,i,o){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Qr,column:Sn,length:o,return:""}}function or(e,t){return bm(es("",null,null,"",null,null,0),e,{length:-e.length},t)}function Sm(){return me}function _m(){return me=Fe>0?_e(_n,--Fe):0,Sn--,me===10&&(Sn=1,Qr--),me}function We(){return me=Fe<ol?_e(_n,Fe++):0,Sn++,me===10&&(Sn=1,Qr++),me}function ht(){return _e(_n,Fe)}function ts(){return Fe}function ar(e,t){return ir(_n,e,t)}function cr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function al(e){return Qr=Sn=1,ol=ft(_n=e),Fe=0,[]}function cl(e){return _n="",e}function ns(e){return il(ar(Fe-1,vi(e===91?e+2:e===40?e+1:e)))}function Cm(e){for(;(me=ht())&&me<33;)We();return cr(e)>2||cr(me)>3?"":" "}function Em(e,t){for(;--t&&We()&&!(me<48||me>102||me>57&&me<65||me>70&&me<97););return ar(e,ts()+(t<6&&ht()==32&&We()==32))}function vi(e){for(;We();)switch(me){case e:return Fe;case 34:case 39:e!==34&&e!==39&&vi(me);break;case 40:e===41&&vi(e);break;case 92:We();break}return Fe}function xm(e,t){for(;We()&&e+me!==57;)if(e+me===84&&ht()===47)break;return"/*"+ar(t,Fe-1)+"*"+Jr(e===47?e:We())}function Im(e){for(;!cr(ht());)We();return ar(e,Fe)}function Tm(e){return cl(rs("",null,null,null,[""],e=al(e),0,[0],e))}function rs(e,t,n,r,s,i,o,a,c){for(var l=0,u=0,d=o,p=0,h=0,f=0,m=1,g=1,_=1,x=0,w="",C=s,N=i,A=r,b=w;g;)switch(f=x,x=We()){case 40:if(f!=108&&_e(b,d-1)==58){yi(b+=Y(ns(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:b+=ns(x);break;case 9:case 10:case 13:case 32:b+=Cm(f);break;case 92:b+=Em(ts()-1,7);continue;case 47:switch(ht()){case 42:case 47:Xr(Am(xm(We(),ts()),t,n),c);break;default:b+="/"}break;case 123*m:a[l++]=ft(b)*_;case 125*m:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+u:_==-1&&(b=Y(b,/\f/g,"")),h>0&&ft(b)-d&&Xr(h>32?ul(b+";",r,n,d-1):ul(Y(b," ","")+";",r,n,d-2),c);break;case 59:b+=";";default:if(Xr(A=ll(b,t,n,l,u,s,a,w,C=[],N=[],d),i),x===123)if(u===0)rs(b,t,A,A,C,i,d,a,N);else switch(p===99&&_e(b,3)===110?100:p){case 100:case 108:case 109:case 115:rs(e,A,A,r&&Xr(ll(e,A,A,0,0,s,a,w,s,C=[],d),N),s,N,d,a,r?C:N);break;default:rs(b,A,A,A,[""],N,0,a,N)}}l=u=h=0,m=_=1,w=b="",d=o;break;case 58:d=1+ft(b),h=f;default:if(m<1){if(x==123)--m;else if(x==125&&m++==0&&_m()==125)continue}switch(b+=Jr(x),x*m){case 38:_=u>0?1:(b+="\f",-1);break;case 44:a[l++]=(ft(b)-1)*_,_=1;break;case 64:ht()===45&&(b+=ns(We())),p=ht(),u=d=ft(w=b+=Im(ts())),x++;break;case 45:f===45&&ft(b)==2&&(m=0)}}return i}function ll(e,t,n,r,s,i,o,a,c,l,u){for(var d=s-1,p=s===0?i:[""],h=wi(p),f=0,m=0,g=0;f<r;++f)for(var _=0,x=ir(e,d+1,d=gm(m=o[f])),w=e;_<h;++_)(w=il(m>0?p[_]+" "+x:Y(x,/&\f/g,p[_])))&&(c[g++]=w);return es(e,t,n,s===0?gi:a,c,l,u)}function Am(e,t,n){return es(e,t,n,rl,Jr(Sm()),ir(e,2,-2),0)}function ul(e,t,n,r){return es(e,t,n,bi,ir(e,0,r),ir(e,r+1,-1),r)}function Cn(e,t){for(var n="",r=wi(e),s=0;s<r;s++)n+=t(e[s],s,e,t)||"";return n}function km(e,t,n,r){switch(e.type){case mm:if(e.children.length)break;case hm:case bi:return e.return=e.return||e.value;case rl:return"";case sl:return e.return=e.value+"{"+Cn(e.children,r)+"}";case gi:e.value=e.props.join(",")}return ft(n=Cn(e.children,r))?e.return=e.value+"{"+n+"}":""}function Rm(e){var t=wi(e);return function(n,r,s,i){for(var o="",a=0;a<t;a++)o+=e[a](n,r,s,i)||"";return o}}function Pm(e){return function(t){t.root||(t=t.return)&&e(t)}}function Om(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Lm=function(t,n,r){for(var s=0,i=0;s=i,i=ht(),s===38&&i===12&&(n[r]=1),!cr(i);)We();return ar(t,Fe)},Nm=function(t,n){var r=-1,s=44;do switch(cr(s)){case 0:s===38&&ht()===12&&(n[r]=1),t[r]+=Lm(Fe-1,n,r);break;case 2:t[r]+=ns(s);break;case 4:if(s===44){t[++r]=ht()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Jr(s)}while(s=We());return t},Mm=function(t,n){return cl(Nm(al(t),n))},dl=new WeakMap,Dm=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,s=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!dl.get(r))&&!s){dl.set(t,!0);for(var i=[],o=Mm(n,i),a=r.props,c=0,l=0;c<o.length;c++)for(var u=0;u<a.length;u++,l++)t.props[l]=i[c]?o[c].replace(/&\f/g,a[u]):a[u]+" "+o[c]}}},Fm=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function pl(e,t){switch(ym(e,t)){case 5103:return K+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return K+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return K+e+Zr+e+Ae+e+e;case 6828:case 4268:return K+e+Ae+e+e;case 6165:return K+e+Ae+"flex-"+e+e;case 5187:return K+e+Y(e,/(\w+).+(:[^]+)/,K+"box-$1$2"+Ae+"flex-$1$2")+e;case 5443:return K+e+Ae+"flex-item-"+Y(e,/flex-|-self/,"")+e;case 4675:return K+e+Ae+"flex-line-pack"+Y(e,/align-content|flex-|-self/,"")+e;case 5548:return K+e+Ae+Y(e,"shrink","negative")+e;case 5292:return K+e+Ae+Y(e,"basis","preferred-size")+e;case 6060:return K+"box-"+Y(e,"-grow","")+K+e+Ae+Y(e,"grow","positive")+e;case 4554:return K+Y(e,/([^-])(transform)/g,"$1"+K+"$2")+e;case 6187:return Y(Y(Y(e,/(zoom-|grab)/,K+"$1"),/(image-set)/,K+"$1"),e,"")+e;case 5495:case 3959:return Y(e,/(image-set\([^]*)/,K+"$1$`$1");case 4968:return Y(Y(e,/(.+:)(flex-)?(.*)/,K+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+K+e+e;case 4095:case 3583:case 4068:case 2532:return Y(e,/(.+)-inline(.+)/,K+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ft(e)-1-t>6)switch(_e(e,t+1)){case 109:if(_e(e,t+4)!==45)break;case 102:return Y(e,/(.+:)(.+)-([^]+)/,"$1"+K+"$2-$3$1"+Zr+(_e(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yi(e,"stretch")?pl(Y(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(_e(e,t+1)!==115)break;case 6444:switch(_e(e,ft(e)-3-(~yi(e,"!important")&&10))){case 107:return Y(e,":",":"+K)+e;case 101:return Y(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+K+(_e(e,14)===45?"inline-":"")+"box$3$1"+K+"$2$3$1"+Ae+"$2box$3")+e}break;case 5936:switch(_e(e,t+11)){case 114:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return K+e+Ae+Y(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return K+e+Ae+e+e}return e}var Bm=function(t,n,r,s){if(t.length>-1&&!t.return)switch(t.type){case bi:t.return=pl(t.value,t.length);break;case sl:return Cn([or(t,{value:Y(t.value,"@","@"+K)})],s);case gi:if(t.length)return vm(t.props,function(i){switch(wm(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Cn([or(t,{props:[Y(i,/:(read-\w+)/,":"+Zr+"$1")]})],s);case"::placeholder":return Cn([or(t,{props:[Y(i,/:(plac\w+)/,":"+K+"input-$1")]}),or(t,{props:[Y(i,/:(plac\w+)/,":"+Zr+"$1")]}),or(t,{props:[Y(i,/:(plac\w+)/,Ae+"input-$1")]})],s)}return""})}},Um=[Bm],$m=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var s=t.stylisPlugins||Um,i={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var c,l=[Dm,Fm];{var u,d=[km,Pm(function(m){u.insert(m)})],p=Rm(l.concat(s,d)),h=function(g){return Cn(Tm(g),p)};c=function(g,_,x,w){u=x,h(g?g+"{"+_.styles+"}":_.styles),w&&(f.inserted[_.name]=!0)}}var f={key:n,sheet:new fm({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return f.sheet.hydrate(a),f};function Vm(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var zm={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Hm=/[A-Z]|^ms/g,jm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,fl=function(t){return t.charCodeAt(1)===45},hl=function(t){return t!=null&&typeof t!="boolean"},Si=Om(function(e){return fl(e)?e:e.replace(Hm,"-$&").toLowerCase()}),ml=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jm,function(r,s,i){return Nt={name:s,styles:i,next:Nt},s})}return zm[t]!==1&&!fl(t)&&typeof n=="number"&&n!==0?n+"px":n};function ss(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var s=n;if(s.anim===1)return Nt={name:s.name,styles:s.styles,next:Nt},s.name;var i=n;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)Nt={name:o.name,styles:o.styles,next:Nt},o=o.next;var a=i.styles+";";return a}return Wm(e,t,n)}}var c=n;if(t==null)return c;var l=t[c];return l!==void 0?l:c}function Wm(e,t,n){var r="";if(Array.isArray(n))for(var s=0;s<n.length;s++)r+=ss(e,t,n[s])+";";else for(var i in n){var o=n[i];if(typeof o!="object"){var a=o;t!=null&&t[a]!==void 0?r+=i+"{"+t[a]+"}":hl(a)&&(r+=Si(i)+":"+ml(i,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)hl(o[c])&&(r+=Si(i)+":"+ml(i,o[c])+";");else{var l=ss(e,t,o);switch(i){case"animation":case"animationName":{r+=Si(i)+":"+l+";";break}default:r+=i+"{"+l+"}"}}}return r}var gl=/label:\s*([^\s;{]+)\s*(;|$)/g,Nt;function _i(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,s="";Nt=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,s+=ss(n,t,i);else{var o=i;s+=o[0]}for(var a=1;a<e.length;a++)if(s+=ss(n,t,e[a]),r){var c=i;s+=c[a]}gl.lastIndex=0;for(var l="",u;(u=gl.exec(s))!==null;)l+="-"+u[1];var d=Vm(s)+l;return{name:d,styles:s,next:Nt}}function bl(e,t,n){var r="";return n.split(" ").forEach(function(s){e[s]!==void 0?t.push(e[s]+";"):s&&(r+=s+" ")}),r}var qm=function(t,n,r){var s=t.key+"-"+n.name;t.registered[s]===void 0&&(t.registered[s]=n.styles)},Gm=function(t,n,r){qm(t,n);var s=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+s:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function yl(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function wl(e,t,n){var r=[],s=bl(e,r,n);return r.length<2?n:s+t(r)}var Km=function(t){var n=$m(t);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var r=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered,void 0);return Gm(n,d),n.key+"-"+d.name},s=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered),p="animation-"+d.name;return yl(n,{name:d.name,styles:"@keyframes "+p+"{"+d.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=_i(l,n.registered);yl(n,d)},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return wl(n.registered,r,Ym(l))};return{css:r,cx:o,injectGlobal:i,keyframes:s,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:bl.bind(null,n.registered),merge:wl.bind(null,n.registered,r)}},Ym=function e(t){for(var n="",r=0;r<t.length;r++){var s=t[r];if(s!=null){var i=void 0;switch(typeof s){case"boolean":break;case"object":{if(Array.isArray(s))i=e(s);else{i="";for(var o in s)s[o]&&o&&(i&&(i+=" "),i+=o)}break}default:i=s}i&&(n&&(n+=" "),n+=i)}}return n},Ci=Km({key:"css"}),Zm=Ci.cx,lr=Ci.keyframes,j=Ci.css;const Jm=lr`
|
|
3
|
+
${n}`:""}`;await Xs(r)}};function so(e,t,n){return t.includes(e)?e:n}const J1=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),X1=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),kd=e=>{const t=JSON.stringify(e);return btoa(t)},Q1=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.replace(/[^A-Za-z0-9]/g,"");let i="",o=0,s=!1;for(const a of n){if(s){i+=a,s=!1;continue}if(a==="\\"){s=!0;continue}if(o>=r.length)break;switch(a){case"#":if(/\d/.test(r[o]))i+=r[o++];else{o++;continue}break;case"A":if(/[A-Za-z]/.test(r[o]))i+=r[o++];else{o++;continue}break;case"*":if(/[A-Za-z0-9]/.test(r[o]))i+=r[o++];else{o++;continue}break;default:i+=a,r[o]===a&&o++;break}}return i},ey=(e,t)=>{if(!t)return e;const n=t.split(""),r=e.split("");let i="",o=!1,s=0;for(const a of n){if(o){o=!1,r[s]===a&&s++;continue}if(a==="\\"){o=!0;continue}if(s>=r.length)break;switch(a){case"#":/\d/.test(r[s])&&(i+=r[s]),s++;break;case"A":/[A-Za-z]/.test(r[s])&&(i+=r[s]),s++;break;case"*":/[A-Za-z0-9]/.test(r[s])&&(i+=r[s]),s++;break;default:r[s]===a&&s++;break}}return i},ty=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3||8).toString(16)}),ny=e=>e?e.startsWith("+")?e:`+${e}`:"",ar=Array.isArray,sn=e=>e!==null&&typeof e=="object"&&!ar(e),ao=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[J1(n)]:sn(r)?ao(r):ar(r)?r.map(i=>sn(i)?ao(i):i):r}),{}),ry=e=>{if(ar(e))return e.map(t=>sn(t)?ao(t):t);throw new Error("Input is not an array")},co=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[X1(n)]:sn(r)?co(r):ar(r)?r.map(i=>sn(i)?co(i):i):r}),{}),iy=e=>{if(ar(e))return e.map(t=>sn(t)?co(t):t);throw new Error("Input is not an array")},Qs=(e,t)=>ar(e)?t==="snake_case-to-camelCase"?ry(e):iy(e):sn(e)?t==="snake_case-to-camelCase"?ao(e):co(e):e,Rd=(e,t)=>{if(!t)return e;const n={...e};for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const i=t[r],o=e[r];sn(i)&&sn(o)?n[r]=Rd(o,i):i!==void 0&&(n[r]=i)}return n},oy={light:Ad,dark:j1},pn=class pn{static init(t){const n=so(t==null?void 0:t.theme,W1,"light");pn.currentTheme=n;const r=pn.processStyles(t==null?void 0:t.styles);pn.styles=Rd(oy[n],r)}static getStyles(){return pn.styles}static getTheme(){return pn.currentTheme}static getFontScale(){return this.getStyles().fontScale}static processStyles(t){if(!t)return;const n={...t};return typeof t.fontScale=="string"&&Y1.includes(t.fontScale)&&(n.fontScale=gn[t.fontScale]),n}};S(pn,"currentTheme","light"),S(pn,"styles",Ad);let j=pn;class we{constructor({tag:t,elementId:n,styles:r}){S(this,"element");if(this.element=document.createElement(t),n&&this.element.setAttribute("id",n),r){const i=j.getStyles(),o=r(i);this.element.className=o}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof we?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function sy(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function ay(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var cy=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ay(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=sy(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Ye="-ms-",uo="-moz-",le="-webkit-",Pd="comm",ea="rule",ta="decl",uy="@import",Od="@keyframes",ly="@layer",dy=Math.abs,lo=String.fromCharCode,fy=Object.assign;function py(e,t){return ze(e,0)^45?(((t<<2^ze(e,0))<<2^ze(e,1))<<2^ze(e,2))<<2^ze(e,3):0}function Ld(e){return e.trim()}function hy(e,t){return(e=t.exec(e))?e[0]:e}function de(e,t,n){return e.replace(t,n)}function na(e,t){return e.indexOf(t)}function ze(e,t){return e.charCodeAt(t)|0}function Xr(e,t,n){return e.slice(t,n)}function Ht(e){return e.length}function ra(e){return e.length}function fo(e,t){return t.push(e),e}function gy(e,t){return e.map(t).join("")}var po=1,cr=1,Nd=0,at=0,Ne=0,ur="";function ho(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:po,column:cr,length:s,return:""}}function Qr(e,t){return fy(ho("",null,null,"",null,null,0),e,{length:-e.length},t)}function my(){return Ne}function vy(){return Ne=at>0?ze(ur,--at):0,cr--,Ne===10&&(cr=1,po--),Ne}function mt(){return Ne=at<Nd?ze(ur,at++):0,cr++,Ne===10&&(cr=1,po++),Ne}function jt(){return ze(ur,at)}function go(){return at}function ei(e,t){return Xr(ur,e,t)}function ti(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Md(e){return po=cr=1,Nd=Ht(ur=e),at=0,[]}function Dd(e){return ur="",e}function mo(e){return Ld(ei(at-1,ia(e===91?e+2:e===40?e+1:e)))}function yy(e){for(;(Ne=jt())&&Ne<33;)mt();return ti(e)>2||ti(Ne)>3?"":" "}function by(e,t){for(;--t&&mt()&&!(Ne<48||Ne>102||Ne>57&&Ne<65||Ne>70&&Ne<97););return ei(e,go()+(t<6&&jt()==32&&mt()==32))}function ia(e){for(;mt();)switch(Ne){case e:return at;case 34:case 39:e!==34&&e!==39&&ia(Ne);break;case 40:e===41&&ia(e);break;case 92:mt();break}return at}function wy(e,t){for(;mt()&&e+Ne!==57;)if(e+Ne===84&&jt()===47)break;return"/*"+ei(t,at-1)+"*"+lo(e===47?e:mt())}function Ey(e){for(;!ti(jt());)mt();return ei(e,at)}function Sy(e){return Dd(vo("",null,null,null,[""],e=Md(e),0,[0],e))}function vo(e,t,n,r,i,o,s,a,c){for(var u=0,l=0,d=s,f=0,h=0,p=0,g=1,m=1,v=1,y=0,b="",w=i,C=o,_=r,E=b;m;)switch(p=y,y=mt()){case 40:if(p!=108&&ze(E,d-1)==58){na(E+=de(mo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=mo(y);break;case 9:case 10:case 13:case 32:E+=yy(p);break;case 92:E+=by(go()-1,7);continue;case 47:switch(jt()){case 42:case 47:fo(_y(wy(mt(),go()),t,n),c);break;default:E+="/"}break;case 123*g:a[u++]=Ht(E)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:v==-1&&(E=de(E,/\f/g,"")),h>0&&Ht(E)-d&&fo(h>32?Ud(E+";",r,n,d-1):Ud(de(E," ","")+";",r,n,d-2),c);break;case 59:E+=";";default:if(fo(_=Fd(E,t,n,u,l,i,a,b,w=[],C=[],d),o),y===123)if(l===0)vo(E,t,_,_,w,o,d,a,C);else switch(f===99&&ze(E,3)===110?100:f){case 100:case 108:case 109:case 115:vo(e,_,_,r&&fo(Fd(e,_,_,0,0,i,a,b,i,w=[],d),C),i,C,d,a,r?w:C);break;default:vo(E,_,_,_,[""],C,0,a,C)}}u=l=h=0,g=v=1,b=E="",d=s;break;case 58:d=1+Ht(E),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&vy()==125)continue}switch(E+=lo(y),y*g){case 38:v=l>0?1:(E+="\f",-1);break;case 44:a[u++]=(Ht(E)-1)*v,v=1;break;case 64:jt()===45&&(E+=mo(mt())),f=jt(),l=d=Ht(b=E+=Ey(go())),y++;break;case 45:p===45&&Ht(E)==2&&(g=0)}}return o}function Fd(e,t,n,r,i,o,s,a,c,u,l){for(var d=i-1,f=i===0?o:[""],h=ra(f),p=0,g=0,m=0;p<r;++p)for(var v=0,y=Xr(e,d+1,d=dy(g=s[p])),b=e;v<h;++v)(b=Ld(g>0?f[v]+" "+y:de(y,/&\f/g,f[v])))&&(c[m++]=b);return ho(e,t,n,i===0?ea:a,c,u,l)}function _y(e,t,n){return ho(e,t,n,Pd,lo(my()),Xr(e,2,-2),0)}function Ud(e,t,n,r){return ho(e,t,n,ta,Xr(e,0,r),Xr(e,r+1,-1),r)}function lr(e,t){for(var n="",r=ra(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Cy(e,t,n,r){switch(e.type){case ly:if(e.children.length)break;case uy:case ta:return e.return=e.return||e.value;case Pd:return"";case Od:return e.return=e.value+"{"+lr(e.children,r)+"}";case ea:e.value=e.props.join(",")}return Ht(n=lr(e.children,r))?e.return=e.value+"{"+n+"}":""}function Ty(e){var t=ra(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function Iy(e){return function(t){t.root||(t=t.return)&&e(t)}}function xy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ay=function(t,n,r){for(var i=0,o=0;i=o,o=jt(),i===38&&o===12&&(n[r]=1),!ti(o);)mt();return ei(t,at)},ky=function(t,n){var r=-1,i=44;do switch(ti(i)){case 0:i===38&&jt()===12&&(n[r]=1),t[r]+=Ay(at-1,n,r);break;case 2:t[r]+=mo(i);break;case 4:if(i===44){t[++r]=jt()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=lo(i)}while(i=mt());return t},Ry=function(t,n){return Dd(ky(Md(t),n))},Bd=new WeakMap,Py=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Bd.get(r))&&!i){Bd.set(t,!0);for(var o=[],s=Ry(n,o),a=r.props,c=0,u=0;c<s.length;c++)for(var l=0;l<a.length;l++,u++)t.props[u]=o[c]?s[c].replace(/&\f/g,a[l]):a[l]+" "+s[c]}}},Oy=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function $d(e,t){switch(py(e,t)){case 5103:return le+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return le+e+uo+e+Ye+e+e;case 6828:case 4268:return le+e+Ye+e+e;case 6165:return le+e+Ye+"flex-"+e+e;case 5187:return le+e+de(e,/(\w+).+(:[^]+)/,le+"box-$1$2"+Ye+"flex-$1$2")+e;case 5443:return le+e+Ye+"flex-item-"+de(e,/flex-|-self/,"")+e;case 4675:return le+e+Ye+"flex-line-pack"+de(e,/align-content|flex-|-self/,"")+e;case 5548:return le+e+Ye+de(e,"shrink","negative")+e;case 5292:return le+e+Ye+de(e,"basis","preferred-size")+e;case 6060:return le+"box-"+de(e,"-grow","")+le+e+Ye+de(e,"grow","positive")+e;case 4554:return le+de(e,/([^-])(transform)/g,"$1"+le+"$2")+e;case 6187:return de(de(de(e,/(zoom-|grab)/,le+"$1"),/(image-set)/,le+"$1"),e,"")+e;case 5495:case 3959:return de(e,/(image-set\([^]*)/,le+"$1$`$1");case 4968:return de(de(e,/(.+:)(flex-)?(.*)/,le+"box-pack:$3"+Ye+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+le+e+e;case 4095:case 3583:case 4068:case 2532:return de(e,/(.+)-inline(.+)/,le+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ht(e)-1-t>6)switch(ze(e,t+1)){case 109:if(ze(e,t+4)!==45)break;case 102:return de(e,/(.+:)(.+)-([^]+)/,"$1"+le+"$2-$3$1"+uo+(ze(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~na(e,"stretch")?$d(de(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ze(e,t+1)!==115)break;case 6444:switch(ze(e,Ht(e)-3-(~na(e,"!important")&&10))){case 107:return de(e,":",":"+le)+e;case 101:return de(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+le+(ze(e,14)===45?"inline-":"")+"box$3$1"+le+"$2$3$1"+Ye+"$2box$3")+e}break;case 5936:switch(ze(e,t+11)){case 114:return le+e+Ye+de(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return le+e+Ye+de(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return le+e+Ye+de(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return le+e+Ye+e+e}return e}var Ly=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ta:t.return=$d(t.value,t.length);break;case Od:return lr([Qr(t,{value:de(t.value,"@","@"+le)})],i);case ea:if(t.length)return gy(t.props,function(o){switch(hy(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return lr([Qr(t,{props:[de(o,/:(read-\w+)/,":"+uo+"$1")]})],i);case"::placeholder":return lr([Qr(t,{props:[de(o,/:(plac\w+)/,":"+le+"input-$1")]}),Qr(t,{props:[de(o,/:(plac\w+)/,":"+uo+"$1")]}),Qr(t,{props:[de(o,/:(plac\w+)/,Ye+"input-$1")]})],i)}return""})}},Ny=[Ly],My=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||Ny,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(g)});var c,u=[Py,Oy];{var l,d=[Cy,Iy(function(g){l.insert(g)})],f=Ty(u.concat(i,d)),h=function(m){return lr(Sy(m),f)};c=function(m,v,y,b){l=y,h(m?m+"{"+v.styles+"}":v.styles),b&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new cy({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:c};return p.sheet.hydrate(a),p};function Dy(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Fy={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Uy=/[A-Z]|^ms/g,By=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vd=function(t){return t.charCodeAt(1)===45},zd=function(t){return t!=null&&typeof t!="boolean"},oa=xy(function(e){return Vd(e)?e:e.replace(Uy,"-$&").toLowerCase()}),Hd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(By,function(r,i,o){return mn={name:i,styles:o,next:mn},i})}return Fy[t]!==1&&!Vd(t)&&typeof n=="number"&&n!==0?n+"px":n};function yo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return mn={name:i.name,styles:i.styles,next:mn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)mn={name:s.name,styles:s.styles,next:mn},s=s.next;var a=o.styles+";";return a}return $y(e,t,n)}}var c=n;if(t==null)return c;var u=t[c];return u!==void 0?u:c}function $y(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=yo(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":zd(a)&&(r+=oa(o)+":"+Hd(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var c=0;c<s.length;c++)zd(s[c])&&(r+=oa(o)+":"+Hd(o,s[c])+";");else{var u=yo(e,t,s);switch(o){case"animation":case"animationName":{r+=oa(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var jd=/label:\s*([^\s;{]+)\s*(;|$)/g,mn;function sa(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";mn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=yo(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=yo(n,t,e[a]),r){var c=o;i+=c[a]}jd.lastIndex=0;for(var u="",l;(l=jd.exec(i))!==null;)u+="-"+l[1];var d=Dy(i)+u;return{name:d,styles:i,next:mn}}function qd(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Vy=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},zy=function(t,n,r){Vy(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Wd(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Gd(e,t,n){var r=[],i=qd(e,r,n);return r.length<2?n:i+t(r)}var Hy=function(t){var n=My(t);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var r=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=sa(u,n.registered,void 0);return zy(n,d),n.key+"-"+d.name},i=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=sa(u,n.registered),f="animation-"+d.name;return Wd(n,{name:d.name,styles:"@keyframes "+f+"{"+d.styles+"}"}),f},o=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=sa(u,n.registered);Wd(n,d)},s=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];return Gd(n.registered,r,jy(u))};return{css:r,cx:s,injectGlobal:o,keyframes:i,hydrate:function(c){c.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:qd.bind(null,n.registered),merge:Gd.bind(null,n.registered,r)}},jy=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var s in i)i[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},aa=Hy({key:"css"}),qy=aa.cx,ni=aa.keyframes,ne=aa.css;const Wy=ni`
|
|
4
4
|
100% {
|
|
5
5
|
transform: rotate(360deg);
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,Gy=ni`
|
|
8
8
|
0% {
|
|
9
9
|
clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
|
|
10
10
|
}
|
|
@@ -20,16 +20,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
20
20
|
100% {
|
|
21
21
|
clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,Ky=ni`
|
|
24
24
|
100% {
|
|
25
25
|
transform: rotate(1turn);
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,Yy=(e,t)=>ne`
|
|
28
28
|
width: ${e}px;
|
|
29
29
|
height: ${e}px;
|
|
30
30
|
border-radius: 50%;
|
|
31
31
|
position: relative;
|
|
32
|
-
animation: ${
|
|
32
|
+
animation: ${Wy} 1s linear infinite;
|
|
33
33
|
|
|
34
34
|
&::before {
|
|
35
35
|
content: '';
|
|
@@ -38,9 +38,9 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
38
38
|
inset: 0px;
|
|
39
39
|
border-radius: 50%;
|
|
40
40
|
border: 2.5px solid ${t};
|
|
41
|
-
animation: ${
|
|
41
|
+
animation: ${Gy} 2s linear infinite;
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`,Zy=(e,t)=>ne`
|
|
44
44
|
width: ${e}px;
|
|
45
45
|
aspect-ratio: 1;
|
|
46
46
|
border-radius: 50%;
|
|
@@ -48,36 +48,37 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
48
48
|
radial-gradient(farthest-side, ${t} 94%, transparent) top/8px 8px no-repeat,
|
|
49
49
|
conic-gradient(transparent 30%, ${t});
|
|
50
50
|
mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 0);
|
|
51
|
-
animation: ${
|
|
52
|
-
`;class
|
|
51
|
+
animation: ${Ky} 1s infinite linear;
|
|
52
|
+
`;class an extends we{constructor({size:t=24,color:n="currentColor",variant:r="inline"}){super({tag:r==="inline"?"span":"div",styles:()=>r==="inline"?Yy(t,n):Zy(t,n)})}}const Kd=e=>typeof e=="number"?e:j.getFontScale()[e],Jy=(e,t)=>{if(t)return t;const n=typeof e=="number"?e:Kd(e);return Math.round(n*1.5)},Xy=(e,t)=>{const n=Kd(t.size||12),r=Jy(n,t.lineHeight);return ne`
|
|
53
53
|
font-family: ${e.fontFamily};
|
|
54
54
|
color: ${(t==null?void 0:t.color)||e.textColor};
|
|
55
55
|
|
|
56
|
-
font-size: ${
|
|
56
|
+
font-size: ${n}px;
|
|
57
|
+
line-height: ${r}px;
|
|
58
|
+
|
|
57
59
|
font-weight: ${t.weight};
|
|
58
60
|
text-align: ${t.align};
|
|
59
61
|
|
|
60
|
-
line-height: ${t.lineHeight}px;
|
|
61
62
|
text-transform: ${t.uppercase?"uppercase":"none"};
|
|
62
|
-
`;class H extends se{constructor({text:t,variant:n="span",weight:r=500,size:s=12,lineHeight:i=18,align:o="left",color:a,uppercase:c=!1}){const l={size:s,weight:r,lineHeight:i,align:o,color:a,uppercase:c};super({tag:n,styles:u=>ng(u,l)}),this.element.textContent=t}}const F=e=>typeof e=="string",ur=()=>{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},vl=e=>e==null?"":""+e,rg=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},sg=/###/g,Sl=e=>e&&e.indexOf("###")>-1?e.replace(sg,"."):e,_l=e=>!e||F(e),dr=(e,t,n)=>{const r=F(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(_l(e))return{};const i=Sl(r[s]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++s}return _l(e)?{}:{obj:e,k:Sl(r[s])}},Cl=(e,t,n)=>{const{obj:r,k:s}=dr(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),a=dr(e,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=dr(e,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ig=(e,t,n,r)=>{const{obj:s,k:i}=dr(e,t,Object);s[i]=s[i]||[],s[i].push(n)},is=(e,t)=>{const{obj:n,k:r}=dr(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},og=(e,t,n)=>{const r=is(e,n);return r!==void 0?r:is(t,n)},El=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?F(e[r])||e[r]instanceof String||F(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):El(e[r],t[r],n):e[r]=t[r]);return e},En=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ag={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const cg=e=>F(e)?e.replace(/[&<>"'\/]/g,t=>ag[t]):e;class lg{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ug=[" ",",","?","!",";"],dg=new lg(20),pg=(e,t,n)=>{t=t||"",n=n||"";const r=ug.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=dg.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(e);if(!i){const o=e.indexOf(n);o>0&&!s.test(e.substring(0,o))&&(i=!0)}return i},Ei=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let s=e;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let c=i;c<r.length;++c)if(c!==i&&(a+=n),a+=r[c],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<r.length-1)continue;i+=c-i+1;break}s=o}return s},os=e=>e==null?void 0:e.replace("_","-"),fg={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class as{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||fg,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,s){return s&&!this.debug?null:(F(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new as(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new as(this.logger,t)}}var mt=new as;class cs{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(o=>{let[a,c]=o;for(let l=0;l<c;l++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,c]=o;for(let l=0;l<c;l++)a.apply(a,[t,...r])})}}class xl extends cs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var l,u;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):F(r)&&i?a.push(...r.split(i)):a.push(r)));const c=is(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!o||!F(r)?c:Ei((u=(l=this.data)==null?void 0:l[t])==null?void 0:u[n],r,i)}addResource(t,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(o?r.split(o):r)),t.indexOf(".")>-1&&(a=t.split("."),s=n,n=a[1]),this.addNamespaces(n),Cl(this.data,a,s),i.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(F(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let c=is(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?El(c,r,i):c={...c,...r},Cl(this.data,a,c),o.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var Il={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(i=>{var o;t=((o=this.processors[i])==null?void 0:o.process(t,n,r,s))??t}),t}};const Tl={},Al=e=>!F(e)&&typeof e!="boolean"&&typeof e!="number";class ls extends cs{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),rg(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!pg(t,r,s);if(o&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:F(i)?[i]:i};const l=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(s)}return{key:t,namespaces:F(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],l=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((l==null?void 0:l.toLowerCase())==="cimode"){if(u){const k=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${k}${o}`,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${k}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o}const d=this.resolve(t,n);let p=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||o,f=(d==null?void 0:d.exactUsedKey)||o,m=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,x=n.count!==void 0&&!F(n.count),w=ls.hasDefaultValue(n),C=x?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&x?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",A=x&&!n.ordinal&&n.count===0,b=A&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${C}`]||n[`defaultValue${N}`]||n.defaultValue;let P=p;_&&!p&&w&&(P=b);const T=Al(P),R=Object.prototype.toString.apply(P);if(_&&P&&T&&m.indexOf(R)<0&&!(F(g)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,P,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(d.res=k,d.usedParams=this.getUsedParamsDetails(n),d):k}if(i){const k=Array.isArray(P),O=k?[]:{},L=k?f:h;for(const M in P)if(Object.prototype.hasOwnProperty.call(P,M)){const ie=`${L}${i}${M}`;w&&!p?O[M]=this.translate(ie,{...n,defaultValue:Al(b)?b[M]:void 0,joinArrays:!1,ns:a}):O[M]=this.translate(ie,{...n,joinArrays:!1,ns:a}),O[M]===ie&&(O[M]=P[M])}p=O}}else if(_&&F(g)&&Array.isArray(p))p=p.join(g),p&&(p=this.extendTranslation(p,t,n,r));else{let k=!1,O=!1;!this.isValidLookup(p)&&w&&(k=!0,p=b),this.isValidLookup(p)||(O=!0,p=o);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:p,ie=w&&b!==p&&this.options.updateMissing;if(O||k||ie){if(this.logger.log(ie?"updateKey":"missingKey",l,c,o,ie?b:p),i){const re=this.resolve(o,{...n,keySeparator:!1});re&&re.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const Pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Pe&&Pe[0])for(let re=0;re<Pe.length;re++)ee.push(Pe[re]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(n.lng||this.language):ee.push(n.lng||this.language);const he=(re,ae,G)=>{var ge;const ue=w&&G!==p?G:M;this.options.missingKeyHandler?this.options.missingKeyHandler(re,c,ae,ue,ie,n):(ge=this.backendConnector)!=null&&ge.saveMissing&&this.backendConnector.saveMissing(re,c,ae,ue,ie,n),this.emit("missingKey",re,c,ae,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?ee.forEach(re=>{const ae=this.pluralResolver.getSuffixes(re,n);A&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&ae.push(`${this.options.pluralSeparator}zero`),ae.forEach(G=>{he([re],o+G,n[`defaultValue${G}`]||b)})}):he(ee,o,b))}p=this.extendTranslation(p,t,n,d,r),O&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${c}:${o}`),(O||k)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${o}`:o,k?p:void 0))}return s?(d.res=p,d.usedParams=this.getUsedParamsDetails(n),d):p}extendTranslation(t,n,r,s,i){var l,u;var o=this;if((l=this.i18nFormat)!=null&&l.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=F(t)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(d){const f=t.match(this.interpolator.nestingRegexp);p=f&&f.length}let h=r.replace&&!F(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||s.usedLng,r),d){const f=t.match(this.interpolator.nestingRegexp),m=f&&f.length;p<m&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];return(i==null?void 0:i[0])===m[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):o.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=F(a)?[a]:a;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=Il.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return F(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(c,n),u=l.key;s=u;let d=l.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const p=n.count!==void 0&&!F(n.count),h=p&&!n.ordinal&&n.count===0,f=n.context!==void 0&&(F(n.context)||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(g=>{var _,x;this.isValidLookup(r)||(a=g,!Tl[`${m[0]}-${g}`]&&((_=this.utils)!=null&&_.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(a))&&(Tl[`${m[0]}-${g}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(w=>{var A;if(this.isValidLookup(r))return;o=w;const C=[u];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(C,u,w,g,n);else{let b;p&&(b=this.pluralResolver.getSuffix(w,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(C.push(u+b),n.ordinal&&b.indexOf(T)===0&&C.push(u+b.replace(T,this.options.pluralSeparator)),h&&C.push(u+P)),f){const R=`${u}${this.options.contextSeparator}${n.context}`;C.push(R),p&&(C.push(R+b),n.ordinal&&b.indexOf(T)===0&&C.push(R+b.replace(T,this.options.pluralSeparator)),h&&C.push(R+P))}}let N;for(;N=C.pop();)this.isValidLookup(r)||(i=N,r=this.getResource(w,g,N,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!F(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class kl{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mt.create("languageUtils")}getScriptPartFromCode(t){if(t=os(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=os(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(F(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),F(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return F(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):F(t)&&i(this.formatLanguageCode(t)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Rl={zero:0,one:1,two:2,few:3,many:4,other:5},Pl={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=mt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=os(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Pl;if(!t.match(/-|_/))return Pl;const c=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(c,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Rl[s]-Rl[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const Ol=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=og(e,t,n);return!i&&s&&F(n)&&(i=Ei(e,n,r),i===void 0&&(i=Ei(t,n,r))),i},xi=e=>e.replace(/\$/g,"$$$$");class mg{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:c,formatSeparator:l,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:f,nestingSuffixEscaped:m,nestingOptionsSeparator:g,maxReplaces:_,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:cg,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?En(i):o||"{{",this.suffix=a?En(a):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?En(p):h||En("$t("),this.nestingSuffix=f?En(f):m||En(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=_||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){var h;let i,o,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=f=>{if(f.indexOf(this.formatSeparator)<0){const x=Ol(n,c,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...s,...n,interpolationkey:f}):x}const m=f.split(this.formatSeparator),g=m.shift().trim(),_=m.join(this.formatSeparator).trim();return this.format(Ol(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure),_,r,{...s,...n,interpolationkey:g})};this.resetRegExp();const u=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>xi(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?xi(this.escape(f)):xi(f)}].forEach(f=>{for(a=0;i=f.regex.exec(t);){const m=i[1].trim();if(o=l(m),o===void 0)if(typeof u=="function"){const _=u(t,i,s);o=F(_)?_:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))o="";else if(d){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),o="";else!F(o)&&!this.useRawValueToEscape&&(o=vl(o));const g=f.safeValue(o);if(t=t.replace(i[0],g),d?(f.regex.lastIndex+=o.length,f.regex.lastIndex-=i[0].length):f.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(c,l)=>{const u=this.nestingOptionsSeparator;if(c.indexOf(u)<0)return c;const d=c.split(new RegExp(`${u}[ ]*{`));let p=`{${d[1]}`;c=d[0],p=this.interpolate(p,o);const h=p.match(/'/g),f=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!f||f.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),l&&(o={...l,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,m),`${c}${u}${p}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(t);){let c=[];o={...r},o=o.replace&&!F(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const u=s[1].split(this.formatSeparator).map(d=>d.trim());s[1]=u.shift(),c=u,l=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===t&&!F(i))return i;F(i)||(i=vl(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),i=""),l&&(i=c.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),t=t.replace(s[0],i),this.regexp.lastIndex=0}return t}}const gg=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=l),l==="false"&&(n[u]=!1),l==="true"&&(n[u]=!0),isNaN(l)||(n[u]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},xn=e=>{const t={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=t[o];return a||(a=e(os(r),s),t[o]=a),a(n)}};class bg{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=mt.create("formatter"),this.options=t,this.formats={number:xn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:xn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:xn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:xn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:xn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=xn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,c)=>{var d;const{formatName:l,formatOptions:u}=gg(c);if(this.formats[l]){let p=a;try{const h=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},f=h.locale||h.lng||s.locale||s.lng||r;p=this.formats[l](a,f,{...u,...s,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${l}`);return a},t)}}const yg=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class wg extends cs{constructor(t,n,r){var i,o;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=mt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(t,n,r,s){const i={},o={},a={},c={};return t.forEach(l=>{let u=!0;n.forEach(d=>{const p=`${l}|${d}`;!r.reload&&this.store.hasResourceBundle(l,d)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,u=!1,o[p]===void 0&&(o[p]=!0),i[p]===void 0&&(i[p]=!0),c[d]===void 0&&(c[d]=!0)))}),u||(a[l]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const s=t.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),!n&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{ig(c.loaded,[i],o),yg(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{a[l]||(a[l]={});const u=c.loaded[l];u.length&&u.forEach(d=>{a[l][d]===void 0&&(a[l][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(l,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(l&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,s+1,i*2,o)},i);return}o(l,u)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const l=c(t,n);l&&typeof l.then=="function"?l.then(u=>a(null,u)).catch(a):a(null,l)}catch(l){a(l)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();F(t)&&(t=this.languageUtils.toResolveHierarchy(t)),F(n)&&(n=[n]);const i=this.queueLoad(t,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(t,o,a)})}saveMissing(t,n,r,s,i){var c,l,u,d,p;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((p=this.backend)!=null&&p.create){const h={...o,isUpdate:i},f=this.backend.create.bind(this.backend);if(f.length<6)try{let m;f.length===5?m=f(t,n,r,s,h):m=f(t,n,r,s),m&&typeof m.then=="function"?m.then(g=>a(null,g)).catch(a):a(null,m)}catch(m){a(m)}else f(t,n,r,s,a,h)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const Ll=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),F(e[1])&&(t.defaultValue=e[1]),F(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Nl=e=>{var t,n;return F(e.ns)&&(e.ns=[e.ns]),F(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),F(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},us=()=>{},vg=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class pr extends cs{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Nl(t),this.services={},this.logger=mt,this.modules={external:[]},vg(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(F(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=Ll();this.options={...s,...this.options,...Nl(n)},this.options.interpolation={...s.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mt.init(i(this.modules.logger),this.options):mt.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=bg;const d=new kl(this.options);this.store=new xl(this.options.resources,this.options);const p=this.services;p.logger=mt,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new hg(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=i(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new mg(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new wg(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(h){for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];t.emit(h,...m)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ls(this.services,this.options),this.translator.on("*",function(h){for(var f=arguments.length,m=new Array(f>1?f-1:0),g=1;g<f;g++)m[g-1]=arguments[g];t.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=us),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const c=ur(),l=()=>{const u=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(p),r(d,p)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),c}loadResources(t){var i,o;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:us;const s=F(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>c(u)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,l=>c(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=ur();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=us),this.services.backendConnector.reload(t,n,i=>{s.resolve(),r(i)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Il.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=ur();this.emit("languageChanging",t);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},o=(c,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{var u,d;!t&&!c&&this.services.languageDetector&&(c=[]);const l=F(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,l)),this.loadResources(l,p=>{o(p,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),s}getFixedT(t,n,r){var s=this;const i=function(o,a){let c;if(typeof a!="object"){for(var l=arguments.length,u=new Array(l>2?l-2:0),d=2;d<l;d++)u[d-2]=arguments[d];c=s.options.overloadTranslationOptionHandler([o,a].concat(u))}else c={...a};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||i.keyPrefix);const p=s.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(o)?h=o.map(f=>`${c.keyPrefix}${p}${f}`):h=c.keyPrefix?`${c.keyPrefix}${p}${o}`:o,s.t(h,c)};return F(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){var s;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...n)}exists(){var s;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,c)=>{const l=this.services.backendConnector.state[`${a}|${c}`];return l===-1||l===0||l===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}loadNamespaces(t,n){const r=ur();return this.options.ns?(F(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ur();F(t)&&(t=[t]);const s=this.options.preload||[],i=t.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(t){var s,i;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new kl(Ll());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new pr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:us;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},i=new pr(s);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},Object.keys(c[l]).reduce((u,d)=>(u[d]={...c[l][d]},u),{})),{});i.store=new xl(a,s),i.services.resourceStore=i.store}return i.translator=new ls(i.services,s),i.translator.on("*",function(a){for(var c=arguments.length,l=new Array(c>1?c-1:0),u=1;u<c;u++)l[u-1]=arguments[u];i.emit(a,...l)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const be=pr.createInstance();be.createInstance=pr.createInstance,be.createInstance,be.dir,be.init,be.loadResources,be.reloadResources,be.use,be.changeLanguage,be.getFixedT,be.t,be.exists,be.setDefaultNamespace,be.hasLoadedNamespace,be.loadNamespaces,be.loadLanguages;const Sg={en:{translation:{additional_information:"Additional information",almost_done:"Almost done...",astro_express_checkout:"Express checkout",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",push_notification_sent:"We sent a push notification to your app",qr_code:"QR code",required_field:"Required Field",scan_qr_copy_link:"Scan the QR code or copy the link.",select:"Select",select_item:"Select an item",time_up:"Time's up!",try_again:"Try again",waiting_confirmation:"Waiting for confirmation...",card_holder_label:"Cardholder name",card_holder_placeholder:"Full name as on card",card_number:"Card number",card_exp_date:"Expiration date",card_tokenization_error:"We couldn't process your card. Please check your details and try again."}},es:{translation:{additional_information:"Información adicional",almost_done:"Casi listo...",astro_express_checkout:"Pago express",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",push_notification_sent:"Enviamos una notificación push a tu app",qr_code:"código QR",required_field:"Campo Requerido",scan_qr_copy_link:"Escaneá el código QR o copiá el enlace.",select:"Seleccionar",select_item:"Selecciona una opción",time_up:"Se acabó el tiempo!",try_again:"Inténtalo de nuevo",waiting_confirmation:"Esperando confirmación...",card_holder_label:"Nombre del titular",card_holder_placeholder:"Nombre completo en la tarjeta",card_number:"Número de tarjeta",card_exp_date:"Fecha de vencimiento",card_tokenization_error:"No pudimos procesar tu tarjeta. Verificá los datos y volvé a intentarlo."}},pt:{translation:{additional_information:"Informações adicionais",almost_done:"Finalizando...",astro_express_checkout:"Pagamento expresso",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",push_notification_sent:"Enviamos uma notificação push para seu app",qr_code:"QR code",required_field:"Campo Obrigatório",scan_qr_copy_link:"Escaneie o QR code ou copie o link.",select:"Selecione",select_item:"Selecione um item",time_up:"Tempo esgotado!",try_again:"Tente novamente",waiting_confirmation:"Aguardando confirmação...",card_holder_label:"Nome do titular",card_holder_placeholder:"Nome completo no cartão",card_number:"Número do cartão",card_exp_date:"Data de validade",card_tokenization_error:"Não foi possível processar o seu cartão. Verifique os dados e tente novamente."}}};class V{static init(t){const n=Gr(t==null?void 0:t.language,Qh,"en");return be.init({lng:n,fallbackLng:"en",resources:Sg,interpolation:{escapeValue:!1}})}static getCurrent(){return be.language}static translate(t,n){return be.t(t,n??{})}}const _g=()=>j`
|
|
63
|
+
`};class X extends we{constructor({text:t,variant:n="span",weight:r=500,size:i="small",lineHeight:o,align:s="left",color:a,uppercase:c=!1}){const u={size:i,weight:r,lineHeight:o,align:s,color:a,uppercase:c};super({tag:n,styles:l=>Xy(l,u)}),this.element.textContent=t}}const q=e=>typeof e=="string",ri=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Yd=e=>e==null?"":""+e,Qy=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},eb=/###/g,Zd=e=>e&&e.indexOf("###")>-1?e.replace(eb,"."):e,Jd=e=>!e||q(e),ii=(e,t,n)=>{const r=q(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Jd(e))return{};const o=Zd(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Jd(e)?{}:{obj:e,k:Zd(r[i])}},Xd=(e,t,n)=>{const{obj:r,k:i}=ii(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=ii(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=ii(e,s,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},tb=(e,t,n,r)=>{const{obj:i,k:o}=ii(e,t,Object);i[o]=i[o]||[],i[o].push(n)},bo=(e,t)=>{const{obj:n,k:r}=ii(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},nb=(e,t,n)=>{const r=bo(e,n);return r!==void 0?r:bo(t,n)},Qd=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?q(e[r])||e[r]instanceof String||q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Qd(e[r],t[r],n):e[r]=t[r]);return e},dr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rb={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ib=e=>q(e)?e.replace(/[&<>"'\/]/g,t=>rb[t]):e;class ob{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const sb=[" ",",","?","!",";"],ab=new ob(20),cb=(e,t,n)=>{t=t||"",n=n||"";const r=sb.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=ab.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},ca=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,a="";for(let c=o;c<r.length;++c)if(c!==o&&(a+=n),a+=r[c],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&c<r.length-1)continue;o+=c-o+1;break}i=s}return i},wo=e=>e==null?void 0:e.replace("_","-"),ub={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};let lb=class xd{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ub,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(q(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new xd(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new xd(this.logger,t)}};var qt=new lb;class Eo{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,c]=s;for(let u=0;u<c;u++)a.apply(a,[t,...r])})}}class ef extends Eo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var u,l;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):q(r)&&o?a.push(...r.split(o)):a.push(r)));const c=bo(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!s||!q(r)?c:ca((l=(u=this.data)==null?void 0:u[t])==null?void 0:l[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Xd(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(q(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let c=bo(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Qd(c,r,o):c={...c,...r},Xd(this.data,a,c),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var tf={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{var s;t=((s=this.processors[o])==null?void 0:s.process(t,n,r,i))??t}),t}};const nf={},rf=e=>!q(e)&&typeof e!="boolean"&&typeof e!="number";class So extends Eo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Qy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cb(t,r,i);if(s&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:q(o)?[o]:o};const u=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(i)}return{key:t,namespaces:q(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),c=a[a.length-1],u=n.lng||this.language,l=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(l){const A=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${A}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${A}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(t,n);let f=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||s,p=(d==null?void 0:d.exactUsedKey)||s,g=["[object Number]","[object Function]","[object RegExp]"],m=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=n.count!==void 0&&!q(n.count),b=So.hasDefaultValue(n),w=y?this.pluralResolver.getSuffix(u,n.count,n):"",C=n.ordinal&&y?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",_=y&&!n.ordinal&&n.count===0,E=_&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${w}`]||n[`defaultValue${C}`]||n.defaultValue;let P=f;v&&!f&&b&&(P=E);const T=rf(P),I=Object.prototype.toString.apply(P);if(v&&P&&T&&g.indexOf(I)<0&&!(q(m)&&Array.isArray(P))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,P,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(d.res=A,d.usedParams=this.getUsedParamsDetails(n),d):A}if(o){const A=Array.isArray(P),O=A?[]:{},D=A?p:h;for(const F in P)if(Object.prototype.hasOwnProperty.call(P,F)){const V=`${D}${o}${F}`;b&&!f?O[F]=this.translate(V,{...n,defaultValue:rf(E)?E[F]:void 0,joinArrays:!1,ns:a}):O[F]=this.translate(V,{...n,joinArrays:!1,ns:a}),O[F]===V&&(O[F]=P[F])}f=O}}else if(v&&q(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let A=!1,O=!1;!this.isValidLookup(f)&&b&&(A=!0,f=E),this.isValidLookup(f)||(O=!0,f=s);const F=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:f,V=b&&E!==f&&this.options.updateMissing;if(O||A||V){if(this.logger.log(V?"updateKey":"missingKey",u,c,s,V?E:f),o){const J=this.resolve(s,{...n,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let z=[];const be=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&be&&be[0])for(let J=0;J<be.length;J++)z.push(be[J]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(n.lng||this.language):z.push(n.lng||this.language);const oe=(J,re,G)=>{var te;const ue=b&&G!==f?G:F;this.options.missingKeyHandler?this.options.missingKeyHandler(J,c,re,ue,V,n):(te=this.backendConnector)!=null&&te.saveMissing&&this.backendConnector.saveMissing(J,c,re,ue,V,n),this.emit("missingKey",J,c,re,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?z.forEach(J=>{const re=this.pluralResolver.getSuffixes(J,n);_&&n[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(G=>{oe([J],s+G,n[`defaultValue${G}`]||E)})}):oe(z,s,E))}f=this.extendTranslation(f,t,n,d,r),O&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${s}`),(O||A)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,A?f:void 0))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,i,o){var u,l;var s=this;if((u=this.i18nFormat)!=null&&u.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=q(t)&&(((l=r==null?void 0:r.interpolation)==null?void 0:l.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const p=t.match(this.interpolator.nestingRegexp);f=p&&p.length}let h=r.replace&&!q(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,r.lng||this.language||i.usedLng,r),d){const p=t.match(this.interpolator.nestingRegexp),g=p&&p.length;f<g&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];return(o==null?void 0:o[0])===g[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):s.translate(...g,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,c=q(a)?[a]:a;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=tf.handle(c,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return q(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),l=u.key;i=l;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!q(n.count),h=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(q(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(m=>{var v,y;this.isValidLookup(r)||(a=m,!nf[`${g[0]}-${m}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(nf[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(b=>{var _;if(this.isValidLookup(r))return;s=b;const w=[l];if((_=this.i18nFormat)!=null&&_.addLookupKeys)this.i18nFormat.addLookupKeys(w,l,b,m,n);else{let E;f&&(E=this.pluralResolver.getSuffix(b,n.count,n));const P=`${this.options.pluralSeparator}zero`,T=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(l+E),n.ordinal&&E.indexOf(T)===0&&w.push(l+E.replace(T,this.options.pluralSeparator)),h&&w.push(l+P)),p){const I=`${l}${this.options.contextSeparator}${n.context}`;w.push(I),f&&(w.push(I+E),n.ordinal&&E.indexOf(T)===0&&w.push(I+E.replace(T,this.options.pluralSeparator)),h&&w.push(I+P))}}let C;for(;C=w.pop();)this.isValidLookup(r)||(o=C,r=this.getResource(b,m,C,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var o;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!q(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class of{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qt.create("languageUtils")}getScriptPartFromCode(t){if(t=wo(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=wo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(q(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),q(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return q(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):q(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const sf={zero:0,one:1,two:2,few:3,many:4,other:5},af={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class db{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=qt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=wo(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),af;if(!t.match(/-|_/))return af;const c=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(c,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>sf[i]-sf[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const cf=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=nb(e,t,n);return!o&&i&&q(n)&&(o=ca(e,n,r),o===void 0&&(o=ca(t,n,r))),o},ua=e=>e.replace(/\$/g,"$$$$");class fb{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:c,formatSeparator:u,unescapeSuffix:l,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:v,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:ib,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?dr(o):s||"{{",this.suffix=a?dr(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?dr(f):h||dr("$t("),this.nestingSuffix=p?dr(p):g||dr(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){var h;let o,s,a;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const y=cf(n,c,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,r,{...i,...n,interpolationkey:p}):y}const g=p.split(this.formatSeparator),m=g.shift().trim(),v=g.join(this.formatSeparator).trim();return this.format(cf(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...i,...n,interpolationkey:m})};this.resetRegExp();const l=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>ua(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?ua(this.escape(p)):ua(p)}].forEach(p=>{for(a=0;o=p.regex.exec(t);){const g=o[1].trim();if(s=u(g),s===void 0)if(typeof l=="function"){const v=l(t,o,i);s=q(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,g))s="";else if(d){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),s="";else!q(s)&&!this.useRawValueToEscape&&(s=Yd(s));const m=p.safeValue(s);if(t=t.replace(o[0],m),d?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(c,u)=>{const l=this.nestingOptionsSeparator;if(c.indexOf(l)<0)return c;const d=c.split(new RegExp(`${l}[ ]*{`));let f=`{${d[1]}`;c=d[0],f=this.interpolate(f,s);const h=f.match(/'/g),p=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${l}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c};for(;i=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&!q(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const l=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=l.shift(),c=l,u=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&!q(o))return o;q(o)||(o=Yd(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),u&&(o=c.reduce((l,d)=>this.format(l,d,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const pb=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...c]=s.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),l=a.trim();n[l]||(n[l]=u),u==="false"&&(n[l]=!1),u==="true"&&(n[l]=!0),isNaN(u)||(n[l]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},fr=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(wo(r),i),t[s]=a),a(n)}};class hb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("formatter"),this.options=t,this.formats={number:fr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:fr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:fr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:fr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:fr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=fr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,c)=>{var d;const{formatName:u,formatOptions:l}=pb(c);if(this.formats[u]){let f=a;try{const h=((d=i==null?void 0:i.formatParams)==null?void 0:d[i.interpolationkey])||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[u](a,p,{...l,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return a},t)}}const gb=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class mb extends Eo{constructor(t,n,r){var o,s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=qt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},c={};return t.forEach(u=>{let l=!0;n.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,l=!1,s[f]===void 0&&(s[f]=!0),o[f]===void 0&&(o[f]=!0),c[d]===void 0&&(c[d]=!0)))}),l||(a[u]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(c=>{tb(c.loaded,[o],s),gb(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{a[u]||(a[u]={});const l=c.loaded[u];l.length&&l.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(u,l)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&l&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(u,l)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(l=>a(null,l)).catch(a):a(null,u)}catch(u){a(u)}return}return c(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();q(t)&&(t=this.languageUtils.toResolveHierarchy(t)),q(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){var c,u,l,d,f;let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((d=(l=this.services)==null?void 0:l.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...s,isUpdate:o},p=this.backend.create.bind(this.backend);if(p.length<6)try{let g;p.length===5?g=p(t,n,r,i,h):g=p(t,n,r,i),g&&typeof g.then=="function"?g.then(m=>a(null,m)).catch(a):a(null,g)}catch(g){a(g)}else p(t,n,r,i,a,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const uf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),q(e[1])&&(t.defaultValue=e[1]),q(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),lf=e=>{var t,n;return q(e.ns)&&(e.ns=[e.ns]),q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),q(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},_o=()=>{},vb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class oi extends Eo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=lf(t),this.services={},this.logger=qt,this.modules={external:[]},vb(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(q(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=uf();this.options={...i,...this.options,...lf(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?qt.init(o(this.modules.logger),this.options):qt.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=hb;const d=new of(this.options);this.store=new ef(this.options.resources,this.options);const f=this.services;f.logger=qt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new db(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=o(l),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new fb(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new mb(o(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),m=1;m<p;m++)g[m-1]=arguments[m];t.emit(h,...g)}),this.modules.languageDetector&&(f.languageDetector=o(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=o(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new So(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),m=1;m<p;m++)g[m-1]=arguments[m];t.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=_o),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return t.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return t.store[l](...arguments),t}});const c=ri(),u=()=>{const l=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),c}loadResources(t){var o,s;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o;const i=q(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&a.indexOf(d)<0&&a.push(d)})};i?c(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>c(l)),(s=(o=this.options.preload)==null?void 0:o.forEach)==null||s.call(o,u=>c(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=ri();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=_o),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&tf.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=ri();this.emit("languageChanging",t);const o=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},s=(c,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},a=c=>{var l,d;!t&&!c&&this.services.languageDetector&&(c=[]);const u=q(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),(d=(l=this.services.languageDetector)==null?void 0:l.cacheUserLanguage)==null||d.call(l,u)),this.loadResources(u,f=>{s(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let c;if(typeof a!="object"){for(var u=arguments.length,l=new Array(u>2?u-2:0),d=2;d<u;d++)l[d-2]=arguments[d];c=i.options.overloadTranslationOptionHandler([s,a].concat(l))}else c={...a};c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||r||o.keyPrefix);const f=i.options.keySeparator||".";let h;return c.keyPrefix&&Array.isArray(s)?h=s.map(p=>`${c.keyPrefix}${f}${p}`):h=c.keyPrefix?`${c.keyPrefix}${f}${s}`:s,i.t(h,c)};return q(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){var i;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(i=this.translator)==null?void 0:i.translate(...n)}exists(){var i;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(i=this.translator)==null?void 0:i.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,c)=>{const u=this.services.backendConnector.state[`${a}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=ri();return this.options.ns?(q(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=ri();q(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){var i,o;if(t||(t=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((o=this.services)==null?void 0:o.languageUtils)||new of(uf());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new oi(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_o;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new oi(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const a=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},Object.keys(c[u]).reduce((l,d)=>(l[d]={...c[u][d]},l),{})),{});o.store=new ef(a,i),o.services.resourceStore=o.store}return o.translator=new So(o.services,i),o.translator.on("*",function(a){for(var c=arguments.length,u=new Array(c>1?c-1:0),l=1;l<c;l++)u[l-1]=arguments[l];o.emit(a,...u)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Fe=oi.createInstance();Fe.createInstance=oi.createInstance,Fe.createInstance,Fe.dir,Fe.init,Fe.loadResources,Fe.reloadResources,Fe.use,Fe.changeLanguage,Fe.getFixedT,Fe.t,Fe.exists,Fe.setDefaultNamespace,Fe.hasLoadedNamespace,Fe.loadNamespaces,Fe.loadLanguages;const yb={en:{translation:{additional_information:"Additional information",almost_done:"Almost done...",astro_express_checkout:"Express checkout",checkout_method:"Checkout method",or:"OR",email:"E-mail",enter_country_code:"Please enter a country or code",enter_your_email:"Enter your e-mail",enter_your_document_number:"Enter your document number",enter_your_document_type:"Select a document type",enter_your_first_name:"Enter your first name",enter_your_last_name:"Enter your last name",enter_your_phone:"Enter your phone number",continue:"Continue",copied:"Copied!",copy_payment_link:"Copy payment link",document_number:"Document number",document_type:"Document type",do_not_close_window:"Please do not close this window.",didnt_receive:"Didn't receive it?",first_name:"First name",generic_error:"An error occurred. Please try again.",hold_on:"Hold on!",invalid_field:"Invalid field",last_name:"Last name",loading_wait:"Loading, please wait...",pay_amount:"Pay {{amount}}",payment_amount:"Payment amount",push_notification_sent:"We sent a push notification to your app",qr_code:"QR code",required_field:"Required Field",scan_qr_copy_link:"Scan the QR code or copy the link.",select:"Select",select_item:"Select an item",time_up:"Time's up!",try_again:"Try again",waiting_confirmation:"Waiting for confirmation...",card_holder_label:"Cardholder name",card_holder_placeholder:"Full name as on card",card_number:"Card number",card_exp_date:"Expiration date",card_tokenization_error:"We couldn't process your card. Please check your details and try again."}},es:{translation:{additional_information:"Información adicional",almost_done:"Casi listo...",astro_express_checkout:"Pago express",checkout_method:"Método de pago",or:"O",email:"Correo electrónico",enter_country_code:"Introduce el país o código del país",enter_your_email:"Ingrese su correo electrónico",enter_your_document_number:"Ingrese su número de documento",enter_your_document_type:"Seleccione un tipo de documento",enter_your_first_name:"Ingrese su nombre",enter_your_last_name:"Ingrese su apellido",enter_your_phone:"Introduzca su número de teléfono",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar enlace de pago",document_number:"Número de documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, no cierres esta ventana.",didnt_receive:"No lo recibiste?",first_name:"Nombre",generic_error:"Ocurrió un error. Por favor, inténtelo de nuevo.",hold_on:"¡Un instante...!",invalid_field:"Campo inválido",last_name:"Apellido",loading_wait:"Cargando, aguantá un toque...",pay_amount:"Pagar {{amount}}",payment_amount:"Monto a pagar",push_notification_sent:"Enviamos una notificación push a tu app",qr_code:"código QR",required_field:"Campo Requerido",scan_qr_copy_link:"Escaneá el código QR o copiá el enlace.",select:"Seleccionar",select_item:"Selecciona una opción",time_up:"Se acabó el tiempo!",try_again:"Inténtalo de nuevo",waiting_confirmation:"Esperando confirmación...",card_holder_label:"Nombre del titular",card_holder_placeholder:"Nombre completo en la tarjeta",card_number:"Número de tarjeta",card_exp_date:"Fecha de vencimiento",card_tokenization_error:"No pudimos procesar tu tarjeta. Verificá los datos y volvé a intentarlo."}},pt:{translation:{additional_information:"Informações adicionais",almost_done:"Finalizando...",astro_express_checkout:"Pagamento expresso",checkout_method:"Método de pagamento",or:"OU",email:"E-mail",enter_country_code:"Informe um país ou código",enter_your_email:"Digite seu e-mail",enter_your_document_number:"Digite seu número de documento",enter_your_document_type:"Selecione um tipo de documento",enter_your_first_name:"Digite seu primeiro nome",enter_your_last_name:"Digite seu sobrenome",enter_your_phone:"Digite seu número de telefone",continue:"Continuar",copied:"Copiado!",copy_payment_link:"Copiar link de pagamento",document_number:"Número do documento",document_type:"Tipo de documento",do_not_close_window:"Por favor, não feche esta janela.",didnt_receive:"Não recebeu?",first_name:"Primeiro nome",generic_error:"Ocorreu um erro. Por favor, tente novamente.",hold_on:"Só um instante!",invalid_field:"Campo inválido",last_name:"Sobrenome",loading_wait:"Carregando, por favor aguarde...",pay_amount:"Pagar {{amount}}",payment_amount:"Valor do pagamento",push_notification_sent:"Enviamos uma notificação push para seu app",qr_code:"QR code",required_field:"Campo Obrigatório",scan_qr_copy_link:"Escaneie o QR code ou copie o link.",select:"Selecione",select_item:"Selecione um item",time_up:"Tempo esgotado!",try_again:"Tente novamente",waiting_confirmation:"Aguardando confirmação...",card_holder_label:"Nome do titular",card_holder_placeholder:"Nome completo no cartão",card_number:"Número do cartão",card_exp_date:"Data de validade",card_tokenization_error:"Não foi possível processar o seu cartão. Verifique os dados e tente novamente."}}};class W{static init(t){const n=so(t==null?void 0:t.language,G1,"en");return Fe.init({lng:n,fallbackLng:"en",resources:yb,interpolation:{escapeValue:!1}})}static getCurrent(){return Fe.language}static translate(t,n){return Fe.t(t,n??{})}}const bb=()=>ne`
|
|
63
64
|
display: flex;
|
|
64
65
|
align-items: center;
|
|
65
66
|
justify-content: center;
|
|
66
67
|
gap: 8px;
|
|
67
|
-
`;class Ii extends se{constructor({text:t,delay:n,onSuccess:r}){super({tag:"div",styles:()=>_g()});const s=new It({size:12,color:z.getStyles().textPrimaryColor}).element,i=new H({text:t??V.translate("almost_done"),size:12}).element;this.element.append(s,i),setTimeout(()=>{r(),this.element.remove()},n??5e3)}}const Cg={astropay_logo:{svg:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Logo"><path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M15.166 10.7383C16.0308 10.7383 16.8793 10.8059 17.7074 10.9372L19.7866 16.0843C18.3684 15.4763 16.8067 15.1396 15.166 15.1396C11.4591 15.1396 8.154 16.8578 6.00304 19.541H0.786621C3.45841 14.3156 8.8949 10.7383 15.166 10.7383Z" fill="#143534"/><path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M13.3258 0.101402L17.0783 9.37359C16.4499 9.30594 15.8109 9.27089 15.1645 9.27089C14.2199 9.27089 13.2932 9.34506 12.3884 9.48851L10.9588 5.95031L9.19826 10.3068C6.78974 11.1741 4.62493 12.5515 2.83423 14.3088L8.57474 0.100586H13.3258V0.101402Z" fill="#151E1D"/></g></svg>'},alert_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 8C12.5523 8 13 8.44772 13 9V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V9C11 8.44772 11.4477 8 12 8Z" fill="currentColor"/><path d="M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7009 3.14771C11.2783 2.14771 12.7217 2.1477 13.299 3.1477L21.933 18.1022C22.5103 19.1022 21.7887 20.3522 20.634 20.3522H3.36601C2.21131 20.3522 1.48962 19.1022 2.06697 18.1022L10.7009 3.14771ZM12 4.8977L4.23203 18.3522H19.7679L12 4.8977Z" fill="currentColor"/></svg>'},arrow_right_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0626 5.63603L20.7194 11.2929C21.1099 11.6834 21.1099 12.3166 20.7194 12.7071L15.0626 18.364C14.672 18.7545 14.0389 18.7545 13.6483 18.364C13.2578 17.9734 13.2578 17.3403 13.6483 16.9497L17.5981 13H4.35547C3.80318 13 3.35547 12.5523 3.35547 12C3.35547 11.4477 3.80318 11 4.35547 11H17.5981L13.6483 7.05025C13.2578 6.65972 13.2578 6.02656 13.6483 5.63603C14.0389 5.24551 14.672 5.24551 15.0626 5.63603Z" fill="currentColor"/></svg>'},arrow_down_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.0626 15.7071C12.6721 16.0976 12.0389 16.0976 11.6484 15.7071L5.99151 10.0502C5.60098 9.6597 5.60098 9.02653 5.99151 8.63601C6.38203 8.24549 7.0152 8.24549 7.40572 8.63601L12.3555 13.5858L17.3052 8.63601C17.6957 8.24549 18.3289 8.24549 18.7194 8.63601C19.11 9.02653 19.11 9.6597 18.7194 10.0502L13.0626 15.7071Z" fill="currentColor"/></svg>'},bank_card_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.3555 13C13.8032 13 13.3555 13.4477 13.3555 14C13.3555 14.5523 13.8032 15 14.3555 15H17.3555C17.9078 15 18.3555 14.5523 18.3555 14C18.3555 13.4477 17.9078 13 17.3555 13H14.3555Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.35547 7C2.35547 5.34315 3.69861 4 5.35547 4H19.3555C21.0123 4 22.3555 5.34315 22.3555 7V17C22.3555 18.6569 21.0123 20 19.3555 20H5.35547C3.69861 20 2.35547 18.6569 2.35547 17V7ZM5.35547 6C4.80318 6 4.35547 6.44772 4.35547 7V8H20.3555V7C20.3555 6.44772 19.9078 6 19.3555 6H5.35547ZM4.35547 17V10H20.3555V17C20.3555 17.5523 19.9078 18 19.3555 18H5.35547C4.80318 18 4.35547 17.5523 4.35547 17Z" fill="currentColor"/></svg>'},check_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.9496 9.79545C17.3401 9.40493 17.3401 8.77176 16.9496 8.38124C16.5591 7.99071 15.9259 7.99071 15.5354 8.38124L10.5856 13.331L8.46431 11.2097C8.07379 10.8191 7.44063 10.8191 7.0501 11.2097C6.65958 11.6002 6.65958 12.2334 7.0501 12.6239L9.80782 15.3816C10.2374 15.8112 10.9339 15.8112 11.3635 15.3816L16.9496 9.79545Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z" fill="currentColor"/></svg>'},close_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.46452 8.46443C8.85505 8.07391 9.48821 8.07391 9.87874 8.46443L12 10.5857L14.1213 8.46441C14.5118 8.07388 15.145 8.07388 15.5355 8.46441C15.926 8.85493 15.926 9.4881 15.5355 9.87862L13.4142 11.9999L15.5356 14.1213C15.9261 14.5118 15.9261 15.145 15.5356 15.5355C15.1451 15.926 14.5119 15.926 14.1214 15.5355L12 13.4141L9.87864 15.5355C9.48812 15.926 8.85496 15.926 8.46443 15.5355C8.07391 15.145 8.07391 14.5118 8.46443 14.1213L10.5858 11.9999L8.46452 9.87864C8.074 9.48812 8.074 8.85496 8.46452 8.46443Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" fill="currentColor"/></svg>'},copy_2_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.3555 2C20.46 2 21.3555 2.89543 21.3555 4V16C21.3555 17.1046 20.46 18 19.3555 18H17.3555V20C17.3555 21.1046 16.46 22 15.3555 22H5.35547C4.2509 22 3.35547 21.1046 3.35547 20V8C3.35547 6.89543 4.2509 6 5.35547 6H7.35547V4C7.35547 2.89543 8.2509 2 9.35547 2H19.3555ZM9.35547 6H15.3555C16.46 6 17.3555 6.89543 17.3555 8V16H19.3555V4L9.35547 4V6ZM5.35547 8L15.3555 8V20H5.35547V8Z" fill="currentColor"/></svg>'},lock_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C11.4477 12 11 12.4477 11 13V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V13C13 12.4477 12.5523 12 12 12Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 8C6 4.68629 8.68629 2 12 2C15.3137 2 18 4.68629 18 8H19C20.1046 8 21 8.89543 21 10V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V10C3 8.89543 3.89543 8 5 8H6ZM12 4C14.2091 4 16 5.79086 16 8H8C8 5.79086 9.79086 4 12 4ZM5 10H19V20H5V10Z" fill="currentColor"/></svg>'},notification_fill:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.9998 19C15 19.5046 14.8094 19.9906 14.4664 20.3605C14.1233 20.7305 13.653 20.9572 13.1498 20.995L12.9998 21H10.9998C10.4953 21.0002 10.0093 20.8096 9.6393 20.4665C9.26932 20.1234 9.04269 19.6532 9.00485 19.15L8.99985 19H14.9998ZM11.9998 2C13.8148 1.99997 15.5589 2.70489 16.8641 3.96607C18.1693 5.22726 18.9336 6.94609 18.9958 8.76L18.9998 9V12.764L20.8218 16.408C20.9014 16.567 20.9412 16.7429 20.9378 16.9206C20.9345 17.0984 20.8881 17.2727 20.8027 17.4286C20.7173 17.5845 20.5953 17.7174 20.4473 17.8158C20.2993 17.9143 20.1297 17.9754 19.9528 17.994L19.8378 18H4.16185C3.98401 18.0001 3.80882 17.957 3.65127 17.8745C3.49372 17.792 3.35853 17.6725 3.25727 17.5264C3.156 17.3802 3.0917 17.2116 3.06985 17.0351C3.04801 16.8586 3.06928 16.6795 3.13185 16.513L3.17785 16.408L4.99985 12.764V9C4.99985 7.14348 5.73735 5.36301 7.0501 4.05025C8.36286 2.7375 10.1433 2 11.9998 2Z" fill="currentColor"/></svg>'},pay_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.2473 1.60389C23.2424 1.36545 23.143 1.13872 22.9709 0.973519C22.7989 0.808319 22.5684 0.718154 22.3299 0.722829L17.5303 0.818649C17.2916 0.823478 17.0646 0.922941 16.8992 1.09516C16.7338 1.26738 16.6436 1.49824 16.6484 1.73696C16.6532 1.97568 16.7527 2.20271 16.9249 2.3681C17.0971 2.53349 17.328 2.62369 17.5667 2.61886L20.1937 2.56614L16.7022 6.25555C16.5369 6.42771 16.4467 6.6585 16.4515 6.89714C16.4564 7.13579 16.5558 7.36274 16.728 7.52808C16.9001 7.69341 17.1309 7.78358 17.3696 7.77876C17.6082 7.77393 17.8352 7.6745 18.0005 7.50234L21.4919 3.81293L21.5451 6.43944C21.5475 6.55764 21.5731 6.67421 21.6206 6.7825C21.668 6.89079 21.7363 6.98868 21.8216 7.07057C21.9069 7.15246 22.0074 7.21676 22.1175 7.25978C22.2277 7.30281 22.3452 7.32372 22.4634 7.32133C22.5816 7.31894 22.6982 7.29329 22.8064 7.24585C22.9147 7.1984 23.0126 7.1301 23.0945 7.04482C23.1764 6.95955 23.2407 6.85898 23.2837 6.74886C23.3268 6.63874 23.3477 6.52122 23.3453 6.40302L23.2473 1.60389Z" fill="currentColor"/><path d="M13.9007 5.74528C13.0603 5.88939 12.6821 6.04597 11.807 6.43486C8.461 7.92184 5.74102 7.59582 4 7.26583V18.2248C5.39102 18.5318 8.50887 18.9511 11.5938 17.5812C14.9397 16.0942 18.259 16.3958 20 16.7258V10.4956C20 10.4956 20 9.49596 21 9.49596C22 9.49596 22 10.4956 22 10.4956V17.301C22 18.3278 21.0243 19.0019 20.1064 18.7902C18.7765 18.4822 15.5732 18.0015 12.4062 19.4094C8.68025 21.0654 4.98673 20.5026 3.46973 20.1546C2.55195 19.9445 2.0001 19.1245 2 18.2746V6.68965C2 5.66281 2.97468 4.9877 3.89355 5.2004C5.22353 5.50839 7.8275 6.01465 10.9945 4.60674C12.1546 4.09113 12.8117 3.87593 13.9007 3.71696C13.9007 3.71696 14.777 3.60629 14.9007 4.60661C15.0244 5.60692 13.9007 5.74528 13.9007 5.74528Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.49564C13.933 8.49564 15.5 10.0626 15.5 11.9956C15.5 13.9286 13.933 15.4956 12 15.4956C10.067 15.4956 8.5 13.9286 8.5 11.9956C8.5 10.0626 10.067 8.49564 12 8.49564ZM12 10.2456C11.0335 10.2456 10.25 11.0291 10.25 11.9956C10.25 12.9621 11.0335 13.7456 12 13.7456C12.9665 13.7456 13.75 12.9621 13.75 11.9956C13.75 11.0291 12.9665 10.2456 12 10.2456Z" fill="currentColor"/></svg>'},payment_master:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 7.2832H9.75V16.7176H15V7.2832Z" fill="#FF5F00"/><path d="M10.0842 12C10.0833 11.0914 10.2892 10.1945 10.6862 9.37725C11.0833 8.55999 11.661 7.84377 12.3758 7.2828C11.4907 6.58708 10.4277 6.15441 9.30827 6.03427C8.18888 5.91412 7.05827 6.11134 6.04566 6.60338C5.03305 7.09542 4.17931 7.86244 3.58201 8.81675C2.98471 9.77107 2.66797 10.8742 2.66797 12C2.66797 13.1258 2.98471 14.2289 3.58201 15.1832C4.17931 16.1376 5.03305 16.9046 6.04566 17.3966C7.05827 17.8887 8.18888 18.0859 9.30827 17.9657C10.4277 17.8456 11.4907 17.4129 12.3758 16.7172C11.661 16.1562 11.0833 15.44 10.6863 14.6227C10.2892 13.8055 10.0833 12.9086 10.0842 12Z" fill="#EB001B"/><path d="M22.0825 12C22.0826 13.1258 21.7659 14.2289 21.1686 15.1832C20.5713 16.1375 19.7176 16.9046 18.705 17.3966C17.6924 17.8887 16.5618 18.0859 15.4425 17.9657C14.3231 17.8456 13.2601 17.4129 12.375 16.7172C13.0891 16.1557 13.6664 15.4393 14.0634 14.6222C14.4604 13.8051 14.6666 12.9085 14.6666 12C14.6666 11.0915 14.4604 10.1949 14.0634 9.37781C13.6664 8.56067 13.0891 7.84433 12.375 7.2828C13.2601 6.58707 14.3231 6.15441 15.4425 6.03427C16.5618 5.91412 17.6924 6.11135 18.705 6.60339C19.7176 7.09544 20.5713 7.86246 21.1686 8.81677C21.7659 9.77109 22.0826 10.8742 22.0825 12Z" fill="#F79E1B"/><path d="M21.5111 15.7173V15.5241H21.589V15.4848H21.3906V15.5241H21.4685V15.7173H21.5111ZM21.8962 15.7173V15.4844H21.8354L21.7654 15.6446L21.6955 15.4844H21.6347V15.7173H21.6776V15.5416L21.7432 15.693H21.7877L21.8533 15.5412V15.7173H21.8962Z" fill="#F79E1B"/></svg>'},payment_visa:{svg:'<svg width="35" height="12" viewBox="0 0 35 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.0517 0.694249L8.55127 11.3334H5.61509L3.40042 2.84288C3.26597 2.31991 3.14906 2.12832 2.74014 1.908C2.07252 1.54912 0.970015 1.21242 0 1.00345L0.0658851 0.694249H4.79224C5.3947 0.694249 5.93628 1.09162 6.07306 1.77903L7.2427 7.93539L10.1334 0.694072H13.0517V0.694249ZM24.5562 7.86C24.568 5.05199 20.6374 4.8973 20.6645 3.64293C20.6729 3.26118 21.0397 2.85529 21.8427 2.75169C22.2407 2.70007 23.3373 2.66069 24.581 3.22783L25.0689 0.971697C24.4006 0.731325 23.5407 0.5 22.4707 0.5C19.7252 0.5 17.7931 1.94614 17.7768 4.01688C17.7591 5.54853 19.1559 6.40322 20.2083 6.91217C21.2909 7.43336 21.6542 7.76829 21.6501 8.23449C21.6424 8.94815 20.7866 9.26321 19.9868 9.27563C18.5907 9.29691 17.7806 8.90132 17.1348 8.60382L16.6313 10.9346C17.2803 11.2296 18.4783 11.4871 19.7202 11.5C22.6383 11.5 24.5472 10.0718 24.5562 7.86ZM31.806 11.3336H34.375L32.1326 0.694249H29.7614C29.2283 0.694249 28.7785 1.00185 28.5794 1.47479L24.4113 11.3334H27.328L27.907 9.74431H31.4707L31.806 11.3334V11.3336ZM28.7067 7.56393L30.1687 3.56931L31.0102 7.56393H28.7067ZM17.0204 0.694249L14.7235 11.3334H11.946L14.2437 0.694249H17.0204Z" fill="#B4C5C3"/></svg>'},refresh_2_fill:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.4981 12.184C1.4881 10.917 2.8451 10.197 3.8771 10.778L3.9901 10.848L6.6681 12.652C8.0921 13.612 7.2061 15.798 5.5681 15.567L5.4311 15.542L5.3221 15.518C5.93702 16.7185 6.86412 17.731 8.00586 18.4491C9.1476 19.1671 10.4618 19.5642 11.8101 19.5985C13.1584 19.6327 14.4911 19.303 15.6679 18.6439C16.8446 17.9848 17.822 17.0207 18.4971 15.853C18.5955 15.6823 18.7265 15.5326 18.8827 15.4126C19.0389 15.2925 19.2172 15.2043 19.4075 15.1532C19.5978 15.102 19.7962 15.0888 19.9916 15.1144C20.187 15.1399 20.3754 15.2037 20.5461 15.302C20.7168 15.4004 20.8665 15.5314 20.9866 15.6876C21.1067 15.8438 21.1948 16.0222 21.246 16.2124C21.2971 16.4027 21.3103 16.6012 21.2848 16.7965C21.2592 16.9919 21.1955 17.1803 21.0971 17.351C18.7801 21.371 13.9781 23.503 9.2821 22.244C7.06294 21.6494 5.09998 20.3434 3.69403 18.5264C2.28808 16.7093 1.5167 14.4814 1.4981 12.184ZM2.9041 6.85404C5.2201 2.83304 10.0221 0.70204 14.7181 1.95904C16.9373 2.55373 18.9002 3.85965 20.3062 5.67669C21.7121 7.49373 22.4835 9.72165 22.5021 12.019C22.5121 13.286 21.1551 14.006 20.1231 13.426L20.0101 13.356L17.3321 11.551C15.9081 10.592 16.7941 8.40604 18.4311 8.63704L18.5691 8.66204L18.6771 8.68504C18.062 7.48471 17.1347 6.47234 15.9929 5.75447C14.8511 5.03659 13.5368 4.63973 12.1885 4.60565C10.8402 4.57158 9.50758 4.90153 8.33093 5.56081C7.15427 6.22009 6.17706 7.18431 5.5021 8.35204C5.40669 8.52821 5.27695 8.68348 5.12054 8.80868C4.96414 8.93389 4.78423 9.02649 4.59145 9.08103C4.39867 9.13556 4.19692 9.15093 3.9981 9.12621C3.79928 9.1015 3.60743 9.03721 3.43387 8.93713C3.26031 8.83706 3.10855 8.70323 2.98756 8.54354C2.86656 8.38385 2.77879 8.20154 2.72941 8.00738C2.68003 7.81321 2.67005 7.61112 2.70005 7.41303C2.73005 7.21494 2.79944 7.02487 2.9041 6.85404Z" fill="currentColor"/></svg>'},system_pix:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.4579 17.1678C16.6929 17.1678 15.9733 16.8699 15.4322 16.3291L12.5074 13.4042C12.302 13.1983 11.9441 13.1989 11.7388 13.4042L8.80326 16.3398C8.26223 16.8806 7.54264 17.1785 6.77758 17.1785H6.20117L9.90564 20.8829C11.0625 22.0398 12.9383 22.0398 14.0952 20.8829L17.8102 17.1678H17.4579Z" fill="currentColor"/><path d="M6.77747 6.822C7.54253 6.822 8.26212 7.11989 8.80315 7.66066L11.7387 10.5967C11.9501 10.8082 12.2953 10.809 12.5073 10.5965L15.4321 7.67136C15.9732 7.1306 16.6927 6.83271 17.4578 6.83271H17.8101L14.0952 3.11772C12.9382 1.96076 11.0624 1.96076 9.90553 3.11772L6.20123 6.82202L6.77747 6.822Z" fill="currentColor"/><path d="M20.883 9.90625L18.638 7.66128C18.5886 7.68108 18.5351 7.69344 18.4785 7.69344H17.4578C16.9301 7.69344 16.4135 7.90748 16.0406 8.28063L13.1159 11.2055C12.8422 11.4792 12.4825 11.6162 12.1232 11.6162C11.7635 11.6162 11.4041 11.4792 11.1305 11.2058L8.19468 8.26995C7.82179 7.8967 7.30521 7.68275 6.7775 7.68275H5.52241C5.46888 7.68275 5.41885 7.67013 5.37163 7.65234L3.11772 9.90625C1.96076 11.0632 1.96076 12.9389 3.11772 14.0959L5.37154 16.3497C5.41885 16.3319 5.46888 16.3193 5.52241 16.3193H6.7775C7.30521 16.3193 7.82179 16.1053 8.19468 15.7322L11.1302 12.7966C11.6608 12.2664 12.5858 12.2663 13.1159 12.7968L16.0406 15.7215C16.4135 16.0946 16.9301 16.3087 17.4578 16.3087H18.4785C18.5351 16.3087 18.5886 16.321 18.638 16.3408L20.883 14.0958C22.0399 12.9389 22.0399 11.0632 20.883 9.90625Z" fill="currentColor"/></svg>'}},Eg={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Ml={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},le={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Oe={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Mt={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class I{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const s=I.getVersionPrecision(t),i=I.getVersionPrecision(n);let o=Math.max(s,i),a=0;const c=I.map([t,n],l=>{const u=o-I.getVersionPrecision(l),d=l+new Array(u+1).join(".0");return I.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}}static map(t,n){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(s=0;s<t.length;s+=1)r.push(n(t[s]));return r}static find(t,n){let r,s;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,s=t.length;r<s;r+=1){const i=t[r];if(n(i,r))return i}}static assign(t,...n){const r=t;let s,i;if(Object.assign)return Object.assign(t,...n);for(s=0,i=n.length;s<i;s+=1){const o=n[s];typeof o=="object"&&o!==null&&Object.keys(o).forEach(c=>{r[c]=o[c]})}return t}static getBrowserAlias(t){return Eg[t]}static getBrowserTypeByAlias(t){return Ml[t]||""}}const te=/version\/(\d+(\.?_?\d+)+)/i,xg=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=I.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=I.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=I.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=I.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=I.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=I.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=I.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=I.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=I.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=I.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=I.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=I.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=I.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=I.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=I.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=I.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=I.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=I.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=I.getFirstMatch(te,e)||I.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=I.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=I.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=I.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=I.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=I.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=I.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=I.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=I.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=I.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=I.getFirstMatch(te,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,s=e.search("\\(")!==-1?n:t;return{name:I.getFirstMatch(s,e),version:I.getSecondMatch(s,e)}}}],Ig=[{test:[/Roku\/DVP/],describe(e){const t=I.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Oe.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=I.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Oe.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=I.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=I.getWindowsVersionName(t);return{name:Oe.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Oe.iOS},n=I.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=I.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=I.getMacOSVersionName(t),r={name:Oe.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=I.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Oe.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=I.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=I.getAndroidVersionName(t),r={name:Oe.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=I.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Oe.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=I.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||I.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||I.getFirstMatch(/\bbb(\d+)/i,e);return{name:Oe.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=I.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Oe.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=I.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Oe.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Oe.Linux}}},{test:[/CrOS/],describe(){return{name:Oe.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=I.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Oe.PlayStation4,version:t}}}],Tg=[{test:[/googlebot/i],describe(){return{type:le.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=I.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:le.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:le.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:le.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:le.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:le.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:le.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:le.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=I.getFirstMatch(/(ipod|iphone)/i,e);return{type:le.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:le.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=I.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:le.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:le.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:le.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:le.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:le.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:le.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:le.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:le.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:le.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:le.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:le.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:le.tv}}}],Ag=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Mt.Blink};const n=I.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Mt.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Mt.Trident},n=I.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Mt.Presto},n=I.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Mt.Gecko},n=I.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Mt.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Mt.WebKit},n=I.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Dl{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=I.find(xg,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=I.find(Ig,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=I.find(Tg,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=I.find(Ag,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return I.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const s={};let i=0;if(Object.keys(t).forEach(a=>{const c=t[a];typeof c=="string"?(s[a]=c,i+=1):typeof c=="object"&&(n[a]=c,r+=1)}),r>0){const a=Object.keys(n),c=I.find(a,u=>this.isOS(u));if(c){const u=this.satisfies(n[c]);if(u!==void 0)return u}const l=I.find(a,u=>this.isPlatform(u));if(l){const u=this.satisfies(n[l]);if(u!==void 0)return u}}if(i>0){const a=Object.keys(s),c=I.find(a,l=>this.isBrowser(l,!0));if(c!==void 0)return this.compareVersion(s[c])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let s=t.toLowerCase();const i=I.getBrowserTypeByAlias(s);return n&&i&&(s=i.toLowerCase()),s===r}compareVersion(t){let n=[0],r=t,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(s=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(s=!0,r=t.substr(1)),n.indexOf(I.compareVersions(i,r,s))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*!
|
|
68
|
+
`;class la extends we{constructor({text:t,delay:n,onSuccess:r}){super({tag:"div",styles:()=>bb()});const i=new an({size:12,color:j.getStyles().textPrimaryColor}).element,o=new X({text:t??W.translate("almost_done"),size:"xSmall"}).element;this.element.append(i,o),setTimeout(()=>{r(),this.element.remove()},n??5e3)}}const wb={astropay_logo:{svg:'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="Logo"><path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M15.166 10.7383C16.0308 10.7383 16.8793 10.8059 17.7074 10.9372L19.7866 16.0843C18.3684 15.4763 16.8067 15.1396 15.166 15.1396C11.4591 15.1396 8.154 16.8578 6.00304 19.541H0.786621C3.45841 14.3156 8.8949 10.7383 15.166 10.7383Z" fill="#143534"/><path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M13.3258 0.101402L17.0783 9.37359C16.4499 9.30594 15.8109 9.27089 15.1645 9.27089C14.2199 9.27089 13.2932 9.34506 12.3884 9.48851L10.9588 5.95031L9.19826 10.3068C6.78974 11.1741 4.62493 12.5515 2.83423 14.3088L8.57474 0.100586H13.3258V0.101402Z" fill="#151E1D"/></g></svg>'},astropay_payment_method:{svg:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.1869 1L12.8888 7.67847C12.4359 7.62964 11.9767 7.60471 11.5113 7.60471C10.8309 7.60471 10.164 7.65873 9.51268 7.76157L8.48323 5.21339L7.21589 8.35161C5.48212 8.97594 3.92392 9.96799 2.63477 11.2343L6.76712 1.00104H10.1869V1Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.5118 8.66016C12.1341 8.66016 12.7449 8.70898 13.3412 8.80351L14.8381 12.51C13.8169 12.0726 12.693 11.8295 11.5118 11.8295C8.84315 11.8295 6.46428 13.0668 4.91543 15H1.16016C3.08402 11.2374 6.99719 8.66016 11.5118 8.66016Z" fill="#00DBBF"/></svg>'},alert_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 8C12.5523 8 13 8.44772 13 9V13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V9C11 8.44772 11.4477 8 12 8Z" fill="currentColor"/><path d="M12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7009 3.14771C11.2783 2.14771 12.7217 2.1477 13.299 3.1477L21.933 18.1022C22.5103 19.1022 21.7887 20.3522 20.634 20.3522H3.36601C2.21131 20.3522 1.48962 19.1022 2.06697 18.1022L10.7009 3.14771ZM12 4.8977L4.23203 18.3522H19.7679L12 4.8977Z" fill="currentColor"/></svg>'},arrow_right_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.0626 5.63603L20.7194 11.2929C21.1099 11.6834 21.1099 12.3166 20.7194 12.7071L15.0626 18.364C14.672 18.7545 14.0389 18.7545 13.6483 18.364C13.2578 17.9734 13.2578 17.3403 13.6483 16.9497L17.5981 13H4.35547C3.80318 13 3.35547 12.5523 3.35547 12C3.35547 11.4477 3.80318 11 4.35547 11H17.5981L13.6483 7.05025C13.2578 6.65972 13.2578 6.02656 13.6483 5.63603C14.0389 5.24551 14.672 5.24551 15.0626 5.63603Z" fill="currentColor"/></svg>'},arrow_down_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.0626 15.7071C12.6721 16.0976 12.0389 16.0976 11.6484 15.7071L5.99151 10.0502C5.60098 9.6597 5.60098 9.02653 5.99151 8.63601C6.38203 8.24549 7.0152 8.24549 7.40572 8.63601L12.3555 13.5858L17.3052 8.63601C17.6957 8.24549 18.3289 8.24549 18.7194 8.63601C19.11 9.02653 19.11 9.6597 18.7194 10.0502L13.0626 15.7071Z" fill="currentColor"/></svg>'},bank_card_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.3555 13C13.8032 13 13.3555 13.4477 13.3555 14C13.3555 14.5523 13.8032 15 14.3555 15H17.3555C17.9078 15 18.3555 14.5523 18.3555 14C18.3555 13.4477 17.9078 13 17.3555 13H14.3555Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.35547 7C2.35547 5.34315 3.69861 4 5.35547 4H19.3555C21.0123 4 22.3555 5.34315 22.3555 7V17C22.3555 18.6569 21.0123 20 19.3555 20H5.35547C3.69861 20 2.35547 18.6569 2.35547 17V7ZM5.35547 6C4.80318 6 4.35547 6.44772 4.35547 7V8H20.3555V7C20.3555 6.44772 19.9078 6 19.3555 6H5.35547ZM4.35547 17V10H20.3555V17C20.3555 17.5523 19.9078 18 19.3555 18H5.35547C4.80318 18 4.35547 17.5523 4.35547 17Z" fill="currentColor"/></svg>'},check_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M16.9496 9.79545C17.3401 9.40493 17.3401 8.77176 16.9496 8.38124C16.5591 7.99071 15.9259 7.99071 15.5354 8.38124L10.5856 13.331L8.46431 11.2097C8.07379 10.8191 7.44063 10.8191 7.0501 11.2097C6.65958 11.6002 6.65958 12.2334 7.0501 12.6239L9.80782 15.3816C10.2374 15.8112 10.9339 15.8112 11.3635 15.3816L16.9496 9.79545Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z" fill="currentColor"/></svg>'},close_circle_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.46452 8.46443C8.85505 8.07391 9.48821 8.07391 9.87874 8.46443L12 10.5857L14.1213 8.46441C14.5118 8.07388 15.145 8.07388 15.5355 8.46441C15.926 8.85493 15.926 9.4881 15.5355 9.87862L13.4142 11.9999L15.5356 14.1213C15.9261 14.5118 15.9261 15.145 15.5356 15.5355C15.1451 15.926 14.5119 15.926 14.1214 15.5355L12 13.4141L9.87864 15.5355C9.48812 15.926 8.85496 15.926 8.46443 15.5355C8.07391 15.145 8.07391 14.5118 8.46443 14.1213L10.5858 11.9999L8.46452 9.87864C8.074 9.48812 8.074 8.85496 8.46452 8.46443Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z" fill="currentColor"/></svg>'},copy_2_line:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M19.3555 2C20.46 2 21.3555 2.89543 21.3555 4V16C21.3555 17.1046 20.46 18 19.3555 18H17.3555V20C17.3555 21.1046 16.46 22 15.3555 22H5.35547C4.2509 22 3.35547 21.1046 3.35547 20V8C3.35547 6.89543 4.2509 6 5.35547 6H7.35547V4C7.35547 2.89543 8.2509 2 9.35547 2H19.3555ZM9.35547 6H15.3555C16.46 6 17.3555 6.89543 17.3555 8V16H19.3555V4L9.35547 4V6ZM5.35547 8L15.3555 8V20H5.35547V8Z" fill="currentColor"/></svg>'},lock_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 12C11.4477 12 11 12.4477 11 13V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V13C13 12.4477 12.5523 12 12 12Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 8C6 4.68629 8.68629 2 12 2C15.3137 2 18 4.68629 18 8H19C20.1046 8 21 8.89543 21 10V20C21 21.1046 20.1046 22 19 22H5C3.89543 22 3 21.1046 3 20V10C3 8.89543 3.89543 8 5 8H6ZM12 4C14.2091 4 16 5.79086 16 8H8C8 5.79086 9.79086 4 12 4ZM5 10H19V20H5V10Z" fill="currentColor"/></svg>'},notification_fill:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.9998 19C15 19.5046 14.8094 19.9906 14.4664 20.3605C14.1233 20.7305 13.653 20.9572 13.1498 20.995L12.9998 21H10.9998C10.4953 21.0002 10.0093 20.8096 9.6393 20.4665C9.26932 20.1234 9.04269 19.6532 9.00485 19.15L8.99985 19H14.9998ZM11.9998 2C13.8148 1.99997 15.5589 2.70489 16.8641 3.96607C18.1693 5.22726 18.9336 6.94609 18.9958 8.76L18.9998 9V12.764L20.8218 16.408C20.9014 16.567 20.9412 16.7429 20.9378 16.9206C20.9345 17.0984 20.8881 17.2727 20.8027 17.4286C20.7173 17.5845 20.5953 17.7174 20.4473 17.8158C20.2993 17.9143 20.1297 17.9754 19.9528 17.994L19.8378 18H4.16185C3.98401 18.0001 3.80882 17.957 3.65127 17.8745C3.49372 17.792 3.35853 17.6725 3.25727 17.5264C3.156 17.3802 3.0917 17.2116 3.06985 17.0351C3.04801 16.8586 3.06928 16.6795 3.13185 16.513L3.17785 16.408L4.99985 12.764V9C4.99985 7.14348 5.73735 5.36301 7.0501 4.05025C8.36286 2.7375 10.1433 2 11.9998 2Z" fill="currentColor"/></svg>'},pay_line:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.2473 1.60389C23.2424 1.36545 23.143 1.13872 22.9709 0.973519C22.7989 0.808319 22.5684 0.718154 22.3299 0.722829L17.5303 0.818649C17.2916 0.823478 17.0646 0.922941 16.8992 1.09516C16.7338 1.26738 16.6436 1.49824 16.6484 1.73696C16.6532 1.97568 16.7527 2.20271 16.9249 2.3681C17.0971 2.53349 17.328 2.62369 17.5667 2.61886L20.1937 2.56614L16.7022 6.25555C16.5369 6.42771 16.4467 6.6585 16.4515 6.89714C16.4564 7.13579 16.5558 7.36274 16.728 7.52808C16.9001 7.69341 17.1309 7.78358 17.3696 7.77876C17.6082 7.77393 17.8352 7.6745 18.0005 7.50234L21.4919 3.81293L21.5451 6.43944C21.5475 6.55764 21.5731 6.67421 21.6206 6.7825C21.668 6.89079 21.7363 6.98868 21.8216 7.07057C21.9069 7.15246 22.0074 7.21676 22.1175 7.25978C22.2277 7.30281 22.3452 7.32372 22.4634 7.32133C22.5816 7.31894 22.6982 7.29329 22.8064 7.24585C22.9147 7.1984 23.0126 7.1301 23.0945 7.04482C23.1764 6.95955 23.2407 6.85898 23.2837 6.74886C23.3268 6.63874 23.3477 6.52122 23.3453 6.40302L23.2473 1.60389Z" fill="currentColor"/><path d="M13.9007 5.74528C13.0603 5.88939 12.6821 6.04597 11.807 6.43486C8.461 7.92184 5.74102 7.59582 4 7.26583V18.2248C5.39102 18.5318 8.50887 18.9511 11.5938 17.5812C14.9397 16.0942 18.259 16.3958 20 16.7258V10.4956C20 10.4956 20 9.49596 21 9.49596C22 9.49596 22 10.4956 22 10.4956V17.301C22 18.3278 21.0243 19.0019 20.1064 18.7902C18.7765 18.4822 15.5732 18.0015 12.4062 19.4094C8.68025 21.0654 4.98673 20.5026 3.46973 20.1546C2.55195 19.9445 2.0001 19.1245 2 18.2746V6.68965C2 5.66281 2.97468 4.9877 3.89355 5.2004C5.22353 5.50839 7.8275 6.01465 10.9945 4.60674C12.1546 4.09113 12.8117 3.87593 13.9007 3.71696C13.9007 3.71696 14.777 3.60629 14.9007 4.60661C15.0244 5.60692 13.9007 5.74528 13.9007 5.74528Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.49564C13.933 8.49564 15.5 10.0626 15.5 11.9956C15.5 13.9286 13.933 15.4956 12 15.4956C10.067 15.4956 8.5 13.9286 8.5 11.9956C8.5 10.0626 10.067 8.49564 12 8.49564ZM12 10.2456C11.0335 10.2456 10.25 11.0291 10.25 11.9956C10.25 12.9621 11.0335 13.7456 12 13.7456C12.9665 13.7456 13.75 12.9621 13.75 11.9956C13.75 11.0291 12.9665 10.2456 12 10.2456Z" fill="currentColor"/></svg>'},payment_master:{svg:'<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15 7.2832H9.75V16.7176H15V7.2832Z" fill="#FF5F00"/><path d="M10.0842 12C10.0833 11.0914 10.2892 10.1945 10.6862 9.37725C11.0833 8.55999 11.661 7.84377 12.3758 7.2828C11.4907 6.58708 10.4277 6.15441 9.30827 6.03427C8.18888 5.91412 7.05827 6.11134 6.04566 6.60338C5.03305 7.09542 4.17931 7.86244 3.58201 8.81675C2.98471 9.77107 2.66797 10.8742 2.66797 12C2.66797 13.1258 2.98471 14.2289 3.58201 15.1832C4.17931 16.1376 5.03305 16.9046 6.04566 17.3966C7.05827 17.8887 8.18888 18.0859 9.30827 17.9657C10.4277 17.8456 11.4907 17.4129 12.3758 16.7172C11.661 16.1562 11.0833 15.44 10.6863 14.6227C10.2892 13.8055 10.0833 12.9086 10.0842 12Z" fill="#EB001B"/><path d="M22.0825 12C22.0826 13.1258 21.7659 14.2289 21.1686 15.1832C20.5713 16.1375 19.7176 16.9046 18.705 17.3966C17.6924 17.8887 16.5618 18.0859 15.4425 17.9657C14.3231 17.8456 13.2601 17.4129 12.375 16.7172C13.0891 16.1557 13.6664 15.4393 14.0634 14.6222C14.4604 13.8051 14.6666 12.9085 14.6666 12C14.6666 11.0915 14.4604 10.1949 14.0634 9.37781C13.6664 8.56067 13.0891 7.84433 12.375 7.2828C13.2601 6.58707 14.3231 6.15441 15.4425 6.03427C16.5618 5.91412 17.6924 6.11135 18.705 6.60339C19.7176 7.09544 20.5713 7.86246 21.1686 8.81677C21.7659 9.77109 22.0826 10.8742 22.0825 12Z" fill="#F79E1B"/><path d="M21.5111 15.7173V15.5241H21.589V15.4848H21.3906V15.5241H21.4685V15.7173H21.5111ZM21.8962 15.7173V15.4844H21.8354L21.7654 15.6446L21.6955 15.4844H21.6347V15.7173H21.6776V15.5416L21.7432 15.693H21.7877L21.8533 15.5412V15.7173H21.8962Z" fill="#F79E1B"/></svg>'},payment_visa:{svg:'<svg width="35" height="12" viewBox="0 0 35 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.0517 0.694249L8.55127 11.3334H5.61509L3.40042 2.84288C3.26597 2.31991 3.14906 2.12832 2.74014 1.908C2.07252 1.54912 0.970015 1.21242 0 1.00345L0.0658851 0.694249H4.79224C5.3947 0.694249 5.93628 1.09162 6.07306 1.77903L7.2427 7.93539L10.1334 0.694072H13.0517V0.694249ZM24.5562 7.86C24.568 5.05199 20.6374 4.8973 20.6645 3.64293C20.6729 3.26118 21.0397 2.85529 21.8427 2.75169C22.2407 2.70007 23.3373 2.66069 24.581 3.22783L25.0689 0.971697C24.4006 0.731325 23.5407 0.5 22.4707 0.5C19.7252 0.5 17.7931 1.94614 17.7768 4.01688C17.7591 5.54853 19.1559 6.40322 20.2083 6.91217C21.2909 7.43336 21.6542 7.76829 21.6501 8.23449C21.6424 8.94815 20.7866 9.26321 19.9868 9.27563C18.5907 9.29691 17.7806 8.90132 17.1348 8.60382L16.6313 10.9346C17.2803 11.2296 18.4783 11.4871 19.7202 11.5C22.6383 11.5 24.5472 10.0718 24.5562 7.86ZM31.806 11.3336H34.375L32.1326 0.694249H29.7614C29.2283 0.694249 28.7785 1.00185 28.5794 1.47479L24.4113 11.3334H27.328L27.907 9.74431H31.4707L31.806 11.3334V11.3336ZM28.7067 7.56393L30.1687 3.56931L31.0102 7.56393H28.7067ZM17.0204 0.694249L14.7235 11.3334H11.946L14.2437 0.694249H17.0204Z" fill="#B4C5C3"/></svg>'},refresh_2_fill:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.4981 12.184C1.4881 10.917 2.8451 10.197 3.8771 10.778L3.9901 10.848L6.6681 12.652C8.0921 13.612 7.2061 15.798 5.5681 15.567L5.4311 15.542L5.3221 15.518C5.93702 16.7185 6.86412 17.731 8.00586 18.4491C9.1476 19.1671 10.4618 19.5642 11.8101 19.5985C13.1584 19.6327 14.4911 19.303 15.6679 18.6439C16.8446 17.9848 17.822 17.0207 18.4971 15.853C18.5955 15.6823 18.7265 15.5326 18.8827 15.4126C19.0389 15.2925 19.2172 15.2043 19.4075 15.1532C19.5978 15.102 19.7962 15.0888 19.9916 15.1144C20.187 15.1399 20.3754 15.2037 20.5461 15.302C20.7168 15.4004 20.8665 15.5314 20.9866 15.6876C21.1067 15.8438 21.1948 16.0222 21.246 16.2124C21.2971 16.4027 21.3103 16.6012 21.2848 16.7965C21.2592 16.9919 21.1955 17.1803 21.0971 17.351C18.7801 21.371 13.9781 23.503 9.2821 22.244C7.06294 21.6494 5.09998 20.3434 3.69403 18.5264C2.28808 16.7093 1.5167 14.4814 1.4981 12.184ZM2.9041 6.85404C5.2201 2.83304 10.0221 0.70204 14.7181 1.95904C16.9373 2.55373 18.9002 3.85965 20.3062 5.67669C21.7121 7.49373 22.4835 9.72165 22.5021 12.019C22.5121 13.286 21.1551 14.006 20.1231 13.426L20.0101 13.356L17.3321 11.551C15.9081 10.592 16.7941 8.40604 18.4311 8.63704L18.5691 8.66204L18.6771 8.68504C18.062 7.48471 17.1347 6.47234 15.9929 5.75447C14.8511 5.03659 13.5368 4.63973 12.1885 4.60565C10.8402 4.57158 9.50758 4.90153 8.33093 5.56081C7.15427 6.22009 6.17706 7.18431 5.5021 8.35204C5.40669 8.52821 5.27695 8.68348 5.12054 8.80868C4.96414 8.93389 4.78423 9.02649 4.59145 9.08103C4.39867 9.13556 4.19692 9.15093 3.9981 9.12621C3.79928 9.1015 3.60743 9.03721 3.43387 8.93713C3.26031 8.83706 3.10855 8.70323 2.98756 8.54354C2.86656 8.38385 2.77879 8.20154 2.72941 8.00738C2.68003 7.81321 2.67005 7.61112 2.70005 7.41303C2.73005 7.21494 2.79944 7.02487 2.9041 6.85404Z" fill="currentColor"/></svg>'},system_pix:{svg:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.4579 17.1678C16.6929 17.1678 15.9733 16.8699 15.4322 16.3291L12.5074 13.4042C12.302 13.1983 11.9441 13.1989 11.7388 13.4042L8.80326 16.3398C8.26223 16.8806 7.54264 17.1785 6.77758 17.1785H6.20117L9.90564 20.8829C11.0625 22.0398 12.9383 22.0398 14.0952 20.8829L17.8102 17.1678H17.4579Z" fill="currentColor"/><path d="M6.77747 6.822C7.54253 6.822 8.26212 7.11989 8.80315 7.66066L11.7387 10.5967C11.9501 10.8082 12.2953 10.809 12.5073 10.5965L15.4321 7.67136C15.9732 7.1306 16.6927 6.83271 17.4578 6.83271H17.8101L14.0952 3.11772C12.9382 1.96076 11.0624 1.96076 9.90553 3.11772L6.20123 6.82202L6.77747 6.822Z" fill="currentColor"/><path d="M20.883 9.90625L18.638 7.66128C18.5886 7.68108 18.5351 7.69344 18.4785 7.69344H17.4578C16.9301 7.69344 16.4135 7.90748 16.0406 8.28063L13.1159 11.2055C12.8422 11.4792 12.4825 11.6162 12.1232 11.6162C11.7635 11.6162 11.4041 11.4792 11.1305 11.2058L8.19468 8.26995C7.82179 7.8967 7.30521 7.68275 6.7775 7.68275H5.52241C5.46888 7.68275 5.41885 7.67013 5.37163 7.65234L3.11772 9.90625C1.96076 11.0632 1.96076 12.9389 3.11772 14.0959L5.37154 16.3497C5.41885 16.3319 5.46888 16.3193 5.52241 16.3193H6.7775C7.30521 16.3193 7.82179 16.1053 8.19468 15.7322L11.1302 12.7966C11.6608 12.2664 12.5858 12.2663 13.1159 12.7968L16.0406 15.7215C16.4135 16.0946 16.9301 16.3087 17.4578 16.3087H18.4785C18.5351 16.3087 18.5886 16.321 18.638 16.3408L20.883 14.0958C22.0399 12.9389 22.0399 11.0632 20.883 9.90625Z" fill="currentColor"/></svg>'}},Eb={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},df={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Te={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},nt={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},vn={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class L{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=L.getVersionPrecision(t),o=L.getVersionPrecision(n);let s=Math.max(i,o),a=0;const c=L.map([t,n],u=>{const l=s-L.getVersionPrecision(u),d=u+new Array(l+1).join(".0");return L.map(d.split("."),f=>new Array(20-f.length).join("0")+f).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const s=n[i];typeof s=="object"&&s!==null&&Object.keys(s).forEach(c=>{r[c]=s[c]})}return t}static getBrowserAlias(t){return Eb[t]}static getBrowserTypeByAlias(t){return df[t]||""}}const ve=/version\/(\d+(\.?_?\d+)+)/i,Sb=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=L.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=L.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=L.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=L.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=L.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=L.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=L.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=L.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=L.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=L.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=L.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=L.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=L.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=L.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=L.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=L.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=L.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=L.getFirstMatch(ve,e)||L.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=L.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=L.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=L.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=L.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=L.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=L.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=L.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=L.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=L.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=L.getFirstMatch(ve,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:L.getFirstMatch(i,e),version:L.getSecondMatch(i,e)}}}],_b=[{test:[/Roku\/DVP/],describe(e){const t=L.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:nt.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=L.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:nt.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=L.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=L.getWindowsVersionName(t);return{name:nt.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:nt.iOS},n=L.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=L.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=L.getMacOSVersionName(t),r={name:nt.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=L.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:nt.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=L.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=L.getAndroidVersionName(t),r={name:nt.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=L.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:nt.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=L.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||L.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||L.getFirstMatch(/\bbb(\d+)/i,e);return{name:nt.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=L.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:nt.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=L.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:nt.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:nt.Linux}}},{test:[/CrOS/],describe(){return{name:nt.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=L.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:nt.PlayStation4,version:t}}}],Cb=[{test:[/googlebot/i],describe(){return{type:Te.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=L.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Te.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Te.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Te.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Te.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Te.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Te.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Te.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=L.getFirstMatch(/(ipod|iphone)/i,e);return{type:Te.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Te.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=L.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:Te.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:Te.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Te.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Te.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Te.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Te.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Te.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Te.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Te.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Te.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Te.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Te.tv}}}],Tb=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:vn.Blink};const n=L.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:vn.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:vn.Trident},n=L.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:vn.Presto},n=L.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:vn.Gecko},n=L.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:vn.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:vn.WebKit},n=L.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class ff{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=L.find(Sb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=L.find(_b,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=L.find(Cb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=L.find(Tb,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return L.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(a=>{const c=t[a];typeof c=="string"?(i[a]=c,o+=1):typeof c=="object"&&(n[a]=c,r+=1)}),r>0){const a=Object.keys(n),c=L.find(a,l=>this.isOS(l));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}const u=L.find(a,l=>this.isPlatform(l));if(u){const l=this.satisfies(n[u]);if(l!==void 0)return l}}if(o>0){const a=Object.keys(i),c=L.find(a,u=>this.isBrowser(u,!0));if(c!==void 0)return this.compareVersion(i[c])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=L.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(L.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*!
|
|
68
69
|
* Bowser - a browser detector
|
|
69
70
|
* https://github.com/lancedikson/bowser
|
|
70
71
|
* MIT License | (c) Dustin Diaz 2012-2015
|
|
71
72
|
* MIT License | (c) Denis Demchenko 2015-2019
|
|
72
|
-
*/class
|
|
73
|
-
hue-rotate(${
|
|
73
|
+
*/class pf{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new ff(t,n)}static parse(t){return new ff(t).getResult()}static get BROWSER_MAP(){return df}static get ENGINE_MAP(){return vn}static get OS_MAP(){return nt}static get PLATFORMS_MAP(){return Te}}var si=(e=>(e.IOS="IOS",e.ANDROID="ANDROID",e.DESKTOP="DESKTOP",e))(si||{}),hf=(e=>(e.FIREFOX="Firefox",e.CHROME="Chrome",e.SAFARI="Safari",e.EDGE="Edge",e.OPERA="Opera",e))(hf||{});const gf=()=>{const t=pf.getParser(window.navigator.userAgent).getOSName().toUpperCase();return t&&Object.values(si).includes(t)?t:si.DESKTOP},Ib=()=>{const e=gf();return e===si.ANDROID||e===si.IOS},xb=e=>{const t=pf.getParser(window.navigator.userAgent).getBrowserName();return Array.isArray(e)?e.includes(t):t===e},ai=(e,t)=>{let n=e;return Object.keys(t).forEach(r=>{const i=t[r];n=n.replace(new RegExp(`:${r}\\b`,"g"),i),n=n.replace(new RegExp(`\\{${r}\\}`,"g"),i)}),n},Ab=(e,t,n)=>{const r=new URL(e);return t&&(r.pathname=t),n&&Object.entries(n).forEach(([i,o])=>{r.searchParams.append(i,o)}),r},kb=e=>{try{return new URL(e).pathname.toLowerCase().endsWith(".svg")}catch{return!1}},Rb=e=>{if(/^#/.test(e)){const t=e.substring(1),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16),o=t.length===8?parseInt(t.substring(6,8),16)/255:1,s=o%1===0?o:+o.toFixed(2);return{r:n,g:r,b:i,a:s}}return e},da=(e,t)=>{if(/^#/.test(e)){const n=Rb(e);return typeof n=="string"?n:`rgba(${n.r}, ${n.g}, ${n.b}, ${t})`}else if(/^rgb/.test(e)){const n=e.replace(/^rgba?\(|\s+|\)$/g,"").split(",");return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${t})`}else return e},mf=e=>["#ffffff","#fff","white","#000000","#000","black","#808080","gray","grey"].includes(e.toLowerCase()),Pb=(e,t,n)=>{e/=255,t/=255,n/=255;const r=Math.max(e,t,n),i=Math.min(e,t,n);let o=0;if(r!==i){const s=r-i;switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return Math.round(o*360)},Ob=e=>{if(!e||e==="currentColor"||mf(e))return 0;const t=document.createElement("div");t.style.color=e,document.body.appendChild(t);const n=getComputedStyle(t).color;document.body.removeChild(t);const r=n.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!r)return 0;const[i,o,s,a]=r.map(Number);return Pb(o,s,a)},Lb=e=>!e||e==="currentColor"?"none":mf(e)?e.toLowerCase().includes("fff")||e==="white"?"brightness(0) invert(100%)":"brightness(0)":`brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(4299%)
|
|
74
|
+
hue-rotate(${Ob(e)}deg) brightness(97%) contrast(113%)`,Nb=e=>ne`
|
|
74
75
|
background-image: var(--icon-url);
|
|
75
76
|
background-repeat: no-repeat;
|
|
76
77
|
background-size: contain;
|
|
77
78
|
background-position: center;
|
|
78
79
|
background-color: transparent;
|
|
79
|
-
filter: ${
|
|
80
|
-
`,
|
|
80
|
+
filter: ${Lb(e)};
|
|
81
|
+
`,Mb=e=>ne`
|
|
81
82
|
background-color: ${e};
|
|
82
83
|
-webkit-mask-box-image: var(--icon-url);
|
|
83
84
|
-webkit-mask-image: var(--icon-url);
|
|
@@ -88,7 +89,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
88
89
|
mask-repeat: no-repeat;
|
|
89
90
|
mask-size: contain;
|
|
90
91
|
mask-position: center;
|
|
91
|
-
`,
|
|
92
|
+
`,Db=({size:e,color:t,isSvgResource:n,isAlternativeStyles:r})=>ne`
|
|
92
93
|
display: inline-flex;
|
|
93
94
|
align-items: center;
|
|
94
95
|
justify-content: center;
|
|
@@ -111,70 +112,70 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
111
112
|
height: ${e}px;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
${n&&
|
|
115
|
+
${n&&ne`
|
|
115
116
|
width: ${e}px;
|
|
116
117
|
height: ${e}px;
|
|
117
118
|
|
|
118
|
-
${r?
|
|
119
|
+
${r?Nb(t):Mb(t)}
|
|
119
120
|
`}
|
|
120
|
-
`;class
|
|
121
|
+
`;class vt extends we{constructor({name:t,color:n="currentColor",size:r=16,alt:i}){const o=kb(t),s=xb(hf.FIREFOX);super({tag:"span",styles:()=>Db({size:r,color:n,isSvgResource:o,isAlternativeStyles:s})});const a=wb[t];if(a)this.element.innerHTML=a.svg;else if(o){const c=document.createElement("div");c.classList.add("icon"),this.element.append(c),this.element.style.setProperty("--icon-url",`url(${t})`)}else{const c=document.createElement("img");c.src=t,c.alt=i??"icon",this.element.append(c)}}}const ci={small:"32px",medium:"40px",large:"48px"},Fb=(e="medium")=>`calc(${ci[e]} + 8px * 2 )`,Ub=ni`
|
|
121
122
|
0% { transform: none; }
|
|
122
123
|
12.5% { transform: none; }
|
|
123
124
|
25% { transform: scale(1.1); }
|
|
124
125
|
37.5% { transform: scale(1.1); }
|
|
125
126
|
50% { transform: none; }
|
|
126
127
|
100% { transform: none; }
|
|
127
|
-
`,
|
|
128
|
+
`,Bb=(e="medium")=>{const t=ci[e],n=`calc(${t} * -1)`,r=`calc(${t} * -2)`;return ni`
|
|
128
129
|
0% { transform: translateY(0); }
|
|
129
130
|
12.5% { transform: translateY(${n}); }
|
|
130
131
|
25% { transform: translateY(${n}); }
|
|
131
132
|
37.5% { transform: translateY(${r}); }
|
|
132
133
|
87.5% { transform: translateY(${r}); }
|
|
133
134
|
100% { transform: translateY(0); }
|
|
134
|
-
`}
|
|
135
|
+
`},$b=(e,t="medium")=>{switch(t){case"small":return ne`
|
|
135
136
|
padding: 8px;
|
|
136
|
-
height: ${
|
|
137
|
+
height: ${ci[t]};
|
|
137
138
|
font-size: 12px;
|
|
138
139
|
line-height: 16px;
|
|
139
140
|
border-radius: ${e.button.small.borderRadius}px;
|
|
140
141
|
font-weight: 600;
|
|
141
|
-
`;case"medium":return
|
|
142
|
+
`;case"medium":return ne`
|
|
142
143
|
padding: 8px 16px;
|
|
143
|
-
height: ${
|
|
144
|
+
height: ${ci[t]};
|
|
144
145
|
line-height: 24px;
|
|
145
146
|
border-radius: ${e.button.medium.borderRadius}px;
|
|
146
147
|
font-size: 14px;
|
|
147
|
-
`;case"large":default:return
|
|
148
|
+
`;case"large":default:return ne`
|
|
148
149
|
padding: 8px 16px;
|
|
149
|
-
height: ${
|
|
150
|
+
height: ${ci[t]};
|
|
150
151
|
line-height: 32px;
|
|
151
152
|
border-radius: ${e.button.large.borderRadius}px;
|
|
152
153
|
font-size: 16px;
|
|
153
|
-
`}},
|
|
154
|
+
`}},fa=(e,t)=>ne`
|
|
154
155
|
cursor: not-allowed;
|
|
155
156
|
background-color: ${t?e.apButtonDisableBgColor:e.button.disabled.backgroundColor};
|
|
156
157
|
color: ${t?e.apButtonDisableTextColor:e.button.disabled.textColor};
|
|
157
|
-
`,
|
|
158
|
+
`,Vb=(e,t,n)=>{switch(e){case"primary":return ne`
|
|
158
159
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
159
160
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
160
161
|
border: ${n.isApTheme?"unset":`${t.button.primary.borderWidth}px solid ${t.button.primary.borderColor}`};
|
|
161
162
|
&:hover {
|
|
162
|
-
background-color: ${
|
|
163
|
+
background-color: ${da(n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor,.7)};
|
|
163
164
|
}
|
|
164
165
|
&:disabled {
|
|
165
|
-
${
|
|
166
|
+
${fa(t,n.isApTheme)}
|
|
166
167
|
}
|
|
167
|
-
`;case"secondary":return
|
|
168
|
+
`;case"secondary":return ne`
|
|
168
169
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
169
170
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
170
171
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
171
172
|
&:hover {
|
|
172
|
-
background-color: ${
|
|
173
|
+
background-color: ${da(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
173
174
|
}
|
|
174
175
|
&:disabled {
|
|
175
|
-
${
|
|
176
|
+
${fa(t,n.isApTheme)}
|
|
176
177
|
}
|
|
177
|
-
`;case"text":return
|
|
178
|
+
`;case"text":return ne`
|
|
178
179
|
background-color: ${n.isApTheme?"unset":t.button.text.backgroundColor};
|
|
179
180
|
color: ${n.isApTheme?t.apButtonTextTxtColor:t.button.text.textColor};
|
|
180
181
|
border: ${n.isApTheme?1:t.button.text.borderWidth}px solid
|
|
@@ -185,23 +186,23 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
185
186
|
background-color: ${n.isApTheme?"unset":t.button.disabled.backgroundColor};
|
|
186
187
|
cursor: not-allowed;
|
|
187
188
|
}
|
|
188
|
-
`;case"copy-to-clipboard":return
|
|
189
|
+
`;case"copy-to-clipboard":return ne`
|
|
189
190
|
background-color: ${n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor};
|
|
190
191
|
color: ${n.isApTheme?t.apButtonSecondaryTxtColor:t.button.secondary.textColor};
|
|
191
192
|
border: ${n.isApTheme?"unset":`${t.button.secondary.borderWidth}px solid ${t.button.secondary.borderColor}`};
|
|
192
193
|
&:hover {
|
|
193
|
-
background-color: ${
|
|
194
|
+
background-color: ${da(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
|
|
194
195
|
}
|
|
195
196
|
&:disabled {
|
|
196
|
-
${
|
|
197
|
+
${fa(t,n.isApTheme)}
|
|
197
198
|
}
|
|
198
199
|
&[data-is-copied='true'] {
|
|
199
200
|
background-color: ${n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor};
|
|
200
201
|
color: ${n.isApTheme?t.apButtonPrimaryTxtColor:t.button.primary.textColor};
|
|
201
202
|
box-shadow: none;
|
|
202
|
-
animation: ${
|
|
203
|
+
animation: ${Ub} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
203
204
|
}
|
|
204
|
-
`;default:return
|
|
205
|
+
`;default:return ne``}},zb=(e,t)=>{const{size:n,variant:r,isFullWidth:i}=t,o=ne`
|
|
205
206
|
border: none;
|
|
206
207
|
cursor: pointer;
|
|
207
208
|
display: inline-flex;
|
|
@@ -213,7 +214,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
213
214
|
font-family: ${t.isApTheme?e.apFontFamily:e.fontFamily};
|
|
214
215
|
font-weight: 600;
|
|
215
216
|
|
|
216
|
-
width: ${
|
|
217
|
+
width: ${i?"100%":"fit-content"};
|
|
217
218
|
|
|
218
219
|
transition:
|
|
219
220
|
background-color 0.3s,
|
|
@@ -243,7 +244,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
243
244
|
opacity 0.3s ease,
|
|
244
245
|
visibility 0.3s ease;
|
|
245
246
|
|
|
246
|
-
margin-top: ${
|
|
247
|
+
margin-top: ${Fb(n)};
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
&:focus-visible {
|
|
@@ -252,7 +253,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
252
253
|
|
|
253
254
|
&[data-is-copied='true'] {
|
|
254
255
|
.content-wrapper {
|
|
255
|
-
animation: ${
|
|
256
|
+
animation: ${Bb(n)} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
.content-copy {
|
|
@@ -260,21 +261,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
260
261
|
opacity: 1;
|
|
261
262
|
}
|
|
262
263
|
}
|
|
263
|
-
`;return
|
|
264
|
-
display: flex;
|
|
265
|
-
align-items: center;
|
|
266
|
-
gap: 10px;
|
|
267
|
-
width: 100%;
|
|
268
|
-
|
|
269
|
-
.divider-line {
|
|
270
|
-
flex-grow: 1;
|
|
271
|
-
border: none;
|
|
272
|
-
background: none;
|
|
273
|
-
border-top: ${e.divider.size}px ${e.divider.color};
|
|
274
|
-
border-top-style: ${e.divider.variant};
|
|
275
|
-
margin: 0;
|
|
276
|
-
}
|
|
277
|
-
`;class ki extends se{constructor({text:t}){super({tag:"div",styles:r=>qg(r)});const n=document.createElement("hr");if(n.classList.add("divider-line"),this.element.appendChild(n),t){const r=new H({text:t,size:16,weight:600,lineHeight:24}),s=document.createElement("hr");s.classList.add("divider-line"),r.render(this.element),this.element.appendChild(s)}}}const Vl=(e,{error:t,disabled:n,maxWidth:r})=>j`
|
|
264
|
+
`;return qy(o,$b(e,n),Vb(r,e,t))};class yn extends we{constructor({text:n,size:r="large",variant:i="primary",iconLeft:o,iconRight:s,isLoading:a=!1,isDisabled:c=!1,isFullWidth:u=!1,onClick:l,copyText:d=W.translate("copied"),isApTheme:f=!1}){const h={size:r,variant:i,isFullWidth:u,isApTheme:f};super({tag:"button",styles:p=>zb(p,h)});S(this,"isLoading");S(this,"isDisabled");S(this,"iconLeft");S(this,"iconRight");S(this,"originalText");S(this,"originalIconLeft");S(this,"originalIconRight");S(this,"variant");S(this,"copyText");S(this,"onClick");this.isLoading=a,this.isDisabled=c,this.onClick=l,this.copyText=d,this.element.disabled=c,this.originalText=n,this.originalIconLeft=o,this.originalIconRight=s,this.variant=i,this.updateContent({text:n,iconLeft:o,iconRight:s}),this.element.addEventListener("click",this.handleClick.bind(this))}updateContent({text:n,iconLeft:r,iconRight:i}){this.element.innerHTML="";const o=document.createElement("div");if(o.classList.add("content-wrapper"),this.isLoading){const s=new an({size:16}).element;s.style.margin="auto",o.append(s),this.element.append(o)}else{const s=document.createElement("div");if(s.classList.add("content-info"),r&&(this.iconLeft=new vt({name:r}),s.append(this.iconLeft.element)),n&&s.appendChild(document.createTextNode(n)),i&&(this.iconRight=new vt({name:i}),s.append(this.iconRight.element)),o.append(s),this.variant==="copy-to-clipboard"){const a=document.createElement("div");a.classList.add("content-copy"),a.append(document.createTextNode(this.copyText)),o.append(a)}this.element.append(o)}}handleClick(n){this.variant==="copy-to-clipboard"&&this.copyText&&(this.element.setAttribute("data-is-copied","true"),setTimeout(()=>{this.element.setAttribute("data-is-copied","false")},3e3)),this.onClick&&!this.isLoading&&!this.isDisabled&&this.onClick(n)}setLoading(n){this.isLoading=n,this.updateContent({text:this.originalText,iconLeft:this.originalIconLeft,iconRight:this.originalIconRight})}setDisabled(n){this.isDisabled=n,this.element.disabled=n}}const se=(e,t,n)=>{const r=j.getStyles();return t?r.input.disabled:e?r.input.error:r.input.normal},Dn=(e,t,n)=>({label:{size:j.getFontScale().xSmall,weight:500,color:se(e,t).textColor},helperText:{size:j.getFontScale().xSmall,weight:400,color:se(e,t).hintTextColor}}),vf=(e,{error:t,disabled:n,maxWidth:r})=>ne`
|
|
278
265
|
display: flex;
|
|
279
266
|
flex-direction: column;
|
|
280
267
|
gap: 4px;
|
|
@@ -289,17 +276,17 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
289
276
|
display: flex;
|
|
290
277
|
align-items: center;
|
|
291
278
|
|
|
292
|
-
background-color: ${
|
|
293
|
-
color: ${
|
|
279
|
+
background-color: ${se(t,n).backgroundColor};
|
|
280
|
+
color: ${se(t,n).textColor};
|
|
294
281
|
|
|
295
|
-
border: ${
|
|
296
|
-
${
|
|
282
|
+
border: ${se(t,n).borderWidth}px solid
|
|
283
|
+
${se(t,n).borderColor};
|
|
297
284
|
transition: border-color 0.3s ease;
|
|
298
285
|
cursor: pointer;
|
|
299
286
|
|
|
300
287
|
height: 40px;
|
|
301
288
|
padding: 0px;
|
|
302
|
-
border-radius: ${
|
|
289
|
+
border-radius: ${se(t,n).borderRadius}px;
|
|
303
290
|
|
|
304
291
|
:hover,
|
|
305
292
|
:focus-within {
|
|
@@ -338,16 +325,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
338
325
|
|
|
339
326
|
&::placeholder {
|
|
340
327
|
font-size: 16px;
|
|
341
|
-
color: ${
|
|
328
|
+
color: ${se(t,n).placeholderTextColor};
|
|
342
329
|
opacity: 1;
|
|
343
330
|
}
|
|
344
331
|
&:-ms-input-placeholder {
|
|
345
332
|
font-size: 16px;
|
|
346
|
-
color: ${
|
|
333
|
+
color: ${se(t,n).placeholderTextColor};
|
|
347
334
|
}
|
|
348
335
|
&::-ms-input-placeholder {
|
|
349
336
|
font-size: 16px;
|
|
350
|
-
color: ${
|
|
337
|
+
color: ${se(t,n).placeholderTextColor};
|
|
351
338
|
}
|
|
352
339
|
|
|
353
340
|
&::-webkit-contacts-auto-fill-button {
|
|
@@ -381,14 +368,14 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
381
368
|
overflow-y: auto;
|
|
382
369
|
border: 1px solid ${e.input.focus.borderColor};
|
|
383
370
|
border-radius: 8px;
|
|
384
|
-
background-color: ${
|
|
371
|
+
background-color: ${se(t,n).backgroundColor};
|
|
385
372
|
z-index: 10;
|
|
386
373
|
list-style-type: none;
|
|
387
374
|
padding: 0;
|
|
388
375
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
389
376
|
|
|
390
377
|
scrollbar-width: thin;
|
|
391
|
-
scrollbar-color: ${e.input.focus.borderColor} ${
|
|
378
|
+
scrollbar-color: ${e.input.focus.borderColor} ${se().backgroundColor};
|
|
392
379
|
|
|
393
380
|
&::-webkit-scrollbar {
|
|
394
381
|
width: 6px;
|
|
@@ -396,7 +383,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
396
383
|
}
|
|
397
384
|
|
|
398
385
|
&::-webkit-scrollbar-track {
|
|
399
|
-
background: ${
|
|
386
|
+
background: ${se().backgroundColor};
|
|
400
387
|
border-radius: 8px;
|
|
401
388
|
}
|
|
402
389
|
|
|
@@ -416,7 +403,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
416
403
|
padding: 8px;
|
|
417
404
|
cursor: pointer;
|
|
418
405
|
transition: background-color 0.2s ease;
|
|
419
|
-
color: ${
|
|
406
|
+
color: ${se(t,n).textColor};
|
|
420
407
|
|
|
421
408
|
&:hover {
|
|
422
409
|
background-color: ${e.input.focus.backgroundColor};
|
|
@@ -437,7 +424,7 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
437
424
|
.select-icon {
|
|
438
425
|
margin-left: 8px;
|
|
439
426
|
}
|
|
440
|
-
`;class
|
|
427
|
+
`;class yf extends we{constructor({name:n,label:r,options:i,helperText:o,placeholder:s=W.translate("select"),emptyMessage:a=W.translate("select_item"),error:c=!1,disabled:u=!1,maxWidth:l="100%",showValue:d=!1,validateOn:f,onChange:h}){super({tag:"div",styles:g=>vf(g,{error:c,disabled:u,maxWidth:l})});S(this,"selectContainer");S(this,"inputElement");S(this,"dropdownIcon");S(this,"optionsList");S(this,"helperTextElement",null);S(this,"labelElement",null);S(this,"isOpen",!1);S(this,"filteredOptions",[]);S(this,"selectedValue",null);S(this,"highlightedIndex",-1);S(this,"currentErrorState");S(this,"currentDisabledState");S(this,"currentHelperText");S(this,"name");S(this,"label");S(this,"options");S(this,"emptyMessage");S(this,"showValue");S(this,"validateOn");S(this,"maxWidth");S(this,"onChange");this.name=n,this.label=r,this.options=i,this.emptyMessage=a,this.showValue=d,this.currentErrorState=c,this.currentDisabledState=u,this.currentHelperText=o,this.validateOn=f,this.maxWidth=l,this.onChange=h,r&&this.renderLabel(),this.selectContainer=document.createElement("div"),this.selectContainer.classList.add("select-input-container"),this.element.append(this.selectContainer),this.inputElement=document.createElement("input"),this.inputElement.classList.add("select-input-field"),this.inputElement.name=n,this.inputElement.id=n,this.inputElement.autocomplete="off",this.inputElement.disabled=u,s&&(this.inputElement.placeholder=s),this.selectContainer.append(this.inputElement),this.dropdownIcon=document.createElement("span"),this.dropdownIcon.classList.add("dropdown-icon-wrapper");const p=new vt({name:"arrow_down_line",size:24}).element;this.dropdownIcon.appendChild(p),this.selectContainer.appendChild(this.dropdownIcon),this.optionsList=document.createElement("ul"),this.optionsList.classList.add("select-options-list"),this.selectContainer.append(this.optionsList),this.renderOptions(i),this.selectContainer.addEventListener("click",g=>{this.optionsList.contains(g.target)||(this.toggleDropdown(!0),this.inputElement.setSelectionRange(0,this.inputElement.value.length),this.inputElement.focus())}),this.inputElement.addEventListener("input",g=>{var m;this.handleInput(g),(m=this.onChange)==null||m.call(this)}),this.selectContainer.addEventListener("change",this.handleInputChange.bind(this)),this.inputElement.addEventListener("keydown",g=>this.handleKeyDown(g)),o&&this.renderHelperText(o),document.addEventListener("click",this.handleClickOutside.bind(this))}handleInputChange(){var n;this!=null&&this.validateOn&&this.validate(),(n=this.onChange)==null||n.call(this)}renderLabel(){if(!this.label)return;const n=Dn(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new X({text:this.label,size:n.label.size,weight:n.label.weight,color:n.label.color,variant:"label"}).element,this.element.append(this.labelElement)),this.labelElement.htmlFor=this.name}renderHelperText(n){if(!n){this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null);return}const r=Dn(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new X({text:n,size:r.helperText.size,weight:r.helperText.weight,color:r.helperText.color}).element,this.element.append(this.helperTextElement))}updateComponentStyles(){const n=r=>vf(r,{error:this.currentErrorState,disabled:this.currentDisabledState,maxWidth:this.maxWidth});this.element.className=n(j.getStyles())}renderOptions(n){if(this.optionsList.innerHTML="",this.filteredOptions=n,n.length>0)n.forEach(r=>{const i=document.createElement("li");if(i.classList.add("select-option"),r.icon){const s=new vt({name:r.icon,size:20}).element;i.appendChild(s)}const o=new X({text:`${r.name} ${this.showValue?r.value:""}`,size:16,lineHeight:24,weight:400}).element;i.appendChild(o),i.dataset.value=String(r.value),i.addEventListener("click",()=>this.handleOptionClick(r)),this.optionsList.append(i)});else{const r=document.createElement("div");r.classList.add("empty-option");const i=new X({text:this.emptyMessage??""}).element;r.append(i),this.optionsList.append(r)}}handleInput(n){const r=n.target.value.toLowerCase();if(r===""){const o=this.selectContainer.querySelector(".select-icon");o&&o.remove(),this.selectedValue=null}const i=this.options.filter(o=>{const s=o.name.toLowerCase().includes(r),a=this.showValue?String(o.value).toLowerCase().includes(r):!1;return s||a});this.renderOptions(i),this.toggleDropdown(!0)}toggleDropdown(n){this.isOpen=n,this.optionsList.style.display=this.isOpen?"block":"none",this.dropdownIcon.style.transform=this.isOpen?"rotate(-180deg)":"rotate(0deg)"}handleOptionClick({name:n,value:r,icon:i}){const o=this.selectContainer.querySelector(".select-icon");if(o&&o.remove(),i){const a=new vt({name:i,size:24}).element;a.classList.add("select-icon"),this.selectContainer.insertBefore(a,this.inputElement)}this.inputElement.value=this.showValue?String(r):n,this.selectedValue=r,this.renderOptions(this.options),this.toggleDropdown(!1),this.highlightedIndex=-1;const s=new Event("change",{bubbles:!0});this.inputElement.dispatchEvent(s)}handleClickOutside(n){this.selectContainer.contains(n.target)||this.toggleDropdown(!1)}handleKeyDown(n){const{key:r}=n;if(r==="Escape"){this.toggleDropdown(!1);return}if(!this.isOpen)return;const i=this.optionsList.querySelectorAll(".select-option");switch(r){case"ArrowDown":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex+1)%i.length,this.highlightOption(this.highlightedIndex);break;case"ArrowUp":n.preventDefault(),this.highlightedIndex=(this.highlightedIndex-1+i.length)%i.length,this.highlightOption(this.highlightedIndex);break;case"Enter":if(n.preventDefault(),this.highlightedIndex>=0&&this.highlightedIndex<this.filteredOptions.length){const o=this.filteredOptions[this.highlightedIndex];this.handleOptionClick(o)}break}}highlightOption(n){const r=this.optionsList.querySelectorAll(".select-option");if(r.forEach(i=>i.classList.remove("highlighted")),n>=0&&n<r.length){const i=r[n];i.classList.add("highlighted"),i.scrollIntoView({block:"nearest"})}}getValue(){return this.selectedValue}setValue(n){const r=this.options.find(i=>i.value===n);r&&this.handleOptionClick(r)}setHelperText(n){n?this.renderHelperText(n):this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null),this.updateComponentStyles()}setErrorState(n){this.currentErrorState!==n&&(this.currentErrorState=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}setDisabled(n){this.currentDisabledState!==n&&(this.currentDisabledState=n,this.inputElement.disabled=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}validate(n){const r=this.selectedValue!==null;if(this.setErrorState(!r),this.renderLabel(),!r){const i=n||(this.getValue()?W.translate("invalid_field"):W.translate("required_field"));this.renderHelperText(i)}return r}destroy(){document.removeEventListener("click",this.handleClickOutside.bind(this)),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),super.destroy()}}const bf=(e,{error:t,disabled:n})=>ne`
|
|
441
428
|
display: flex;
|
|
442
429
|
flex-direction: column;
|
|
443
430
|
gap: 4px;
|
|
@@ -457,16 +444,16 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
457
444
|
line-height: normal;
|
|
458
445
|
height: 40px;
|
|
459
446
|
padding: 8px;
|
|
460
|
-
border-radius: ${
|
|
447
|
+
border-radius: ${se(t,n).borderRadius}px;
|
|
461
448
|
font-size: 16px;
|
|
462
449
|
line-height: 24px;
|
|
463
450
|
outline: none;
|
|
464
451
|
caret-color: ${e.textColor};
|
|
465
452
|
|
|
466
|
-
background-color: ${
|
|
467
|
-
color: ${
|
|
468
|
-
border: ${
|
|
469
|
-
${
|
|
453
|
+
background-color: ${se(t,n).backgroundColor};
|
|
454
|
+
color: ${se(t,n).textColor};
|
|
455
|
+
border: ${se(t,n).borderWidth}px solid
|
|
456
|
+
${se(t,n).borderColor};
|
|
470
457
|
transition: border-color 0.3s ease;
|
|
471
458
|
|
|
472
459
|
:hover,
|
|
@@ -493,23 +480,23 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
493
480
|
}
|
|
494
481
|
&::placeholder {
|
|
495
482
|
font-size: 16px;
|
|
496
|
-
color: ${
|
|
483
|
+
color: ${se(t,n).placeholderTextColor};
|
|
497
484
|
opacity: 1;
|
|
498
485
|
}
|
|
499
486
|
&:-ms-input-placeholder {
|
|
500
487
|
font-size: 16px;
|
|
501
|
-
color: ${
|
|
488
|
+
color: ${se(t,n).placeholderTextColor};
|
|
502
489
|
}
|
|
503
490
|
&::-ms-input-placeholder {
|
|
504
491
|
font-size: 16px;
|
|
505
|
-
color: ${
|
|
492
|
+
color: ${se(t,n).placeholderTextColor};
|
|
506
493
|
}
|
|
507
494
|
&::-webkit-contacts-auto-fill-button {
|
|
508
495
|
visibility: hidden;
|
|
509
496
|
pointer-events: none;
|
|
510
497
|
}
|
|
511
498
|
}
|
|
512
|
-
`;class
|
|
499
|
+
`;class wf extends we{constructor({name:n,label:r,helperText:i,type:o="text",placeholder:s,error:a=!1,disabled:c=!1,validationRegex:u,validateOn:l,mask:d,maxLength:f,minLength:h,onChange:p,onBlur:g}){super({tag:"div",styles:m=>bf(m,{error:a,disabled:c})});S(this,"inputElement");S(this,"helperTextElement",null);S(this,"labelElement",null);S(this,"currentErrorState");S(this,"currentDisabledState");S(this,"name");S(this,"label");S(this,"currentHelperText");S(this,"validationRegex");S(this,"validateOn");S(this,"mask");S(this,"onChange");S(this,"onBlur");this.currentErrorState=a,this.currentDisabledState=c,this.name=n,this.label=r,this.currentHelperText=i,this.validateOn=l,this.validationRegex=u,this.mask=d,this.onChange=p,this.onBlur=g,r&&this.renderLabel(),this.inputElement=document.createElement("input"),this.inputElement.type=o==="number"?"number":"text",this.inputElement.inputMode=o,this.inputElement.name=n,this.inputElement.id=n,this.inputElement.autocomplete="off",this.inputElement.disabled=c,s&&(this.inputElement.placeholder=s),f&&(this.inputElement.maxLength=f),h&&(this.inputElement.minLength=h),this.inputElement.classList.add("input-field"),this.element.append(this.inputElement),["number","tel"].includes(o)&&this.inputElement.addEventListener("input",this.handleNumericInput.bind(this)),this.inputElement.addEventListener("input",this.handleInputChange.bind(this)),this.inputElement.addEventListener("blur",this.handleInputBlur.bind(this)),i&&this.renderHelperText(i)}handleInputChange(){var n;this.inputElement.value=Q1(this.inputElement.value,this.mask),(this==null?void 0:this.validateOn)==="onChange"&&this.validate(),(n=this.onChange)==null||n.call(this)}handleInputBlur(){var n;(this==null?void 0:this.validateOn)==="onBlur"&&this.validate(),(n=this.onBlur)==null||n.call(this)}renderLabel(){if(!this.label)return;const n=Dn(this.currentErrorState,this.currentDisabledState);this.labelElement?(this.labelElement.textContent=this.label,this.labelElement.style.color=n.label.color):(this.labelElement=new X({text:this.label,size:n.label.size,weight:n.label.weight,color:n.label.color,variant:"label"}).element,this.element.append(this.labelElement)),this.labelElement.htmlFor=this.name}renderHelperText(n){if(!n){this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null);return}const r=Dn(this.currentErrorState,this.currentDisabledState);this.helperTextElement?(this.helperTextElement.textContent=n,this.helperTextElement.style.color=r.helperText.color):(this.helperTextElement=new X({text:n,size:r.helperText.size,weight:r.helperText.weight,color:r.helperText.color}).element,this.element.append(this.helperTextElement))}updateComponentStyles(){const n=r=>bf(r,{error:this.currentErrorState,disabled:this.currentDisabledState});this.element.className=n(j.getStyles())}handleNumericInput(n){const r=n.target;r.value=r.value.replace(/[^0-9]/g,"")}getValue(){return this.inputElement.value}setValue(n){this.inputElement.value=n}setHelperText(n){n?this.renderHelperText(n):this.helperTextElement&&(this.helperTextElement.remove(),this.helperTextElement=null),this.updateComponentStyles()}setErrorState(n){this.currentErrorState!==n&&(this.currentErrorState=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}setDisabled(n){this.currentDisabledState!==n&&(this.currentDisabledState=n,this.inputElement.disabled=n,this.renderLabel(),this.renderHelperText(this.currentHelperText),this.updateComponentStyles())}validate(n){if(!this.validationRegex)return!0;const r=ey(this.inputElement.value,this.mask),i=this.validationRegex.test(r);if(this.setErrorState(!i),this.renderLabel(),!i){const o=n||(this.getValue().trim()?W.translate("invalid_field"):W.translate("required_field"));this.renderHelperText(o)}return i}}var Fn=(e=>(e.AMOUNT_DISPLAY="AMOUNT_DISPLAY",e.COPY="COPY",e.DESCRIPTION="DESCRIPTION",e.EXPIRATION_TIMER="EXPIRATION_TIMER",e.QR_CODE="QR_CODE",e.SHARE="SHARE",e))(Fn||{}),pa=(e=>(e.TEXT="TEXT",e.SELECT="SELECT",e))(pa||{});const Hb=e=>{if(e)try{return new RegExp(e)}catch{console.warn("Invalid regex from backend:",e);return}},jb=e=>e.map(t=>({name:t.value,value:t.key}));var Ef=(e=>(e.MOBILE="480px",e.TABLET="768px",e.LAPTOP="1024px",e.DESKTOP="1280px",e))(Ef||{});const qb=()=>ne`
|
|
513
500
|
display: flex;
|
|
514
501
|
flex-direction: column;
|
|
515
502
|
gap: 12px;
|
|
@@ -519,11 +506,11 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
519
506
|
gap: 12px;
|
|
520
507
|
flex-direction: row;
|
|
521
508
|
|
|
522
|
-
@media (max-width: ${
|
|
509
|
+
@media (max-width: ${Ef.MOBILE}) {
|
|
523
510
|
flex-direction: column;
|
|
524
511
|
}
|
|
525
512
|
}
|
|
526
|
-
`;class
|
|
513
|
+
`;class Wb extends we{constructor(n){super({tag:"div",styles:()=>qb()});S(this,"componentProps");S(this,"dynamicInputs",{});S(this,"onValidationChange",()=>{});if(this.componentProps=n,n.title){const r=new X({text:n.title,size:"medium",weight:400}).element;r.style.padding="12px 0",this.element.append(r)}this.renderDynamicInputs()}renderDynamicInputs(){if(!this.componentProps.requiredFields)return;const n=this.componentProps.requiredFields.find(o=>o.field==="document_type"),r=this.componentProps.requiredFields.find(o=>o.field==="document_number"),i=this.componentProps.requiredFields.filter(o=>o.field!=="document_type"&&o.field!=="document_number");n&&r?this.renderDocumentNumberWithType(n,r):(n&&this.renderStandardInput(n),r&&this.renderStandardInput(r)),i.forEach(o=>{this.renderStandardInput(o)})}renderDocumentNumberWithType(n,r){const i=document.createElement("div");i.classList.add("row-container");const o=this.createInputElement(n),s=this.createInputElement(r);this.dynamicInputs[n.field]=o,this.dynamicInputs[r.field]=s,this.addInputEventListeners(o,n.type),this.addInputEventListeners(s,r.type),i.append(o.element,s.element),this.element.append(i)}renderStandardInput(n){const r=this.createInputElement(n);this.dynamicInputs[n.field]=r,this.addInputEventListeners(r,n.type),this.element.append(r.element)}createInputElement(n){return n.type===pa.SELECT?this.createSelectInput({name:n.field,label:n.label,placeholder:n.placeholder,options:jb(n.values),validateOn:"onChange"}):this.createTextInput({name:n.field,label:n.label,placeholder:n.placeholder,type:"text",validationRegex:Hb(n.regex),validateOn:"onChange"})}createSelectInput(n){return new yf(n)}createTextInput(n){return new wf(n)}addInputEventListeners(n,r){const i=r===pa.TEXT?"input":"change";n.element.addEventListener(i,()=>{this.validateForm(),this.triggerValidationChange()})}validateForm(){return Object.values(this.dynamicInputs).every(n=>n.getValue()&&n.validate())}getFormData(){const n={};return Object.entries(this.dynamicInputs).forEach(([r,i])=>{const o=i.getValue();n[r]=o!==null?String(o):""}),n}setValidationChangeHandler(n){this.onValidationChange=n,this.triggerValidationChange()}triggerValidationChange(){this.onValidationChange&&this.onValidationChange(this.validateForm())}setFieldError(n,r,i){const o=this.dynamicInputs[n];o&&(o.setErrorState(r),i&&o.setHelperText(i))}}const Gb={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.2",MODE:"test",API_BASE_URL:"https://partners-api-tst.astropay.com/api",RESOURCES_BUCKET:"https://rs-tst.astropay.com",CHECKOUT_URL:"https://checkout-tst.astropay.com"},sandbox:{NAME:"@astropay/payments-lib",VERSION:"2.0.2",MODE:"staging",API_BASE_URL:"https://partners-api-sandbox.astropay.com/api",RESOURCES_BUCKET:"https://rs-tst.astropay.com",CHECKOUT_URL:"https://checkout-sandbox.astropay.com"},production:{NAME:"@astropay/payments-lib",VERSION:"2.0.2",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com"}};var ui=(e=>(e.SESSION_ID="session_id",e))(ui||{});const hn=class hn{static init(t){const n=so(t==null?void 0:t.environment,[...q1,"test"],"production"),r=so(t==null?void 0:t.currencyMode,K1,"iso");hn.environment=n,hn.currencyMode=r}static getRuntimeConfig(){const t=hn.environment||"production";return Gb[t]}static getEnvironment(){return hn.environment}static getCurrencyMode(){return hn.currencyMode}};S(hn,"environment"),S(hn,"currencyMode");let Ze=hn;const Kb={AED:"ar-AE",AOA:"pt-AO",AND:"ca-AD",ARS:"es-AR",AUD:"en-AU",BDT:"bn-BD",BGN:"bg-BG",BOB:"es-BO",BRL:"pt-BR",CAD:"en-CA",CDF:"fr-CD",CLP:"es-CL",CNY:"zh-CN",COP:"es-CO",CZK:"cs-CZ",DKK:"da-DK",EGP:"ar-EG",ETB:"am-ET",EUR:"de-DE",GBP:"en-GB",GHS:"en-GH",GTQ:"es-GT",HNL:"es-HN",HKD:"zh-HK",HUF:"hu-HU",IDR:"id-ID",INR:"hi-IN",JPY:"ja-JP",KES:"en-KE",KRW:"ko-KR",KWD:"ar-KW",KZT:"kk-KZ",LKR:"si-LK",LSL:"st-LS",MAD:"ar-MA",MGA:"mg-MG",MKD:"mk-MK",MMK:"my-MM",MNT:"mn-MN",MOP:"zh-MO",MXN:"es-MX",MYR:"ms-MY",MZN:"pt-MZ",NGN:"en-NG",NIO:"es-NI",NOK:"no-NO",NPR:"ne-NP",NZD:"en-NZ",PAB:"es-PA",PEN:"es-PE",PKR:"ur-PK",PLN:"pl-PL",PYG:"es-PY",QAR:"ar-QA",RMB:"zh-CN",RSD:"sr-RS",RUB:"ru-RU",RWF:"rw-RW",SAR:"ar-SA",SEK:"sv-SE",SLL:"en-SL",SVC:"es-SV",THB:"th-TH",TND:"ar-TN",TRY:"tr-TR",TTD:"en-TT",TWD:"zh-TW",TZS:"sw-TZ",UAH:"uk-UA",UGX:"en-UG",USD:"en-US",UYU:"es-UY",UZS:"uz-UZ",VND:"vi-VN",XAF:"fr-CM",XOF:"fr-SN",ZAR:"en-ZA",ZWD:"en-ZW",ZWL:"en-ZW"},Yb=(e,t)=>{const n=Kb[t]||"en-US";return new Intl.NumberFormat(n,{style:"decimal",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},Zb={AED:"د.إ",AOA:"Kz",AND:"€",ARS:"$",AUD:"$",BDT:"৳",BGN:"лв",BOB:"Bs.",BRL:"R$",CAD:"$",CDF:"FC",CLP:"$",CNY:"¥",COP:"$",CZK:"Kč",DKK:"kr",EGP:"£",ETB:"Br",EUR:"€",GBP:"£",GHS:"₵",GTQ:"Q",HNL:"L",HKD:"$",HUF:"Ft",IDR:"Rp",INR:"₹",JPY:"¥",KES:"KSh",KRW:"₩",KWD:"د.ك",KZT:"₸",LKR:"₨",LSL:"L",MAD:"د.م.",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MXN:"$",MYR:"RM",MZN:"MT",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",PAB:"B/.",PEN:"S/.",PKR:"₨",PLN:"zł",PYG:"₲",QAR:"﷼",RMB:"¥",RSD:"РСД",RUB:"₽",RWF:"FRw",SAR:"ر.س",SEK:"kr",SLL:"Le",SVC:"$",THB:"฿",TND:"د.ت",TRY:"₺",TTD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"US$",UYU:"$",UZS:"so'm",VND:"₫",XAF:"FCFA",XOF:"CFA",ZAR:"R",ZWD:"$",ZWL:"$"},Jb=e=>e===void 0?"":Zb[e.trim()]||e,ha=(e,t,n)=>{const r=Yb(e,t);return n==="symbol"?`${Jb(t)} ${r}`:`${r} ${t}`},Xb=e=>ne`
|
|
527
514
|
display: flex;
|
|
528
515
|
flex-direction: column;
|
|
529
516
|
background-color: ${e.card.backgroundColor};
|
|
@@ -532,23 +519,35 @@ ${n}`:""}`;await hi(r)}};function Gr(e,t,n){return t.includes(e)?e:n}const nm=e=
|
|
|
532
519
|
padding: ${e.card.padding}px;
|
|
533
520
|
border: ${e.card.borderWidth}px ${e.card.borderStyle} ${e.card.borderColor};
|
|
534
521
|
border-radius: ${e.card.borderRadius}px;
|
|
535
|
-
`;class
|
|
522
|
+
`;class Qb extends we{constructor(t){super({tag:"div",styles:i=>Xb(i)});const n=new X({text:W.translate("payment_amount"),size:"medium",weight:400}).element,r=new X({text:ha(t.amount,t.currency,Ze.getCurrencyMode()),size:"large",weight:600}).element;this.element.append(n,r)}}const e2=()=>ne`
|
|
536
523
|
display: flex;
|
|
537
524
|
flex-direction: column;
|
|
538
525
|
align-items: center;
|
|
539
526
|
gap: 8px;
|
|
540
|
-
`;class Oi extends se{constructor(t){super({tag:"div",styles:()=>s1()});const n=t.type==="success",r=n?z.getStyles().messages.success.textColor:z.getStyles().messages.error.textColor,s=new qe({name:n?"check_circle_line":"close_circle_line",size:96,color:r}).element;if(this.element.append(s),t.title){const i=new H({text:t.title,size:20,lineHeight:30,weight:600,align:"center"}).element;this.element.append(i)}if(t.description){const i=new H({text:t.description,size:16,lineHeight:24,align:"center"}).element;this.element.append(i)}}}var E=Ke;function Li(){var e=Ke;const t=["clear","127830LZHlSi",e(795),e(743),e(794),e(649),e(511),"1048780OzWlkN",e(668),e(412),e(465),e(180),e(520),e(373),e(419),e(562),e(422),"off"];return(Li=function(){return t})()}(function(){for(var e=Ke,t=Mi();;)try{if(-parseInt(e(329))/1*(parseInt(e(274))/2)+-parseInt(e(369))/3*(-parseInt(e(367))/4)+-parseInt(e(233))/5+parseInt(e(145))/6*(-parseInt(e(701))/7)+-parseInt(e(655))/8*(-parseInt(e(270))/9)+parseInt(e(315))/10*(parseInt(e(142))/11)+parseInt(e(685))/12===588751)break;t.push(t.shift())}catch{t.push(t.shift())}})();const Ni=Di;function Mi(){var e=["3448vNCtZZ","761436JoNrAO","5310140VtlWwy","Request timeout","7672278JDWNZO","90ZjyTbp","3104038VhHmhJ","341079ldogSu","3114441jTKeeA","key","PRODUCTION","getAttribute","toDotCase","send","102532iujTOj","757371vntIDP","rule","28497zqLGhH","1965484iDLxVf","justify","10QefxGX","5066250nuHGFb","append","1380400kMJPdd","tags","3598075UDNdui","rel","latest","5679575iNTExO","@font-feature-values","700156cwVhpM","13090752DcUgRT","count","lowerFirst","box-pack:$3","@keyframes","6990495zFYjlD","timeout","SANDBOX","1764180DwriBQ","28900hQasRN","get","$2box$3","592uldMpH","1906140GGDNCn","forEach","6lcQlGI","timeZone","330066EfbpyJ","2180136rfoyVo","2548490MycJlj","3489ZHTUlC","includes","902079TZNeVj","hasOwnProperty","20cFIzva","flex-line-pack","5421zZCtjq","anim","1685971anZxDF","1118807BrroiT","633515GvGIbN","href","612712APocYB","-ms-","34347599FblyIU","5oIWUit",'/"]',"styleSheets","1149940kbRkDq","18emqyKv","216768ATlgsw","REQUIRED","1538910aqOPES","167058fDTlal","1802382UuEKog","11928996WPgChJ","297544AzCjab","7cCQubY","210052cCRFdo","15365691CaBpSv","prepend","1837320JmVWKN","apply","5488040tLgchU","6404728IJjHNF","cssRules","[HTTP]: ","function","538328lGaoiz","3WyhRFj","set","document.head or document.body","18KOgRUC","3PpNGVC","frames","request","formatKeys","2515230SGPlYS","1557YOosgA","container","4144596Ukwkkq","14mcAgvY","_createCaseFirst","80179OoRuKl","NOT_FOUND","test","1063965TOYbKD","112560WXZvtM","5855416GyXitv","authorization","insertionPoint","ctx","3122830eGkjjc","173392QMdDYZ","197776ZnKCeZ","comm","42CEhiUc","3UDJFFS","8znKpbY","1rkGFTj","1103656RUOYui","5297088ciYuDR","CopyButton","random","5589390vSVLAu","done","969632YGVaMk","flex-pack:$3","setPrototypeOf","negative","$2$3","8766CUlXUX","6555474dHVLiB","16hoClBR","10399347ouOdzC","1731331adTcvK","6011170PFMfeO","box-","2QsMDbx","396880hxDmUW","5lLsGOe","lower","288762yBOcUy","927680PXUBpa","5272970jsKcdl","210wvAPTz","4390984qBtQNZ","1042915vBnDcJ","slice","18146574kLGOdt","Content-Type","@counter-style","1635840LijluJ","assign","then","148iTkCvR","upperFirst","4586523dESxoU","102UdDlbM","13480IirCBl","application/json","-$&","snake","startCase","3782506eozEyq","[UNHANDLED]: ","1586289ZbsznC","parent","compat","style[data-emotion]:not([data-s])","41346sAgKHc","origin","1542472UUshgd","toPascalCase","domians","187957vMwqit","toSnakeCase","568pAcJOy","5590kjPEGP","@font-face","34057TCsfxk","9621207ZSMPqN","data-emotion","_startCase","print-","@media","link",":read-write","NOT_LOADED","9356KfJoDB","animationName","4mPQIOh","animation","2696336QqSQcN","start","3363787mMyewX","12991583mFbRDh","35tYPZLV","35168opQkvL","32WPbhAk","hydrate","/public/v1/token/reveal","36hVbjtN","basis","$1$2","cdn","__emotion_styles","22apMIFO","3goapWe","3275226iDBkQv","push","221142kMnpSu","querySelectorAll","114RSjmoG","reveal","2672020NupvKQ","5voBSrt","5280612FAmHRj","2YDvJFs","121946FvfpOL","TIMEOUT","BAD_REQUEST","308070mzXybL","7704828AlyWpW","4136vTyAoM","42WATbWV","17375868QkLWYY","1961979ltppkW","369356uTNDzr","5112212jRFQZI","24746700nYUjHu","$1 $2","6521168AcnhGa","style","12tOiqGC","https://tokenizer-tst.cc.astropay.com","speedy","60VyHydS","793022whjRWB","bind","kebab","10Oqises","add","1470645xRoijs","object","captureStackTrace","781649cCTwXr","182824NOFIwU","4817756GOdPsv","BASE_CDN","isArray","@supports","1244744kHEZvp","1204400cULrpT","449711XSjyNn","@namespace","57gVyDRX","emit","6236046SweZxs","defineProperties","@@INIT","3014374nROcbQ","params","sheet","1671942sLAGQH","Unable to find ","shift","canExecute","upper","UNHANDLED","321246WzqUuK","2416zstDHz","78TjMsRA","@document","486479crVyAA","1274230eUYpuD","7476MqGCll","https://tokenizer.cc.astropay.com","9qEwJkj","94mlxQmC","_insertTag","@viewport","copy-button","2oFrXUh","css","707329nPsPGZ","3903120ZTbQWm","1250232QMjwkz","993063ECHrBH","off","box$3","2387410tdnXlE","environment","type","4XTbgyi","207494VIJaqZ","207VWsTHT","6MQcvFH","35KTILAE","623aFRIRv","104MtyiFW","70fByxgL","1328390hcsUJy","11965976myZRSf","2932168wOOQED","7CAfDgU","27xTvXzF","5139khheWn","18298ErvNda","15qVcyAs","2581385zzzlSz","1531173EygmBU","5013TdEGGQ","39251454EyvEGu","1szHVRr","nextSibling","171eGkepJ","995792ZXdNpW","getFullCdn","49fgToOT","141238OYIhFf","3604728wtPlZt","9byfBJF","exec","next","message","70759QyvmDC","isSpeedy","128yfgIdV","data-s","200ROoAmA","shrink","length","282358JpRRgN","isOperational","insert","3278505kVkcHW","2558421fHqYVU","1165706VPRSLL","split","360993lzNNst","3986rrEZYp","return","3480945BQAAYg","2nMBmkS","2281844ROitQp","BASE_API","27HmsHKI","679404ZmaTyg","20xkgBFi","3908064tZgPPb","1790914KWViXl","inserted","stylisPlugins","reduce","insertBefore","26oJRKGO","119987EZDfNd","565eyruQF","Access-Control-Allow-Origin","595876LgUVRS","1992206jKEGfb","join","193550GoZXIJ","202wLqUwO","replace","baseURL"," is invalid.","99amzLEi","12446nhMFLu","1856148uSihXJ","31566270qvtShe","56045nULafv","abs","5889208ocarfU","2206497yNbZFm","7WjjEbv","@keyframes ","firstChild","305907rAOuHi","1070106SrHRtP","1KlNACj","2829256VMfbYc","801054pmVKPQ","45296tjbJvx","399116yuJdxn","TimeZone","removeEventListener","UNDEFINED",' "]',"lastIndex","18388260JgPhmo","790sQdzeI","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx","39nuPwxQ","nonce","1906825qFGXWA","102Qkfvvl","name","raw","20gywqiU","7308324sgDoMc","34825311qnCLyR","991531xZguiI","4593190CadDlo","INVALID","1uSGfgo","input-$1","1501542qKAixX","prototype","registered","456wJQuIj","347732LsCzct","parse","undefined","76385hkeDYT","inline-","115026FZBXCQ","5txmdnE","32HPdvVb","8954800LNVZHA","accessToken","3GcEFSv","props","5028BbqWZE","34672561hfhCnC","6522030iNQqBd","36TYjiRw","474fHLsgQ","365994YPzeNn","toKebabCase","6SBjYSO","1HxbtmM","toCamelCase","3xMbMIj","313859KKbbgd","keys","6LCyCWH","tb-rl","1145017tuPjtp","api","10895PHjSJt","boolean","flex-$1$2","2012180BGZvZq","5JHUgnG","6eqGueN","create","1483570zwTktD","366KnZgCn","14qDkMOo","8FUVWOn","38685lFcQsk","appendChild","4wswXHb","INTERNAL_SERVER_ERROR","315634dCJvdO","32039NIQJjh","trim","entries","143352vIzUva","-grow","6vPzjsU","getOwnPropertyDescriptors","192VVRXxR","2013040uXGWiH","grow","10gWvkPZ","getOwnPropertySymbols","!important","5028340uiCobm","splitWords","1398012AIJUyj","1632420YnhDrH","ctr"," is undefined.","41812yDXNFv","2495164uYJjkv","-moz-","version","502691MEcBqX","getHeaders","3kPtUIZ","stringify","14822650JPeFEZ","@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ","42054ESbccP","_toWords","4242528bXZfiT","3344667OIHhxe","5750396vrmTdj","head","268152SJsZnw","427cxPooO","isUndefined","3930zrQOch","listeners","decl","@import","filter","stop","location","79674ZpwWYN","293732SBYxst","/public/v1/token","fromCharCode","toLowerCase","toUpperCase","call","GET","addEventListener","setAttribute","26941288CkDEbN","post","11oqlwuN","Access token not set","87GWhrFE","emitter","before","isRequired","1369700dRAXAo","5GSCGHS","string","toString","24384006yWcRvg","_canExecute","8765008liwqJC","sourceWindow","sandbox","7368UiaItP","12GMrAvZ","HTTP","dns-prefetch","4410036tOJnlJ","264834CkfPaR","children","4214610DepdAD","1472518dXJTTo","3379032afmmzz","Component selectors can only be used in conjunction with ","8ZmfgGJ","44cPbEBd","582SAPPev","350313NZGJmJ","4249880hofxWm",":read-only","436145BXkDSV","toSentenceCase","24qGiocM","flex-item-","REQUEST_TIMEOUT","UNAUTHORIZED","2924874IDKzfu","11ozoHrq","20380sohzME","284730CeOziu","6521911DlQhaK","resolve","175pzlaDH","12Wntbrz","153CwXsSP","6807462wcVIbh","$`$1","99255obnocz","8565340BeQZTN","frameId","3220704wvCPTK","9vcUkeB","5163599fsttEm","983742ZSzkPs","1880YXBEgQ","postMessage","6676776VbOJGf","value","72700aKFNWB","Request error! status: ","2685321kQBtXq","2011122iTUboz","784830EiOgSk","4Shhqxd","concat","throw","777225SHDgSu","resolvedOptions","search","24brqEuT","stretch","2353821ouiOcG","16BpXaTH","body","4168339BVBfRq","_upperFirst","styles","5GkJNGS","2498022TthXHp","match","4399206zUvsoU","defineProperty","45vUgLOB",'script[src^="',"box-$1$2","1915506xRzusT","targetOrigin","10vjgZog","map","3084189TBfDxs","2617015rxAdDp","20057BCeMKK","692668yJTffY","3275913IwuUbo","5yABJbK","charCodeAt","4DRtert","formatKey","5gnwpyW","_lowerCase","4622320DSbOxK","createElement","1428025rswbrb","AbortError","272928GGfFVj","737mdBFHW","4950912kToKgF","handleMessage","8310840DVoCar","getOwnPropertyDescriptor","109064imVtqW","createTextNode","6XsYOJz","24899zSajlN","127845nWOlks","21ZAugTX","11860803tMqYZp","3898532gnOkwM","5015045AqKKoB","1371378msYiaj","5167656aUcLyl","209740ohkUFh","7903578rApVjM","378mIpYul","UNABLE_TO_FIND","586668OMSavw","https://tokenizer-web.cc.astropay.com","39728XQruux","::placeholder","2hgGSIR","3799864GhLwZS","removeChild","toLocaleLowerCase","40869670rNPvRw","flush","235779fIEMDA","enumerable","5CDMHbY","Reveal","773584eZyLko","1907948myHfGb","61554tirTmC","4269661uBmwSk","23881380dQaLeD","296368dsyAUL"];return(Mi=function(){return e})()}function Di(e,t){const n=Li();return(Di=function(r,s){return n[r-=160]})(e,t)}(function(){var e=Ke;const t=Di,n=Li();for(;;)try{if(-parseInt(t(176))/1*(-parseInt(t(169))/2)+-parseInt(t(175))/3+parseInt(t(172))/4*(parseInt(t(173))/5)+parseInt(t(170))/6*(-parseInt(t(161))/7)+-parseInt(t(174))/8+-parseInt(t(163))/9*(parseInt(t(167))/10)+parseInt(t(171))/11==561693)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),Ni(165),Ni(177),Ni(166);var Je,Ft,Ge,ql,Xe,gt,Gl,Kl,Fi,Bi,Yl,ds;function Ui(){var e=Ke,t=[e(350),e(396),e(311),e(474),"837xAVhUS","HTTP",e(724),e(144),e(264),e(473),e(689),e(226),e(221),"TIMEOUT","NOT_LOADED",e(328),e(378),e(179),e(656),e(563),"6960805uGgNwo",e(192),e(426),"12267310uEVrHO"];return(Ui=function(){return t})()}function ps(e,t){var n=Ui();return(ps=function(r,s){return n[r-=191]})(e,t)}function $i(e,t){var n=Vi();return($i=function(r,s){return n[r-=203]})(e,t)}function Vi(){var e=Ke,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Vi=function(){return t})()}function zi(e,t){var n=Hi();return(zi=function(r,s){return n[r-=166]})(e,t)}function Hi(){var e=Ke,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Hi=function(){return t})()}function Zl(e,t){var n=ji();return(Zl=function(r,s){return n[r-=472]})(e,t)}function ji(){var e=Ke,t=[e(308),e(157),e(444),e(335),e(279),e(169),"2vZiVLA","1287DSJSxR",e(240),e(251),e(456),e(477),e(692),"96LHSqDE"];return(ji=function(){return t})()}(function(){for(var e=Ke,t=ps,n=Ui();;)try{if(parseInt(t(196))/1*(parseInt(t(200))/2)+-parseInt(t(209))/3*(parseInt(t(214))/4)+parseInt(t(212))/5+parseInt(t(193))/6*(-parseInt(t(204))/7)+parseInt(t(203))/8+parseInt(t(192))/9*(parseInt(t(198))/10)+-parseInt(t(191))/11==844014)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(Ft=Je||(Je={}))[(Ge=ps)(210)]=Ge(210),Ft[Ge(194)]=Ge(194),Ft[Ge(211)]=Ge(211),Ft[E(773)]=Ge(206),Ft[Ge(207)]=Ge(207),Ft[Ge(197)]=Ge(197),Ft[Ge(205)]=E(143),Ft.UNHANDLED=Ge(213),gt=ps,(Xe=ql||(ql={}))[Xe.OK=200]="OK",Xe[Xe[gt(199)]=400]=gt(199),Xe[Xe[gt(202)]=404]=gt(202),Xe[Xe[gt(208)]=500]=E(378),Xe[Xe[gt(201)]=408]=gt(201),Xe[Xe[gt(195)]=401]=gt(195),(function(){for(var e=E,t=$i,n=Vi();;)try{if(-parseInt(t(211))/1+-parseInt(t(209))/2*(parseInt(t(210))/3)+-parseInt(t(212))/4*(parseInt(t(207))/5)+-parseInt(t(204))/6+-parseInt(t(206))/7*(parseInt(t(203))/8)+-parseInt(t(208))/9+parseInt(t(214))/10==660557)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),Fi=$i,(Kl=Gl||(Gl={}))[E(577)]=Fi(205),Kl[Fi(213)]=E(205),(function(){for(var e=E,t=zi,n=Hi();;)try{if(parseInt(t(167))/1+parseInt(t(175))/2+parseInt(t(178))/3+parseInt(t(176))/4*(-parseInt(t(172))/5)+-parseInt(t(170))/6+-parseInt(t(171))/7*(-parseInt(t(168))/8)+parseInt(t(174))/9==266134)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(Yl=Bi||(Bi={}))[(ds=zi)(166)]=ds(173),Yl[ds(169)]=ds(177),(function(){for(var e=E,t=Zl,n=ji();;)try{if(parseInt(t(479))/1*(-parseInt(t(485))/2)+parseInt(t(478))/3*(parseInt(t(477))/4)+parseInt(t(481))/5*(-parseInt(t(475))/6)+parseInt(t(482))/7*(parseInt(t(474))/8)+parseInt(t(472))/9*(parseInt(t(476))/10)+-parseInt(t(484))/11*(parseInt(t(480))/12)+-parseInt(t(483))/13*(parseInt(t(473))/14)==639293)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const In=hs;(function(){var e=E;const t=hs,n=Wi();for(;;)try{if(parseInt(t(494))/1+parseInt(t(487))/2*(-parseInt(t(497))/3)+-parseInt(t(485))/4*(parseInt(t(483))/5)+-parseInt(t(488))/6+parseInt(t(484))/7*(-parseInt(t(499))/8)+parseInt(t(469))/9*(-parseInt(t(480))/10)+parseInt(t(468))/11==507588)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const br={isRequired:e=>e+In(475),isUndefined:e=>e+In(492),isInvalid:e=>e+In(490),unableToFind:e=>In(466)+e+".",notLoaded:e=>In(473)+e+"."};class fs extends Error{constructor(t,n,r=!1){var s=E;const i=In;let o=n;switch(t){case Je[i(491)]:o=br[i(470)](n);break;case Je[i(479)]:o=br.isInvalid(n);break;case Je[i(486)]:o=br[i(476)](n);break;case Je[s(563)]:o=br[i(495)](n);break;case Je[i(481)]:o=br[i(493)](n);break;case Je[s(454)]:o=i(478)+n;break;case Je[i(471)]:o=i(496)+n;break;case Je[i(477)]:default:o=i(474)+n}var a,c,l;super(o),a=this,l=void 0,(c=i(482))in a?Object[hs(489)](a,c,{value:l,enumerable:!0,configurable:!0,writable:!0}):a[c]=l,Object[i(472)](this,new.target.prototype),this[i(467)]=t,this[i(482)]=r,Error[i(498)](this)}}function hs(e,t){const n=Wi();return(hs=function(r,s){return n[r-=466]})(e,t)}function Wi(){var e=E;const t=[e(348),e(524),e(442),e(143),e(713),"Failed to load the ",e(750)," is required.",e(417),e(192),e(671),e(328),e(164),e(773),e(257),e(645),e(358),e(784),"UNDEFINED","618834PMzmgD",e(519),e(520),e(290),e(656),e(398),"notLoaded",e(218),"unableToFind","[TIMEOUT]: ",e(357),"captureStackTrace",e(223),e(188),e(321)];return(Wi=function(){return t})()}function Jl(e,t){var n=qi();return(Jl=function(r,s){return n[r-=363]})(e,t)}function qi(){var e=E,t=[e(699),"10296792NSbaBf",e(144),e(237),e(713),e(171),"3JrHjWm",e(467),e(520),e(239),"httpCode",e(390),e(590),e(280),e(303)];return(qi=function(){return t})()}(function(){for(var e=E,t=Jl,n=qi();;)try{if(parseInt(t(365))/1*(-parseInt(t(374))/2)+-parseInt(t(368))/3*(-parseInt(t(367))/4)+-parseInt(t(373))/5*(-parseInt(t(376))/6)+parseInt(t(375))/7+-parseInt(t(377))/8*(parseInt(t(371))/9)+parseInt(t(369))/10+parseInt(t(363))/11==917605)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const yr=Ki;function Gi(){var e=E;const t=[e(683),e(336),e(629),e(541),e(446),"143705UhzlIi",e(141),e(193),e(176),e(147),e(674),e(688),e(234),e(173),e(406),e(606),"940hBWQzM"];return(Gi=function(){return t})()}function Ki(e,t){const n=Gi();return(Ki=function(r,s){return n[r-=127]})(e,t)}(function(){var e=E;const t=Ki,n=Gi();for(;;)try{if(parseInt(t(139))/1*(-parseInt(t(140))/2)+parseInt(t(127))/3*(parseInt(t(142))/4)+-parseInt(t(137))/5+-parseInt(t(141))/6+-parseInt(t(129))/7+-parseInt(t(143))/8*(parseInt(t(134))/9)+-parseInt(t(133))/10*(-parseInt(t(128))/11)==195235)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class i1{static[yr(135)](t){const n=yr,r=new URLSearchParams(t),s={};return r[n(136)](((i,o)=>{var a=Ke;const c=n;s[o]?Array[c(130)](s[o])?s[o][a(795)](i):s[o]=[s[o],i]:s[o]=i})),s}static parseObject(t){return this[yr(135)](t)}static[yr(131)](t){const n=yr,r=new URLSearchParams;for(const s in t){const i=t[s];if(Array[n(130)](i))for(const o of i)r[n(132)](s,o);else r[n(132)](s,i?i[n(138)]():"")}return r[n(138)]()}}const ms=Yi;function Yi(e,t){const n=Zi();return(Yi=function(r,s){return n[r-=358]})(e,t)}(function(){var e=E;const t=Yi,n=Zi();for(;;)try{if(parseInt(t(368))/1+parseInt(t(367))/2*(parseInt(t(361))/3)+-parseInt(t(371))/4+-parseInt(t(358))/5*(-parseInt(t(370))/6)+parseInt(t(362))/7*(parseInt(t(366))/8)+parseInt(t(363))/9*(parseInt(t(364))/10)+-parseInt(t(372))/11==832538)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Tn={endpoints:{tokenizer:E(427),reveal:ms(365)},domians:{cdn:{production:ms(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:ms(359),sandbox:ms(360)}}};function Zi(){var e=E;const t=[e(393),e(786),e(471),"107952fYoopL",e(644),e(565),"5250978IBLHHK","2968388TUhYeT",e(236),e(537),e(200),e(158),e(317),e(780),e(677)];return(Zi=function(){return t})()}const o1=Ji;function Ji(e,t){const n=Xi();return(Ji=function(r,s){return n[r-=466]})(e,t)}(function(){var e=E;const t=Ji,n=Xi();for(;;)try{if(parseInt(t(475))/1+parseInt(t(466))/2*(-parseInt(t(472))/3)+parseInt(t(471))/4+-parseInt(t(467))/5*(parseInt(t(473))/6)+parseInt(t(474))/7*(-parseInt(t(469))/8)+-parseInt(t(470))/9*(-parseInt(t(477))/10)+-parseInt(t(476))/11==221555)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const a1={environment:Bi[o1(468)],version:E(611)};function Xi(){var e=E;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(Xi=function(){return t})()}function Qi(){var e=E;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(Qi=function(){return t})()}function Xl(e,t){const n=Qi();return(Xl=function(r,s){return n[r-=155]})(e,t)}(function(){var e=E;const t=Xl,n=Qi();for(;;)try{if(parseInt(t(162))/1*(parseInt(t(155))/2)+parseInt(t(157))/3+-parseInt(t(159))/4+parseInt(t(160))/5*(-parseInt(t(163))/6)+-parseInt(t(158))/7*(parseInt(t(164))/8)+parseInt(t(161))/9*(parseInt(t(156))/10)+parseInt(t(165))/11==451934)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})();let eo=a1;const Qt=()=>eo,c1=to;function to(e,t){const n=no();return(to=function(r,s){return n[r-=379]})(e,t)}(function(){var e=E;const t=to,n=no();for(;;)try{if(parseInt(t(384))/1+-parseInt(t(389))/2+-parseInt(t(383))/3*(-parseInt(t(387))/4)+parseInt(t(388))/5+-parseInt(t(381))/6*(parseInt(t(385))/7)+-parseInt(t(382))/8+parseInt(t(379))/9*(parseInt(t(386))/10)==645524)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();const Ql=(e,t)=>e[c1(380)](new RegExp(t+"$"),"");function no(){var e=E;const t=[e(306),e(288),e(372),e(155),e(232),e(632),"83594fyhqnZ",e(730),e(399),"3139375mafbsW",e(607)];return(no=function(){return t})()}const wr=so;function ro(){var e=E;const t=[e(535),e(602),e(582),e(266),e(416),e(172),"11uyatGf",e(402),e(269),"6nfgxja",e(698),e(150),e(219),"domians",e(363),e(790),e(720),e(501),e(215)];return(ro=function(){return t})()}function so(e,t){const n=ro();return(so=function(r,s){return n[r-=110]})(e,t)}(function(){var e=E;const t=so,n=ro();for(;;)try{if(parseInt(t(124))/1+-parseInt(t(128))/2+parseInt(t(119))/3*(parseInt(t(127))/4)+parseInt(t(111))/5*(parseInt(t(117))/6)+parseInt(t(112))/7*(-parseInt(t(118))/8)+parseInt(t(120))/9*(-parseInt(t(125))/10)+parseInt(t(114))/11*(parseInt(t(110))/12)==961663)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class gs{static get[wr(113)](){const t=wr;return Ql(Tn[t(121)][t(123)][Qt()[t(126)]],"/")}static get[wr(116)](){const t=wr;return Ql(Tn[t(121)][t(122)][Qt()[t(126)]],"/")}static[E(241)](t,n,r){var s=E;const i=wr,o=i1[s(406)](r??{}),a=Qt(),c=o?n[s(636)]("?")?"&":"?":"";return gs[i(113)]+"/"+t+"/"+a[i(115)]+"/"+n+c+o}}var io=ao;function oo(){var e=E,t=[e(559),e(634),e(630),e(739),e(548),e(503),e(436),e(480),e(404),"1042584XPmVvk",e(172),e(473),e(289),e(745),"json",e(795),"2166WIGGYn",e(438),e(385),e(606),e(629),"173LKkRgC",e(391),e(498),e(282),e(614),e(710),e(247),e(621),e(255),"14XmrYdp",e(182),e(735),e(504),"Bearer ",e(697),e(694),e(474),"abort","defineProperty",e(321),e(680),e(496),e(587),e(309),e(344),e(406),e(248),"status",e(542),e(386),"keys",e(586)];return(oo=function(){return t})()}function ao(e,t){var n=oo();return(ao=function(r,s){return n[r-=115]})(e,t)}(function(){for(var e=E,t=ao,n=oo();;)try{if(-parseInt(t(126))/1*(-parseInt(t(121))/2)+-parseInt(t(160))/3*(-parseInt(t(130))/4)+parseInt(t(140))/5*(-parseInt(t(123))/6)+parseInt(t(135))/7*(parseInt(t(167))/8)+-parseInt(t(158))/9+parseInt(t(159))/10+parseInt(t(157))/11==336922)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),io(146),io(164),io(166);var bs=co;function co(e,t){var n=lo();return(co=function(r,s){return n[r-=291]})(e,t)}(function(){for(var e=E,t=co,n=lo();;)try{if(-parseInt(t(301))/1+parseInt(t(307))/2+-parseInt(t(292))/3*(-parseInt(t(306))/4)+parseInt(t(291))/5+-parseInt(t(314))/6*(-parseInt(t(300))/7)+-parseInt(t(302))/8*(parseInt(t(303))/9)+-parseInt(t(293))/10==616185)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),E(597),bs(294),E(779),bs(305),bs(296),bs(315);function lo(){var e=E,t=[e(208),e(302),"336OqQgfm",e(755),e(494),e(423),e(647),"1179086uaDkqa",e(752),"emit","message",e(756),e(190),e(520),e(148),e(546),e(216),e(779),e(450),"listener",e(319),e(654),e(407),e(212),e(162),e(448),e(440),e(525),e(310)];return(lo=function(){return t})()}function uo(){var e=E;const t=[e(676),e(331),e(362),"2228304EqXFLn",e(512),e(778),e(387),e(721),e(673),"207AHFLGs",e(376),e(425)];return(uo=function(){return t})()}function po(e,t){const n=uo();return(po=function(r,s){return n[r-=254]})(e,t)}(function(){var e=E;const t=po,n=uo();for(;;)try{if(parseInt(t(257))/1+parseInt(t(260))/2+parseInt(t(254))/3*(-parseInt(t(261))/4)+parseInt(t(262))/5+-parseInt(t(258))/6+parseInt(t(256))/7+-parseInt(t(263))/8*(parseInt(t(264))/9)==716064)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();const eu=function(e){var t=E;const n=po,r=document[t(414)]||document[n(259)];if(!r)throw new fs(Je[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=E;const t=fo,n=ho();for(;;)try{if(parseInt(t(128))/1+parseInt(t(125))/2+-parseInt(t(127))/3+parseInt(t(132))/4+-parseInt(t(131))/5+parseInt(t(133))/6+-parseInt(t(134))/7==688465)break;n.push(n[e(189)]())}catch{n[e(795)](n.shift())}})();const ys=function(e,t){const n=fo,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,eu(r)};function fo(e,t){const n=ho();return(fo=function(r,s){return n[r-=125]})(e,t)}function ho(){var e=E;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(ho=function(){return t})()}function mo(){var e=E,t=[e(608),e(186),e(570),e(376),e(652),e(301),"10439181hcqJpc",e(593),e(434),e(441),"createTextNode",e(695),e(250),e(604),"ctr",e(665),e(785),"9136jiXoxV",e(238),e(203),e(324),e(723),e(177),e(278),"insertRule",e(540),"nonce",e(670),"flush",e(767),"forEach","7294661PRwxon",e(774),e(742),e(159),"ownerNode",e(795),e(255),"2555lCYkVH",e(252),e(684),e(481)];return(mo=function(){return t})()}function en(e,t){var n=mo();return(en=function(r,s){return n[r-=379]})(e,t)}(function(){for(var e=E,t=en,n=mo();;)try{if(parseInt(t(413))/1*(-parseInt(t(412))/2)+-parseInt(t(382))/3+-parseInt(t(381))/4*(-parseInt(t(387))/5)+parseInt(t(411))/6+parseInt(t(390))/7*(parseInt(t(408))/8)+parseInt(t(397))/9+-parseInt(t(404))/10*(parseInt(t(380))/11)==960039)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E,t=en;function n(s){var i=Ke,o=en,a=this;this[i(203)]=function(c){var l,u=i,d=en;l=a[d(391)][d(386)]===0?a[d(402)]?a[d(402)][d(409)]:a[d(406)]?a[d(389)][d(396)]:a[d(400)]:a[d(391)][a[d(391)][d(386)]-1][u(238)],a[d(389)][d(414)](c,l),a[d(391)][d(385)](c)},this[o(403)]=s[o(383)]===void 0||s[o(383)],this[o(391)]=[],this.ctr=0,this[o(417)]=s[i(318)],this[o(398)]=s[o(398)],this[o(389)]=s[i(684)],this[o(406)]=s[o(406)],this[o(402)]=s[o(402)],this.before=null}var r=n[e(332)];r[t(407)]=function(s){var i=e;s[t(379)](this[i(203)])},r[e(258)]=function(s){var i,o,a,c=e,l=t;this[l(405)]%(this[l(403)]?65e3:1)==0&&this[l(410)]((i=this,o=en,(a=document[o(416)](c(156)))[o(399)](o(420),i[o(398)]),i[o(417)]!==void 0&&a[c(434)](c(318),i[c(318)]),a[o(394)](document[o(401)]("")),a[o(399)](o(388),""),a));var u=this[c(608)][this[l(391)][l(386)]-1];if(this[l(403)]){var d=(function(p){var h=c,f=en;if(p[f(392)])return p.sheet;for(var m=0;m<document[f(395)][f(386)];m++)if(document[f(395)][m][f(384)]===p)return document[h(652)][m]})(u);try{d[l(415)](s,d[l(418)][l(386)])}catch{}}else u[l(394)](document[c(550)](s));this.ctr++},r[t(419)]=function(){var s=e,i=t;this[i(391)][s(629)]((function(o){var a,c=i;return(a=o.parentNode)==null?void 0:a[c(393)](o)})),this[i(391)]=[],this[s(397)]=0}})();var Qe=go;function go(e,t){var n=bo();return(go=function(r,s){return n[r-=110]})(e,t)}function bo(){var e=E,t=[e(196),"152336OQhHhe",e(420),e(492),e(783),e(770),e(349),e(204),e(598),e(178),e(401),e(650),"4724nuSFUK",e(439),e(736),"@page",e(613),e(619),e(443),"@layer",e(174)];return(bo=function(){return t})()}(function(){for(var e=E,t=go,n=bo();;)try{if(-parseInt(t(119))/1+-parseInt(t(123))/2*(-parseInt(t(124))/3)+-parseInt(t(129))/4*(parseInt(t(122))/5)+-parseInt(t(114))/6+-parseInt(t(115))/7+parseInt(t(112))/8+parseInt(t(117))/9==198272)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),E(648),Qe(121),E(700),E(600),Qe(113),Qe(126),Qe(116),Qe(118),Qe(110),Qe(111),Qe(120),Qe(128),Qe(125),Qe(127),Qe(130);var yo=wo;function wo(e,t){var n=vo();return(wo=function(r,s){return n[r-=258]})(e,t)}function vo(){var e=E,t=[e(347),e(371),e(260),e(288),e(227),e(409),e(255),e(795),e(246),"10opKczI","charCodeAt",e(733),e(377),e(428),e(738),e(281),e(296),e(510),e(381),e(464),"3836294AMJKLE"];return(vo=function(){return t})()}function So(){var e=E,t=[e(327),e(255),e(566),e(334),e(323),"14ejudnZ",e(201),"862542dyuBTR",e(552),"401898SBLqqH",e(184),e(705)];return(So=function(){return t})()}function tu(e,t){var n=So();return(tu=function(r,s){return n[r-=123]})(e,t)}function nu(e,t){var n=_o();return(nu=function(r,s){return n[r-=435]})(e,t)}function _o(){var e=E,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(_o=function(){return t})()}function Co(){var e=E,t=[e(458),"2134996QawHcC","return",e(693),e(558),"15490080Hutsfa",e(496),e(228),e(216),e(346),e(255),"1837002hgOqZq",e(531),e(516),e(484),"join"];return(Co=function(){return t})()}function ru(e,t){var n=Co();return(ru=function(r,s){return n[r-=147]})(e,t)}function su(e,t){var n=Eo();return(su=function(r,s){return n[r-=398]})(e,t)}function Eo(){var e=E,t=[e(551),"input-$1",e(273),e(468),"root",e(749),e(287),e(567),e(772),e(549),e(716),e(346),"global",e(229),e(294),"1314449boGmmT",e(527),"4549375QrRZcY",e(265),"type"];return(Eo=function(){return t})()}function xo(){var e=E,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(xo=function(){return t})()}function iu(e,t){var n=xo();return(iu=function(r,s){return n[r-=484]})(e,t)}function Io(e,t){var n=To();return(Io=function(r,s){return n[r-=236]})(e,t)}function To(){var e=E,t=[e(584),"953666lBllkt",e(564),"48PHUuVy",e(437),e(214),e(627),e(149),e(272),e(307),e(483),e(800),e(370)];return(To=function(){return t})()}(function(){for(var e=E,t=wo,n=vo();;)try{if(-parseInt(t(259))/1*(parseInt(t(278))/2)+-parseInt(t(276))/3*(-parseInt(t(271))/4)+-parseInt(t(274))/5*(-parseInt(t(264))/6)+-parseInt(t(258))/7+-parseInt(t(263))/8+parseInt(t(261))/9*(-parseInt(t(268))/10)+parseInt(t(260))/11==402046)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),Math[yo(275)],String[yo(272)],Object[yo(273)],(function(){for(var e=E,t=tu,n=So();;)try{if(-parseInt(t(132))/1*(parseInt(t(123))/2)+-parseInt(t(125))/3+parseInt(t(129))/4+parseInt(t(134))/5*(parseInt(t(127))/6)+parseInt(t(126))/7*(parseInt(t(133))/8)+-parseInt(t(124))/9*(-parseInt(t(130))/10)+-parseInt(t(128))/11==366270)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=E,t=nu,n=_o();;)try{if(parseInt(t(439))/1+parseInt(t(443))/2*(parseInt(t(442))/3)+parseInt(t(441))/4*(parseInt(t(440))/5)+parseInt(t(438))/6+-parseInt(t(436))/7+parseInt(t(435))/8+-parseInt(t(437))/9==637765)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=E,t=ru,n=Co();;)try{if(-parseInt(t(158))/1+-parseInt(t(150))/2+parseInt(t(149))/3+-parseInt(t(155))/4*(-parseInt(t(151))/5)+-parseInt(t(152))/6+-parseInt(t(161))/7*(-parseInt(t(157))/8)+parseInt(t(159))/9==746841)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=su,n=Eo();;)try{if(parseInt(t(398))/1+-parseInt(t(409))/2*(-parseInt(t(413))/3)+parseInt(t(405))/4+parseInt(t(400))/5+-parseInt(t(403))/6*(-parseInt(t(408))/7)+-parseInt(t(412))/8*(-parseInt(t(416))/9)+-parseInt(t(417))/10==921092)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=E,t=iu,n=xo();;)try{if(parseInt(t(484))/1+-parseInt(t(485))/2*(-parseInt(t(490))/3)+parseInt(t(488))/4+parseInt(t(489))/5+parseInt(t(492))/6+-parseInt(t(486))/7*(parseInt(t(487))/8)+-parseInt(t(491))/9==521840)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=E,t=Io,n=To();;)try{if(parseInt(t(246))/1*(parseInt(t(239))/2)+parseInt(t(248))/3*(-parseInt(t(241))/4)+parseInt(t(244))/5+-parseInt(t(236))/6*(parseInt(t(247))/7)+-parseInt(t(242))/8*(parseInt(t(243))/9)+-parseInt(t(238))/10+parseInt(t(237))/11*(parseInt(t(240))/12)==600322)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})();var l1=Ao;function Ao(e,t){var n=ko();return(Ao=function(r,s){return n[r-=373]})(e,t)}function ko(){var e=E,t=[e(485),e(252),e(684),e(523),"column",e(337),e(515),e(275),e(159),e(366),e(332),e(312),e(197),e(265),e(321),e(601),e(752),e(603),"$2-$3",e(258),e(534),e(376),e(769),e(254),e(392),e(788),e(216),e(521),e(295),e(267),e(255),"preferred-size",e(629),"line",e(181),e(797),e(593),e(330),e(288),"compat",e(595),e(186),e(767),e(384),e(508),e(339),"prepend","push",e(503),e(496),e(472),e(276),'style[data-emotion^="',e(695),e(346),e(213),e(789),e(715),"head",e(567),"448GdQtAv",e(600),e(711),e(262),e(509),e(434),"flex-",e(626),e(318),e(389),e(560),e(468),e(463),e(431),e(781),"indexOf",e(618),e(207),e(640)];return(ko=function(){return t})()}function Ro(){var e=E,t=[e(320),e(388),e(405),e(579),"35AIBzSb",e(534),e(505),e(411),"1274024Vuuviq","length",e(572),e(478)];return(Ro=function(){return t})()}function ou(e,t){var n=Ro();return(ou=function(r,s){return n[r-=484]})(e,t)}function au(e,t){var n=Po();return(au=function(r,s){return n[r-=106]})(e,t)}function Po(){var e=E,t=[e(526),e(340),e(765),e(703),e(487),e(489),e(146),e(639),e(729),e(664)];return(Po=function(){return t})()}(function(){for(var e=E,t=Ao,n=ko();;)try{if(parseInt(t(444))/1+parseInt(t(411))/2*(-parseInt(t(397))/3)+-parseInt(t(442))/4*(-parseInt(t(410))/5)+parseInt(t(416))/6+parseInt(t(394))/7*(-parseInt(t(375))/8)+parseInt(t(409))/9*(parseInt(t(373))/10)+-parseInt(t(377))/11*(parseInt(t(426))/12)==928149)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),l1(387),(function(){for(var e=E,t=ou,n=Ro();;)try{if(-parseInt(t(487))/1+parseInt(t(489))/2+-parseInt(t(495))/3*(parseInt(t(484))/4)+-parseInt(t(492))/5*(parseInt(t(493))/6)+parseInt(t(485))/7*(-parseInt(t(494))/8)+-parseInt(t(488))/9+parseInt(t(491))/10==772143)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=au,n=Po();;)try{if(-parseInt(t(106))/1*(-parseInt(t(114))/2)+parseInt(t(115))/3*(parseInt(t(107))/4)+parseInt(t(112))/5+parseInt(t(110))/6+parseInt(t(108))/7+parseInt(t(109))/8+parseInt(t(113))/9*(-parseInt(t(111))/10)==797311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})();var cu=Lo;function Oo(){var e=E,t=["animationName","2256550Ipcodt",e(173),"compiler transform.",e(746),e(462),e(288),e(801),e(211),e(500),e(255),"number",e(791),"NO_COMPONENT_SELECTOR","1182279EAtwWa",e(682),e(321),"1304688UcogLI",e(247),"string",e(569),"styles","45ISzOCs",e(246),e(777),e(167),e(672)];return(Oo=function(){return t})()}(function(){for(var e=E,t=Lo,n=Oo();;)try{if(-parseInt(t(249))/1+-parseInt(t(242))/2+parseInt(t(250))/3+parseInt(t(258))/4+-parseInt(t(248))/5*(parseInt(t(256))/6)+-parseInt(t(255))/7+parseInt(t(261))/8*(parseInt(t(236))/9)==662021)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();function Lo(e,t){var n=Oo();return(Lo=function(r,s){return n[r-=236]})(e,t)}function lu(e,t){var n=No();return(lu=function(r,s){return n[r-=142]})(e,t)}function No(){var e=E,t=[e(368),e(305),"registered",e(262),"styles",e(255),e(374),e(629),e(633),e(615),e(663),e(753),e(275),e(802),"push",e(593),e(321),e(491),e(258),e(666)];return(No=function(){return t})()}function Mo(){var e=E,t=[e(578),e(321),e(258),e(629),e(255),e(449),e(250),e(333),e(502),"bind",e(573),"281145OZnPDr",e(547),"3uNmnOL",e(159),e(186),e(291),e(275),e(476),e(593),e(365),e(173),e(515),e(753),"6198910frrjDN",e(413),e(300),"animation-",e(195),e(599),"object"];return(Mo=function(){return t})()}function uu(e,t){var n=Mo();return(uu=function(r,s){return n[r-=250]})(e,t)}Object[Io(245)](null),cu(246),E(408),cu(244),(function(){for(var e=E,t=lu,n=No();;)try{if(-parseInt(t(146))/1+-parseInt(t(155))/2+-parseInt(t(144))/3+-parseInt(t(157))/4+parseInt(t(156))/5*(parseInt(t(149))/6)+parseInt(t(153))/7*(parseInt(t(142))/8)+parseInt(t(145))/9==509549)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=uu,n=Mo();;)try{if(parseInt(t(274))/1*(-parseInt(t(253))/2)+-parseInt(t(258))/3*(-parseInt(t(270))/4)+parseInt(t(256))/5*(parseInt(t(273))/6)+parseInt(t(250))/7+-parseInt(t(276))/8*(parseInt(t(261))/9)+parseInt(t(269))/10*(parseInt(t(263))/11)+-parseInt(t(257))/12==769621)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Z=Bo;function Do(){var e=E;const t=[e(191),e(751),"toCamelCase",e(446),e(325),e(210),"toPascalCase",e(284),e(154),e(726),e(288),e(617),e(768),e(343),e(394),"4804168lIEQdb",e(410),e(539),e(430),e(678),e(353),"_lowerCase",e(596),e(733),e(518),"charAt",e(687),e(527),e(262),"42wLrOPC",e(285),"toLowerCase",e(470),e(514)];return(Do=function(){return t})()}function du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(){var e=E;const t=Bo,n=Do();for(;;)try{if(-parseInt(t(224))/1+parseInt(t(230))/2+-parseInt(t(242))/3*(parseInt(t(238))/4)+-parseInt(t(236))/5+-parseInt(t(228))/6*(-parseInt(t(252))/7)+-parseInt(t(240))/8+parseInt(t(227))/9==959733)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();class Fo{static[Z(241)](t,n=!1){const r=Z;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[E(429)](t,n=!1){var r=E;const s=Z;return n?this[s(244)](t)[s(233)](/ /g," "):t[r(429)]()}static[E(741)](t){const n=Z;return this[n(249)](n(241))(t)}static[Z(234)](t){const n=Z;return this[n(249)](n(220))(t)}static[Z(225)](t){var n=E;const r=Z;return this[r(239)](t)[n(527)](((s,i)=>i===0?s[n(429)]():this[r(222)](s[r(220)]())))[r(253)]("")}static[Z(229)](t){var n=E;const r=Z;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[Z(243)](t){const n=Z;return this[n(239)](t)[n(253)]("-")}static[E(761)](t){const n=Z;return this[E(410)](t)[n(253)]("_")}static[Z(245)](t){return this[Z(244)](t).replace(/ /g,".")}static[Z(221)](t){const n=Z;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=Z;return this[n(244)](t)[n(233)](/ /g,"-")}static[Z(237)](t){return this[Z(239)](t)}static[Z(239)](t){const n=Z;return t[n(233)](/([a-z])([A-Z])/g,n(231))[n(233)](/[\s_-]+/g," ")[n(220)]()[n(247)](/[a-zà-öø-ÿ0-9]+/gi)||[]}static[E(538)](t){var n=E;const r=Z;return this[r(239)](t)[n(527)]((s=>s[r(220)]()))[r(253)](" ")}static[Z(222)](t){const n=Z;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=Z;return this[E(410)](t)[n(250)]((r=>this[n(222)](r)))[n(253)](" ")}}function Bo(e,t){const n=Do();return(Bo=function(r,s){return n[r-=220]})(e,t)}du(Fo,E(748),((e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:s=Z(223)}={splitChar:" ",joinChar:" ",to:Z(223)})=>{const i=Z,o=e!==void 0?e[i(226)]():"";return o?t?Fo[i(235)](o):o[i(251)](n).map((a=>{var c=Ke;const l=i;return s===l(232)?a[l(248)](0)[c(571)]()+a[l(246)](1)[c(429)]():a[l(248)](0).toUpperCase()+a[l(246)](1)[l(220)]()}))[i(253)](r):""})),du(Fo,Z(249),(e=>t=>{var n=E;const r=Z;if(!t)return"";const s=t[r(246)](0,1),i=t[r(246)](1);return s[e]!==void 0&&n(672)==typeof s[e]?s[e]()+i:t}));const u1=Uo;function Uo(e,t){const n=$o();return(Uo=function(r,s){return n[r-=328]})(e,t)}function Ke(e,t){var n=Mi();return(Ke=function(r,s){return n[r-=141]})(e,t)}function $o(){var e=E;const t=[e(460),e(638),"pascal",e(620),e(152),e(353),"object",e(796),e(719),e(761),e(536),e(222),e(758),e(356),e(747),e(704),e(527),e(194),e(681),e(561)];return($o=function(){return t})()}(function(){var e=E;const t=Uo,n=$o();for(;;)try{if(parseInt(t(337))/1*(parseInt(t(342))/2)+-parseInt(t(329))/3+parseInt(t(346))/4+parseInt(t(345))/5+-parseInt(t(341))/6+-parseInt(t(333))/7*(-parseInt(t(339))/8)+-parseInt(t(330))/9==892829)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),E(681),u1(332);function Vo(){var e=E;const t=[e(314),e(249),e(764),e(792),"7920680CrCzXO",e(776),"kebab",e(532),e(400),"1889976zPDrSf",e(681),e(165),"574270pCgwUB"];return(Vo=function(){return t})()}function pu(e,t){const n=Vo();return(pu=function(r,s){return n[r-=199]})(e,t)}function fu(e,t){const n=zo();return(fu=function(r,s){return n[r-=310]})(e,t)}function zo(){var e=E;const t=["strategy","5941134AnJjDR",e(435),"REQUIRED",e(403),e(298),e(507),e(277),e(304),e(185),e(217),"168yAApGZ","210166RwrXjV",e(288),"replacer",e(660),e(341),e(431),e(422),e(497),"parameters.search"];return(zo=function(){return t})()}function hu(e,t){const n=Ho();return(hu=function(r,s){return n[r-=245]})(e,t)}function Ho(){var e=E;const t=[e(757),e(288),"749930AnkLQM",e(345),e(475),e(244),e(395),e(316),"77UAdnad",e(161),e(245),e(446),e(286),e(725)];return(Ho=function(){return t})()}function jo(){var e=E;const t=[e(235),e(583),e(580),e(224),e(355),e(787),e(653),e(256),e(612),"90faVQnR",e(486)];return(jo=function(){return t})()}function mu(e,t){const n=jo();return(mu=function(r,s){return n[r-=199]})(e,t)}function Wo(){var e=E;const t=["location",e(728),e(574),"2xpcQKU","push","768628jYCGxS",e(756),"24FLVsmp",e(752),e(293),"978200aOzrna",e(488),"63KlvtSY",e(277),e(553),e(231),e(679),e(336),e(507),e(422),e(527)];return(Wo=function(){return t})()}function gu(e,t){const n=Wo();return(gu=function(r,s){return n[r-=482]})(e,t)}function qo(e,t){const n=Go();return(qo=function(r,s){return n[r-=252]})(e,t)}function Go(){var e=E;const t=[e(759),e(605),e(261),e(585),e(790),e(383),e(637),"104DOhoZO","preconnect",e(215),e(175),"5jiSoDi",e(658)];return(Go=function(){return t})()}(function(){var e=E;const t=pu,n=Vo();for(;;)try{if(parseInt(t(206))/1*(-parseInt(t(208))/2)+-parseInt(t(199))/3*(parseInt(t(210))/4)+parseInt(t(204))/5+-parseInt(t(201))/6+-parseInt(t(200))/7+parseInt(t(209))/8+parseInt(t(205))/9==606311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=E;const t=fu,n=zo();for(;;)try{if(parseInt(t(317))/1*(-parseInt(t(321))/2)+-parseInt(t(314))/3*(parseInt(t(319))/4)+parseInt(t(325))/5*(-parseInt(t(310))/6)+-parseInt(t(313))/7*(-parseInt(t(320))/8)+-parseInt(t(324))/9+parseInt(t(328))/10+parseInt(t(311))/11==808336)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=E;const t=hu,n=Ho();for(;;)try{if(-parseInt(t(252))/1+-parseInt(t(249))/2*(-parseInt(t(257))/3)+parseInt(t(254))/4+-parseInt(t(253))/5*(-parseInt(t(258))/6)+parseInt(t(246))/7+-parseInt(t(245))/8*(parseInt(t(250))/9)+-parseInt(t(256))/10*(parseInt(t(248))/11)==300232)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=mu,n=jo();for(;;)try{if(-parseInt(t(200))/1*(parseInt(t(203))/2)+parseInt(t(209))/3+parseInt(t(202))/4+-parseInt(t(206))/5*(parseInt(t(201))/6)+-parseInt(t(199))/7*(parseInt(t(208))/8)+parseInt(t(207))/9*(parseInt(t(205))/10)+parseInt(t(204))/11==198596)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=gu,n=Wo();for(;;)try{if(parseInt(t(488))/1+-parseInt(t(497))/2*(parseInt(t(496))/3)+-parseInt(t(501))/4*(parseInt(t(487))/5)+-parseInt(t(482))/6+parseInt(t(499))/7+-parseInt(t(495))/8+-parseInt(t(485))/9*(-parseInt(t(483))/10)==155517)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(function(){var e=E;const t=qo,n=Go();for(;;)try{if(parseInt(t(254))/1+parseInt(t(257))/2+parseInt(t(260))/3+-parseInt(t(252))/4*(-parseInt(t(253))/5)+-parseInt(t(258))/6+parseInt(t(256))/7+parseInt(t(262))/8*(-parseInt(t(261))/9)==402722)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=E;const t=Ko,n=Yo();for(;;)try{if(parseInt(t(397))/1*(-parseInt(t(389))/2)+-parseInt(t(394))/3*(parseInt(t(383))/4)+parseInt(t(391))/5+-parseInt(t(384))/6*(-parseInt(t(388))/7)+parseInt(t(382))/8*(-parseInt(t(393))/9)+parseInt(t(386))/10+parseInt(t(392))/11==453357)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();function Ko(e,t){const n=Yo();return(Ko=function(r,s){return n[r-=382]})(e,t)}function Yo(){var e=E;const t=[e(581),e(589),e(702),e(759),"api","9885ktAjwX","515144gJwABd",e(461),e(352),e(455),e(709),"environment",e(782),e(360),e(790),e(609)];return(Yo=function(){return t})()}function Zo(e,t){const n=Jo();return(Zo=function(r,s){return n[r-=188]})(e,t)}function Jo(){var e=E;const t=[e(513),e(744),e(230),e(151),e(354),e(170),e(638),"42ZfbLkm",e(529),e(527),"length",e(656),e(793),e(328),e(479),e(737),"84AZtHRP"];return(Jo=function(){return t})()}(function(){var e=E;const t=Zo,n=Jo();for(;;)try{if(parseInt(t(200))/1*(-parseInt(t(191))/2)+parseInt(t(195))/3*(-parseInt(t(193))/4)+-parseInt(t(196))/5*(parseInt(t(192))/6)+-parseInt(t(188))/7+-parseInt(t(203))/8+-parseInt(t(190))/9*(parseInt(t(189))/10)+parseInt(t(202))/11*(parseInt(t(204))/12)==863321)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const ws=Xo;function Xo(e,t){const n=Qo();return(Xo=function(r,s){return n[r-=135]})(e,t)}(function(){var e=E;const t=Xo,n=Qo();for(;;)try{if(-parseInt(t(139))/1*(parseInt(t(147))/2)+-parseInt(t(142))/3+-parseInt(t(140))/4+-parseInt(t(143))/5*(-parseInt(t(148))/6)+parseInt(t(137))/7*(parseInt(t(141))/8)+-parseInt(t(138))/9+-parseInt(t(136))/10*(-parseInt(t(145))/11)==902131)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const d1={environment:e=>typeof e===ws(146)&&/^(sandbox|production)$/[E(690)](e),version:e=>e===ws(144)||typeof e===ws(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[ws(135)](e)},p1=e=>{var t;((n,r)=>{var s=E;const i=Zo;if(n&&r){const o=Object[s(359)](n)[s(422)]((a=>!r[i(194)](a)||r[a]===void 0||!n[a](r[a])))[i(197)]((a=>new fs(Je[i(201)],a,!0)));if(o[i(198)]){const[a]=o;throw a}}})(d1,e),(t=e)&&(eo=Object.assign({},eo,t))};function Qo(){var e=E;const t=[e(591),e(576),e(611),"4202RbmDMY",e(445),e(727),e(517),e(690),e(624),e(292),e(717),e(299),"1611912xHkDlR",e(452)];return(Qo=function(){return t})()}function ea(){var e=E;const t=[e(379),e(380),e(686),e(522),"248VddyCN","1828569LfJoFC","11940faSemP",e(661),e(482),"9YYlhsV",e(457),e(651),e(375),e(255),e(641),e(160)];return(ea=function(){return t})()}(function(){var e=E;const t=ta,n=ea();for(;;)try{if(-parseInt(t(271))/1*(-parseInt(t(278))/2)+-parseInt(t(275))/3+-parseInt(t(274))/4*(-parseInt(t(266))/5)+-parseInt(t(280))/6*(-parseInt(t(272))/7)+parseInt(t(277))/8*(-parseInt(t(279))/9)+parseInt(t(269))/10*(-parseInt(t(270))/11)+-parseInt(t(276))/12*(-parseInt(t(268))/13)==356241)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();function ta(e,t){const n=ea();return(ta=function(r,s){return n[r-=266]})(e,t)}function na(){var e=E;const t=[e(422),e(530),e(338),e(202),"push",e(183),e(740),e(763),"137247nsOmnY",e(544),e(554),e(628),e(297),e(555)];return(na=function(){return t})()}function bu(e,t){const n=na();return(bu=function(r,s){return n[r-=169]})(e,t)}function yu(e,t){var n=ra();return(yu=function(r,s){return n[r-=337]})(e,t)}function ra(){var e=E,t=[e(466),e(762),e(255),e(548),e(391),e(557),e(277),e(706),"2051dwZdDh",e(199),e(503),e(342),e(422),"182295YeOYne",e(382),e(575),e(520),e(629),"apply","40247440IrIkgT",e(672),"push","getOwnPropertyDescriptors","indexOf",e(326),e(359)];return(ra=function(){return t})()}function sa(){var e=E,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return(sa=function(){return t})()}function wu(e,t){var n=sa();return(wu=function(r,s){return n[r-=171]})(e,t)}function ia(){var e=["INVALID","UNHANDLED","HTTP","UNAUTHORIZED","13163230kGdpsc","856juyAkB","TIMEOUT","350256uPlzjN","5054ruXNQI","2450577zCNjjI","2339148NeQscF","REQUEST_TIMEOUT","REQUIRED","BAD_REQUEST","60389xcocgx","11tPlygx","NOT_FOUND","301vJXIvb","UNABLE_TO_FIND","NOT_LOADED","6497910YprBBF","40ngIbUX","UNDEFINED"];return(ia=function(){return e})()}var vs,Bt,et,vu,Ye,Ut,Su,_u,Ss,Cu,oa,_s;function Cs(e,t){var n=ia();return(Cs=function(r,s){return n[r-=335]})(e,t)}function aa(e,t){var n=ca();return(aa=function(r,s){return n[r-=341]})(e,t)}function ca(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(ca=function(){return e})()}function la(e,t){var n=ua();return(la=function(r,s){return n[r-=235]})(e,t)}function ua(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(ua=function(){return e})()}function da(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(da=function(){return e})()}function Eu(e,t){var n=da();return(Eu=function(r,s){return n[r-=366]})(e,t)}function Es(e,t){const n=pa();return(Es=function(r,s){return n[r-=152]})(e,t)}(function(){var e=E;const t=bu,n=na();for(;;)try{if(-parseInt(t(172))/1*(-parseInt(t(174))/2)+parseInt(t(179))/3+parseInt(t(177))/4*(-parseInt(t(173))/5)+-parseInt(t(182))/6*(-parseInt(t(181))/7)+parseInt(t(169))/8+-parseInt(t(170))/9+parseInt(t(178))/10*(-parseInt(t(180))/11)==757080)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=yu,n=ra();;)try{if(parseInt(t(355))/1+parseInt(t(342))/2*(parseInt(t(357))/3)+parseInt(t(338))/4+-parseInt(t(362))/5+parseInt(t(340))/6*(parseInt(t(339))/7)+parseInt(t(358))/8*(parseInt(t(344))/9)+-parseInt(t(350))/10==959569)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=E,t=wu,n=sa();;)try{if(-parseInt(t(172))/1+-parseInt(t(175))/2*(-parseInt(t(173))/3)+parseInt(t(174))/4+-parseInt(t(177))/5+-parseInt(t(171))/6*(-parseInt(t(180))/7)+-parseInt(t(178))/8*(parseInt(t(179))/9)+parseInt(t(176))/10==940869)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=Cs,t=ia();;)try{if(parseInt(e(336))/1*(-parseInt(e(350))/2)+-parseInt(e(351))/3+parseInt(e(352))/4+parseInt(e(340))/5*(parseInt(e(349))/6)+parseInt(e(356))/7*(-parseInt(e(347))/8)+parseInt(e(339))/9+-parseInt(e(346))/10*(-parseInt(e(357))/11)===589533)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(Bt=vs||(vs={}))[(et=Cs)(354)]="REQUIRED",Bt[et(341)]=et(341),Bt[et(337)]="UNABLE_TO_FIND",Bt.NOT_LOADED=et(338),Bt[et(342)]=et(342),Bt.HTTP=et(344),Bt[et(348)]=et(348),Bt[et(343)]=et(343),Ye=vu||(vu={}),Ut=Cs,Ye[Ye.OK=200]="OK",Ye[Ye[Ut(355)]=400]=Ut(355),Ye[Ye[Ut(335)]=404]=Ut(335),Ye[Ye.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",Ye[Ye[Ut(353)]=408]=Ut(353),Ye[Ye.UNAUTHORIZED=401]=Ut(345),(function(){for(var e=aa,t=ca();;)try{if(parseInt(e(345))/1+-parseInt(e(344))/2+-parseInt(e(351))/3+parseInt(e(347))/4+-parseInt(e(350))/5*(-parseInt(e(346))/6)+parseInt(e(343))/7+parseInt(e(348))/8===704730)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(_u=Su||(Su={}))[(Ss=aa)(349)]=Ss(342),_u[Ss(352)]=Ss(341),(function(){for(var e=la,t=ua();;)try{if(-parseInt(e(236))/1+-parseInt(e(248))/2+parseInt(e(243))/3*(parseInt(e(245))/4)+parseInt(e(242))/5*(-parseInt(e(239))/6)+parseInt(e(237))/7*(-parseInt(e(244))/8)+parseInt(e(246))/9+-parseInt(e(238))/10*(-parseInt(e(241))/11)===902110)break;t.push(t.shift())}catch{t.push(t.shift())}})(),oa=Cu||(Cu={}),_s=la,oa.PRODUCTION=_s(240),oa[_s(235)]=_s(247),(function(){for(var e=Eu,t=da();;)try{if(-parseInt(e(368))/1*(-parseInt(e(376))/2)+-parseInt(e(371))/3*(parseInt(e(367))/4)+parseInt(e(374))/5*(parseInt(e(373))/6)+parseInt(e(370))/7*(parseInt(e(372))/8)+-parseInt(e(366))/9+-parseInt(e(377))/10*(-parseInt(e(378))/11)+-parseInt(e(369))/12*(parseInt(e(375))/13)===152250)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(function(){const e=Es,t=pa();for(;;)try{if(-parseInt(e(166))/1*(parseInt(e(155))/2)+parseInt(e(157))/3+parseInt(e(164))/4+-parseInt(e(159))/5+parseInt(e(158))/6*(parseInt(e(168))/7)+parseInt(e(165))/8*(-parseInt(e(152))/9)+parseInt(e(154))/10===424938)break;t.push(t.shift())}catch{t.push(t.shift())}})();const f1=()=>new Promise(((e,t)=>{const n=Es;if(((r=gs[E(172)])=>{const s=ta;try{return document.querySelectorAll(s(273)+r+s(281))[s(267)]>0}catch{return!1}})()&&window[n(153)])e(window[n(153)]);else if(!window[n(153)]){const r=(()=>{const s=Es,i=document.createElement(s(161));return i.src=gs.getFullCdn(s(156),s(163)),eu(i),i})();return r.onload=()=>{const s=n;window[s(153)]?e(window.APTokenizer):t(new fs(vs[s(167)],s(160),!0))},void(r[n(162)]=()=>t(new fs(vs[n(169)],"SCRIPT",!0)))}}));function pa(){const e=["31456JYMHzf","928wCafiN","156wRIJHE","UNDEFINED","2317DECIua","NOT_LOADED","62802oYTinX","APTokenizer","20534150rAmYXS","8482vGJDwh","tokenizer-sdk","793641JyeeYi","2676hrMTeo","2887350YWJLUu","Astropay Web Tokenizer","script","onerror","astropay-tokenizer.min.js"];return(pa=function(){return e})()}var fa=Tt;function xu(e,t,n,r,s,i,o){var a=Tt;try{var c=e[i](o),l=c[a(293)]}catch(u){return void n(u)}c[a(304)]?t(l):Promise.resolve(l)[a(303)](r,s)}(function(){for(var e=Tt,t=ha();;)try{if(-parseInt(e(297))/1+-parseInt(e(301))/2*(parseInt(e(302))/3)+parseInt(e(292))/4+parseInt(e(305))/5+-parseInt(e(300))/6+parseInt(e(295))/7*(parseInt(e(294))/8)+parseInt(e(306))/9*(parseInt(e(298))/10)===667472)break;t.push(t.shift())}catch{t.push(t.shift())}})(),Promise[fa(308)]()[fa(303)]((()=>{var e=fa;typeof window!==e(299)&&!window[e(291)]&&((()=>{const t=Ko;ys(t(385),Tn[t(395)][t(390)][Qt()[t(387)]]),ys(t(385),Tn[t(395)][t(396)][Qt()[t(387)]])})(),(()=>{var t=E;const n=qo;ys(n(263),Tn[n(255)][n(259)][Qt()[n(264)]]),ys(n(263),Tn[n(255)][t(363)][Qt()[n(264)]])})())}));const h1=(Iu=function*(e){p1(e);const t={initRevealer:(n=e)=>{var r,s=Tt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(307)](n)},initCollector:(n=e)=>{var r,s=Tt;return(r=window[s(291)])===null||r===void 0?void 0:r[s(289)](n)}};return new Promise(((n,r)=>{var s=Tt;typeof window!==s(299)?window[s(291)]?n(t):f1()[s(303)]((()=>{n(t)}))[s(296)]((i=>{r(i)})):r(s(290))}))},Tu=function(){var e=this,t=arguments;return new Promise((function(n,r){var s=Iu[Tt(309)](e,t);function i(a){xu(s,n,r,i,o,"next",a)}function o(a){xu(s,n,r,i,o,"throw",a)}i(void 0)}))},function(e){return Tu[Tt(309)](this,arguments)});var Iu,Tu;function Tt(e,t){var n=ha();return(Tt=function(r,s){return n[r-=289]})(e,t)}function ha(){var e=["APTokenizer","4582976tSGCgi","value","373232tEwSlg","63KVvFap","catch","1156122MmdZsQ","142260eHWUOj","undefined","7303908VsgDsd","6URBYWa","276963Gnzkoo","then","done","3355345JCZnlM","684orEnOE","initRevealer","resolve","apply","initCollector","new SDKError(ErrorType.UNDEFINED, 'window', true)"];return(ha=function(){return e})()}const xs={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},At=console,An={};Object.keys(xs).forEach(e=>{An[e]=At[e]});const vr="Datadog Browser SDK:",W={debug:An.debug.bind(At,vr),log:An.log.bind(At,vr),info:An.info.bind(At,vr),warn:An.warn.bind(At,vr),error:An.error.bind(At,vr)},Is="https://docs.datadoghq.com",m1=`${Is}/real_user_monitoring/browser/troubleshooting`,ma="More details:";function Au(e,t){return(...n)=>{try{return e(...n)}catch(r){W.error(t,r)}}}function $t(e){return e!==0&&Math.random()*100<=e}function Ts(e,t){return+e.toFixed(t)}function g1(e){return Sr(e)&&e>=0&&e<=100}function Sr(e){return typeof e=="number"}const ke=1e3,Be=60*ke,ku=60*Be,Ru=365*(24*ku);function As(e){return{relative:e,timeStamp:y1(e)}}function b1(e){return{relative:ga(e),timeStamp:e}}function y1(e){const t=tt()-performance.now();return t>_r()?Math.round(kn(t,e)):v1(e)}function w1(){return Math.round(tt()-kn(_r(),performance.now()))}function B(e){return Sr(e)?Ts(e*1e6,0):e}function tt(){return new Date().getTime()}function ye(){return tt()}function nt(){return performance.now()}function Ne(){return{relative:nt(),timeStamp:ye()}}function Pu(){return{relative:0,timeStamp:_r()}}function Ce(e,t){return t-e}function kn(e,t){return e+t}function ga(e){return e-_r()}function v1(e){return Math.round(kn(_r(),e))}function S1(e){return e<Ru}let ba;function _r(){return ba===void 0&&(ba=performance.timing.navigationStart),ba}const Cr=1024,Ou=1024*Cr,_1=/[^\u0000-\u007F]/;function Lu(e){return _1.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function C1(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Er(e){return{...e}}function ks(e,t){return Object.keys(e).some(n=>e[n]===t)}function tn(e){return Object.keys(e).length===0}function E1(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function bt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function Vt(e,t){const n=bt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let ya,Nu=!1;function x1(e){ya=e}function I1(e){Nu=e}function $(e){return function(){return nn(e,this,arguments)}}function nn(e,t,n){try{return e.apply(t,n)}catch(r){kt(r)}}function kt(e){if(wa(e),ya)try{ya(e)}catch(t){wa(t)}}function wa(...e){Nu&&W.error("[MONITOR]",...e)}function we(e,t){return Vt(bt(),"setTimeout")($(e),t)}function Ue(e){Vt(bt(),"clearTimeout")(e)}function Rn(e,t){return Vt(bt(),"setInterval")($(e),t)}function Rs(e){Vt(bt(),"clearInterval")(e)}class Q{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(t){this.observers.forEach(n=>n(t))}}function Mu(...e){return new Q(t=>{const n=e.map(r=>r.subscribe(s=>t.notify(s)));return()=>n.forEach(r=>r.unsubscribe())})}function zt(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,s=n&&n.trailing!==void 0?n.trailing:!0;let i=!1,o,a;return{throttled:(...c)=>{if(i){o=c;return}r?e(...c):o=c,i=!0,a=we(()=>{s&&o&&e(...o),i=!1,o=void 0},t)},cancel:()=>{Ue(a),i=!1,o=void 0}}}function q(){}function Ee(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,Ee)}const Ps=/([\w-]+)\s*=\s*([^;]+)/g;function xr(e,t){for(Ps.lastIndex=0;;){const n=Ps.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function T1(e){const t=new Map;for(Ps.lastIndex=0;;){const n=Ps.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Du(e,t,n=""){const r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function A1(){return Fu()===0}function k1(){return Fu()===1}let Os;function Fu(){return Os??(Os=R1())}function R1(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Ir(e,t,n=0,r){const s=new Date;s.setTime(s.getTime()+n);const i=`expires=${s.toUTCString()}`,o=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",l=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${i};path=/;samesite=${o}${a}${c}${l}`}function va(e){return xr(document.cookie,e)}let Sa;function Ht(e){return Sa||(Sa=T1(document.cookie)),Sa.get(e)}function Bu(e,t){Ir(e,"",0,t)}function P1(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${Ee()}`,n="test";Ir(t,n,Be,e);const r=va(t)===n;return Bu(t,e),r}catch(t){return W.error(t),!1}}let _a;function O1(){if(_a===void 0){const e=`dd_site_test_${Ee()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!va(e);)r=`${n.pop()}.${r}`,Ir(e,t,ke,{domain:r});Bu(e,{domain:r}),_a=r}return _a}const Pn="_dd_s";function L1(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function Uu(e){return Object.values(e)}function Ca(e){return Object.entries(e)}const rn=4*ku,$u=15*Be,N1=Ru,Tr={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Vu=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ea="&";function M1(e){return!!e&&(e.indexOf(Ea)!==-1||Vu.test(e))}const D1="1";function sn(e,t){const n={isExpired:D1};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=Ee()),n}function Ls(e){return tn(e)}function zu(e){return!Ls(e)}function Ns(e){return e.isExpired!==void 0||!F1(e)}function F1(e){return(e.created===void 0||tt()-Number(e.created)<rn)&&(e.expire===void 0||tt()<Number(e.expire))}function Hu(e){e.expire=String(tt()+$u)}function xa(e){return Ca(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Ea)}function ju(e){const t={};return M1(e)&&e.split(Ea).forEach(n=>{const r=Vu.exec(n);if(r!==null){const[,s,i]=r;s==="aid"?t.anonymousId=i:t[s]=i}}),t}const B1="_dd",U1="_dd_r",$1="_dd_l",V1="rum",z1="logs";function H1(e){if(!Ht(Pn)){const n=Ht(B1),r=Ht(U1),s=Ht($1),i={};n&&(i.id=n),s&&/^[01]$/.test(s)&&(i[z1]=s),r&&/^[012]$/.test(r)&&(i[V1]=r),zu(i)&&(Hu(i),e.persistSession(i))}}function Wu(e){const t=K1(e);return P1(t)?{type:Tr.COOKIE,cookieOptions:t}:void 0}function j1(e,t){const n={isLockEnabled:A1(),persistSession:W1(t),retrieveSession:G1,expireSession:r=>q1(t,r,e)};return H1(n),n}function W1(e){return t=>{Ir(Pn,xa(t),$u,e)}}function q1(e,t,n){const r=sn(t,n);Ir(Pn,xa(r),n.trackAnonymousUser?N1:rn,e)}function G1(){const e=va(Pn);return ju(e)}function K1(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=O1()),t}const Y1="_dd_test_";function qu(){try{const e=Ee(),t=`${Y1}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Tr.LOCAL_STORAGE}:void 0}catch{return}}function Z1(e){return{isLockEnabled:!1,persistSession:Gu,retrieveSession:J1,expireSession:t=>X1(t,e)}}function Gu(e){localStorage.setItem(Pn,xa(e))}function J1(){const e=localStorage.getItem(Pn);return ju(e)}function X1(e,t){Gu(sn(e,t))}const Q1=10,e0=100,Ku=[];let Ms;function on(e,t,n=0){var r;const{isLockEnabled:s,persistSession:i,expireSession:o}=t,a=p=>i({...p,lock:l}),c=()=>{const p=t.retrieveSession(),h=p.lock;return p.lock&&delete p.lock,{session:p,lock:h}};if(Ms||(Ms=e),e!==Ms){Ku.push(e);return}if(s&&n>=e0){Yu(t);return}let l,u=c();if(s){if(u.lock){Ds(e,t,n);return}if(l=Ee(),a(u.session),u=c(),u.lock!==l){Ds(e,t,n);return}}let d=e.process(u.session);if(s&&(u=c(),u.lock!==l)){Ds(e,t,n);return}if(d&&(Ns(d)?o(d):(Hu(d),s?a(d):i(d))),s&&!(d&&Ns(d))){if(u=c(),u.lock!==l){Ds(e,t,n);return}i(u.session),d=u.session}(r=e.after)===null||r===void 0||r.call(e,d||u.session),Yu(t)}function Ds(e,t,n){we(()=>{on(e,t,n+1)},Q1)}function Yu(e){Ms=void 0;const t=Ku.shift();t&&on(t,e)}const Zu=ke;function t0(e){switch(e.sessionPersistence){case Tr.COOKIE:return Wu(e);case Tr.LOCAL_STORAGE:return qu();case void 0:{let t=Wu(e);return!t&&e.allowFallbackToLocalStorage&&(t=qu()),t}default:W.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function n0(e,t,n,r){const s=new Q,i=new Q,o=new Q,a=e.type===Tr.COOKIE?j1(t,e.cookieOptions):Z1(t),{expireSession:c}=a,l=Rn(f,Zu);let u;g();const{throttled:d,cancel:p}=zt(()=>{on({process:b=>{if(Ls(b))return;const P=m(b);return _(P),P},after:b=>{zu(b)&&!x()&&N(b),u=b}},a)},Zu);function h(){on({process:b=>x()?m(b):void 0},a)}function f(){on({process:b=>Ns(b)?sn(b,t):void 0,after:m},a)}function m(b){return Ns(b)&&(b=sn(b,t)),x()&&(w(b)?C():(o.notify({previousState:u,newState:b}),u=b)),b}function g(){on({process:b=>{if(Ls(b))return sn(b,t)},after:b=>{u=b}},a)}function _(b){if(Ls(b))return!1;const{trackingType:P,isTracked:T}=r(b[n]);b[n]=P,delete b.isExpired,T&&!b.id&&(b.id=Ee(),b.created=String(tt()))}function x(){return u[n]!==void 0}function w(b){return u.id!==b.id||u[n]!==b[n]}function C(){u=sn(u,t),i.notify()}function N(b){u=b,s.notify()}function A(b){on({process:P=>({...P,...b}),after:m},a)}return{expandOrRenewSession:d,expandSession:h,getSession:()=>u,renewObservable:s,expireObservable:i,sessionStateUpdateObservable:o,restartSession:g,expire:()=>{p(),c(u),m(sn(u,t))},stop:()=>{Rs(l)},updateSessionState:A}}const Ia={GRANTED:"granted",NOT_GRANTED:"not-granted"};function r0(e){const t=new Q;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Ia.GRANTED},observable:t}}function On(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Ln(Object.prototype),s=Ln(Array.prototype),i=Ln(Object.getPrototypeOf(e)),o=Ln(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),s(),i(),o()}}function Ln(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):q}function Ta(e){return Fs(e,location.href).href}function s0(e){try{return!!Fs(e)}catch{return!1}}function i0(e){const t=Fs(e).pathname;return t[0]==="/"?t:`/${t}`}function Fs(e,t){const n=o0();if(n)try{return t!==void 0?new n(e,t):new n(e)}catch(i){throw new Error(`Failed to construct URL: ${String(i)} ${On({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw new Error(`Invalid URL: '${e}'`);let r=document;const s=r.createElement("a");if(t!==void 0){r=document.implementation.createHTMLDocument("");const i=r.createElement("base");i.href=t,r.head.appendChild(i),r.body.appendChild(s)}return s.href=e,s}const Ju=URL;let Bs;function o0(){if(Bs===void 0)try{Bs=new Ju("http://test/path").href==="http://test/path"}catch{Bs=!1}return Bs?Ju:void 0}const Xu="datad0g.com",a0="dd0g-gov.com",an="datadoghq.com",c0="datadoghq.eu",l0="ddog-gov.com",u0="pci.browser-intake-datadoghq.com",d0=["ddsource","ddtags"];function Nn(e,t,n){const r=p0(e,t);return{build(s,i){const o=f0(e,t,n,s,i);return r(o)},tags:n,urlPrefix:r(""),trackType:t}}function p0(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const i=Ta(r);return o=>`${i}?ddforward=${encodeURIComponent(`${n}?${o}`)}`}if(typeof r=="function")return i=>r({path:n,parameters:i});const s=Qu(t,e);return i=>`https://${s}${n}?${i}`}function Qu(e,t){const{site:n=an,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===an)return u0;if(r&&n===an)return`${r}.${an}`;if(n===a0)return`http-intake.logs.${n}`;const s=n.split("."),i=s.pop();return`browser-intake-${s.join("-")}.${i}`}function f0({clientToken:e,internalAnalyticsSubdomain:t},n,r,s,{retry:i,encoding:o}){const a=["sdk_version:6.6.3",`api:${s}`].concat(r);i&&a.push(`retry_count:${i.count}`,`retry_after:${i.lastFailureStatus}`);const c=["ddsource=browser",`ddtags=${encodeURIComponent(a.join(","))}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${Ee()}`];return o&&c.push(`dd-evp-encoding=${o}`),n==="rum"&&c.push(`batch_time=${ye()}`),t&&c.reverse(),c.join("&")}const h0=200;function m0(e){const{env:t,service:n,version:r,datacenter:s}=e,i=[];return t&&i.push(Us("env",t)),n&&i.push(Us("service",n)),r&&i.push(Us("version",r)),s&&i.push(Us("datacenter",s)),i}function Us(e,t){const n=h0-e.length-1;(t.length>n||g0(t))&&W.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${ma} ${Is}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function g0(e){return b0()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function b0(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function y0(e){const t=e.site||an,n=m0(e),r=w0(e,n);return{replica:v0(e,n),site:t,...r}}function w0(e,t){return{logsEndpointBuilder:Nn(e,"logs",t),rumEndpointBuilder:Nn(e,"rum",t),profilingEndpointBuilder:Nn(e,"profile",t),sessionReplayEndpointBuilder:Nn(e,"replay",t)}}function v0(e,t){if(!e.replica)return;const n={...e,site:an,clientToken:e.replica.clientToken},r={logsEndpointBuilder:Nn(n,"logs",t),rumEndpointBuilder:Nn(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function S0(e){return d0.every(t=>e.includes(t))}const Ar={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Aa={ALL:"all",SAMPLED:"sampled"};function ka(e,t){return e!=null&&typeof e!="string"?(W.error(`${t} must be defined as a string`),!1):!0}function _0(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(W.error(`Site should be a valid Datadog site. ${ma} ${Is}/getting_started/site/.`),!1):!0}function Mn(e,t){return e!==void 0&&!g1(e)?(W.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function C0(e){var t,n,r,s,i,o;if(!e||!e.clientToken){W.error("Client Token is not configured, we will not send any data.");return}if(!(!_0(e.site)||!Mn(e.sessionSampleRate,"Session")||!Mn(e.telemetrySampleRate,"Telemetry")||!Mn(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!Mn(e.telemetryUsageSampleRate,"Telemetry Usage")||!ka(e.version,"Version")||!ka(e.env,"Env")||!ka(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ks(Ia,e.trackingConsent)){W.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Au(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:t0(e),sessionSampleRate:(t=e.sessionSampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(r=e.telemetryConfigurationSampleRate)!==null&&r!==void 0?r:5,telemetryUsageSampleRate:(s=e.telemetryUsageSampleRate)!==null&&s!==void 0?s:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(i=e.trackingConsent)!==null&&i!==void 0?i:Ia.GRANTED,trackAnonymousUser:(o=e.trackAnonymousUser)!==null&&o!==void 0?o:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Cr,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ke,batchMessagesLimit:50,messageBytesLimit:256*Cr,...y0(e)}}}function E0(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent}}var cn;(function(e){e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",e.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",e.PROFILING="profiling"})(cn||(cn={}));const Ra=new Set;function x0(e){Array.isArray(e)&&I0(e.filter(t=>ks(cn,t)))}function I0(e){e.forEach(t=>{Ra.add(t)})}function $s(e){return Ra.has(e)}function T0(){return Ra}const kr="?";function jt(e){const t=[];let n=Pa(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
541
|
-
|
|
542
|
-
at ${r}${s} @ ${n.url}${i}${o}`}),t}function td(e){return`${e.name||"Error"}: ${e.message}`}function $e(e,t,n,{computeHandlingStack:r}={}){let s=e[t];if(typeof s!="function")if(t in e&&t.startsWith("on"))s=q;else return{stop:q};let i=!1;const o=function(){if(i)return s.apply(this,arguments);const a=Array.from(arguments);let c;nn(n,null,[{target:this,parameters:a,onPostCall:u=>{c=u},handlingStack:r?Vs("instrumented method"):void 0}]);const l=s.apply(this,a);return c&&nn(c,null,[l]),l};return e[t]=o,{stop:()=>{i=!0,e[t]===o&&(e[t]=s)}}}function Rr(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:q};const s=q;let i=(a,c)=>{we(()=>{i!==s&&n(a,c)},0)};const o=function(a){r.set.call(this,a),i(this,a)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===o&&Object.defineProperty(e,t,r),i=s}}}const V0=220*Cr,z0="$",H0=3;function de(e,t=V0){const n=Ln(Object.prototype),r=Ln(Array.prototype),s=[],i=new WeakMap,o=Oa(e,z0,void 0,s,i),a=JSON.stringify(o);let c=a?a.length:0;if(c>t){Na(t,"discarded",e);return}for(;s.length>0&&c<t;){const l=s.shift();let u=0;if(Array.isArray(l.source))for(let d=0;d<l.source.length;d++){const p=Oa(l.source[d],l.path,d,s,i);if(p!==void 0?c+=JSON.stringify(p).length:c+=4,c+=u,u=1,c>t){Na(t,"truncated",e);break}l.target[d]=p}else for(const d in l.source)if(Object.prototype.hasOwnProperty.call(l.source,d)){const p=Oa(l.source[d],l.path,d,s,i);if(p!==void 0&&(c+=JSON.stringify(p).length+u+d.length+H0,u=1),c>t){Na(t,"truncated",e);break}l.target[d]=p}}return n(),r(),o}function Oa(e,t,n,r,s){const i=q0(e);if(!i||typeof i!="object")return j0(i);const o=La(i);if(o!=="[Object]"&&o!=="[Array]"&&o!=="[Error]")return o;const a=e;if(s.has(a))return`[Reference seen at ${s.get(a)}]`;const c=n!==void 0?`${t}.${n}`:t,l=Array.isArray(i)?[]:{};return s.set(a,c),r.push({source:i,target:l,path:c}),l}function j0(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function La(e){try{if(e instanceof Event)return W0(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function W0(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?La(e.currentTarget):null,target:e.target?La(e.target):null}}function q0(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function Na(e,t,n){W.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const nd="No stack, consider using an instance of Error";function rd({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:i,source:o,handling:a}){const c=Wt(t),l=G0(e,c,i,t),u=K0(c,e)?Fn(e):nd,d=c?od(t,o):void 0,p=e?e.name:void 0,h=sd(t),f=id(t);return{startClocks:s,source:o,handling:a,handlingStack:n,componentStack:r,originalError:t,type:p,message:l,stack:u,causes:d,fingerprint:h,context:f}}function G0(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${On(de(r))}`}function K0(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function sd(e){return Wt(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function id(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function Wt(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function od(e,t){let n=e;const r=[];for(;Wt(n==null?void 0:n.cause)&&r.length<10;){const s=jt(n.cause);r.push({message:n.cause.message,source:t,type:s==null?void 0:s.name,stack:s&&Fn(s)}),n=n.cause}return r.length?r:void 0}const Bn={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Y0(e){const t=(s,i)=>{const o=rd({stackTrace:s,originalError:i,startClocks:Ne(),nonErrorPrefix:"Uncaught",source:Bn.SOURCE,handling:"unhandled"});e.notify(o)},{stop:n}=Z0(t),{stop:r}=J0(t);return{stop:()=>{n(),r()}}}function Z0(e){return $e(window,"onerror",({parameters:[t,n,r,s,i]})=>{let o;Wt(i)?o=jt(i):o=B0(t,n,r,s),e(o,i??t)})}function J0(e){return $e(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=jt(n);e(r,n)})}function X0(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return I1},enumerable:!1}),t}function Q0(e,t,n){const r=e[t];r&&!r.q&&r.version&&W.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(s=>Au(s,"onReady callback threw an error:")())}function ad(e,t){t.silentMultipleInit||W.error(`${e} is already initialized.`)}function oe(e,t,n,r,s){return Ve(e,t,[n],r,s)}function Ve(e,t,n,r,{once:s,capture:i,passive:o}={}){const a=$(p=>{!p.isTrusted&&!p.__ddIsTrusted&&!e.allowUntrustedEvents||(s&&d(),r(p))}),c=o?{capture:i,passive:o}:i,l=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,u=Vt(l,"addEventListener");n.forEach(p=>u.call(t,p,a,c));function d(){const p=Vt(l,"removeEventListener");n.forEach(h=>p.call(t,h,a,c))}return{stop:d}}const Pr={intervention:"intervention",cspViolation:"csp_violation"};function eb(e,t){const n=[];t.includes(Pr.cspViolation)&&n.push(nb(e));const r=t.filter(s=>s!==Pr.cspViolation);return r.length&&n.push(tb(r)),Mu(...n)}function tb(e){return new Q(t=>{if(!window.ReportingObserver)return;const n=$((s,i)=>s.forEach(o=>t.notify(rb(o)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function nb(e){return new Q(t=>{const{stop:n}=oe(e,document,"securitypolicyviolation",r=>{t.notify(sb(r))});return n})}function rb(e){const{type:t,body:n}=e;return cd({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:ld(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function sb(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return cd({type:e.effectiveDirective,message:`${Pr.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:ld(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Du(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function cd(e){return{startClocks:Ne(),source:Bn.REPORT,handling:"unhandled",...e}}function ld(e,t,n,r,s){return n?Fn({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:s??void 0}]}):void 0}function Ma(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function ln(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function zs(e,t,n=ib()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const s=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,s)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const s=Array.isArray(e)?e:[];for(let i=0;i<t.length;++i)s[i]=zs(s[i],t[i],n);return s}const r=ln(e)==="object"?e:{};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=zs(r[s],t[s],n));return r}function Da(e){return zs(void 0,e)}function at(...e){let t;for(const n of e)n!=null&&(t=zs(t,n));return t}function ib(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function ud(){var e;const t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function dd(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const ob=500;function pd(){const e=[];return{add:s=>{e.push(s)>ob&&e.splice(0,1)},remove:s=>{dd(e,s)},drain:s=>{e.forEach(i=>i(s)),e.length=0}}}const un={log:"log",configuration:"configuration",usage:"usage"},ab=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],cb=[l0];let fd=pd(),Un=e=>{fd.add(()=>Un(e))};function lb(e,t){let n;const r=new Q,s=new Set,i=!cb.includes(t.site)&&$t(t.telemetrySampleRate),o={[un.log]:i,[un.configuration]:i&&$t(t.telemetryConfigurationSampleRate),[un.usage]:i&&$t(t.telemetryUsageSampleRate)},a=ub();Un=l=>{const u=On(l);if(o[l.type]&&s.size<t.maxTelemetryEventsPerPage&&!s.has(u)){const d=c(e,l,a);r.notify(d),Ma("telemetry",d),s.add(u)}},x1(Fa);function c(l,u,d){return at({type:"telemetry",date:ye(),service:l,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:at(u,{runtime_env:d,connectivity:ud(),sdk_setup:"npm"}),experimental_features:Array.from(T0())},n!==void 0?n():{})}return{setContextProvider:l=>{n=l},observable:r,enabled:i}}function ub(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function db(){fd.drain()}function pb(e){return e.site===Xu}function Rt(e,t){wa(xs.debug,e,t),Un({type:un.log,message:e,status:"debug",...t})}function Fa(e,t){Un({type:un.log,status:"error",...hb(e),...t})}function fb(e){Un({type:un.configuration,configuration:e})}function Me(e){Un({type:un.usage,usage:e})}function hb(e){if(Wt(e)){const t=jt(e);return{error:{kind:t.name,stack:Fn(mb(t))},message:t.message}}return{error:{stack:nd},message:`Uncaught ${On(e)}`}}function mb(e){return e.stack=e.stack.filter(t=>!t.url||ab.some(n=>t.url.startsWith(n))),e}const Or=1/0,gb=Be;let Lr=null;const Hs=new Set;function bb(){Hs.forEach(e=>e())}function $n({expireDelay:e,maxEntries:t}){let n=[];const r=[];Lr||(Lr=Rn(()=>bb(),gb));const s=()=>{const h=nt()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const f=n.pop();f&&r.push(f.startTime)}};Hs.add(s);function i(h,f){const m={value:h,startTime:f,endTime:Or,remove:()=>{dd(n,m)},close:g=>{m.endTime=g}};return t&&n.length>=t&&n.pop(),n.unshift(m),m}function o(h=Or,f={returnInactive:!1}){for(const m of n)if(m.startTime<=h){if(f.returnInactive||h<=m.endTime)return m.value;break}}function a(h){const f=n[0];f&&f.endTime===Or&&f.close(h)}function c(h=Or,f=0){const m=kn(h,f);return n.filter(g=>g.startTime<=m&&h<=g.endTime).map(g=>g.value)}function l(){return n.map(({startTime:h,endTime:f,value:m})=>({startTime:h,endTime:f===Or?"Infinity":f,value:m}))}function u(){return r}function d(){n=[]}function p(){Hs.delete(s),Hs.size===0&&Lr&&(Rs(Lr),Lr=null)}return{add:i,find:o,closeActive:a,findAll:c,reset:d,stop:p,getAllEntries:l,getDeletedEntries:u}}const yb=Be,wb=rn;function vb(e,t,n,r){const s=new Q,i=new Q,o=n0(e.sessionStoreStrategyType,e,t,n),a=$n({expireDelay:wb});o.renewObservable.subscribe(()=>{a.add(c(),nt()),s.notify()}),o.expireObservable.subscribe(()=>{i.notify(),a.closeActive(nt())}),o.expandOrRenewSession(),a.add(c(),Pu().relative),r.observable.subscribe(()=>{r.isGranted()?o.expandOrRenewSession():o.expire()}),Sb(e,()=>{r.isGranted()&&o.expandOrRenewSession()}),_b(e,()=>o.expandSession()),Cb(e,()=>o.restartSession());function c(){return{id:o.getSession().id,trackingType:o.getSession()[t],isReplayForced:!!o.getSession().forcedReplay,anonymousId:o.getSession().anonymousId}}return{findSession:(l,u)=>a.find(l,u),renewObservable:s,expireObservable:i,sessionStateUpdateObservable:o.sessionStateUpdateObservable,expire:o.expire,updateSessionState:o.updateSessionState}}function Sb(e,t){const{stop:n}=Ve(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function _b(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=oe(e,document,"visibilitychange",n);Rn(n,yb)}function Cb(e,t){const{stop:n}=oe(e,window,"resume",t,{capture:!0})}function Eb(e){return e>=500}function xb(e){try{return e.clone()}catch{return}}const Ib=80*Cr,Tb=32,hd=3*Ou,Ab=Be,md=ke;function gd(e,t,n,r,s){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?yd(e,t,n,{onSuccess:()=>wd(0,t,n,r,s),onFailure:()=>{t.queuedPayloads.enqueue(e),bd(t,n,r,s)}}):t.queuedPayloads.enqueue(e)}function bd(e,t,n,r){e.transportStatus===2&&we(()=>{const s=e.queuedPayloads.first();yd(s,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=md,wd(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(Ab,e.currentBackoffTime*2),bd(e,t,n,r)}})},e.currentBackoffTime)}function yd(e,t,n,{onSuccess:r,onFailure:s}){t.bandwidthMonitor.add(e),n(e,i=>{t.bandwidthMonitor.remove(e),kb(i)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:i.status},s()):(t.transportStatus=0,r())})}function wd(e,t,n,r,s){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(s({message:`Reached max ${r} events size queued for upload: ${hd/Ou}MiB`,source:Bn.AGENT,startClocks:Ne()}),t.queueFullReported=!0);const i=t.queuedPayloads;for(t.queuedPayloads=vd();i.size()>0;)gd(i.dequeue(),t,n,r,s)}function kb(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Eb(e.status))}function Rb(){return{transportStatus:0,currentBackoffTime:md,bandwidthMonitor:Pb(),queuedPayloads:vd(),queueFullReported:!1}}function vd(){const e=[];return{bytesCount:0,enqueue(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=hd}}}function Pb(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Ib&&this.ongoingRequestCount<Tb},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function Sd(e,t,n){const r=Rb(),s=(i,o)=>Nb(e,t,i,o);return{send:i=>{gd(i,r,s,e.trackType,n)},sendOnExit:i=>{Ob(e,t,i)}}}function Ob(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const s=e.build("beacon",n);if(navigator.sendBeacon(s,n.data))return}catch(s){Lb(s)}Ba(e,n)}let _d=!1;function Lb(e){_d||(_d=!0,kt(e))}function Nb(e,t,n,r){if(Mb()&&n.bytesCount<t){const i=e.build("fetch-keepalive",n);fetch(i,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then($(o=>r==null?void 0:r({status:o.status,type:o.type}))).catch($(()=>Ba(e,n,r)))}else Ba(e,n,r)}function Ba(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then($(s=>n==null?void 0:n({status:s.status,type:s.type}))).catch($(()=>n==null?void 0:n({status:0})))}function Mb(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Vn(){const e=Db();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const s=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:s}))}}}function Cd(e){const t=Vn();return!!t&&t.getCapabilities().includes(e)}function dn(e){var t;e===void 0&&(e=(t=bt().location)===null||t===void 0?void 0:t.hostname);const n=Vn();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function Db(){return bt().DatadogEventBridge}const zn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Fb(e){return new Q(t=>{const{stop:n}=Ve(e,window,["visibilitychange","freeze"],s=>{s.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:zn.HIDDEN}):s.type==="freeze"&&t.notify({reason:zn.FROZEN})},{capture:!0}),r=oe(e,window,"beforeunload",()=>{t.notify({reason:zn.UNLOADING})}).stop;return()=>{n(),r()}})}function Ed(e){return Uu(zn).includes(e)}function Bb({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let s={};const i=n.flushObservable.subscribe(d=>u(d));function o(d,p,h){n.notifyBeforeAddMessage(p),h!==void 0?(s[h]=d,n.notifyAfterAddMessage()):e.write(e.isEmpty?d:`
|
|
543
|
-
${d}`,f=>{n.notifyAfterAddMessage(f-p)})}function a(d){return d!==void 0&&s[d]!==void 0}function c(d){const p=s[d];delete s[d];const h=e.estimateEncodedBytesCount(p);n.notifyAfterRemoveMessage(h)}function l(d,p){const h=On(d),f=e.estimateEncodedBytesCount(h);if(f>=r){W.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${ma} ${m1}/#technical-limitations`);return}a(p)&&c(p),o(h,f,p)}function u(d){const p=Uu(s).join(`
|
|
544
|
-
`);s={};const h=Ed(d.reason),f=h?t.sendOnExit:t.send;if(h&&e.isAsync){const m=e.finishSync();m.outputBytesCount&&f(xd(m));const g=[m.pendingData,p].filter(Boolean).join(`
|
|
545
|
-
|
|
546
|
-
${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.unsubscribe}}function xd(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}function Ub({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:s}){const i=r.subscribe(f=>u(f.reason)),o=s.subscribe(()=>u("session_expire")),a=new Q(()=>()=>{i.unsubscribe(),o.unsubscribe()});let c=0,l=0;function u(f){if(l===0)return;const m=l,g=c;l=0,c=0,h(),a.notify({reason:f,messagesCount:m,bytesCount:g})}let d;function p(){d===void 0&&(d=we(()=>{u("duration_limit")},n))}function h(){Ue(d),d=void 0}return{flushObservable:a,get messagesCount(){return l},notifyBeforeAddMessage(f){c+f>=t&&u("bytes_limit"),l+=1,c+=f,p()},notifyAfterAddMessage(f=0){c+=f,l>=e?u("messages_limit"):c>=t&&u("bytes_limit")},notifyAfterRemoveMessage(f){c-=f,l-=1,l===0&&h()}}}function $b(e,t,n,r,s,i,o=Bb){const a=l(e,t),c=n&&l(e,n);function l(u,{endpoint:d,encoder:p}){return o({encoder:p,request:Sd(d,u.batchBytesLimit,r),flushController:Ub({messagesLimit:u.batchMessagesLimit,bytesLimit:u.batchBytesLimit,durationLimit:u.flushTimeout,pageMayExitObservable:s,sessionExpireObservable:i}),messageBytesLimit:u.messageBytesLimit})}return{flushObservable:a.flushController.flushObservable,add(u,d=!0){a.add(u),c&&d&&c.add(n.transformMessage?n.transformMessage(u):u)},upsert:(u,d)=>{a.upsert(u,d),c&&c.upsert(n.transformMessage?n.transformMessage(u):u,d)},stop:()=>{a.stop(),c&&c.stop()}}}function Vb(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const s=Lu(n);t+=s,e+=n,r&&r(s)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class zb{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(s=>s(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function Ua(e,t,n){let r=0,s=!1;return{isLimitReached(){if(r===0&&we(()=>{r=0},Be),r+=1,r<=t||s)return s=!1,!1;if(r===t+1){s=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Bn.AGENT,startClocks:Ne()})}finally{s=!1}}return!0}}}function $a(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:q}):oe(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function Hb(e,t){return new Promise(n=>{$a(e,t,n)})}let Va;const za=new WeakMap;function jb(e){return Va||(Va=Wb(e)),Va}function Wb(e){return new Q(t=>{const{stop:n}=$e(XMLHttpRequest.prototype,"open",qb),{stop:r}=$e(XMLHttpRequest.prototype,"send",i=>{Gb(i,e,t)},{computeHandlingStack:!0}),{stop:s}=$e(XMLHttpRequest.prototype,"abort",Kb);return()=>{n(),r(),s()}})}function qb({target:e,parameters:[t,n]}){za.set(e,{state:"open",method:String(t).toUpperCase(),url:Ta(String(n))})}function Gb({target:e,handlingStack:t},n,r){const s=za.get(e);if(!s)return;const i=s;i.state="start",i.startClocks=Ne(),i.isAborted=!1,i.xhr=e,i.handlingStack=t;let o=!1;const{stop:a}=$e(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),a(),o)return;o=!0;const u=s;u.state="complete",u.duration=Ce(i.startClocks.timeStamp,ye()),u.status=e.status,r.notify(Er(u))},{stop:l}=oe(n,e,"loadend",c);r.notify(i)}function Kb({target:e}){const t=za.get(e);t&&(t.isAborted=!0)}let Ha;function Id(){return Ha||(Ha=Yb()),Ha}function Yb(){return new Q(e=>{if(!window.fetch)return;const{stop:t}=$e(window,"fetch",n=>Zb(n,e),{computeHandlingStack:!0});return t})}function Zb({parameters:e,onPostCall:t,handlingStack:n},r){const[s,i]=e;let o=i&&i.method;o===void 0&&s instanceof Request&&(o=s.method);const a=o!==void 0?String(o).toUpperCase():"GET",c=s instanceof Request?s.url:Ta(String(s)),l=Ne(),u={state:"start",init:i,input:s,method:a,startClocks:l,url:c,handlingStack:n};r.notify(u),e[0]=u.input,e[1]=u.init,t(d=>Jb(r,d,u))}function Jb(e,t,n){const r=n;function s(i){r.state="resolve",Object.assign(r,i),e.notify(r)}t.then($(i=>{s({response:i,responseType:i.type,status:i.status,isAborted:!1})}),$(i=>{var o,a;s({status:0,isAborted:((a=(o=r.init)===null||o===void 0?void 0:o.signal)===null||a===void 0?void 0:a.aborted)||i instanceof DOMException&&i.code===DOMException.ABORT_ERR,error:i})}))}function Td(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback($(e),t);return()=>window.cancelIdleCallback(n)}return Qb(e)}const Xb=50;function Qb(e){const t=tt(),n=we(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,Xb-(tt()-t))})},0);return()=>Ue(n)}const e2=ke,t2=30;function n2(){const e=[];function t(r){let s;if(r.didTimeout){const i=performance.now();s=()=>t2-(performance.now()-i)}else s=r.timeRemaining.bind(r);for(;s()>0&&e.length;)e.shift()();e.length&&n()}function n(){Td(t,{timeout:e2})}return{push(r){e.push(r)===1&&n()}}}let ja={};function r2(e){const t=e.map(n=>(ja[n]||(ja[n]=s2(n)),ja[n]));return Mu(...t)}function s2(e){return new Q(t=>{const n=At[e];return At[e]=(...r)=>{n.apply(console,r);const s=Vs("console error");nn(()=>{t.notify(i2(r,e,s))})},()=>{At[e]=n}})}function i2(e,t,n){const r=e.map(i=>o2(i)).join(" ");let s;if(t===xs.error){const i=e.find(Wt);s={stack:i?Fn(jt(i)):void 0,fingerprint:sd(i),causes:i?od(i,"console"):void 0,startClocks:Ne(),message:r,source:Bn.CONSOLE,handling:"handled",handlingStack:n,context:id(i),originalError:i}}return{api:t,message:r,error:s,handlingStack:n}}function o2(e){return typeof e=="string"?de(e):Wt(e)?td(jt(e)):On(de(e),void 0,2)}function a2(e){const t=ln(e)==="object";return t||W.error("Unsupported context:",e),t}function Wa(e,t,n){const r={...e};for(const[s,{required:i,type:o}]of Object.entries(t))o==="string"&&s in r&&(r[s]=String(r[s])),i&&!(s in e)&&W.warn(`The property ${s} of ${n} is required; context will not be sent to the intake.`);return r}function js(e="",{propertiesConfig:t={}}={}){let n={};const r=new Q,s={getContext:()=>Da(n),setContext:i=>{a2(i)?n=de(Wa(i,t,e)):s.clearContext(),r.notify()},setContextProperty:(i,o)=>{n=de(Wa({...n,[i]:o},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],Wa(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return s}const c2="_dd_c",l2=[];function qa(e,t,n,r){const s=u2(n,r);l2.push(oe(e,window,"storage",({key:l})=>{s===l&&o()})),t.changeObservable.subscribe(a);const i=at(c(),t.getContext());tn(i)||t.setContext(i);function o(){t.setContext(c())}function a(){localStorage.setItem(s,JSON.stringify(t.getContext()))}function c(){const l=localStorage.getItem(s);return l?JSON.parse(l):{}}}function u2(e,t){return`${c2}_${e}_${t}`}const ve={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},De={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function d2(e,t,n){const r=e.getReader();let s=0;i();function i(){r.read().then($(a=>{if(a.done){o();return}s+=a.value.length,s>n.bytesLimit?o():i()}),$(a=>t(a)))}function o(){r.cancel().catch(q),t(void 0,void 0,void 0)}}const p2="datadog-synthetics-public-id",f2="datadog-synthetics-result-id",h2="datadog-synthetics-injects-rum";function Ad(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Ht(h2))}function m2(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Ht(p2);return typeof e=="string"?e:void 0}function g2(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Ht(f2);return typeof e=="string"?e:void 0}function Ga(e){const t=ln(e);return t==="string"||t==="function"||e instanceof RegExp}function kd(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(s){W.error(s)}return!1})}function b2(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function y2(e,t,n){function r(i){return!t.wasInPageStateDuringPeriod("frozen",i.startClocks.relative,i.duration)}function s(i){r(i)&&e.notify(12,v2(i))}return{addDurationVital:s,startDurationVital:(i,o={})=>Rd(n,i,o),stopDurationVital:(i,o={})=>{Pd(s,n,i,o)}}}function Rd({vitalsByName:e,vitalsByReference:t},n,r={}){const s={name:n,startClocks:Ne(),context:r.context,description:r.description},i={__dd_vital_reference:!0};return e.set(n,s),t.set(i,s),i}function Pd(e,{vitalsByName:t,vitalsByReference:n},r,s={}){const i=typeof r=="string"?t.get(r):n.get(r);i&&(e(w2(i,i.startClocks,s,Ne())),typeof r=="string"?t.delete(r):n.delete(r))}function w2(e,t,n,r){var s;return{name:e.name,type:"duration",startClocks:t,duration:Ce(t.timeStamp,r.timeStamp),context:at(e.context,n.context),description:(s=n.description)!==null&&s!==void 0?s:e.description}}function v2(e,t){const n={date:e.startClocks.timeStamp,vital:{id:Ee(),type:e.type,name:e.name,duration:B(e.duration),description:e.description},type:"vital"};return n._dd={vital:{computed_value:!0}},{rawRumEvent:n,startTime:e.startClocks.relative,duration:e.duration,customerContext:e.context,domainContext:{}}}function Od(e,t,n){if(e)for(const r of e){const s=r[t];s&&s(n)}}function S2(){return Nd(64)}function Ld(){return Nd(63)}function Nd(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],s=t[0],i="";do{const o=r%n*4294967296+s;r=Math.floor(r/n),s=Math.floor(o/n),i=(o%n).toString(n)+i}while(r||s);return i}}}function Hn(e){return e.toString(16).padStart(16,"0")}let Ws;function _2(e,t){if(t===100)return!0;if(t===0)return!1;if(Ws&&e===Ws.sessionId)return Ws.decision;let n;return window.BigInt?n=C2(BigInt(`0x${e.split("-")[4]}`),t):n=$t(t),Ws={sessionId:e,decision:n},n}function C2(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),s=e*n%r;return Number(s)<=t/100*Number(r)}function E2(e){const t=e;return ln(t)==="object"&&Ga(t.match)&&Array.isArray(t.propagatorTypes)}function x2(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function I2(e,t,n){return{clearTracingIfNeeded:x2,traceFetch:r=>Md(e,r,t,n,s=>{var i;if(r.input instanceof Request&&!(!((i=r.init)===null||i===void 0)&&i.headers))r.input=new Request(r.input),Object.keys(s).forEach(o=>{r.input.headers.append(o,s[o])});else{r.init=Er(r.init);const o=[];r.init.headers instanceof Headers?r.init.headers.forEach((a,c)=>{o.push([c,a])}):Array.isArray(r.init.headers)?r.init.headers.forEach(a=>{o.push(a)}):r.init.headers&&Object.keys(r.init.headers).forEach(a=>{o.push([a,r.init.headers[a]])}),r.init.headers=o.concat(Ca(s))}}),traceXhr:(r,s)=>Md(e,r,t,n,i=>{Object.keys(i).forEach(o=>{s.setRequestHeader(o,i[o])})})}}function Md(e,t,n,r,s){const i=n.findTrackedSession();if(!i)return;const o=e.allowedTracingUrls.find(l=>kd([l.match],t.url,!0));if(!o)return;const a=_2(i.id,e.traceSampleRate);(a||e.traceContextInjection===Aa.ALL)&&(t.traceSampled=a,t.traceId=S2(),t.spanId=Ld(),s(T2(t.traceId,t.spanId,t.traceSampled,o.propagatorTypes,r,e)))}function T2(e,t,n,r,s,i){const o={};if(r.forEach(a=>{switch(a){case"datadog":{Object.assign(o,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(o,{traceparent:`00-0000000000000000${Hn(e)}-${Hn(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(o,{b3:`${Hn(e)}-${Hn(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(o,{"X-B3-TraceId":Hn(e),"X-B3-SpanId":Hn(t),"X-B3-Sampled":n?"1":"0"});break}}}),$s(cn.USER_ACCOUNT_TRACE_HEADER)&&i.propagateTraceBaggage){const a=s().user.id,c=s().account.id,l=[];typeof a=="string"&&l.push(`usr.id=${encodeURIComponent(a)}`),typeof c=="string"&&l.push(`account.id=${encodeURIComponent(c)}`),l.length>0&&(o.baggage=l.join(","))}return o}const Dd=["tracecontext","datadog"];function A2(e){var t,n,r,s,i,o,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&W.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){W.error("Application ID is not configured, no RUM data will be collected.");return}if(!Mn(e.sessionReplaySampleRate,"Session Replay")||!Mn(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){W.error("Excluded Activity Urls should be an array");return}const c=k2(e);if(!c)return;const l=C0(e);if(!l)return;const u=$s(cn.PROFILING),d=(t=e.sessionReplaySampleRate)!==null&&t!==void 0?t:0;return{applicationId:e.applicationId,version:e.version||void 0,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:d,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:d===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:Sr(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(r=e.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((s=e.trackUserInteractions)!==null&&s!==void 0)||s),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((i=e.trackResources)!==null&&i!==void 0)||i),trackLongTasks:!!(!((o=e.trackLongTasks)!==null&&o!==void 0)||o),subdomain:e.subdomain,defaultPrivacyLevel:ks(Ar,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Ar.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ks(Aa,e.traceContextInjection)?e.traceContextInjection:Aa.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:u&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...l}}function k2(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){W.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){W.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{Ga(n)?t.push({match:n,propagatorTypes:Dd}):E2(n)?t.push(n):W.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function R2(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{Ga(n)?Dd.forEach(r=>t.add(r)):ln(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function P2(e){var t;const n=E0(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:R2(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var s;return{name:r.name,...(s=r.getConfigurationTelemetry)===null||s===void 0?void 0:s.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,...n}}const O2="v1";function L2(e,t){M2(e,n=>{t(N2(e,n))})}function N2(e,t){return{...e,...t}}function M2(e,t){const n=new XMLHttpRequest;oe(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Fd()}),oe(e,n,"error",function(){Fd()}),n.open("GET",D2(e)),n.send()}function D2(e){return`https://sdk-configuration.${Qu("rum",e)}/${O2}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Fd(){W.error("Error fetching the remote configuration.")}function F2(e){const t=Bd();return e.storeContextsAcrossPages&&qa(e,t,"rum",2),t}function Bd(){return js("global context")}function B2(e){const t=Ud();return e.storeContextsAcrossPages&&qa(e,t,"rum",1),t}function Ud(){return js("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function U2(e){const t=$d();return e.storeContextsAcrossPages&&qa(e,t,"rum",4),t}function $d(){return js("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function $2({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,s){const i=pd(),o=Bd();Ka(o,ve.globalContext,i);const a=Ud();Ka(a,ve.userContext,i);const c=$d();Ka(c,ve.accountContext,i);let l,u,d,p;const h=n.observable.subscribe(m),f={};function m(){if(!d||!p||!n.isGranted())return;h.unsubscribe();let w;if(p.trackViewsManually){if(!l)return;i.remove(l.callback),w=l.options}const C=s(p,u,w);i.drain(C)}function g(w){const C=dn();if(C&&(w=V2(w)),d=w,fb(P2(w)),p){ad("DD_RUM",w);return}const N=A2(w);if(N){if(!C&&!N.sessionStoreStrategyType){W.warn("No storage available for session. We will not send any data.");return}N.compressIntakeRequests&&!C&&t&&(u=t(N,"Datadog RUM",q),!u)||(p=N,Id().subscribe(q),n.tryToInit(N.trackingConsent),m())}}const _=w=>{i.add(C=>C.addDurationVital(w))};return{init(w,C){if(!w){W.error("Missing configuration");return}x0(w.enableExperimentalFeatures),d=w,!(e&&Ad())&&(Od(w.plugins,"onInit",{initConfiguration:w,publicApi:C}),w.remoteConfigurationId?L2(w,g):g(w))},get initConfiguration(){return d},getInternalContext:q,stopSession:q,addTiming(w,C=ye()){i.add(N=>N.addTiming(w,C))},startView(w,C=Ne()){const N=A=>{A.startView(w,C)};i.add(N),l||(l={options:w,callback:N},m())},setViewName(w){i.add(C=>C.setViewName(w))},setViewContext(w){i.add(C=>C.setViewContext(w))},setViewContextProperty(w,C){i.add(N=>N.setViewContextProperty(w,C))},getViewContext:()=>f,globalContext:o,userContext:a,accountContext:c,addAction(w){i.add(C=>C.addAction(w))},addError(w){i.add(C=>C.addError(w))},addFeatureFlagEvaluation(w,C){i.add(N=>N.addFeatureFlagEvaluation(w,C))},startDurationVital(w,C){return Rd(r,w,C)},stopDurationVital(w,C){Pd(_,r,w,C)},addDurationVital:_}}function V2(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Vn())===null||n===void 0?void 0:n.getPrivacyLevel()}}function Ka(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(s=>s[t].setContext(r))})}function z2(e,t,n,r={}){const s=r0(),i=b2();let o=$2(r,s,i,(u,d,p)=>{const h=e(u,t,n,p,d&&r.createDeflateEncoder?f=>r.createDeflateEncoder(u,d,f):Vb,s,i);return t.onRumStart(h.lifeCycle,u,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,u,h.session,h.viewHistory),o=H2(o,h),Od(u.plugins,"onRumStart",{strategy:o}),h});const a=$(u=>{const d=typeof u=="object"?u:{name:u};o.startView(d),Me({feature:"start-view"})});function c(u,d,p){return $((...h)=>(Me({feature:p}),o[u][d](...h)))}const l=X0({init:$(u=>{o.init(u,l)}),setTrackingConsent:$(u=>{s.update(u),Me({feature:"set-tracking-consent",tracking_consent:u})}),setViewName:$(u=>{o.setViewName(u),Me({feature:"set-view-name"})}),setViewContext:$(u=>{o.setViewContext(u),Me({feature:"set-view-context"})}),setViewContextProperty:$((u,d)=>{o.setViewContextProperty(u,d),Me({feature:"set-view-context-property"})}),getViewContext:$(()=>(Me({feature:"set-view-context-property"}),o.getViewContext())),getInternalContext:$(u=>o.getInternalContext(u)),getInitConfiguration:$(()=>Da(o.initConfiguration)),addAction:(u,d)=>{const p=Vs("action");nn(()=>{o.addAction({name:de(u),context:de(d),startClocks:Ne(),type:"custom",handlingStack:p}),Me({feature:"add-action"})})},addError:(u,d)=>{const p=Vs("error");nn(()=>{o.addError({error:u,handlingStack:p,context:de(d),startClocks:Ne()}),Me({feature:"add-error"})})},addTiming:$((u,d)=>{o.addTiming(de(u),d)}),setGlobalContext:c(ve.globalContext,De.setContext,"set-global-context"),getGlobalContext:c(ve.globalContext,De.getContext,"get-global-context"),setGlobalContextProperty:c(ve.globalContext,De.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c(ve.globalContext,De.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c(ve.globalContext,De.clearContext,"clear-global-context"),setUser:c(ve.userContext,De.setContext,"set-user"),getUser:c(ve.userContext,De.getContext,"get-user"),setUserProperty:c(ve.userContext,De.setContextProperty,"set-user-property"),removeUserProperty:c(ve.userContext,De.removeContextProperty,"remove-user-property"),clearUser:c(ve.userContext,De.clearContext,"clear-user"),setAccount:c(ve.accountContext,De.setContext,"set-account"),getAccount:c(ve.accountContext,De.getContext,"get-account"),setAccountProperty:c(ve.accountContext,De.setContextProperty,"set-account-property"),removeAccountProperty:c(ve.accountContext,De.removeContextProperty,"remove-account-property"),clearAccount:c(ve.accountContext,De.clearContext,"clear-account"),startView:a,stopSession:$(()=>{o.stopSession(),Me({feature:"stop-session"})}),addFeatureFlagEvaluation:$((u,d)=>{o.addFeatureFlagEvaluation(de(u),de(d)),Me({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:$(()=>t.getSessionReplayLink()),startSessionReplayRecording:$(u=>{t.start(u),Me({feature:"start-session-replay-recording",force:u&&u.force})}),stopSessionReplayRecording:$(()=>t.stop()),addDurationVital:$((u,d)=>{Me({feature:"add-duration-vital"}),o.addDurationVital({name:de(u),type:"duration",startClocks:b1(d.startTime),duration:d.duration,context:de(d&&d.context),description:de(d&&d.description)})}),startDurationVital:$((u,d)=>(Me({feature:"start-duration-vital"}),o.startDurationVital(de(u),{context:de(d&&d.context),description:de(d&&d.description)}))),stopDurationVital:$((u,d)=>{Me({feature:"stop-duration-vital"}),o.stopDurationVital(typeof u=="string"?de(u):u,{context:de(d&&d.context),description:de(d&&d.description)})})});return l}function H2(e,t){return{init:n=>{ad("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function j2(){const e=Vd();return new Q(t=>{if(!e)return;const n=new e($(()=>t.notify()));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Vd(){let e;const t=window;if(t.Zone&&(e=Vt(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(q),r=Vt(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function W2(){const e=new Q,{stop:t}=$e(window,"open",()=>e.notify());return{observable:e,stop:t}}function q2(e,t,n,r,s){return{get:i=>{const o=n.findView(i),a=s.findUrl(i),c=t.findTrackedSession(i);if(c&&o&&a){const l=r.findActionId(i);return{application_id:e,session_id:c.id,user_action:l?{id:l}:void 0,view:{id:o.id,name:o.name,referrer:a.referrer,url:a.url}}}}}}const G2=zb,K2=rn;function Y2(e){const t=$n({expireDelay:K2});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const s=t.find(r.startClocks.relative);s&&r.name&&(s.name=r.name),s&&r.context&&(s.context=r.context)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),getAllEntries:()=>t.getAllEntries(),getDeletedEntries:()=>t.getDeletedEntries(),stop:()=>{t.stop()}}}const zd="initial_document",Z2=[["document",e=>zd===e],["xhr",e=>e==="xmlhttprequest"],["fetch",e=>e==="fetch"],["beacon",e=>e==="beacon"],["css",(e,t)=>/\.css$/i.test(t)],["js",(e,t)=>/\.js$/i.test(t)],["image",(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],["font",(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],["media",(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function J2(e){const t=e.name;if(!s0(t))return Rt(`Failed to construct URL for "${e.name}"`),"other";const n=i0(t);for(const[r,s]of Z2)if(s(e.initiatorType,n))return r;return"other"}function Hd(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function X2(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function jd(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?Ce(n,r):t}function Q2(e){if(!qd(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:s,redirectEnd:i,domainLookupStart:o,domainLookupEnd:a,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:p,responseEnd:h}=e,f={download:pn(t,p,h),first_byte:pn(t,d,p)};return 0<r&&r<n&&(f.worker=pn(t,r,n)),n<u&&(f.connect=pn(t,c,u),c<=l&&l<=u&&(f.ssl=pn(t,l,u))),n<a&&(f.dns=pn(t,o,a)),t<i&&(f.redirect=pn(t,s,i)),f}function Wd(e){return e.duration>=0}function qd(e){const t=Hd(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=ey(e)?Hd(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function ey(e){return e.redirectEnd>e.startTime}function pn(e,t,n){if(e<=t&&t<=n)return{duration:B(Ce(t,n)),start:B(Ce(e,t))}}function Gd(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Kd(e){return e.deliveryType===""?"other":e.deliveryType}function ty(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Ya(e){return e&&!S0(e)}const ny=/data:(.+)?(;base64)?,/g,Yd=24e3;function Zd(e){return e.length<=Yd?!1:e.substring(0,5)==="data:"?(e=e.substring(0,Yd),!0):!1}function Jd(e){return`${e.match(ny)[0]}[...]`}let Xd=1;function ry(e,t,n,r){const s=I2(t,n,r);sy(e,t,s),iy(e,s)}function sy(e,t,n){const r=jb(t).subscribe(s=>{const i=s;if(Ya(i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=Qd(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.clearTracingIfNeeded(i),e.notify(8,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"xhr",url:i.url,xhr:i.xhr,isAborted:i.isAborted,handlingStack:i.handlingStack});break}});return{stop:()=>r.unsubscribe()}}function iy(e,t){const n=Id().subscribe(r=>{const s=r;if(Ya(s.url))switch(s.state){case"start":t.traceFetch(s),s.requestIndex=Qd(),e.notify(7,{requestIndex:s.requestIndex,url:s.url});break;case"resolve":oy(s,i=>{t.clearTracingIfNeeded(s),e.notify(8,{duration:i,method:s.method,requestIndex:s.requestIndex,responseType:s.responseType,spanId:s.spanId,startClocks:s.startClocks,status:s.status,traceId:s.traceId,traceSampled:s.traceSampled,type:"fetch",url:s.url,response:s.response,init:s.init,input:s.input,isAborted:s.isAborted,handlingStack:s.handlingStack})});break}});return{stop:()=>n.unsubscribe()}}function Qd(){const e=Xd;return Xd+=1,e}function oy(e,t){const n=e.response&&xb(e.response);!n||!n.body?t(Ce(e.startClocks.timeStamp,ye())):d2(n.body,()=>{t(Ce(e.startClocks.timeStamp,ye()))},{bytesLimit:Number.POSITIVE_INFINITY})}function ep(e){return Sr(e)&&e<0?void 0:e}function tp({lifeCycle:e,isChildEvent:t,onChange:n=q}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},s=e.subscribe(13,i=>{var o;if(!(i.type==="view"||i.type==="vital"||!t(i)))switch(i.type){case"error":r.errorCount+=1,n();break;case"action":r.actionCount+=1,i.action.frustration&&(r.frustrationCount+=i.action.frustration.type.length),n();break;case"long_task":r.longTaskCount+=1,n();break;case"resource":!((o=i._dd)===null||o===void 0)&&o.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{s.unsubscribe()},eventCounts:r}}function ay(e,t){const n=tt();let r=!1;const{stop:s}=Ve(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:nt(),processingEnd:nt(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?i(e,c):o(c)},{passive:!0,capture:!0});return{stop:s};function i(a,c){Ve(a,window,["pointerup","pointercancel"],l=>{l.type==="pointerup"&&o(c)},{once:!0})}function o(a){if(!r){r=!0,s();const c=a.processingStart-a.startTime;c>=0&&c<tt()-n&&t(a)}}}var J;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(J||(J={}));function yt(e,t){return new Q(n=>{if(!window.PerformanceObserver)return;const r=c=>{const l=uy(c);l.length>0&&n.notify(l)};let s,i=!0;const o=new PerformanceObserver($(c=>{i?s=we(()=>r(c.getEntries())):r(c.getEntries())}));try{o.observe(t)}catch{if([J.RESOURCE,J.NAVIGATION,J.LONG_TASK,J.PAINT].includes(t.type)){t.buffered&&(s=we(()=>r(performance.getEntriesByType(t.type))));try{o.observe({entryTypes:[t.type]})}catch{return}}}i=!1,cy(e);let a;return!fn(J.FIRST_INPUT)&&t.type===J.FIRST_INPUT&&({stop:a}=ay(e,c=>{r([c])})),()=>{o.disconnect(),a&&a(),Ue(s)}})}let Nr;function cy(e){return!Nr&&ly()&&"addEventListener"in performance&&(Nr=oe(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Nr==null||Nr.stop()}}function ly(){return window.performance!==void 0&&"getEntries"in performance}function fn(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function uy(e){return e.filter(t=>!dy(t))}function dy(e){return e.entryType===J.RESOURCE&&(!Ya(e.name)||!Wd(e))}const np=100,py=100;function Za(e,t,n,r,s,i){const o=hy(e,t,n,r);return fy(o,s,i)}function fy(e,t,n){let r,s=!1;const i=we($(()=>l({hadActivity:!1})),np),o=n!==void 0?we($(()=>l({hadActivity:!0,end:ye()})),n):void 0,a=e.subscribe(({isBusy:u})=>{Ue(i),Ue(r);const d=ye();u||(r=we($(()=>l({hadActivity:!0,end:d})),py))}),c=()=>{s=!0,Ue(i),Ue(r),Ue(o),a.unsubscribe()};function l(u){s||(c(),t(u))}return{stop:c}}function hy(e,t,n,r){return new Q(s=>{const i=[];let o,a=0;return i.push(t.subscribe(c),n.subscribe(c),yt(r,{type:J.RESOURCE}).subscribe(l=>{l.some(u=>!Ja(r,u.name))&&c()}),e.subscribe(7,l=>{Ja(r,l.url)||(o===void 0&&(o=l.requestIndex),a+=1,c())}),e.subscribe(8,l=>{Ja(r,l.url)||o===void 0||l.requestIndex<o||(a-=1,c())})),()=>{i.forEach(l=>l.unsubscribe())};function c(){s.notify({isBusy:a>0})}})}function Ja(e,t){return kd(e.excludedActivityUrls,t)}function rp(e){return e.nodeType===Node.TEXT_NODE}function my(e){return e.nodeType===Node.COMMENT_NODE}function jn(e){return e.nodeType===Node.ELEMENT_NODE}function qs(e){return jn(e)&&!!e.shadowRoot}function Xa(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&jn(t.host)}function gy(e){return e.childNodes.length>0||qs(e)}function sp(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;qs(e)&&t(e.shadowRoot)}function Gs(e){return Xa(e)?e.host:e.parentNode}const D={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Ar.ALLOW,MASK:Ar.MASK,MASK_USER_INPUT:Ar.MASK_USER_INPUT},Qa="data-dd-privacy",by="hidden",yy="dd-privacy-",qt="***",ip="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",wy={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},vy="x";function wt(e,t,n){if(n&&n.has(e))return n.get(e);const r=Gs(e),s=r?wt(r,t,n):t,i=ap(e),o=op(i,s);return n&&n.set(e,o),o}function op(e,t){switch(t){case D.HIDDEN:case D.IGNORE:return t}switch(e){case D.ALLOW:case D.MASK:case D.MASK_USER_INPUT:case D.HIDDEN:case D.IGNORE:return e;default:return t}}function ap(e){if(jn(e)){if(e.tagName==="BASE")return D.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return D.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return D.MASK}if(e.matches(Wn(D.HIDDEN)))return D.HIDDEN;if(e.matches(Wn(D.MASK)))return D.MASK;if(e.matches(Wn(D.MASK_USER_INPUT)))return D.MASK_USER_INPUT;if(e.matches(Wn(D.ALLOW)))return D.ALLOW;if(_y(e))return D.IGNORE}}function Ks(e,t){switch(t){case D.MASK:case D.HIDDEN:case D.IGNORE:return!0;case D.MASK_USER_INPUT:return rp(e)?cp(e.parentNode):cp(e);default:return!1}}function cp(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!wy[t.tagName]}const Sy=e=>e.replace(/\S/g,vy);function lp(e,t,n){var r;const s=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let i=e.textContent||"";if(t&&!i.trim())return;const o=n;if(s==="SCRIPT")i=qt;else if(o===D.HIDDEN)i=qt;else if(Ks(e,o))if(s==="DATALIST"||s==="SELECT"||s==="OPTGROUP"){if(!i.trim())return}else s==="OPTION"?i=qt:i=Sy(i);return i}function _y(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),s=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(s)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(s)||/^product:/.test(s)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function Wn(e){return`[${Qa}="${e}"], .${yy}${e}`}const ec="data-dd-action-name",Cy="Masked Element";function Ey(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const s=up(e,ec)||n&&up(e,n);return s?{name:s,nameSource:"custom_attribute"}:r===D.MASK?{name:Cy,nameSource:"mask_placeholder"}:dp(e,n,xy,t)||dp(e,n,Iy,t)||{name:"",nameSource:"blank"}}function up(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return fp(pp(r.trim()))}const xy=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Ys(e.labels[0],t)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Ys(e,t,n)},e=>Mr(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(s=>Ay(e,s)).filter(s=>!!s).map(s=>hp(s,t,n)).join(" "),nameSource:"text_content"}},e=>Mr(e,"alt"),e=>Mr(e,"name"),e=>Mr(e,"title"),e=>Mr(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Ys(e.options[0],t)}],Iy=[(e,t,n)=>Ys(e,t,n)],Ty=10;function dp(e,t,n,r){let s=e,i=0;for(;i<=Ty&&s&&s.nodeName!=="BODY"&&s.nodeName!=="HTML"&&s.nodeName!=="HEAD";){for(const o of n){const a=o(s,t,r);if(a){const{name:c,nameSource:l}=a,u=c&&c.trim();if(u)return{name:fp(pp(u)),nameSource:l}}}if(s.nodeName==="FORM")break;s=s.parentElement,i+=1}}function pp(e){return e.replace(/\s+/g," ")}function fp(e){return e.length>100?`${Du(e,100)} [...]`:e}function Ay(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Mr(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Ys(e,t,n){return{name:hp(e,t,n)||"",nameSource:"text_content"}}function hp(e,t,n){if(!e.isContentEditable){if("innerText"in e){let r=e.innerText;const s=i=>{const o=e.querySelectorAll(i);for(let a=0;a<o.length;a+=1){const c=o[a];if("innerText"in c){const l=c.innerText;l&&l.trim().length>0&&(r=r.replace(l,""))}}};return s(`[${ec}]`),t&&s(`[${t}]`),n&&s(`${Wn(D.HIDDEN)}, ${Wn(D.MASK)}`),r}return e.textContent}}const mp=[ec,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],ky=[bp,Py],Ry=[bp,Oy,Ly];function Dr(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const s=yp(r,ky,My,t,n);if(s)return s;n=yp(r,Ry,Dy,t,n)||Zs(Ny(r),n),r=r.parentElement}return n}function gp(e){return/[0-9]/.test(e)}function Py(e){if(e.id&&!gp(e.id))return`#${CSS.escape(e.id)}`}function Oy(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!gp(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Ly(e){return CSS.escape(e.tagName)}function bp(e,t){if(t){const r=n(t);if(r)return r}for(const r of mp){const s=n(r);if(s)return s}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function Ny(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function yp(e,t,n,r,s){for(const i of t){const o=i(e,r);if(o&&n(e,o,s))return Zs(o,s)}}function My(e,t,n){return e.ownerDocument.querySelectorAll(Zs(t,n)).length===1}function Dy(e,t,n){let r;if(n===void 0)r=o=>o.matches(t);else{const o=Zs(`${t}:scope`,n);r=a=>a.querySelector(o)!==null}let i=e.parentElement.firstElementChild;for(;i;){if(i!==e&&r(i))return!1;i=i.nextElementSibling}return!0}function Zs(e,t){return t?`${e}>${t}`:e}const wp=ke,Fy=100;function By(e,t){const n=[];let r=0,s;i(e);function i(c){c.stopObservable.subscribe(o),n.push(c),Ue(s),s=we(a,wp)}function o(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){Ue(s),r===0&&(r=1,o())}return{tryAppend:c=>r!==0?!1:n.length>0&&!Uy(n[n.length-1].event,c.event)?(a(),!1):(i(c),!0),stop:()=>{a()}}}function Uy(e,t){return e.target===t.target&&$y(e,t)<=Fy&&e.timeStamp-t.timeStamp<=wp}function $y(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function Vy(e,{onPointerDown:t,onPointerUp:n}){let r,s={selection:!1,input:!1,scroll:!1},i;const o=[oe(e,window,"pointerdown",a=>{Sp(a)&&(r=vp(),s={selection:!1,input:!1,scroll:!1},i=t(a))},{capture:!0}),oe(e,window,"selectionchange",()=>{(!r||!vp())&&(s.selection=!0)},{capture:!0}),oe(e,window,"scroll",()=>{s.scroll=!0},{capture:!0,passive:!0}),oe(e,window,"pointerup",a=>{if(Sp(a)&&i){const c=s;n(i,a,()=>c),i=void 0}},{capture:!0}),oe(e,window,"input",()=>{s.input=!0},{capture:!0})];return{stop:()=>{o.forEach(a=>a.stop())}}}function vp(){const e=window.getSelection();return!e||e.isCollapsed}function Sp(e){return e.target instanceof Element&&e.isPrimary!==!1}const _p=3;function zy(e,t){if(Hy(e))return t.addFrustration("rage_click"),e.some(Cp)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration("error_click"),Cp(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function Hy(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(_p-1);t+=1)if(e[t+_p-1].event.timeStamp-e[t].event.timeStamp<=ke)return!0;return!1}const jy='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function Cp(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(jy)}const Ep=10*ke,Fr=new Map;function Wy(e){const t=Fr.get(e);return Fr.delete(e),t}function xp(e,t){Fr.set(e,t),Fr.forEach((n,r)=>{Ce(r,nt())>Ep&&Fr.delete(r)})}const qy=5*Be;function Gy(e,t,n,r){const s=$n({expireDelay:qy}),i=new Q;let o;e.subscribe(10,()=>{s.reset()}),e.subscribe(5,u),e.subscribe(11,d=>{d.reason===zn.UNLOADING&&u()});const{stop:a}=Vy(r,{onPointerDown:d=>Ky(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:p},h,f)=>{Yy(r,e,t,n,s,i,l,d,h,f,p)}});return{stop:()=>{u(),i.notify(),a()},actionContexts:{findActionId:d=>s.findAll(d)}};function l(d){if(!o||!o.tryAppend(d)){const p=d.clone();o=By(d,h=>{Jy(h,p)})}}function u(){o&&o.stop()}}function Ky(e,t,n,r,s){const i=e.enablePrivacyForActionName?wt(r.target,e.defaultPrivacyLevel):D.ALLOW;if(i===D.HIDDEN)return;const o=Zy(r,i,e);let a=!1;return Za(t,n,s,e,c=>{a=c.hadActivity},np),{clickActionBase:o,hadActivityOnPointerDown:()=>a}}function Yy(e,t,n,r,s,i,o,a,c,l,u){var d;const p=Ip(t,s,l,a,c);o(p);const h=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;h&&xp(c.timeStamp,h);const{stop:f}=Za(t,n,r,e,_=>{_.hadActivity&&_.end<p.startClocks.timeStamp?p.discard():_.hadActivity?p.stop(_.end):u()?p.stop(p.startClocks.timeStamp):p.stop()},Ep),m=t.subscribe(5,({endClocks:_})=>{p.stop(_.timeStamp)}),g=i.subscribe(()=>{p.stop()});p.stopObservable.subscribe(()=>{m.unsubscribe(),f(),g.unsubscribe()})}function Zy(e,t,n){const r=e.target.getBoundingClientRect(),s=Dr(e.target,n.actionNameAttribute);s&&xp(e.timeStamp,s);const i=Ey(e.target,n,t);return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:s},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:i.name,nameSource:i.nameSource}}function Ip(e,t,n,r,s){const i=Ee(),o=Ne(),a=t.add(i,o.relative),c=tp({lifeCycle:e,isChildEvent:f=>f.action!==void 0&&(Array.isArray(f.action.id)?f.action.id.includes(i):f.action.id===i)});let l=0,u;const d=[],p=new Q;function h(f){l===0&&(u=f,l=1,u?a.close(ga(u)):a.remove(),c.stop(),p.notify())}return{event:s,stop:h,stopObservable:p,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return u!==void 0},getUserActivity:n,addFrustration:f=>{d.push(f)},startClocks:o,isStopped:()=>l===1||l===2,clone:()=>Ip(e,t,n,r,s),validate:f=>{if(h(),l!==1)return;const{resourceCount:m,errorCount:g,longTaskCount:_}=c.eventCounts,x={duration:u&&Ce(o.timeStamp,u),startClocks:o,id:i,frustrationTypes:d,counts:{resourceCount:m,errorCount:g,longTaskCount:_},events:f??[s],event:s,...r};e.notify(0,x),l=2},discard:()=>{h(),l=2}}}function Jy(e,t){const{isRage:n}=zy(e,t);n?(e.forEach(r=>r.discard()),t.stop(ye()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function Xy(e,t,n,r,s){e.subscribe(0,a=>e.notify(12,Tp(a))),t.register(0,({startTime:a,eventType:c})=>{if(c!=="error"&&c!=="resource"&&c!=="long_task")return;const l=i.findActionId(a);if(l)return{type:c,action:{id:l}}});let i={findActionId:q},o=q;return s.trackUserInteractions&&({actionContexts:i,stop:o}=Gy(e,n,r,s)),{addAction:a=>{e.notify(12,Tp(a))},actionContexts:i,stop:o}}function Tp(e){const t=Js(e)?{action:{id:e.id,loading_time:ep(B(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:void 0,n=at({action:{id:Ee(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Js(e)?e.duration:void 0,s=Js(e)?void 0:e.context,i=Js(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:s,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:i}}function Js(e){return e.type!=="custom"}function Qy(e){const t=r2([xs.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function ew(e,t){const n=eb(e,[Pr.cspViolation,Pr.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function tw(e,t){const n=new Q;return Qy(n),Y0(n),ew(t,n),n.subscribe(r=>e.notify(14,{error:r})),nw(e)}function nw(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=at(t.context,n),e.notify(12,{customerContext:n,...rw(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:s,context:i})=>{const o=Wt(t)?jt(t):void 0,a=rd({stackTrace:o,originalError:t,handlingStack:n,componentStack:r,startClocks:s,nonErrorPrefix:"Provided",source:Bn.CUSTOM,handling:"handled"});e.notify(14,{customerContext:i,error:a})}}}function rw(e){const t={date:e.startClocks.timeStamp,error:{id:Ee(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:"error"},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const Ap=new WeakSet;function sw(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!Ap.has(r)).filter(r=>Wd(r)&&qd(r)).filter(r=>iw(r,e.startClocks.relative,kp({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Ap.add(n[0]),n[0].toJSON()}function kp(e){return kn(e.startTime,e.duration)}function iw(e,t,n){return e.startTime>=t-1&&kp(e)<=kn(n,1)}const ow=2*Be;function aw(e){const t=cw(e)||lw(e);if(!(!t||t.traceTime<=tt()-ow))return t.traceId}function cw(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return Rp(t&&t.content,n&&n.content)}function lw(e){const t=uw(e);if(t)return Rp(xr(t,"trace-id"),xr(t,"trace-time"))}function Rp(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function uw(e){for(let t=0;t<e.childNodes.length;t+=1){const n=Pp(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=Pp(n);if(r)return r;if(!rp(n))break}}function Pp(e){if(e&&my(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Op(){if(fn(J.NAVIGATION)){const n=performance.getEntriesByType(J.NAVIGATION)[0];if(n)return n}const e=dw(),t={entryType:J.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function dw(){const e={},t=performance.timing;for(const n in t)if(Sr(t[n])){const r=n,s=t[r];e[r]=s===0?0:ga(s)}return e}function pw(e,t,n=Op){$a(e,"interactive",()=>{const r=n(),s=Object.assign(r.toJSON(),{entryType:J.RESOURCE,initiatorType:zd,duration:r.responseEnd,traceId:aw(document),toJSON:()=>({...s,toJSON:void 0})});t(s)})}function fw(e,t,n,r=n2(),s=pw){e.subscribe(8,a=>{o(()=>hw(a,t,n))});const i=yt(t,{type:J.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)X2(c)||o(()=>Lp(c,t))});s(t,a=>{o(()=>Lp(a,t))});function o(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{i.unsubscribe()}}}function hw(e,t,n){const r=sw(e),s=r?As(r.startTime):e.startClocks,i=mw(e,t);if(!t.trackResources&&!i)return;const o=e.type==="xhr"?"xhr":"fetch",a=r?Np(r):void 0,c=r?jd(r):bw(n,s,e.duration),l=at({date:s.timeStamp,resource:{id:Ee(),type:o,duration:B(c),method:e.method,status_code:e.status,protocol:r&&Gd(r),url:Zd(e.url)?Jd(e.url):e.url,delivery_type:r&&Kd(r)},type:"resource",_dd:{discarded:!t.trackResources}},i,a);return{startTime:s.relative,duration:c,rawRumEvent:l,domainContext:{performanceEntry:r,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error,isAborted:e.isAborted,handlingStack:e.handlingStack}}}function Lp(e,t){const n=As(e.startTime),r=gw(e,t);if(!t.trackResources&&!r)return;const s=J2(e),i=Np(e),o=jd(e),a=at({date:n.timeStamp,resource:{id:Ee(),type:s,duration:B(o),url:e.name,status_code:yw(e.responseStatus),protocol:Gd(e),delivery_type:Kd(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,i);return{startTime:n.relative,duration:o,rawRumEvent:a,domainContext:{performanceEntry:e}}}function Np(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...ty(e),...Q2(e)}}}function mw(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function gw(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Ld().toString(),rule_psr:t.rulePsr}}}function bw(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function yw(e){return e===0?void 0:e}function ww(e,t,n){const{stop:r,eventCounts:s}=tp({lifeCycle:e,isChildEvent:i=>i.view.id===t,onChange:n});return{stop:r,eventCounts:s}}const vw=10*Be;function Sw(e,t,n){return{stop:yt(e,{type:J.PAINT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.name==="first-contentful-paint"&&o.startTime<t.timeStamp&&o.startTime<vw);i&&n(i.startTime)}).unsubscribe}}function _w(e,t,n){const r=yt(e,{type:J.FIRST_INPUT,buffered:!0}).subscribe(s=>{const i=s.find(o=>o.startTime<t.timeStamp);if(i){const o=Ce(i.startTime,i.processingStart);let a;i.target&&jn(i.target)&&(a=Dr(i.target,e.actionNameAttribute)),n({delay:o>=0?o:0,time:i.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function Cw(e,t,n=Op){return Iw(e,()=>{const r=n();xw(r)||t(Ew(r))})}function Ew(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=nt()?e.responseStart:void 0}}function xw(e){return e.loadEventEnd<=0}function Iw(e,t){let n;const{stop:r}=$a(e,"complete",()=>{n=we(()=>t())});return{stop:()=>{r(),Ue(n)}}}const Tw=10*Be;function Aw(e,t,n,r){let s=1/0;const{stop:i}=Ve(e,n,["pointerdown","keydown"],c=>{s=c.timeStamp},{capture:!0,once:!0});let o=0;const a=yt(e,{type:J.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const l=L1(c,u=>u.entryType===J.LARGEST_CONTENTFUL_PAINT&&u.startTime<s&&u.startTime<t.timeStamp&&u.startTime<Tw&&u.size>o);if(l){let u;l.element&&(u=Dr(l.element,e.actionNameAttribute)),r({value:l.startTime,targetSelector:u,resourceUrl:kw(l)}),o=l.size}});return{stop:()=>{i(),a.unsubscribe()}}}function kw(e){return e.url===""?void 0:e.url}function Mp(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:q};if(fn(J.VISIBILITY_STATE)){const s=performance.getEntriesByType(J.VISIBILITY_STATE).find(i=>i.name==="hidden");if(s)return{timeStamp:s.startTime,stop:q}}let n=1/0;const{stop:r}=Ve(e,t,["pagehide","visibilitychange"],s=>{(s.type==="pagehide"||document.visibilityState==="hidden")&&(n=s.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Rw(e,t,n){const r={},{stop:s}=Cw(e,u=>{t(u.loadEvent),r.navigationTimings=u,n()}),i=Mp(e),{stop:o}=Sw(e,i,u=>{r.firstContentfulPaint=u,n()}),{stop:a}=Aw(e,i,window,u=>{r.largestContentfulPaint=u,n()}),{stop:c}=_w(e,i,u=>{r.firstInput=u,n()});function l(){s(),o(),a(),c(),i.stop()}return{stop:l,initialViewMetrics:r}}function Pw(e,t,n){if(!Dw())return{stop:q};let r=0,s;n({value:0});const i=Mw(),o=yt(e,{type:J.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const l of a){if(l.hadRecentInput||l.startTime<t)continue;const{cumulatedValue:u,isMaxValue:d}=i.update(l);if(d){const p=Ow(l.sources);s={target:p!=null&&p.node?new WeakRef(p.node):void 0,time:Ce(t,l.startTime),previousRect:p==null?void 0:p.previousRect,currentRect:p==null?void 0:p.currentRect,devicePixelRatio:window.devicePixelRatio}}if(u>r){r=u;const p=(c=s==null?void 0:s.target)===null||c===void 0?void 0:c.deref();n({value:Ts(r,4),targetSelector:p&&Dr(p,e.actionNameAttribute),time:s==null?void 0:s.time,previousRect:s!=null&&s.previousRect?Dp(s.previousRect):void 0,currentRect:s!=null&&s.currentRect?Dp(s.currentRect):void 0,devicePixelRatio:s==null?void 0:s.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Ow(e){return e.find(t=>!!t.node&&jn(t.node))}function Dp({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const Lw=5*ke,Nw=ke;function Mw(){let e=0,t,n,r=0;return{update:s=>{const i=t===void 0||s.startTime-n>=Nw||s.startTime-t>=Lw;let o;return i?(t=n=s.startTime,r=e=s.value,o=!0):(e+=s.value,n=s.startTime,o=s.value>r,o&&(r=s.value)),{cumulatedValue:e,isMaxValue:o}}}}function Dw(){return fn(J.LAYOUT_SHIFT)&&"WeakRef"in window}let Xs,Fp=0,tc=1/0,nc=0;function Fw(){"interactionCount"in performance||Xs||(Xs=new window.PerformanceObserver($(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(tc=Math.min(tc,n.interactionId),nc=Math.max(nc,n.interactionId),Fp=(nc-tc)/7+1)})})),Xs.observe({type:"event",buffered:!0,durationThreshold:0}))}const Bp=()=>Xs?Fp:window.performance.interactionCount||0,Up=10,Bw=1*Be;function Uw(e,t,n){if(!zw())return{getInteractionToNextPaint:()=>{},setViewEnd:q,stop:q};const{getViewInteractionCount:r,stopViewInteractionCount:s}=Vw(n);let i=1/0;const o=$w(r);let a=-1,c,l;function u(h){for(const m of h)m.interactionId&&m.startTime>=t&&m.startTime<=i&&o.process(m);const f=o.estimateP98Interaction();f&&f.duration!==a&&(a=f.duration,l=Ce(t,f.startTime),c=Wy(f.startTime),!c&&f.target&&jn(f.target)&&(c=Dr(f.target,e.actionNameAttribute)))}const d=yt(e,{type:J.FIRST_INPUT,buffered:!0}).subscribe(u),p=yt(e,{type:J.EVENT,durationThreshold:40,buffered:!0}).subscribe(u);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,Bw),targetSelector:c,time:l};if(r())return{value:0}},setViewEnd:h=>{i=h,s()},stop:()=>{p.unsubscribe(),d.unsubscribe()}}}function $w(e){const t=[];function n(){t.sort((r,s)=>s.duration-r.duration).splice(Up)}return{process(r){const s=t.findIndex(o=>r.interactionId===o.interactionId),i=t[t.length-1];s!==-1?r.duration>t[s].duration&&(t[s]=r,n()):(t.length<Up||r.duration>i.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function Vw(e){Fw();const t=e==="initial_load"?0:Bp();let n={stopped:!1};function r(){return Bp()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function zw(){return fn(J.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function Hw(e,t,n,r,s,i,o){let a=s==="initial_load",c=!0;const l=[],u=Mp(r);function d(){if(!c&&!a&&l.length>0){const h=Math.max(...l);h<u.timeStamp&&o(h)}}const{stop:p}=Za(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&l.push(Ce(i.timeStamp,h.end)),d())});return{stop:()=>{p(),u.stop()},setLoadEvent:h=>{a&&(a=!1,l.push(h),d())}}}function $p(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function rc(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let sc;function Vp(e){return sc||(sc=jw(e)),sc}function jw(e){return new Q(t=>{const{throttled:n}=zt(()=>{t.notify(Qs())},200);return oe(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Qs(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const Ww=ke;function qw(e,t,n,r=Kw(e)){let s=0,i=0,o=0;const a=r.subscribe(({scrollDepth:c,scrollTop:l,scrollHeight:u})=>{let d=!1;if(c>s&&(s=c,d=!0),u>i){i=u;const p=nt();o=Ce(t.relative,p),d=!0}d&&n({maxDepth:Math.min(s,i),maxDepthScrollTop:l,maxScrollHeight:i,maxScrollHeightTime:o})});return{stop:()=>a.unsubscribe()}}function Gw(){const e=rc(),{height:t}=Qs(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function Kw(e,t=Ww){return new Q(n=>{function r(){n.notify(Gw())}if(window.ResizeObserver){const s=zt(r,t,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver($(s.throttled));i&&o.observe(i);const a=oe(e,window,"scroll",s.throttled,{passive:!0});return()=>{s.cancel(),o.disconnect(),a.stop()}}})}function Yw(e,t,n,r,s,i,o){const a={},{stop:c,setLoadEvent:l}=Hw(e,t,n,r,i,o,m=>{a.loadingTime=m,s()}),{stop:u}=qw(r,o,m=>{a.scroll=m}),{stop:d}=Pw(r,o.relative,m=>{a.cumulativeLayoutShift=m,s()}),{stop:p,getInteractionToNextPaint:h,setViewEnd:f}=Uw(r,o.relative,i);return{stop:()=>{c(),d(),u()},stopINPTracking:p,setLoadEvent:l,setViewEnd:f,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const Zw=3e3,Jw=5*Be,Xw=5*Be;function Qw(e,t,n,r,s,i,o,a){const c=new Set;let l=d("initial_load",Pu(),a);p();let u;o&&(u=h(i));function d(f,m,g){const _=e5(t,n,r,s,e,f,m,g);return c.add(_),_.stopObservable.subscribe(()=>{c.delete(_)}),_}function p(){t.subscribe(10,()=>{l=d("route_change",void 0,{name:l.name,service:l.service,version:l.version,context:l.contextManager.getContext()})}),t.subscribe(9,()=>{l.end({sessionIsActive:!1})})}function h(f){return f.subscribe(({oldLocation:m,newLocation:g})=>{n5(m,g)&&(l.end(),l=d("route_change"))})}return{addTiming:(f,m=ye())=>{l.addTiming(f,m)},startView:(f,m)=>{l.end({endClocks:m}),l=d("route_change",m,f)},setViewContext:f=>{l.contextManager.setContext(f)},setViewContextProperty:(f,m)=>{l.contextManager.setContextProperty(f,m)},setViewName:f=>{l.setViewName(f)},getViewContext:()=>l.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l.end(),c.forEach(f=>f.stop())}}}function e5(e,t,n,r,s,i,o=Ne(),a){const c=Ee(),l=new Q,u={};let d=0,p;const h=Er(s),f=js();let m=!0,g=a==null?void 0:a.name;const _=(a==null?void 0:a.service)||r.service,x=(a==null?void 0:a.version)||r.version,w=a==null?void 0:a.context;w&&f.setContext(w);const C={id:c,name:g,startClocks:o,service:_,version:x,context:w};e.notify(1,C),e.notify(2,C);const{throttled:N,cancel:A}=zt(ae,Zw,{leading:!1}),{setLoadEvent:b,setViewEnd:P,stop:T,stopINPTracking:R,getCommonViewMetrics:k}=Yw(e,t,n,r,re,i,o),{stop:O,initialViewMetrics:L}=i==="initial_load"?Rw(r,b,re):{stop:q,initialViewMetrics:{}},{stop:M,eventCounts:ie}=ww(e,c,re),ee=Rn(ae,Jw),Pe=e.subscribe(11,G=>{G.reason===zn.UNLOADING&&ae()});ae(),f.changeObservable.subscribe(re);function he(){e.notify(3,{id:c,name:g,context:f.getContext(),startClocks:o})}function re(){he(),N()}function ae(){A(),he(),d+=1;const G=p===void 0?ye():p.timeStamp;e.notify(4,{customTimings:u,documentVersion:d,id:c,name:g,service:_,version:x,context:f.getContext(),loadingType:i,location:h,startClocks:o,commonViewMetrics:k(),initialViewMetrics:L,duration:Ce(o.timeStamp,G),isActive:p===void 0,sessionIsActive:m,eventCounts:ie})}return{get name(){return g},service:_,version:x,contextManager:f,stopObservable:l,end(G={}){var ue,ge;p||(p=(ue=G.endClocks)!==null&&ue!==void 0?ue:Ne(),m=(ge=G.sessionIsActive)!==null&&ge!==void 0?ge:!0,e.notify(5,{endClocks:p}),e.notify(6,{endClocks:p}),Rs(ee),P(p.relative),T(),Pe.unsubscribe(),ae(),we(()=>{this.stop()},Xw))},stop(){O(),M(),R(),l.notify()},addTiming(G,ue){if(p)return;const ge=S1(ue)?ue:Ce(o.timeStamp,ue);u[t5(G)]=ge,re()},setViewName(G){g=G,ae()}}}function t5(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&W.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function n5(e,t){return e.pathname!==t.pathname||!r5(t.hash)&&zp(t.hash)!==zp(e.hash)}function r5(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function zp(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function s5(e,t,n,r,s,i,o,a,c,l){return e.subscribe(4,u=>e.notify(12,i5(u,n,a))),t.register(0,({startTime:u,eventType:d})=>{const{service:p,version:h,id:f,name:m,context:g}=c.findView(u);return{type:d,service:p,version:h,context:g,view:{id:f,name:m}}}),Qw(r,e,s,i,n,o,!n.trackViewsManually,l)}function i5(e,t,n){var r,s,i,o,a,c,l,u,d,p,h,f,m,g,_,x,w,C;const N=n.getReplayStats(e.id),A=(s=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||s===void 0?void 0:s.devicePixelRatio,b={_dd:{document_version:e.documentVersion,replay_stats:N,cls:A?{device_pixel_ratio:A}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(i=e.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_time:B((o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:B((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:B((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domComplete),dom_content_loaded:B((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domContentLoaded),dom_interactive:B((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:B(e.initialViewMetrics.firstContentfulPaint),first_input_delay:B((p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.delay),first_input_time:B((h=e.initialViewMetrics.firstInput)===null||h===void 0?void 0:h.time),first_input_target_selector:(f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.targetSelector,interaction_to_next_paint:B((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.value),interaction_to_next_paint_time:B((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.time),interaction_to_next_paint_target_selector:(_=e.commonViewMetrics.interactionToNextPaint)===null||_===void 0?void 0:_.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:B((x=e.initialViewMetrics.largestContentfulPaint)===null||x===void 0?void 0:x.value),largest_contentful_paint_target_selector:(w=e.initialViewMetrics.largestContentfulPaint)===null||w===void 0?void 0:w.targetSelector,load_event:B((C=e.initialViewMetrics.navigationTimings)===null||C===void 0?void 0:C.loadEvent),loading_time:ep(B(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:o5(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:B(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:B(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:N?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return tn(e.customTimings)||(b.view.custom_timings=E1(e.customTimings,B)),{rawRumEvent:b,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function o5({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:s}){return{cls:e&&{score:e.value,timestamp:B(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:B(n)},fid:r&&{duration:B(r.delay),timestamp:B(r.time),target_selector:r.targetSelector},inp:t&&{duration:B(t.value),timestamp:B(t.time),target_selector:t.targetSelector},lcp:s&&{timestamp:B(s.value),target_selector:s.targetSelector,resource_url:s.resourceUrl}}}const a5="rum";function c5(e,t,n){const r=vb(e,a5,s=>u5(e,s),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:s,newState:i})=>{if(!s.forcedReplay&&i.forcedReplay){const o=r.findSession();o&&(o.isReplayForced=!0)}}),{findTrackedSession:s=>{const i=r.findSession(s);if(!(!i||!Hp(i.trackingType)))return{id:i.id,sessionReplay:i.trackingType==="1"?1:i.isReplayForced?2:0,anonymousId:i.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function l5(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:Cd("records")?1:0};return{findTrackedSession:()=>e,expire:q,expireObservable:new Q,setForcedReplay:q}}function u5(e,t){let n;return d5(t)?n=t:$t(e.sessionSampleRate)?$t(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:Hp(n)}}function d5(e){return e==="0"||e==="1"||e==="2"}function Hp(e){return e==="2"||e==="1"}function p5(e,t,n,r,s,i,o){const a=e.replica,c=$b(e,{endpoint:e.rumEndpointBuilder,encoder:o(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:l=>at(l,{application:{id:a.applicationId}}),encoder:o(3)},r,s,i);return t.subscribe(13,l=>{l.type==="view"?c.upsert(l,l.view.id):c.add(l)}),n.subscribe(l=>c.add(l,pb(e))),c}function f5(e){const t=Vn();e.subscribe(13,n=>{t.send("rum",n)})}const h5=rn;function m5(e,t,n,r){const s=$n({expireDelay:h5});let i;e.subscribe(1,({startClocks:c})=>{const l=r.href;s.add(a({url:l,referrer:i||document.referrer}),c.relative),i=l}),e.subscribe(6,({endClocks:c})=>{s.closeActive(c.relative)});const o=n.subscribe(({newLocation:c})=>{const l=s.find();if(l){const u=nt();s.closeActive(u),s.add(a({url:c.href,referrer:l.referrer}),u)}});function a({url:c,referrer:l}){return{url:c,referrer:l}}return t.register(0,({startTime:c,eventType:l})=>{const{url:u,referrer:d}=s.find(c);return{type:l,view:{url:u,referrer:d}}}),{findUrl:c=>s.find(c),getAllEntries:()=>s.getAllEntries(),getDeletedEntries:()=>s.getDeletedEntries(),stop:()=>{o.unsubscribe(),s.stop()}}}function g5(e,t){let n=Er(t);return new Q(r=>{const{stop:s}=b5(e,o),{stop:i}=y5(e,o);function o(){if(n.href===t.href)return;const a=Er(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{s(),i()}})}function b5(e,t){const{stop:n}=$e(jp("pushState"),"pushState",({onPostCall:i})=>{i(t)}),{stop:r}=$e(jp("replaceState"),"replaceState",({onPostCall:i})=>{i(t)}),{stop:s}=oe(e,window,"popstate",t);return{stop:()=>{n(),r(),s()}}}function y5(e,t){return oe(e,window,"hashchange",t)}function jp(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const w5=rn;function v5(e,t,n){const r=$n({expireDelay:w5});return e.subscribe(1,({startClocks:s})=>{r.add({},s.relative)}),e.subscribe(6,({endClocks:s})=>{r.closeActive(s.relative)}),t.register(0,({startTime:s,eventType:i})=>{if(!n.trackFeatureFlagsForEvents.concat(["view","error"]).includes(i))return;const a=r.find(s);if(!(!a||tn(a)))return{type:i,feature_flags:a}}),{addFeatureFlagEvaluation:(s,i)=>{const o=r.find();o&&(o[s]=i)}}}const S5=10*ke;let qn,ic;function _5(e,t,n,r){t.enabled&&$t(e.customerDataTelemetrySampleRate)&&(Gp(),ic=!1,n.subscribe(13,()=>{ic=!0}),r.subscribe(({bytesCount:i,messagesCount:o})=>{ic&&(qn.batchCount+=1,qp(qn.batchBytesCount,i),qp(qn.batchMessagesCount,o))}),Rn(C5,S5))}function C5(){qn.batchCount!==0&&(Rt("Customer data measures",qn),Gp())}function Wp(){return{min:1/0,max:0,sum:0}}function qp(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function Gp(){qn={batchCount:0,batchBytesCount:Wp(),batchMessagesCount:Wp()}}const E5=4e3,x5=500,I5=rn;function T5(e,t,n=x5){const r=$n({expireDelay:I5,maxEntries:E5});let s;o(Kp(),nt());const{stop:i}=Ve(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{o(k5(c),c.timeStamp)},{capture:!0});function o(c,l=nt()){c!==s&&(s=c,r.closeActive(l),r.add({state:s,startTime:l},l))}function a(c,l,u){return r.findAll(l,u).some(d=>d.state===c)}return e.register(0,({startTime:c,duration:l=0,eventType:u})=>{if(u==="view"){const d=r.findAll(c,l);return{type:u,_dd:{page_states:A5(d,c,n)}}}if(u==="action"||u==="error")return{type:u,view:{in_foreground:a("active",c,0)}}}),{wasInPageStateDuringPeriod:a,addPageState:o,stop:()=>{i(),r.stop()}}}function A5(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:s})=>({state:r,start:B(Ce(t,s))}))}function k5(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Kp()}function Kp(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function R5(e){let t;const n=requestAnimationFrame($(()=>{t=Qs()})),r=Vp(e).subscribe(s=>{t=s}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const P5=ke;function O5(e){return new Q(t=>L5(e,n=>t.notify(n)))}function L5(e,t){const n=xr(document.cookie,e),r=Rn(()=>{const s=xr(document.cookie,e);s!==n&&t(s)},P5);return()=>Rs(r)}const Yp="datadog-ci-visibility-test-execution-id";function N5(e,t=O5(Yp)){var n;let r=Ht(Yp)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const s=t.subscribe(i=>{r=i});return e.register(0,({eventType:i})=>{if(typeof r=="string")return{type:i,session:{type:"ci_test"},ci_test:{test_execution_id:r}}}),{stop:()=>{s.unsubscribe()}}}function M5(e,t){const n=yt(t,{type:J.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const s of r){const i=As(s.startTime),o={date:i.timeStamp,long_task:{id:Ee(),entry_type:"long-animation-frame",duration:B(s.duration),blocking_duration:B(s.blockingDuration),first_ui_event_timestamp:B(s.firstUIEventTimestamp),render_start:B(s.renderStart),style_and_layout_start:B(s.styleAndLayoutStart),start_time:B(s.startTime),scripts:s.scripts.map(a=>({duration:B(a.duration),pause_duration:B(a.pauseDuration),forced_style_and_layout_duration:B(a.forcedStyleAndLayoutDuration),start_time:B(a.startTime),execution_start:B(a.executionStart),source_url:a.sourceURL,source_function_name:a.sourceFunctionName,source_char_position:a.sourceCharPosition,invoker:a.invoker,invoker_type:a.invokerType,window_attribution:a.windowAttribution}))},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:o,startTime:i.relative,duration:s.duration,domainContext:{performanceEntry:s}})}});return{stop:()=>n.unsubscribe()}}function D5(e,t){const n=yt(t,{type:J.LONG_TASK,buffered:!0}).subscribe(r=>{for(const s of r){if(s.entryType!==J.LONG_TASK||!t.trackLongTasks)break;const i=As(s.startTime),o={date:i.timeStamp,long_task:{id:Ee(),entry_type:"long-task",duration:B(s.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:o,startTime:i.relative,duration:s.duration,domainContext:{performanceEntry:s}})}});return{stop(){n.unsubscribe()}}}function F5(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const s=(e[t]||[]).map(i=>i(n));return at(...s)}}}function B5(e){e.register(0,({eventType:t})=>{const n=m2(),r=g2();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Ad()}}})}function U5(e,t,n){const r=Da(e),s=n(r);return Ca(t).forEach(([i,o])=>oc(e,r,i.split(/\.|(?=\[\])/),o)),s}function oc(e,t,n,r){const[s,...i]=n;if(s==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((o,a)=>oc(o,t[a],i,r));return}if(!(!Zp(e)||!Zp(t))){if(i.length>0)return oc(e[s],t[s],i,r);$5(e,s,t[s],r)}}function $5(e,t,n,r){const s=ln(n);s===r?e[t]=de(n):r==="object"&&(s==="undefined"||s==="null")&&(e[t]={})}function Zp(e){return ln(e)==="object"}const Gn={"view.name":"string","view.url":"string","view.referrer":"string"},Kn={context:"object"},ac={service:"string",version:"string"};let Jp;function V5(e,t,n,r,s,i,o,a,c){Jp={view:{"view.performance.lcp.resource_url":"string",...Kn,...Gn},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...Kn,...Gn,...ac},resource:{"resource.url":"string",...$s(cn.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...Kn,...Gn,...ac},action:{"action.target.name":"string",...Kn,...Gn,...ac},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...Kn,...Gn},vital:{...Kn,...Gn}};const l={error:Ua("error",e.eventRateLimiterThreshold,c),action:Ua("action",e.eventRateLimiterThreshold,c),vital:Ua("vital",e.eventRateLimiterThreshold,c)};t.subscribe(12,({startTime:u,duration:d,rawRumEvent:p,domainContext:h,customerContext:f})=>{const m=s.findView(u),g=i.findUrl(u),_=r.findTrackedSession(u);if(_&&m&&!g&&$s(cn.MISSING_URL_CONTEXT_TELEMETRY)&&Rt("Missing URL entry",{debug:{eventType:p.type,startTime:u,urlEntries:i.getAllEntries(),urlDeletedEntries:i.getDeletedEntries(),viewEntries:s.getAllEntries(),viewDeletedEntries:s.getDeletedEntries()}}),_&&m&&g){const x=a(),w={_dd:{format_version:2,drift:w1(),configuration:{session_sample_rate:Ts(e.sessionSampleRate,3),session_replay_sample_rate:Ts(e.sessionReplaySampleRate,3)},browser_sdk_version:dn()?"6.6.3":void 0},application:{id:e.applicationId},date:ye(),source:"browser",session:{id:_.id,type:"user"},display:o.get(),connectivity:ud(),context:x.context},C=at(w,n.triggerHook(0,{eventType:p.type,startTime:u,duration:d}),{context:f},p);"has_replay"in C.session||(C.session.has_replay=x.hasReplay),C.type==="view"&&(C.session.sampled_for_replay=_.sessionReplay===1),_.anonymousId&&!x.user.anonymous_id&&e.trackAnonymousUser&&(x.user.anonymous_id=_.anonymousId),tn(x.user)||(C.usr=x.user),!tn(x.account)&&x.account.id&&(C.account=x.account),z5(C,e.beforeSend,h,l)&&(tn(C.context)&&delete C.context,t.notify(13,C))}})}function z5(e,t,n,r){var s;if(t){const o=U5(e,Jp[e.type],a=>t(a,n));if(o===!1&&e.type!=="view")return!1;o===!1&&W.warn("Can't dismiss view events using beforeSend!")}return!((s=r[e.type])===null||s===void 0?void 0:s.isLimitReached())}function H5(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function j5(e,t,n,r,s,i,o){const a=[],c=new G2,l=F5();c.subscribe(13,ce=>Ma("rum",ce));const u=W5(e);u.setContextProvider(()=>{var ce,rr;return{application:{id:e.applicationId},session:{id:(ce=f.findTrackedSession())===null||ce===void 0?void 0:ce.id},view:{id:(rr=x.findView())===null||rr===void 0?void 0:rr.id},action:{id:k.findActionId()}}});const d=ce=>{c.notify(14,{error:ce}),Rt("Error reported to customer",{"error.message":ce.message})},p=Fb(e),h=p.subscribe(ce=>{c.notify(11,ce)});a.push(()=>h.unsubscribe());const f=dn()?l5():c5(e,c,i);if(dn())f5(c);else{const ce=p5(e,c,u.observable,d,p,f.expireObservable,s);a.push(()=>ce.stop()),_5(e,u,c,ce.flushObservable)}const m=j2(),g=g5(e,location),_=T5(l,e),x=Y2(c),w=m5(c,l,g,location),C=v5(c,l,e),{observable:N,stop:A}=W2();a.push(A);const b=F2(e),P=B2(e),T=U2(e),R=()=>H5(b,P,T,t),{actionContexts:k,addAction:O,stop:L}=q5(c,l,e,f,_,m,N,w,x,R,d);a.push(L),db();const{addTiming:M,startView:ie,setViewName:ee,setViewContext:Pe,setViewContextProperty:he,getViewContext:re,stop:ae}=s5(c,l,e,location,m,N,g,t,x,r);a.push(ae);const{stop:G}=fw(c,e,_);if(a.push(G),e.trackLongTasks)if(fn(J.LONG_ANIMATION_FRAME)){const{stop:ce}=M5(c,e);a.push(ce)}else D5(c,e);const{addError:ue}=tw(c,e);ry(c,e,f,R);const ge=y2(c,_,o),Zt=q2(e.applicationId,f,x,k,w);return a.push(()=>n.stop()),{addAction:O,addError:ue,addTiming:M,addFeatureFlagEvaluation:C.addFeatureFlagEvaluation,startView:ie,setViewContext:Pe,setViewContextProperty:he,getViewContext:re,setViewName:ee,lifeCycle:c,viewHistory:x,session:f,stopSession:()=>f.expire(),getInternalContext:Zt.get,startDurationVital:ge.startDurationVital,stopDurationVital:ge.stopDurationVital,addDurationVital:ge.addDurationVital,globalContext:b,userContext:P,accountContext:T,stop:()=>{a.forEach(ce=>ce())}}}function W5(e){const t=lb("browser-rum-sdk",e);if(dn()){const n=Vn();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function q5(e,t,n,r,s,i,o,a,c,l,u){const d=Xy(e,t,i,o,n),p=R5(n),h=N5(t);return B5(t),V5(n,e,t,r,c,a,p,l,u),{pageStateHistory:s,addAction:d.addAction,actionContexts:d.actionContexts,stop:()=>{d.stop(),h.stop(),p.stop(),c.stop(),s.stop(),a.stop()}}}function G5(e,{session:t,viewContext:n,errorType:r}){const s=t?t.id:"no-session-id",i=[];r!==void 0&&i.push(`error-type=${r}`),n&&(i.push(`seed=${n.id}`),i.push(`from=${n.startClocks.timeStamp}`));const o=K5(e),a=`/rum/replay/sessions/${s}`;return`${o}${a}?${i.join("&")}`}function K5(e){const t=e.site,n=e.subdomain||Y5(e);return`https://${n?`${n}.`:""}${t}`}function Y5(e){switch(e.site){case an:case c0:return"app";case Xu:return"dd";default:return}}const Z5=1e3;let rt;function J5(e){return ei(e).segments_count}function X5(e){ei(e).segments_count+=1}function Q5(e){ei(e).records_count+=1}function e3(e,t){ei(e).segments_total_raw_size+=t}function t3(e){return rt==null?void 0:rt.get(e)}function ei(e){rt||(rt=new Map);let t;return rt.has(e)?t=rt.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},rt.set(e,t),rt.size>Z5&&n3()),t}function n3(){if(!rt)return;const e=rt.keys().next().value;e&&rt.delete(e)}function Xp(e,t,n){let r=0,s=[],i,o=0;const a=[],{stop:c}=oe(e,t,"message",({data:d})=>{if(d.type!=="wrote"||d.streamId!==n)return;r+=d.additionalBytesCount,s.push(d.result),i=d.trailer;const p=a.shift();p&&p.id===d.id?p.writeCallback?p.writeCallback(d.result.byteLength):p.finishCallback&&p.finishCallback():(c(),Rt("Worker responses received out of order."))});function l(){const d=s.length===0?new Uint8Array(0):C1(s.concat(i)),p={rawBytesCount:r,output:d,outputBytesCount:d.byteLength,encoding:"deflate"};return r=0,s=[],p}function u(){o>0&&(t.postMessage({action:"reset",streamId:n}),o=0)}return{isAsync:!0,get isEmpty(){return o===0},write(d,p){t.postMessage({action:"write",id:o,data:d,streamId:n}),a.push({id:o,writeCallback:p,data:d}),o+=1},finish(d){u(),a.length?(a.forEach(p=>{delete p.writeCallback}),a[a.length-1].finishCallback=()=>d(l())):d(l())},finishSync(){u();const d=a.map(p=>(delete p.writeCallback,delete p.finishCallback,p.data)).join("");return{...l(),pendingData:d}},estimateEncodedBytesCount(d){return d.length/8},stop(){c()}}}function cc({configuredUrl:e,error:t,source:n,scriptType:r}){if(W.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&r3(t.message)){let s;e?s=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:s="Please make sure CSP is correctly configured.",W.error(`${s} See documentation at ${Is}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&Fa(t)}function r3(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const s3=30*ke;function Qp(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},et=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-J)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=L(s.adler,h,o,l):2===s.state.wrap&&(s.adler=T(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},at=function(t,e){for(var a,n;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},nt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var it=[new rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(et(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)})),new rt(4,4,8,4,at),new rt(4,5,16,8,at),new rt(4,6,32,32,at),new rt(4,4,16,16,nt),new rt(8,16,32,32,nt),new rt(8,16,128,128,nt),new rt(8,32,128,256,nt),new rt(32,128,258,1024,nt),new rt(32,258,258,4096,nt)];function st(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var ht=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=it[e.level].max_lazy,e.good_match=it[e.level].good_length,e.nice_match=it[e.level].nice_length,e.max_chain_length=it[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},lt=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(et(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(et(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):it[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},_t=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},ot=new Uint8Array(256),dt=0;dt<256;dt++)ot[dt]=dt>=252?6:dt>=248?5:dt>=240?4:dt>=224?3:dt>=192?2:1;ot[254]=ot[254]=1;var ut=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ft=Object.prototype.toString;function ct(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new st;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,ht(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ft.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,et(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,et(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function pt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function gt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}ct.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ft.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=lt(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=_t(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},ct.prototype.onData=function(t){this.chunks.push(t)},ct.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",(n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.6.3"};case"write":{let n=e.get(a.streamId);n||(n=new ct,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:gt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){pt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){pt(e,t)}}()})();'])))}let pe={status:0};function ef(e,t,n,r=Qp){switch(pe.status===0&&i3(e,t,r),pe.status){case 1:return pe.initializationFailureCallbacks.push(n),pe.worker;case 3:return pe.worker}}function tf(){return pe.status}function i3(e,t,n=Qp){try{const r=n(e),{stop:s}=oe(e,r,"error",a=>{lc(e,t,a)}),{stop:i}=oe(e,r,"message",({data:a})=>{a.type==="errored"?lc(e,t,a.error,a.streamId):a.type==="initialized"&&a3(a.version)});r.postMessage({action:"init"}),we(()=>o3(t),s3),pe={status:1,worker:r,stop:()=>{s(),i()},initializationFailureCallbacks:[]}}catch(r){lc(e,t,r)}}function o3(e){pe.status===1&&(W.error(`${e} failed to start: a timeout occurred while initializing the Worker`),pe.initializationFailureCallbacks.forEach(t=>t()),pe={status:2})}function a3(e){pe.status===1&&(pe={status:3,worker:pe.worker,stop:pe.stop,version:e})}function lc(e,t,n,r){pe.status===1||pe.status===0?(cc({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),pe.status===1&&pe.initializationFailureCallbacks.forEach(s=>s()),pe={status:2}):Fa(n,{worker_version:pe.status===3&&pe.version,stream_id:r})}function nf(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function c3(e,t,n,r){const s=t.findTrackedSession(),i=l3(s,r),o=n.findView();return G5(e,{viewContext:o,errorType:i,session:s})}function l3(e,t){if(!nf())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function u3(e,t,n,r,s,i){let o=0,a;t.subscribe(9,()=>{(o===2||o===3)&&(u(),o=1)}),t.subscribe(10,()=>{o===1&&l()});const c=async()=>{const[d]=await Promise.all([s(),Hb(e,"interactive")]);if(o!==2)return;const p=i();if(!p||!d){o=0;return}({stop:a}=d(t,e,n,r,p)),o=3};function l(d){const p=n.findTrackedSession();if(d3(p,d)){o=1;return}p3(o)||(o=2,c().catch(kt),f3(p,d)&&n.setForcedReplay())}function u(){o===3&&(a==null||a()),o=0}return{start:l,stop:u,getSessionReplayLink(){return c3(e,n,r,o!==0)},isRecording:()=>o===3}}function d3(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function p3(e){return e===2||e===3}function f3(e,t){return t&&t.force&&e.sessionReplay===0}function h3(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:q},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function m3(e,t){if(dn()&&!Cd("records")||!nf())return{start:q,stop:q,getReplayStats:()=>{},onRumStart:q,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=h3();return{start:i=>n.start(i),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:s,isRecording:()=>tf()===3&&n.isRecording(),getReplayStats:i=>tf()===3?t3(i):void 0};function s(i,o,a,c,l){let u;function d(){return u||(l??(l=ef(o,"Datadog Session Replay",()=>{n.stop()},t)),l&&(u=Xp(o,l,1))),u}n=u3(o,i,a,c,e,d),r(o)&&n.start()}}async function g3(e=b3){try{return await e()}catch(t){cc({error:t,source:"Recorder",scriptType:"module"})}}async function b3(){return(await Promise.resolve().then(()=>e_)).startRecording}function y3(){return bt().Profiler!==void 0}async function w3(e=v3){try{return await e()}catch(t){cc({error:t,source:"Profiler",scriptType:"module"})}}async function v3(){return(await Promise.resolve().then(()=>h_)).createRumProfiler}function S3(){let e;function t(n,r,s,i){!y3()||!$t(r.profilingSampleRate)||w3().then(o=>{if(!o){Rt("[DD_RUM] Failed to lazy load the RUM Profiler");return}e=o(r,n,s),e.start(i.findView())}).catch(kt)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(kt)}}}const _3=m3(g3),C3=S3(),Ze=z2(j5,_3,C3,{startDeflateWorker:ef,createDeflateEncoder:Xp});Q0(bt(),"DD_RUM",Ze);const nr=class nr{init(){if(nr.isInitialized){console.info("Tracker [DD]: already initialized");return}Ze.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:Le.getRuntimeConfig().MODE,version:Le.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),Ze.startView({name:"ap_cl_view_mounted"}),Ze.startSessionReplayRecording(),nr.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){Ze==null||Ze.addAction(t,n||{})}trackError(t,n){Ze==null||Ze.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof Ze.stopSessionReplayRecording=="function"&&Ze.stopSessionReplayRecording(),Ze.addAction("ap_cl_view_unmounted",{reason:"component_destroyed"}),nr.isInitialized=!1}filterEvents(t){var n,r,s;return!!(t.type==="view"&&((n=t.view.name)!=null&&n.startsWith("ap_cl_"))||t.type==="action"&&typeof((r=t.action.target)==null?void 0:r.name)=="string"&&t.action.target.name.startsWith("ap_cl_")||t.type==="error"&&((s=t.error)==null?void 0:s.source)==="custom")}};S(nr,"isInitialized",!1);let uc=nr,Yn=[];class xe{static init(t){if(!t){console.info("Tracking disabled");return}Yn=[new uc],Yn.forEach(n=>n.init())}static trackEvent(t,n){Yn.forEach(r=>r.track(t,n))}static trackError(t,n){Yn.forEach(r=>r.trackError(t,n))}static destroy(){Yn.forEach(t=>t.destroy()),Yn=[]}}const Se=class Se{static init(t,n){if(!t)throw console.error('AstroPay Payments Library: Missing "app-id". Call init function first.'),new Error("app-id is required for authentication.");if(Se.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}Se.token=t,xe.init((n==null?void 0:n.tracking)??!0),z.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),V.init({language:(n==null?void 0:n.language)??"en"}),Le.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),ut.init({appName:"ap-cl",baseURL:Le.getRuntimeConfig().API_BASE_URL,timeout:5e3}),xe.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),Se.isInitialized=!0}static registerComponent(t){Se.components.add(t)}static unregisterComponent(t){Se.components.delete(t)}static getToken(){if(!Se.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return Se.token}static destroy(){Se.isInitialized&&(Se.components.forEach(t=>t.destroy()),Se.components.clear(),Se.isInitialized=!1,xe.destroy(),Se.token="")}static isLibInitialized(){return Se.isInitialized}};S(Se,"isInitialized",!1),S(Se,"token"),S(Se,"components",new Set);let ct=Se;function rf(e,t){return function(){return e.apply(t,arguments)}}const{toString:E3}=Object.prototype,{getPrototypeOf:dc}=Object,{iterator:ti,toStringTag:sf}=Symbol,ni=(e=>t=>{const n=E3.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lt=e=>(e=e.toLowerCase(),t=>ni(t)===e),ri=e=>t=>typeof t===e,{isArray:Zn}=Array,Jn=ri("undefined");function Br(e){return e!==null&&!Jn(e)&&e.constructor!==null&&!Jn(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const of=lt("ArrayBuffer");function x3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&of(e.buffer),t}const I3=ri("string"),ze=ri("function"),af=ri("number"),Ur=e=>e!==null&&typeof e=="object",T3=e=>e===!0||e===!1,si=e=>{if(ni(e)!=="object")return!1;const t=dc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(sf in e)&&!(ti in e)},A3=e=>{if(!Ur(e)||Br(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},k3=lt("Date"),R3=lt("File"),P3=lt("Blob"),O3=lt("FileList"),L3=e=>Ur(e)&&ze(e.pipe),N3=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=ni(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},M3=lt("URLSearchParams"),[D3,F3,B3,U3]=["ReadableStream","Request","Response","Headers"].map(lt),$3=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $r(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Zn(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(Br(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function cf(e,t){if(Br(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lf=e=>!Jn(e)&&e!==hn;function pc(){const{caseless:e,skipUndefined:t}=lf(this)&&this||{},n={},r=(s,i)=>{const o=e&&cf(n,i)||i;si(n[o])&&si(s)?n[o]=pc(n[o],s):si(s)?n[o]=pc({},s):Zn(s)?n[o]=s.slice():(!t||!Jn(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&$r(arguments[s],r);return n}const V3=(e,t,n,{allOwnKeys:r}={})=>($r(t,(s,i)=>{n&&ze(s)?e[i]=rf(s,n):e[i]=s},{allOwnKeys:r}),e),z3=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),H3=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},j3=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&dc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W3=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},q3=e=>{if(!e)return null;if(Zn(e))return e;let t=e.length;if(!af(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},G3=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dc(Uint8Array)),K3=(e,t)=>{const r=(e&&e[ti]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Y3=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Z3=lt("HTMLFormElement"),J3=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),uf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),X3=lt("RegExp"),df=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};$r(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Q3=e=>{df(e,(t,n)=>{if(ze(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ze(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e4=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Zn(e)?r(e):r(String(e).split(t)),n},t4=()=>{},n4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r4(e){return!!(e&&ze(e.append)&&e[sf]==="FormData"&&e[ti])}const s4=e=>{const t=new Array(10),n=(r,s)=>{if(Ur(r)){if(t.indexOf(r)>=0)return;if(Br(r))return r;if(!("toJSON"in r)){t[s]=r;const i=Zn(r)?[]:{};return $r(r,(o,a)=>{const c=n(o,s+1);!Jn(c)&&(i[a]=c)}),t[s]=void 0,i}}return r};return n(e,0)},i4=lt("AsyncFunction"),o4=e=>e&&(Ur(e)||ze(e))&&ze(e.then)&&ze(e.catch),pf=((e,t)=>e?setImmediate:t?((n,r)=>(hn.addEventListener("message",({source:s,data:i})=>{s===hn&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),hn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(hn.postMessage)),a4=typeof queueMicrotask<"u"?queueMicrotask.bind(hn):typeof process<"u"&&process.nextTick||pf,y={isArray:Zn,isArrayBuffer:of,isBuffer:Br,isFormData:N3,isArrayBufferView:x3,isString:I3,isNumber:af,isBoolean:T3,isObject:Ur,isPlainObject:si,isEmptyObject:A3,isReadableStream:D3,isRequest:F3,isResponse:B3,isHeaders:U3,isUndefined:Jn,isDate:k3,isFile:R3,isBlob:P3,isRegExp:X3,isFunction:ze,isStream:L3,isURLSearchParams:M3,isTypedArray:G3,isFileList:O3,forEach:$r,merge:pc,extend:V3,trim:$3,stripBOM:z3,inherits:H3,toFlatObject:j3,kindOf:ni,kindOfTest:lt,endsWith:W3,toArray:q3,forEachEntry:K3,matchAll:Y3,isHTMLForm:Z3,hasOwnProperty:uf,hasOwnProp:uf,reduceDescriptors:df,freezeMethods:Q3,toObjectSet:e4,toCamelCase:J3,noop:t4,toFiniteNumber:n4,findKey:cf,global:hn,isContextDefined:lf,isSpecCompliantForm:r4,toJSONObject:s4,isAsyncFn:i4,isThenable:o4,setImmediate:pf,asap:a4,isIterable:e=>e!=null&&ze(e[ti])};function U(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}y.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:y.toJSONObject(this.config),code:this.code,status:this.status}}});const ff=U.prototype,hf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{hf[e]={value:e}}),Object.defineProperties(U,hf),Object.defineProperty(ff,"isAxiosError",{value:!0}),U.from=(e,t,n,r,s,i)=>{const o=Object.create(ff);y.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return U.call(o,a,c,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const c4=null;function fc(e){return y.isPlainObject(e)||y.isArray(e)}function mf(e){return y.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(s,i){return s=mf(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function l4(e){return y.isArray(e)&&!e.some(fc)}const u4=y.toFlatObject(y,{},null,function(t){return/^is[A-Z]/.test(t)});function ii(e,t,n){if(!y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,g){return!y.isUndefined(g[m])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&y.isSpecCompliantForm(t);if(!y.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(y.isDate(f))return f.toISOString();if(y.isBoolean(f))return f.toString();if(!c&&y.isBlob(f))throw new U("Blob is not supported. Use a Buffer instead.");return y.isArrayBuffer(f)||y.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,m,g){let _=f;if(f&&!g&&typeof f=="object"){if(y.endsWith(m,"{}"))m=r?m:m.slice(0,-2),f=JSON.stringify(f);else if(y.isArray(f)&&l4(f)||(y.isFileList(f)||y.endsWith(m,"[]"))&&(_=y.toArray(f)))return m=mf(m),_.forEach(function(w,C){!(y.isUndefined(w)||w===null)&&t.append(o===!0?gf([m],C,i):o===null?m:m+"[]",l(w))}),!1}return fc(f)?!0:(t.append(gf(g,m,i),l(f)),!1)}const d=[],p=Object.assign(u4,{defaultVisitor:u,convertValue:l,isVisitable:fc});function h(f,m){if(!y.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(f),y.forEach(f,function(_,x){(!(y.isUndefined(_)||_===null)&&s.call(t,_,y.isString(x)?x.trim():x,m,p))===!0&&h(_,m?m.concat(x):[x])}),d.pop()}}if(!y.isObject(e))throw new TypeError("data must be an object");return h(e),t}function bf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function hc(e,t){this._pairs=[],e&&ii(e,this,t)}const yf=hc.prototype;yf.append=function(t,n){this._pairs.push([t,n])},yf.toString=function(t){const n=t?function(r){return t.call(this,r,bf)}:bf;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function d4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function wf(e,t,n){if(!t)return e;const r=n&&n.encode||d4;y.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=y.isURLSearchParams(t)?t.toString():new hc(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class vf{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){y.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},p4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,f4=mc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),h4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m4=mc&&window.location.href||"http://localhost",Re={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:f4,hasStandardBrowserWebWorkerEnv:h4,navigator:gc,origin:m4},Symbol.toStringTag,{value:"Module"})),...p4};function g4(e,t){return ii(e,new Re.classes.URLSearchParams,{visitor:function(n,r,s,i){return Re.isNode&&y.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function b4(e){return y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y4(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function _f(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&y.isArray(s)?s.length:o,c?(y.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!y.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&y.isArray(s[o])&&(s[o]=y4(s[o])),!a)}if(y.isFormData(e)&&y.isFunction(e.entries)){const n={};return y.forEachEntry(e,(r,s)=>{t(b4(r),s,n,0)}),n}return null}function w4(e,t,n){if(y.isString(e))try{return(t||JSON.parse)(e),y.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vr={transitional:Sf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=y.isObject(t);if(i&&y.isHTMLForm(t)&&(t=new FormData(t)),y.isFormData(t))return s?JSON.stringify(_f(t)):t;if(y.isArrayBuffer(t)||y.isBuffer(t)||y.isStream(t)||y.isFile(t)||y.isBlob(t)||y.isReadableStream(t))return t;if(y.isArrayBufferView(t))return t.buffer;if(y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return g4(t,this.formSerializer).toString();if((a=y.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ii(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),w4(t)):t}],transformResponse:[function(t){const n=this.transitional||Vr.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(y.isResponse(t)||y.isReadableStream(t))return t;if(t&&y.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?U.from(a,U.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Re.classes.FormData,Blob:Re.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};y.forEach(["delete","get","head","post","put","patch"],e=>{Vr.headers[e]={}});const v4=y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),S4=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
547
|
-
|
|
548
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Cf]=this[Cf]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=zr(o);r[a]||(x4(s,o),r[a]=!0)}return y.isArray(t)?t.forEach(i):i(t),this}};He.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),y.reduceDescriptors(He.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),y.freezeMethods(He);function yc(e,t){const n=this||Vr,r=t||n,s=He.from(r.headers);let i=r.data;return y.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Ef(e){return!!(e&&e.__CANCEL__)}function Xn(e,t,n){U.call(this,e??"canceled",U.ERR_CANCELED,t,n),this.name="CanceledError"}y.inherits(Xn,U,{__CANCEL__:!0});function xf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function I4(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function T4(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[i];o||(o=l),n[s]=c,r[s]=l;let d=i,p=0;for(;d!==s;)p+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o<t)return;const h=u&&l-u;return h?Math.round(p*1e3/h):void 0}}function A4(e,t){let n=0,r=1e3/t,s,i;const o=(l,u=Date.now())=>{n=u,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const ai=(e,t,n=3)=>{let r=0;const s=T4(50,250);return A4(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,c=o-r,l=s(c),u=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&u?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},If=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tf=e=>(...t)=>y.asap(()=>e(...t)),k4=Re.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Re.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Re.origin),Re.navigator&&/(msie|trident)/i.test(Re.navigator.userAgent)):()=>!0,R4=Re.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),y.isString(r)&&o.push("path="+r),y.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function P4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O4(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Af(e,t,n){let r=!P4(t);return e&&(r||n==!1)?O4(e,t):t}const kf=e=>e instanceof He?{...e}:e;function mn(e,t){t=t||{};const n={};function r(l,u,d,p){return y.isPlainObject(l)&&y.isPlainObject(u)?y.merge.call({caseless:p},l,u):y.isPlainObject(u)?y.merge({},u):y.isArray(u)?u.slice():u}function s(l,u,d,p){if(y.isUndefined(u)){if(!y.isUndefined(l))return r(void 0,l,d,p)}else return r(l,u,d,p)}function i(l,u){if(!y.isUndefined(u))return r(void 0,u)}function o(l,u){if(y.isUndefined(u)){if(!y.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function a(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,u,d)=>s(kf(l),kf(u),d,!0)};return y.forEach(Object.keys({...e,...t}),function(u){const d=c[u]||s,p=d(e[u],t[u],u);y.isUndefined(p)&&d!==a||(n[u]=p)}),n}const Rf=e=>{const t=mn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=He.from(o),t.url=wf(Af(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),y.isFormData(n)){if(Re.hasStandardBrowserEnv||Re.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(y.isFunction(n.getHeaders)){const c=n.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([u,d])=>{l.includes(u.toLowerCase())&&o.set(u,d)})}}if(Re.hasStandardBrowserEnv&&(r&&y.isFunction(r)&&(r=r(t)),r||r!==!1&&k4(t.url))){const c=s&&i&&R4.read(i);c&&o.set(s,c)}return t},L4=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=Rf(e);let i=s.data;const o=He.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=s,u,d,p,h,f;function m(){h&&h(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function _(){if(!g)return;const w=He.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),N={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};xf(function(b){n(b),m()},function(b){r(b),m()},N),g=null}"onloadend"in g?g.onloadend=_:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(_)},g.onabort=function(){g&&(r(new U("Request aborted",U.ECONNABORTED,e,g)),g=null)},g.onerror=function(C){const N=C&&C.message?C.message:"Network Error",A=new U(N,U.ERR_NETWORK,e,g);A.event=C||null,r(A),g=null},g.ontimeout=function(){let C=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||Sf;s.timeoutErrorMessage&&(C=s.timeoutErrorMessage),r(new U(C,N.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&y.forEach(o.toJSON(),function(C,N){g.setRequestHeader(N,C)}),y.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),a&&a!=="json"&&(g.responseType=s.responseType),l&&([p,f]=ai(l,!0),g.addEventListener("progress",p)),c&&g.upload&&([d,h]=ai(c),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",h)),(s.cancelToken||s.signal)&&(u=w=>{g&&(r(!w||w.type?new Xn(null,e,g):w),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const x=I4(s.url);if(x&&Re.protocols.indexOf(x)===-1){r(new U("Unsupported protocol "+x+":",U.ERR_BAD_REQUEST,e));return}g.send(i||null)})},N4=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;r.abort(u instanceof U?u:new Xn(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new U(`timeout ${t} of ms exceeded`,U.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>y.asap(a),c}},M4=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},D4=async function*(e,t){for await(const n of F4(e))yield*M4(n,t)},F4=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Pf=(e,t,n,r)=>{const s=D4(e,t);let i=0,o,a=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await s.next();if(l){a(),c.close();return}let d=u.byteLength;if(n){let p=i+=d;n(p)}c.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},Of=64*1024,{isFunction:ci}=y,B4=(({Request:e,Response:t})=>({Request:e,Response:t}))(y.global),{ReadableStream:Lf,TextEncoder:Nf}=y.global,Mf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},U4=e=>{e=y.merge.call({skipUndefined:!0},B4,e);const{fetch:t,Request:n,Response:r}=e,s=t?ci(t):typeof fetch=="function",i=ci(n),o=ci(r);if(!s)return!1;const a=s&&ci(Lf),c=s&&(typeof Nf=="function"?(f=>m=>f.encode(m))(new Nf):async f=>new Uint8Array(await new n(f).arrayBuffer())),l=i&&a&&Mf(()=>{let f=!1;const m=new n(Re.origin,{body:new Lf,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),u=o&&a&&Mf(()=>y.isReadableStream(new r("").body)),d={stream:u&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(m,g)=>{let _=m&&m[f];if(_)return _.call(m);throw new U(`Response type '${f}' is not supported`,U.ERR_NOT_SUPPORT,g)})});const p=async f=>{if(f==null)return 0;if(y.isBlob(f))return f.size;if(y.isSpecCompliantForm(f))return(await new n(Re.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(y.isArrayBufferView(f)||y.isArrayBuffer(f))return f.byteLength;if(y.isURLSearchParams(f)&&(f=f+""),y.isString(f))return(await c(f)).byteLength},h=async(f,m)=>{const g=y.toFiniteNumber(f.getContentLength());return g??p(m)};return async f=>{let{url:m,method:g,data:_,signal:x,cancelToken:w,timeout:C,onDownloadProgress:N,onUploadProgress:A,responseType:b,headers:P,withCredentials:T="same-origin",fetchOptions:R}=Rf(f),k=t||fetch;b=b?(b+"").toLowerCase():"text";let O=N4([x,w&&w.toAbortSignal()],C),L=null;const M=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let ie;try{if(A&&l&&g!=="get"&&g!=="head"&&(ie=await h(P,_))!==0){let G=new n(m,{method:"POST",body:_,duplex:"half"}),ue;if(y.isFormData(_)&&(ue=G.headers.get("content-type"))&&P.setContentType(ue),G.body){const[ge,Zt]=If(ie,ai(Tf(A)));_=Pf(G.body,Of,ge,Zt)}}y.isString(T)||(T=T?"include":"omit");const ee=i&&"credentials"in n.prototype,Pe={...R,signal:O,method:g.toUpperCase(),headers:P.normalize().toJSON(),body:_,duplex:"half",credentials:ee?T:void 0};L=i&&new n(m,Pe);let he=await(i?k(L,R):k(m,Pe));const re=u&&(b==="stream"||b==="response");if(u&&(N||re&&M)){const G={};["status","statusText","headers"].forEach(ce=>{G[ce]=he[ce]});const ue=y.toFiniteNumber(he.headers.get("content-length")),[ge,Zt]=N&&If(ue,ai(Tf(N),!0))||[];he=new r(Pf(he.body,Of,ge,()=>{Zt&&Zt(),M&&M()}),G)}b=b||"text";let ae=await d[y.findKey(d,b)||"text"](he,f);return!re&&M&&M(),await new Promise((G,ue)=>{xf(G,ue,{data:ae,headers:He.from(he.headers),status:he.status,statusText:he.statusText,config:f,request:L})})}catch(ee){throw M&&M(),ee&&ee.name==="TypeError"&&/Load failed|fetch/i.test(ee.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,f,L),{cause:ee.cause||ee}):U.from(ee,ee&&ee.code,f,L)}}},$4=new Map,Df=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,c,l,u=$4;for(;a--;)c=i[a],l=u.get(c),l===void 0&&u.set(c,l=a?new Map:U4(t)),u=l;return l};Df();const wc={http:c4,xhr:L4,fetch:{get:Df}};y.forEach(wc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ff=e=>`- ${e}`,V4=e=>y.isFunction(e)||e===null||e===!1,Bf={getAdapter:(e,t)=>{e=y.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o<n;o++){r=e[o];let a;if(s=r,!V4(r)&&(s=wc[(a=String(r)).toLowerCase()],s===void 0))throw new U(`Unknown adapter '${a}'`);if(s&&(y.isFunction(s)||(s=s.get(t))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mn(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ui.assertOptions(r,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean)},!1),s!=null&&(y.isFunction(s)?n.paramsSerializer={serialize:s}:ui.assertOptions(s,{encode:vt.function,serialize:vt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ui.assertOptions(n,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&y.merge(i.common,i[n.method]);i&&y.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=He.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!c){const f=[Uf.bind(this),void 0];for(f.unshift(...a),f.push(...l),p=f.length,u=Promise.resolve(n);d<p;)u=u.then(f[d++],f[d++]);return u}p=a.length;let h=n;for(;d<p;){const f=a[d++],m=a[d++];try{h=f(h)}catch(g){m.call(this,g);break}}try{u=Uf.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=mn(this.defaults,t);const n=Af(t.baseURL,t.url,t.allowAbsoluteUrls);return wf(n,t.params,t.paramsSerializer)}};y.forEach(["delete","get","head","options"],function(t){gn.prototype[t]=function(n,r){return this.request(mn(r||{},{method:t,url:n,data:(r||{}).data}))}}),y.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(mn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}gn.prototype[t]=n(),gn.prototype[t+"Form"]=n(!0)});let H4=class Kh{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Xn(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kh(function(s){t=s}),cancel:t}}};function j4(e){return function(n){return e.apply(null,n)}}function W4(e){return y.isObject(e)&&e.isAxiosError===!0}const Sc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Sc).forEach(([e,t])=>{Sc[t]=e});function zf(e){const t=new gn(e),n=rf(gn.prototype.request,t);return y.extend(n,gn.prototype,t,{allOwnKeys:!0}),y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return zf(mn(e,s))},n}const fe=zf(Vr);fe.Axios=gn,fe.CanceledError=Xn,fe.CancelToken=H4,fe.isCancel=Ef,fe.VERSION=$f,fe.toFormData=ii,fe.AxiosError=U,fe.Cancel=fe.CanceledError,fe.all=function(t){return Promise.all(t)},fe.spread=j4,fe.isAxiosError=W4,fe.mergeConfig=mn,fe.AxiosHeaders=He,fe.formToJSON=e=>_f(y.isHTMLForm(e)?new FormData(e):e),fe.getAdapter=Bf.getAdapter,fe.HttpStatusCode=Sc,fe.default=fe;const{Axios:R_,AxiosError:P_,CanceledError:O_,isCancel:L_,CancelToken:N_,VERSION:M_,all:D_,Cancel:F_,isAxiosError:B_,spread:U_,toFormData:$_,AxiosHeaders:V_,HttpStatusCode:z_,formToJSON:H_,getAdapter:j_,mergeConfig:W_}=fe,Hr=(e,t)=>{const n=Le.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},ne=class ne{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};S(ne,"axiosInstance"),S(ne,"config"),S(ne,"init",t=>{ne.config=t,ne.axiosInstance=fe.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":V.getCurrent(),...t.headers}}),ne.setupInterceptors()}),S(ne,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s,...n}};return await ne.getAxiosInstance().get(i,o)}),S(ne,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await ne.getAxiosInstance().post(i,n,o)}),S(ne,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s}};return await ne.getAxiosInstance().put(i,n,o)}),S(ne,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s},headers:{"Content-Type":"text/plain"}};return await ne.getAxiosInstance().patch(i,n,o)}),S(ne,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:s=!0})=>{const i=Hr(t,r),o={params:{useQueryParams:s,...n}};return await ne.getAxiosInstance().delete(i,o)}),S(ne,"setupInterceptors",()=>{ne.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:ne.getEncodeParams()}:t.params=r,t.data&&(t.data=mi(t.data,"camelCase-to-snake_case")),t}),ne.axiosInstance.interceptors.response.use(t=>ne.handleResponse(t),t=>ne.handleError(t))}),S(ne,"handleResponse",t=>{const n=t.status===202,r=mi(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),S(ne,"handleError",t=>{var s;const n=mi((s=t.response)==null?void 0:s.data,"snake_case-to-camelCase"),r={error:(n==null?void 0:n.error)||"UNKNOWN_ERROR",internalTerm:n==null?void 0:n.internalTerm,message:(n==null?void 0:n.message)||V.translate("generic_error"),description:n==null?void 0:n.description};return Promise.reject(r)}),S(ne,"getEncodeParams",()=>{const t={app_name:ne.config.appName,app_id:ct.getToken(),environment:Le.getEnvironment(),platform:Ul(),version:Le.getRuntimeConfig().VERSION};return tl(t)});let ut=ne;const Qn={createPayment:"/v1/web/payments",paymentDetails:"/v1/web/payments/:paymentExternalId/detail",identifyUser:"/v1/web/payments/:paymentExternalId/identify-user",paymentStatus:"/v1/web/payments/:paymentExternalId/status",paymentMethodDetail:"/v1/web/payments/:paymentExternalId/payment-methods/:methodCode",pciToken:"v1/web/payments/pci/token"};class Hf{}S(Hf,"getPciToken",async t=>{try{return await ut.POST({url:Qn.pciToken,data:t})}catch(n){return xe.trackError(n),Promise.reject(n)}});const q4=e=>{if(!e)return"";const n=e.replace(/\s+/g,"").split("/");if(n.length!==2)return"";let[r,s]=n;if(r.length===1&&(r="0"+r),s.length===2){const i=new Date().getFullYear(),o=Math.floor(i/100)*100;s=String(o+Number(s))}return`${r}/${s}`},G4="v1.1.3";class K4{constructor(t,n){S(this,"collector");S(this,"form");S(this,"fields");S(this,"callback");this.fields=t,this.callback=n}async init(t){try{const n=await h1({environment:this.getCardEnvironment(),version:G4});this.collector=n.initCollector(),this.form=this.collector.createForm(r=>{if(this.callback){const s=Object.entries(r).reduce((i,[o,a])=>(i[o]={isValid:a.isValid||!a.isDirty&&!a.isTouched,isTouched:a.isTouched||a.isDirty},i),{});this.callback(s)}}),this.fields.forEach(({field:r,...s})=>{this.form.field(r,s)}),t==null||t()}catch(n){throw console.error(n),n}}async tokenizeCard(t,n,r){try{const{accessToken:s}=await Hf.getPciToken(t);return this.form.accessToken=s,await new Promise(i=>{this.form.submit(o=>{const a={cardNumberTkn:o.card_number.value,cvvToken:o.card_cvc.value,holderName:o.card_holder.value,expirationDate:q4(o.card_exp.value),firstSixDigits:o.card_number.details.bin.substring(0,6),lastFourDigits:o.card_number.details.lastFour,brand:o.card_number.details.brand||"unknown"};n(a),i()},()=>{r(new Error(V.translate("card_tokenization_error")))})})}catch{r(new Error(V.translate("generic_error")))}}unmount(){var t;(t=this.form)==null||t.tearDown()}getCardEnvironment(){return Le.getEnvironment()==="production"?"production":"sandbox"}}var jf=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e))(jf||{});class Ie{}S(Ie,"postCreatePayment",async(t,n)=>{try{const r=await ut.POST({data:t,url:Qn.createPayment});return xe.trackEvent("ap_cl_payment_created",{...t,initializer:n}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"getPaymentDetails",async(t,n)=>{try{const r=await ut.GET({url:hr(Qn.paymentDetails,{paymentExternalId:t})});return xe.trackEvent("ap_cl_payment_details",{paymentExternalId:t,initializer:n}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"postIdentifyUser",async(t,n)=>{try{const r=await ut.POST({data:n,url:hr(Qn.identifyUser,{paymentExternalId:t})});return xe.trackEvent("ap_cl_user_identified",{hasAccount:r.user.hasAccount,user:r.user.otherUserData}),r}catch(r){return xe.trackError(r),Promise.reject(r)}}),S(Ie,"getPaymentStatus",async t=>{try{return await ut.GET({url:hr(Qn.paymentStatus,{paymentExternalId:t})})}catch(n){return Promise.reject(n)}}),S(Ie,"getPollingRequest",async t=>{try{const n=t.replace(/^\/?api\//,"");return await ut.GET({url:n})}catch(n){return Promise.reject(n)}}),S(Ie,"postGenericPayment",async(t,n,r)=>{try{const s=t.replace(/^\/?api\//,"");return await ut.POST({url:hr(s,{paymentExternalId:n}),data:r})}catch(s){return Promise.reject(s)}});var Gt=(e=>(e.ACCEPTED="ACCEPTED",e.FINISHED="FINISHED",e))(Gt||{});class Wf{}S(Wf,"getPaymentMethodDetail",async t=>{try{return await ut.GET({url:hr(Qn.paymentMethodDetail,{paymentExternalId:t.paymentExternalId,methodCode:t.methodCode})})}catch(n){return Promise.reject(n)}});class _c{constructor(t,n,r,s){S(this,"pollingTimeout",null);S(this,"isPollingActive",!1);S(this,"remainingAttempts");this.pollingAcceptedData=t,this.onWaitingInfo=n,this.onFinished=r,this.onError=s,this.remainingAttempts=t.pollingMetadata.remainingHits,this.validatePollingData()}startPolling(){var t;if(this.pollingAcceptedData.pollingMetadata.remainingHits<=0){this.onError(new Error("Polling attempts exhausted"));return}this.isPollingActive=!0,(t=this.pollingAcceptedData.waitingInfo)!=null&&t.text&&this.onWaitingInfo&&this.onWaitingInfo(this.pollingAcceptedData.waitingInfo.text),this.executePoll()}stopPolling(){this.isPollingActive=!1,this.pollingTimeout&&(clearTimeout(this.pollingTimeout),this.pollingTimeout=null)}validatePollingData(){if(!this.pollingAcceptedData.pollingMetadata.pollingUrl)throw new Error("Invalid polling URL");if(this.pollingAcceptedData.pollingMetadata.nextHitIn<=0)throw new Error("Invalid polling interval")}executePoll(){this.isPollingActive&&(this.pollingTimeout=setTimeout(()=>{this.handlePolling().catch(t=>{this.onError(t),this.stopPolling()})},this.getPollingInterval()))}async handlePolling(){const t=await Ie.getPollingRequest(this.pollingAcceptedData.pollingMetadata.pollingUrl);t.statusCode===202&&t.pollingStatus===Gt.ACCEPTED?this.handleAccepted(t):this.handleFinished(t)}handleAccepted(t){if(this.isPollingActive){if(this.remainingAttempts=t.pollingMetadata.remainingHits,this.pollingAcceptedData=t,this.remainingAttempts<=0){const n=t.timeoutInfo.text;this.stopPolling(),this.onError(new Error(n));return}this.executePoll()}}handleFinished(t){this.stopPolling(),this.onFinished(t)}getPollingInterval(){return this.pollingAcceptedData.pollingMetadata.nextHitIn}}const di=(e,t)=>({fontSize:"16px",lineHeight:"24px",color:e,backgroundColor:t}),Y4=(e,{error:t=!1,disabled:n=!1})=>j`
|
|
527
|
+
`;let ga=class extends we{constructor(t){super({tag:"div",styles:()=>e2()});const n=t.type==="success",r=n?j.getStyles().messages.success.textColor:j.getStyles().messages.error.textColor,i=new vt({name:n?"check_circle_line":"close_circle_line",size:96,color:r}).element;if(this.element.append(i),t.title){const o=new X({text:t.title,size:"base",lineHeight:30,weight:600,align:"center"}).element;this.element.append(o)}if(t.description){const o=new X({text:t.description,size:"medium",lineHeight:24,align:"center"}).element;this.element.append(o)}}};var R=bt;function ma(){var e=bt;const t=["clear","127830LZHlSi",e(795),e(743),e(794),e(649),e(511),"1048780OzWlkN",e(668),e(412),e(465),e(180),e(520),e(373),e(419),e(562),e(422),"off"];return(ma=function(){return t})()}(function(){for(var e=bt,t=ya();;)try{if(-parseInt(e(329))/1*(parseInt(e(274))/2)+-parseInt(e(369))/3*(-parseInt(e(367))/4)+-parseInt(e(233))/5+parseInt(e(145))/6*(-parseInt(e(701))/7)+-parseInt(e(655))/8*(-parseInt(e(270))/9)+parseInt(e(315))/10*(parseInt(e(142))/11)+parseInt(e(685))/12===588751)break;t.push(t.shift())}catch{t.push(t.shift())}})();const va=ba;function ya(){var e=["3448vNCtZZ","761436JoNrAO","5310140VtlWwy","Request timeout","7672278JDWNZO","90ZjyTbp","3104038VhHmhJ","341079ldogSu","3114441jTKeeA","key","PRODUCTION","getAttribute","toDotCase","send","102532iujTOj","757371vntIDP","rule","28497zqLGhH","1965484iDLxVf","justify","10QefxGX","5066250nuHGFb","append","1380400kMJPdd","tags","3598075UDNdui","rel","latest","5679575iNTExO","@font-feature-values","700156cwVhpM","13090752DcUgRT","count","lowerFirst","box-pack:$3","@keyframes","6990495zFYjlD","timeout","SANDBOX","1764180DwriBQ","28900hQasRN","get","$2box$3","592uldMpH","1906140GGDNCn","forEach","6lcQlGI","timeZone","330066EfbpyJ","2180136rfoyVo","2548490MycJlj","3489ZHTUlC","includes","902079TZNeVj","hasOwnProperty","20cFIzva","flex-line-pack","5421zZCtjq","anim","1685971anZxDF","1118807BrroiT","633515GvGIbN","href","612712APocYB","-ms-","34347599FblyIU","5oIWUit",'/"]',"styleSheets","1149940kbRkDq","18emqyKv","216768ATlgsw","REQUIRED","1538910aqOPES","167058fDTlal","1802382UuEKog","11928996WPgChJ","297544AzCjab","7cCQubY","210052cCRFdo","15365691CaBpSv","prepend","1837320JmVWKN","apply","5488040tLgchU","6404728IJjHNF","cssRules","[HTTP]: ","function","538328lGaoiz","3WyhRFj","set","document.head or document.body","18KOgRUC","3PpNGVC","frames","request","formatKeys","2515230SGPlYS","1557YOosgA","container","4144596Ukwkkq","14mcAgvY","_createCaseFirst","80179OoRuKl","NOT_FOUND","test","1063965TOYbKD","112560WXZvtM","5855416GyXitv","authorization","insertionPoint","ctx","3122830eGkjjc","173392QMdDYZ","197776ZnKCeZ","comm","42CEhiUc","3UDJFFS","8znKpbY","1rkGFTj","1103656RUOYui","5297088ciYuDR","CopyButton","random","5589390vSVLAu","done","969632YGVaMk","flex-pack:$3","setPrototypeOf","negative","$2$3","8766CUlXUX","6555474dHVLiB","16hoClBR","10399347ouOdzC","1731331adTcvK","6011170PFMfeO","box-","2QsMDbx","396880hxDmUW","5lLsGOe","lower","288762yBOcUy","927680PXUBpa","5272970jsKcdl","210wvAPTz","4390984qBtQNZ","1042915vBnDcJ","slice","18146574kLGOdt","Content-Type","@counter-style","1635840LijluJ","assign","then","148iTkCvR","upperFirst","4586523dESxoU","102UdDlbM","13480IirCBl","application/json","-$&","snake","startCase","3782506eozEyq","[UNHANDLED]: ","1586289ZbsznC","parent","compat","style[data-emotion]:not([data-s])","41346sAgKHc","origin","1542472UUshgd","toPascalCase","domians","187957vMwqit","toSnakeCase","568pAcJOy","5590kjPEGP","@font-face","34057TCsfxk","9621207ZSMPqN","data-emotion","_startCase","print-","@media","link",":read-write","NOT_LOADED","9356KfJoDB","animationName","4mPQIOh","animation","2696336QqSQcN","start","3363787mMyewX","12991583mFbRDh","35tYPZLV","35168opQkvL","32WPbhAk","hydrate","/public/v1/token/reveal","36hVbjtN","basis","$1$2","cdn","__emotion_styles","22apMIFO","3goapWe","3275226iDBkQv","push","221142kMnpSu","querySelectorAll","114RSjmoG","reveal","2672020NupvKQ","5voBSrt","5280612FAmHRj","2YDvJFs","121946FvfpOL","TIMEOUT","BAD_REQUEST","308070mzXybL","7704828AlyWpW","4136vTyAoM","42WATbWV","17375868QkLWYY","1961979ltppkW","369356uTNDzr","5112212jRFQZI","24746700nYUjHu","$1 $2","6521168AcnhGa","style","12tOiqGC","https://tokenizer-tst.cc.astropay.com","speedy","60VyHydS","793022whjRWB","bind","kebab","10Oqises","add","1470645xRoijs","object","captureStackTrace","781649cCTwXr","182824NOFIwU","4817756GOdPsv","BASE_CDN","isArray","@supports","1244744kHEZvp","1204400cULrpT","449711XSjyNn","@namespace","57gVyDRX","emit","6236046SweZxs","defineProperties","@@INIT","3014374nROcbQ","params","sheet","1671942sLAGQH","Unable to find ","shift","canExecute","upper","UNHANDLED","321246WzqUuK","2416zstDHz","78TjMsRA","@document","486479crVyAA","1274230eUYpuD","7476MqGCll","https://tokenizer.cc.astropay.com","9qEwJkj","94mlxQmC","_insertTag","@viewport","copy-button","2oFrXUh","css","707329nPsPGZ","3903120ZTbQWm","1250232QMjwkz","993063ECHrBH","off","box$3","2387410tdnXlE","environment","type","4XTbgyi","207494VIJaqZ","207VWsTHT","6MQcvFH","35KTILAE","623aFRIRv","104MtyiFW","70fByxgL","1328390hcsUJy","11965976myZRSf","2932168wOOQED","7CAfDgU","27xTvXzF","5139khheWn","18298ErvNda","15qVcyAs","2581385zzzlSz","1531173EygmBU","5013TdEGGQ","39251454EyvEGu","1szHVRr","nextSibling","171eGkepJ","995792ZXdNpW","getFullCdn","49fgToOT","141238OYIhFf","3604728wtPlZt","9byfBJF","exec","next","message","70759QyvmDC","isSpeedy","128yfgIdV","data-s","200ROoAmA","shrink","length","282358JpRRgN","isOperational","insert","3278505kVkcHW","2558421fHqYVU","1165706VPRSLL","split","360993lzNNst","3986rrEZYp","return","3480945BQAAYg","2nMBmkS","2281844ROitQp","BASE_API","27HmsHKI","679404ZmaTyg","20xkgBFi","3908064tZgPPb","1790914KWViXl","inserted","stylisPlugins","reduce","insertBefore","26oJRKGO","119987EZDfNd","565eyruQF","Access-Control-Allow-Origin","595876LgUVRS","1992206jKEGfb","join","193550GoZXIJ","202wLqUwO","replace","baseURL"," is invalid.","99amzLEi","12446nhMFLu","1856148uSihXJ","31566270qvtShe","56045nULafv","abs","5889208ocarfU","2206497yNbZFm","7WjjEbv","@keyframes ","firstChild","305907rAOuHi","1070106SrHRtP","1KlNACj","2829256VMfbYc","801054pmVKPQ","45296tjbJvx","399116yuJdxn","TimeZone","removeEventListener","UNDEFINED",' "]',"lastIndex","18388260JgPhmo","790sQdzeI","xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx","39nuPwxQ","nonce","1906825qFGXWA","102Qkfvvl","name","raw","20gywqiU","7308324sgDoMc","34825311qnCLyR","991531xZguiI","4593190CadDlo","INVALID","1uSGfgo","input-$1","1501542qKAixX","prototype","registered","456wJQuIj","347732LsCzct","parse","undefined","76385hkeDYT","inline-","115026FZBXCQ","5txmdnE","32HPdvVb","8954800LNVZHA","accessToken","3GcEFSv","props","5028BbqWZE","34672561hfhCnC","6522030iNQqBd","36TYjiRw","474fHLsgQ","365994YPzeNn","toKebabCase","6SBjYSO","1HxbtmM","toCamelCase","3xMbMIj","313859KKbbgd","keys","6LCyCWH","tb-rl","1145017tuPjtp","api","10895PHjSJt","boolean","flex-$1$2","2012180BGZvZq","5JHUgnG","6eqGueN","create","1483570zwTktD","366KnZgCn","14qDkMOo","8FUVWOn","38685lFcQsk","appendChild","4wswXHb","INTERNAL_SERVER_ERROR","315634dCJvdO","32039NIQJjh","trim","entries","143352vIzUva","-grow","6vPzjsU","getOwnPropertyDescriptors","192VVRXxR","2013040uXGWiH","grow","10gWvkPZ","getOwnPropertySymbols","!important","5028340uiCobm","splitWords","1398012AIJUyj","1632420YnhDrH","ctr"," is undefined.","41812yDXNFv","2495164uYJjkv","-moz-","version","502691MEcBqX","getHeaders","3kPtUIZ","stringify","14822650JPeFEZ","@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ","42054ESbccP","_toWords","4242528bXZfiT","3344667OIHhxe","5750396vrmTdj","head","268152SJsZnw","427cxPooO","isUndefined","3930zrQOch","listeners","decl","@import","filter","stop","location","79674ZpwWYN","293732SBYxst","/public/v1/token","fromCharCode","toLowerCase","toUpperCase","call","GET","addEventListener","setAttribute","26941288CkDEbN","post","11oqlwuN","Access token not set","87GWhrFE","emitter","before","isRequired","1369700dRAXAo","5GSCGHS","string","toString","24384006yWcRvg","_canExecute","8765008liwqJC","sourceWindow","sandbox","7368UiaItP","12GMrAvZ","HTTP","dns-prefetch","4410036tOJnlJ","264834CkfPaR","children","4214610DepdAD","1472518dXJTTo","3379032afmmzz","Component selectors can only be used in conjunction with ","8ZmfgGJ","44cPbEBd","582SAPPev","350313NZGJmJ","4249880hofxWm",":read-only","436145BXkDSV","toSentenceCase","24qGiocM","flex-item-","REQUEST_TIMEOUT","UNAUTHORIZED","2924874IDKzfu","11ozoHrq","20380sohzME","284730CeOziu","6521911DlQhaK","resolve","175pzlaDH","12Wntbrz","153CwXsSP","6807462wcVIbh","$`$1","99255obnocz","8565340BeQZTN","frameId","3220704wvCPTK","9vcUkeB","5163599fsttEm","983742ZSzkPs","1880YXBEgQ","postMessage","6676776VbOJGf","value","72700aKFNWB","Request error! status: ","2685321kQBtXq","2011122iTUboz","784830EiOgSk","4Shhqxd","concat","throw","777225SHDgSu","resolvedOptions","search","24brqEuT","stretch","2353821ouiOcG","16BpXaTH","body","4168339BVBfRq","_upperFirst","styles","5GkJNGS","2498022TthXHp","match","4399206zUvsoU","defineProperty","45vUgLOB",'script[src^="',"box-$1$2","1915506xRzusT","targetOrigin","10vjgZog","map","3084189TBfDxs","2617015rxAdDp","20057BCeMKK","692668yJTffY","3275913IwuUbo","5yABJbK","charCodeAt","4DRtert","formatKey","5gnwpyW","_lowerCase","4622320DSbOxK","createElement","1428025rswbrb","AbortError","272928GGfFVj","737mdBFHW","4950912kToKgF","handleMessage","8310840DVoCar","getOwnPropertyDescriptor","109064imVtqW","createTextNode","6XsYOJz","24899zSajlN","127845nWOlks","21ZAugTX","11860803tMqYZp","3898532gnOkwM","5015045AqKKoB","1371378msYiaj","5167656aUcLyl","209740ohkUFh","7903578rApVjM","378mIpYul","UNABLE_TO_FIND","586668OMSavw","https://tokenizer-web.cc.astropay.com","39728XQruux","::placeholder","2hgGSIR","3799864GhLwZS","removeChild","toLocaleLowerCase","40869670rNPvRw","flush","235779fIEMDA","enumerable","5CDMHbY","Reveal","773584eZyLko","1907948myHfGb","61554tirTmC","4269661uBmwSk","23881380dQaLeD","296368dsyAUL"];return(ya=function(){return e})()}function ba(e,t){const n=ma();return(ba=function(r,i){return n[r-=160]})(e,t)}(function(){var e=bt;const t=ba,n=ma();for(;;)try{if(-parseInt(t(176))/1*(-parseInt(t(169))/2)+-parseInt(t(175))/3+parseInt(t(172))/4*(parseInt(t(173))/5)+parseInt(t(170))/6*(-parseInt(t(161))/7)+-parseInt(t(174))/8+-parseInt(t(163))/9*(parseInt(t(167))/10)+parseInt(t(171))/11==561693)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),va(165),va(177),va(166);var It,bn,yt,Sf,xt,Wt,_f,Cf,wa,Ea,Tf,Co;function Sa(){var e=bt,t=[e(350),e(396),e(311),e(474),"837xAVhUS","HTTP",e(724),e(144),e(264),e(473),e(689),e(226),e(221),"TIMEOUT","NOT_LOADED",e(328),e(378),e(179),e(656),e(563),"6960805uGgNwo",e(192),e(426),"12267310uEVrHO"];return(Sa=function(){return t})()}function To(e,t){var n=Sa();return(To=function(r,i){return n[r-=191]})(e,t)}function _a(e,t){var n=Ca();return(_a=function(r,i){return n[r-=203]})(e,t)}function Ca(){var e=bt,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Ca=function(){return t})()}function Ta(e,t){var n=Ia();return(Ta=function(r,i){return n[r-=166]})(e,t)}function Ia(){var e=bt,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Ia=function(){return t})()}function If(e,t){var n=xa();return(If=function(r,i){return n[r-=472]})(e,t)}function xa(){var e=bt,t=[e(308),e(157),e(444),e(335),e(279),e(169),"2vZiVLA","1287DSJSxR",e(240),e(251),e(456),e(477),e(692),"96LHSqDE"];return(xa=function(){return t})()}(function(){for(var e=bt,t=To,n=Sa();;)try{if(parseInt(t(196))/1*(parseInt(t(200))/2)+-parseInt(t(209))/3*(parseInt(t(214))/4)+parseInt(t(212))/5+parseInt(t(193))/6*(-parseInt(t(204))/7)+parseInt(t(203))/8+parseInt(t(192))/9*(parseInt(t(198))/10)+-parseInt(t(191))/11==844014)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(bn=It||(It={}))[(yt=To)(210)]=yt(210),bn[yt(194)]=yt(194),bn[yt(211)]=yt(211),bn[R(773)]=yt(206),bn[yt(207)]=yt(207),bn[yt(197)]=yt(197),bn[yt(205)]=R(143),bn.UNHANDLED=yt(213),Wt=To,(xt=Sf||(Sf={}))[xt.OK=200]="OK",xt[xt[Wt(199)]=400]=Wt(199),xt[xt[Wt(202)]=404]=Wt(202),xt[xt[Wt(208)]=500]=R(378),xt[xt[Wt(201)]=408]=Wt(201),xt[xt[Wt(195)]=401]=Wt(195),(function(){for(var e=R,t=_a,n=Ca();;)try{if(-parseInt(t(211))/1+-parseInt(t(209))/2*(parseInt(t(210))/3)+-parseInt(t(212))/4*(parseInt(t(207))/5)+-parseInt(t(204))/6+-parseInt(t(206))/7*(parseInt(t(203))/8)+-parseInt(t(208))/9+parseInt(t(214))/10==660557)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),wa=_a,(Cf=_f||(_f={}))[R(577)]=wa(205),Cf[wa(213)]=R(205),(function(){for(var e=R,t=Ta,n=Ia();;)try{if(parseInt(t(167))/1+parseInt(t(175))/2+parseInt(t(178))/3+parseInt(t(176))/4*(-parseInt(t(172))/5)+-parseInt(t(170))/6+-parseInt(t(171))/7*(-parseInt(t(168))/8)+parseInt(t(174))/9==266134)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(Tf=Ea||(Ea={}))[(Co=Ta)(166)]=Co(173),Tf[Co(169)]=Co(177),(function(){for(var e=R,t=If,n=xa();;)try{if(parseInt(t(479))/1*(-parseInt(t(485))/2)+parseInt(t(478))/3*(parseInt(t(477))/4)+parseInt(t(481))/5*(-parseInt(t(475))/6)+parseInt(t(482))/7*(parseInt(t(474))/8)+parseInt(t(472))/9*(parseInt(t(476))/10)+-parseInt(t(484))/11*(parseInt(t(480))/12)+-parseInt(t(483))/13*(parseInt(t(473))/14)==639293)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const pr=xo;(function(){var e=R;const t=xo,n=Aa();for(;;)try{if(parseInt(t(494))/1+parseInt(t(487))/2*(-parseInt(t(497))/3)+-parseInt(t(485))/4*(parseInt(t(483))/5)+-parseInt(t(488))/6+parseInt(t(484))/7*(-parseInt(t(499))/8)+parseInt(t(469))/9*(-parseInt(t(480))/10)+parseInt(t(468))/11==507588)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const li={isRequired:e=>e+pr(475),isUndefined:e=>e+pr(492),isInvalid:e=>e+pr(490),unableToFind:e=>pr(466)+e+".",notLoaded:e=>pr(473)+e+"."};let Io=class extends Error{constructor(t,n,r=!1){var i=R;const o=pr;let s=n;switch(t){case It[o(491)]:s=li[o(470)](n);break;case It[o(479)]:s=li.isInvalid(n);break;case It[o(486)]:s=li[o(476)](n);break;case It[i(563)]:s=li[o(495)](n);break;case It[o(481)]:s=li[o(493)](n);break;case It[i(454)]:s=o(478)+n;break;case It[o(471)]:s=o(496)+n;break;case It[o(477)]:default:s=o(474)+n}var a,c,u;super(s),a=this,u=void 0,(c=o(482))in a?Object[xo(489)](a,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[c]=u,Object[o(472)](this,new.target.prototype),this[o(467)]=t,this[o(482)]=r,Error[o(498)](this)}};function xo(e,t){const n=Aa();return(xo=function(r,i){return n[r-=466]})(e,t)}function Aa(){var e=R;const t=[e(348),e(524),e(442),e(143),e(713),"Failed to load the ",e(750)," is required.",e(417),e(192),e(671),e(328),e(164),e(773),e(257),e(645),e(358),e(784),"UNDEFINED","618834PMzmgD",e(519),e(520),e(290),e(656),e(398),"notLoaded",e(218),"unableToFind","[TIMEOUT]: ",e(357),"captureStackTrace",e(223),e(188),e(321)];return(Aa=function(){return t})()}function xf(e,t){var n=ka();return(xf=function(r,i){return n[r-=363]})(e,t)}function ka(){var e=R,t=[e(699),"10296792NSbaBf",e(144),e(237),e(713),e(171),"3JrHjWm",e(467),e(520),e(239),"httpCode",e(390),e(590),e(280),e(303)];return(ka=function(){return t})()}(function(){for(var e=R,t=xf,n=ka();;)try{if(parseInt(t(365))/1*(-parseInt(t(374))/2)+-parseInt(t(368))/3*(-parseInt(t(367))/4)+-parseInt(t(373))/5*(-parseInt(t(376))/6)+parseInt(t(375))/7+-parseInt(t(377))/8*(parseInt(t(371))/9)+parseInt(t(369))/10+parseInt(t(363))/11==917605)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const di=Pa;function Ra(){var e=R;const t=[e(683),e(336),e(629),e(541),e(446),"143705UhzlIi",e(141),e(193),e(176),e(147),e(674),e(688),e(234),e(173),e(406),e(606),"940hBWQzM"];return(Ra=function(){return t})()}function Pa(e,t){const n=Ra();return(Pa=function(r,i){return n[r-=127]})(e,t)}(function(){var e=R;const t=Pa,n=Ra();for(;;)try{if(parseInt(t(139))/1*(-parseInt(t(140))/2)+parseInt(t(127))/3*(parseInt(t(142))/4)+-parseInt(t(137))/5+-parseInt(t(141))/6+-parseInt(t(129))/7+-parseInt(t(143))/8*(parseInt(t(134))/9)+-parseInt(t(133))/10*(-parseInt(t(128))/11)==195235)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();let t2=class{static[di(135)](t){const n=di,r=new URLSearchParams(t),i={};return r[n(136)](((o,s)=>{var a=bt;const c=n;i[s]?Array[c(130)](i[s])?i[s][a(795)](o):i[s]=[i[s],o]:i[s]=o})),i}static parseObject(t){return this[di(135)](t)}static[di(131)](t){const n=di,r=new URLSearchParams;for(const i in t){const o=t[i];if(Array[n(130)](o))for(const s of o)r[n(132)](i,s);else r[n(132)](i,o?o[n(138)]():"")}return r[n(138)]()}};const Ao=Oa;function Oa(e,t){const n=La();return(Oa=function(r,i){return n[r-=358]})(e,t)}(function(){var e=R;const t=Oa,n=La();for(;;)try{if(parseInt(t(368))/1+parseInt(t(367))/2*(parseInt(t(361))/3)+-parseInt(t(371))/4+-parseInt(t(358))/5*(-parseInt(t(370))/6)+parseInt(t(362))/7*(parseInt(t(366))/8)+parseInt(t(363))/9*(parseInt(t(364))/10)+-parseInt(t(372))/11==832538)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const hr={endpoints:{tokenizer:R(427),reveal:Ao(365)},domians:{cdn:{production:Ao(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:Ao(359),sandbox:Ao(360)}}};function La(){var e=R;const t=[e(393),e(786),e(471),"107952fYoopL",e(644),e(565),"5250978IBLHHK","2968388TUhYeT",e(236),e(537),e(200),e(158),e(317),e(780),e(677)];return(La=function(){return t})()}const n2=Na;function Na(e,t){const n=Ma();return(Na=function(r,i){return n[r-=466]})(e,t)}(function(){var e=R;const t=Na,n=Ma();for(;;)try{if(parseInt(t(475))/1+parseInt(t(466))/2*(-parseInt(t(472))/3)+parseInt(t(471))/4+-parseInt(t(467))/5*(parseInt(t(473))/6)+parseInt(t(474))/7*(-parseInt(t(469))/8)+-parseInt(t(470))/9*(-parseInt(t(477))/10)+-parseInt(t(476))/11==221555)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();const r2={environment:Ea[n2(468)],version:R(611)};function Ma(){var e=R;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(Ma=function(){return t})()}function Da(){var e=R;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(Da=function(){return t})()}function Af(e,t){const n=Da();return(Af=function(r,i){return n[r-=155]})(e,t)}(function(){var e=R;const t=Af,n=Da();for(;;)try{if(parseInt(t(162))/1*(parseInt(t(155))/2)+parseInt(t(157))/3+-parseInt(t(159))/4+parseInt(t(160))/5*(-parseInt(t(163))/6)+-parseInt(t(158))/7*(parseInt(t(164))/8)+parseInt(t(161))/9*(parseInt(t(156))/10)+parseInt(t(165))/11==451934)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})();let Fa=r2;const Un=()=>Fa,i2=Ua;function Ua(e,t){const n=Ba();return(Ua=function(r,i){return n[r-=379]})(e,t)}(function(){var e=R;const t=Ua,n=Ba();for(;;)try{if(parseInt(t(384))/1+-parseInt(t(389))/2+-parseInt(t(383))/3*(-parseInt(t(387))/4)+parseInt(t(388))/5+-parseInt(t(381))/6*(parseInt(t(385))/7)+-parseInt(t(382))/8+parseInt(t(379))/9*(parseInt(t(386))/10)==645524)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();const kf=(e,t)=>e[i2(380)](new RegExp(t+"$"),"");function Ba(){var e=R;const t=[e(306),e(288),e(372),e(155),e(232),e(632),"83594fyhqnZ",e(730),e(399),"3139375mafbsW",e(607)];return(Ba=function(){return t})()}const fi=Va;function $a(){var e=R;const t=[e(535),e(602),e(582),e(266),e(416),e(172),"11uyatGf",e(402),e(269),"6nfgxja",e(698),e(150),e(219),"domians",e(363),e(790),e(720),e(501),e(215)];return($a=function(){return t})()}function Va(e,t){const n=$a();return(Va=function(r,i){return n[r-=110]})(e,t)}(function(){var e=R;const t=Va,n=$a();for(;;)try{if(parseInt(t(124))/1+-parseInt(t(128))/2+parseInt(t(119))/3*(parseInt(t(127))/4)+parseInt(t(111))/5*(parseInt(t(117))/6)+parseInt(t(112))/7*(-parseInt(t(118))/8)+parseInt(t(120))/9*(-parseInt(t(125))/10)+parseInt(t(114))/11*(parseInt(t(110))/12)==961663)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();class ko{static get[fi(113)](){const t=fi;return kf(hr[t(121)][t(123)][Un()[t(126)]],"/")}static get[fi(116)](){const t=fi;return kf(hr[t(121)][t(122)][Un()[t(126)]],"/")}static[R(241)](t,n,r){var i=R;const o=fi,s=t2[i(406)](r??{}),a=Un(),c=s?n[i(636)]("?")?"&":"?":"";return ko[o(113)]+"/"+t+"/"+a[o(115)]+"/"+n+c+s}}var za=ja;function Ha(){var e=R,t=[e(559),e(634),e(630),e(739),e(548),e(503),e(436),e(480),e(404),"1042584XPmVvk",e(172),e(473),e(289),e(745),"json",e(795),"2166WIGGYn",e(438),e(385),e(606),e(629),"173LKkRgC",e(391),e(498),e(282),e(614),e(710),e(247),e(621),e(255),"14XmrYdp",e(182),e(735),e(504),"Bearer ",e(697),e(694),e(474),"abort","defineProperty",e(321),e(680),e(496),e(587),e(309),e(344),e(406),e(248),"status",e(542),e(386),"keys",e(586)];return(Ha=function(){return t})()}function ja(e,t){var n=Ha();return(ja=function(r,i){return n[r-=115]})(e,t)}(function(){for(var e=R,t=ja,n=Ha();;)try{if(-parseInt(t(126))/1*(-parseInt(t(121))/2)+-parseInt(t(160))/3*(-parseInt(t(130))/4)+parseInt(t(140))/5*(-parseInt(t(123))/6)+parseInt(t(135))/7*(parseInt(t(167))/8)+-parseInt(t(158))/9+parseInt(t(159))/10+parseInt(t(157))/11==336922)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),za(146),za(164),za(166);var Ro=qa;function qa(e,t){var n=Wa();return(qa=function(r,i){return n[r-=291]})(e,t)}(function(){for(var e=R,t=qa,n=Wa();;)try{if(-parseInt(t(301))/1+parseInt(t(307))/2+-parseInt(t(292))/3*(-parseInt(t(306))/4)+parseInt(t(291))/5+-parseInt(t(314))/6*(-parseInt(t(300))/7)+-parseInt(t(302))/8*(parseInt(t(303))/9)+-parseInt(t(293))/10==616185)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),R(597),Ro(294),R(779),Ro(305),Ro(296),Ro(315);function Wa(){var e=R,t=[e(208),e(302),"336OqQgfm",e(755),e(494),e(423),e(647),"1179086uaDkqa",e(752),"emit","message",e(756),e(190),e(520),e(148),e(546),e(216),e(779),e(450),"listener",e(319),e(654),e(407),e(212),e(162),e(448),e(440),e(525),e(310)];return(Wa=function(){return t})()}function Ga(){var e=R;const t=[e(676),e(331),e(362),"2228304EqXFLn",e(512),e(778),e(387),e(721),e(673),"207AHFLGs",e(376),e(425)];return(Ga=function(){return t})()}function Ka(e,t){const n=Ga();return(Ka=function(r,i){return n[r-=254]})(e,t)}(function(){var e=R;const t=Ka,n=Ga();for(;;)try{if(parseInt(t(257))/1+parseInt(t(260))/2+parseInt(t(254))/3*(-parseInt(t(261))/4)+parseInt(t(262))/5+-parseInt(t(258))/6+parseInt(t(256))/7+-parseInt(t(263))/8*(parseInt(t(264))/9)==716064)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();const Rf=function(e){var t=R;const n=Ka,r=document[t(414)]||document[n(259)];if(!r)throw new Io(It[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=R;const t=Ya,n=Za();for(;;)try{if(parseInt(t(128))/1+parseInt(t(125))/2+-parseInt(t(127))/3+parseInt(t(132))/4+-parseInt(t(131))/5+parseInt(t(133))/6+-parseInt(t(134))/7==688465)break;n.push(n[e(189)]())}catch{n[e(795)](n.shift())}})();const Po=function(e,t){const n=Ya,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,Rf(r)};function Ya(e,t){const n=Za();return(Ya=function(r,i){return n[r-=125]})(e,t)}function Za(){var e=R;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(Za=function(){return t})()}function Ja(){var e=R,t=[e(608),e(186),e(570),e(376),e(652),e(301),"10439181hcqJpc",e(593),e(434),e(441),"createTextNode",e(695),e(250),e(604),"ctr",e(665),e(785),"9136jiXoxV",e(238),e(203),e(324),e(723),e(177),e(278),"insertRule",e(540),"nonce",e(670),"flush",e(767),"forEach","7294661PRwxon",e(774),e(742),e(159),"ownerNode",e(795),e(255),"2555lCYkVH",e(252),e(684),e(481)];return(Ja=function(){return t})()}function Bn(e,t){var n=Ja();return(Bn=function(r,i){return n[r-=379]})(e,t)}(function(){for(var e=R,t=Bn,n=Ja();;)try{if(parseInt(t(413))/1*(-parseInt(t(412))/2)+-parseInt(t(382))/3+-parseInt(t(381))/4*(-parseInt(t(387))/5)+parseInt(t(411))/6+parseInt(t(390))/7*(parseInt(t(408))/8)+parseInt(t(397))/9+-parseInt(t(404))/10*(parseInt(t(380))/11)==960039)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R,t=Bn;function n(i){var o=bt,s=Bn,a=this;this[o(203)]=function(c){var u,l=o,d=Bn;u=a[d(391)][d(386)]===0?a[d(402)]?a[d(402)][d(409)]:a[d(406)]?a[d(389)][d(396)]:a[d(400)]:a[d(391)][a[d(391)][d(386)]-1][l(238)],a[d(389)][d(414)](c,u),a[d(391)][d(385)](c)},this[s(403)]=i[s(383)]===void 0||i[s(383)],this[s(391)]=[],this.ctr=0,this[s(417)]=i[o(318)],this[s(398)]=i[s(398)],this[s(389)]=i[o(684)],this[s(406)]=i[s(406)],this[s(402)]=i[s(402)],this.before=null}var r=n[e(332)];r[t(407)]=function(i){var o=e;i[t(379)](this[o(203)])},r[e(258)]=function(i){var o,s,a,c=e,u=t;this[u(405)]%(this[u(403)]?65e3:1)==0&&this[u(410)]((o=this,s=Bn,(a=document[s(416)](c(156)))[s(399)](s(420),o[s(398)]),o[s(417)]!==void 0&&a[c(434)](c(318),o[c(318)]),a[s(394)](document[s(401)]("")),a[s(399)](s(388),""),a));var l=this[c(608)][this[u(391)][u(386)]-1];if(this[u(403)]){var d=(function(f){var h=c,p=Bn;if(f[p(392)])return f.sheet;for(var g=0;g<document[p(395)][p(386)];g++)if(document[p(395)][g][p(384)]===f)return document[h(652)][g]})(l);try{d[u(415)](i,d[u(418)][u(386)])}catch{}}else l[u(394)](document[c(550)](i));this.ctr++},r[t(419)]=function(){var i=e,o=t;this[o(391)][i(629)]((function(s){var a,c=o;return(a=s.parentNode)==null?void 0:a[c(393)](s)})),this[o(391)]=[],this[i(397)]=0}})();var At=Xa;function Xa(e,t){var n=Qa();return(Xa=function(r,i){return n[r-=110]})(e,t)}function Qa(){var e=R,t=[e(196),"152336OQhHhe",e(420),e(492),e(783),e(770),e(349),e(204),e(598),e(178),e(401),e(650),"4724nuSFUK",e(439),e(736),"@page",e(613),e(619),e(443),"@layer",e(174)];return(Qa=function(){return t})()}(function(){for(var e=R,t=Xa,n=Qa();;)try{if(-parseInt(t(119))/1+-parseInt(t(123))/2*(-parseInt(t(124))/3)+-parseInt(t(129))/4*(parseInt(t(122))/5)+-parseInt(t(114))/6+-parseInt(t(115))/7+parseInt(t(112))/8+parseInt(t(117))/9==198272)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),R(648),At(121),R(700),R(600),At(113),At(126),At(116),At(118),At(110),At(111),At(120),At(128),At(125),At(127),At(130);var ec=tc;function tc(e,t){var n=nc();return(tc=function(r,i){return n[r-=258]})(e,t)}function nc(){var e=R,t=[e(347),e(371),e(260),e(288),e(227),e(409),e(255),e(795),e(246),"10opKczI","charCodeAt",e(733),e(377),e(428),e(738),e(281),e(296),e(510),e(381),e(464),"3836294AMJKLE"];return(nc=function(){return t})()}function rc(){var e=R,t=[e(327),e(255),e(566),e(334),e(323),"14ejudnZ",e(201),"862542dyuBTR",e(552),"401898SBLqqH",e(184),e(705)];return(rc=function(){return t})()}function Pf(e,t){var n=rc();return(Pf=function(r,i){return n[r-=123]})(e,t)}function Of(e,t){var n=ic();return(Of=function(r,i){return n[r-=435]})(e,t)}function ic(){var e=R,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(ic=function(){return t})()}function oc(){var e=R,t=[e(458),"2134996QawHcC","return",e(693),e(558),"15490080Hutsfa",e(496),e(228),e(216),e(346),e(255),"1837002hgOqZq",e(531),e(516),e(484),"join"];return(oc=function(){return t})()}function Lf(e,t){var n=oc();return(Lf=function(r,i){return n[r-=147]})(e,t)}function Nf(e,t){var n=sc();return(Nf=function(r,i){return n[r-=398]})(e,t)}function sc(){var e=R,t=[e(551),"input-$1",e(273),e(468),"root",e(749),e(287),e(567),e(772),e(549),e(716),e(346),"global",e(229),e(294),"1314449boGmmT",e(527),"4549375QrRZcY",e(265),"type"];return(sc=function(){return t})()}function ac(){var e=R,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(ac=function(){return t})()}function Mf(e,t){var n=ac();return(Mf=function(r,i){return n[r-=484]})(e,t)}function cc(e,t){var n=uc();return(cc=function(r,i){return n[r-=236]})(e,t)}function uc(){var e=R,t=[e(584),"953666lBllkt",e(564),"48PHUuVy",e(437),e(214),e(627),e(149),e(272),e(307),e(483),e(800),e(370)];return(uc=function(){return t})()}(function(){for(var e=R,t=tc,n=nc();;)try{if(-parseInt(t(259))/1*(parseInt(t(278))/2)+-parseInt(t(276))/3*(-parseInt(t(271))/4)+-parseInt(t(274))/5*(-parseInt(t(264))/6)+-parseInt(t(258))/7+-parseInt(t(263))/8+parseInt(t(261))/9*(-parseInt(t(268))/10)+parseInt(t(260))/11==402046)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),Math[ec(275)],String[ec(272)],Object[ec(273)],(function(){for(var e=R,t=Pf,n=rc();;)try{if(-parseInt(t(132))/1*(parseInt(t(123))/2)+-parseInt(t(125))/3+parseInt(t(129))/4+parseInt(t(134))/5*(parseInt(t(127))/6)+parseInt(t(126))/7*(parseInt(t(133))/8)+-parseInt(t(124))/9*(-parseInt(t(130))/10)+-parseInt(t(128))/11==366270)break;n[e(795)](n.shift())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=R,t=Of,n=ic();;)try{if(parseInt(t(439))/1+parseInt(t(443))/2*(parseInt(t(442))/3)+parseInt(t(441))/4*(parseInt(t(440))/5)+parseInt(t(438))/6+-parseInt(t(436))/7+parseInt(t(435))/8+-parseInt(t(437))/9==637765)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=R,t=Lf,n=oc();;)try{if(-parseInt(t(158))/1+-parseInt(t(150))/2+parseInt(t(149))/3+-parseInt(t(155))/4*(-parseInt(t(151))/5)+-parseInt(t(152))/6+-parseInt(t(161))/7*(-parseInt(t(157))/8)+parseInt(t(159))/9==746841)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Nf,n=sc();;)try{if(parseInt(t(398))/1+-parseInt(t(409))/2*(-parseInt(t(413))/3)+parseInt(t(405))/4+parseInt(t(400))/5+-parseInt(t(403))/6*(-parseInt(t(408))/7)+-parseInt(t(412))/8*(-parseInt(t(416))/9)+-parseInt(t(417))/10==921092)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})(),(function(){for(var e=R,t=Mf,n=ac();;)try{if(parseInt(t(484))/1+-parseInt(t(485))/2*(-parseInt(t(490))/3)+parseInt(t(488))/4+parseInt(t(489))/5+parseInt(t(492))/6+-parseInt(t(486))/7*(parseInt(t(487))/8)+-parseInt(t(491))/9==521840)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){for(var e=R,t=cc,n=uc();;)try{if(parseInt(t(246))/1*(parseInt(t(239))/2)+parseInt(t(248))/3*(-parseInt(t(241))/4)+parseInt(t(244))/5+-parseInt(t(236))/6*(parseInt(t(247))/7)+-parseInt(t(242))/8*(parseInt(t(243))/9)+-parseInt(t(238))/10+parseInt(t(237))/11*(parseInt(t(240))/12)==600322)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})();var o2=lc;function lc(e,t){var n=dc();return(lc=function(r,i){return n[r-=373]})(e,t)}function dc(){var e=R,t=[e(485),e(252),e(684),e(523),"column",e(337),e(515),e(275),e(159),e(366),e(332),e(312),e(197),e(265),e(321),e(601),e(752),e(603),"$2-$3",e(258),e(534),e(376),e(769),e(254),e(392),e(788),e(216),e(521),e(295),e(267),e(255),"preferred-size",e(629),"line",e(181),e(797),e(593),e(330),e(288),"compat",e(595),e(186),e(767),e(384),e(508),e(339),"prepend","push",e(503),e(496),e(472),e(276),'style[data-emotion^="',e(695),e(346),e(213),e(789),e(715),"head",e(567),"448GdQtAv",e(600),e(711),e(262),e(509),e(434),"flex-",e(626),e(318),e(389),e(560),e(468),e(463),e(431),e(781),"indexOf",e(618),e(207),e(640)];return(dc=function(){return t})()}function fc(){var e=R,t=[e(320),e(388),e(405),e(579),"35AIBzSb",e(534),e(505),e(411),"1274024Vuuviq","length",e(572),e(478)];return(fc=function(){return t})()}function Df(e,t){var n=fc();return(Df=function(r,i){return n[r-=484]})(e,t)}function Ff(e,t){var n=pc();return(Ff=function(r,i){return n[r-=106]})(e,t)}function pc(){var e=R,t=[e(526),e(340),e(765),e(703),e(487),e(489),e(146),e(639),e(729),e(664)];return(pc=function(){return t})()}(function(){for(var e=R,t=lc,n=dc();;)try{if(parseInt(t(444))/1+parseInt(t(411))/2*(-parseInt(t(397))/3)+-parseInt(t(442))/4*(-parseInt(t(410))/5)+parseInt(t(416))/6+parseInt(t(394))/7*(-parseInt(t(375))/8)+parseInt(t(409))/9*(parseInt(t(373))/10)+-parseInt(t(377))/11*(parseInt(t(426))/12)==928149)break;n.push(n.shift())}catch{n[e(795)](n[e(189)]())}})(),o2(387),(function(){for(var e=R,t=Df,n=fc();;)try{if(-parseInt(t(487))/1+parseInt(t(489))/2+-parseInt(t(495))/3*(parseInt(t(484))/4)+-parseInt(t(492))/5*(parseInt(t(493))/6)+parseInt(t(485))/7*(-parseInt(t(494))/8)+-parseInt(t(488))/9+parseInt(t(491))/10==772143)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Ff,n=pc();;)try{if(-parseInt(t(106))/1*(-parseInt(t(114))/2)+parseInt(t(115))/3*(parseInt(t(107))/4)+parseInt(t(112))/5+parseInt(t(110))/6+parseInt(t(108))/7+parseInt(t(109))/8+parseInt(t(113))/9*(-parseInt(t(111))/10)==797311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})();var Uf=gc;function hc(){var e=R,t=["animationName","2256550Ipcodt",e(173),"compiler transform.",e(746),e(462),e(288),e(801),e(211),e(500),e(255),"number",e(791),"NO_COMPONENT_SELECTOR","1182279EAtwWa",e(682),e(321),"1304688UcogLI",e(247),"string",e(569),"styles","45ISzOCs",e(246),e(777),e(167),e(672)];return(hc=function(){return t})()}(function(){for(var e=R,t=gc,n=hc();;)try{if(-parseInt(t(249))/1+-parseInt(t(242))/2+parseInt(t(250))/3+parseInt(t(258))/4+-parseInt(t(248))/5*(parseInt(t(256))/6)+-parseInt(t(255))/7+parseInt(t(261))/8*(parseInt(t(236))/9)==662021)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();function gc(e,t){var n=hc();return(gc=function(r,i){return n[r-=236]})(e,t)}function Bf(e,t){var n=mc();return(Bf=function(r,i){return n[r-=142]})(e,t)}function mc(){var e=R,t=[e(368),e(305),"registered",e(262),"styles",e(255),e(374),e(629),e(633),e(615),e(663),e(753),e(275),e(802),"push",e(593),e(321),e(491),e(258),e(666)];return(mc=function(){return t})()}function vc(){var e=R,t=[e(578),e(321),e(258),e(629),e(255),e(449),e(250),e(333),e(502),"bind",e(573),"281145OZnPDr",e(547),"3uNmnOL",e(159),e(186),e(291),e(275),e(476),e(593),e(365),e(173),e(515),e(753),"6198910frrjDN",e(413),e(300),"animation-",e(195),e(599),"object"];return(vc=function(){return t})()}function $f(e,t){var n=vc();return($f=function(r,i){return n[r-=250]})(e,t)}Object[cc(245)](null),Uf(246),R(408),Uf(244),(function(){for(var e=R,t=Bf,n=mc();;)try{if(-parseInt(t(146))/1+-parseInt(t(155))/2+-parseInt(t(144))/3+-parseInt(t(157))/4+parseInt(t(156))/5*(parseInt(t(149))/6)+parseInt(t(153))/7*(parseInt(t(142))/8)+parseInt(t(145))/9==509549)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=$f,n=vc();;)try{if(parseInt(t(274))/1*(-parseInt(t(253))/2)+-parseInt(t(258))/3*(-parseInt(t(270))/4)+parseInt(t(256))/5*(parseInt(t(273))/6)+parseInt(t(250))/7+-parseInt(t(276))/8*(parseInt(t(261))/9)+parseInt(t(269))/10*(parseInt(t(263))/11)+-parseInt(t(257))/12==769621)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const fe=wc;function yc(){var e=R;const t=[e(191),e(751),"toCamelCase",e(446),e(325),e(210),"toPascalCase",e(284),e(154),e(726),e(288),e(617),e(768),e(343),e(394),"4804168lIEQdb",e(410),e(539),e(430),e(678),e(353),"_lowerCase",e(596),e(733),e(518),"charAt",e(687),e(527),e(262),"42wLrOPC",e(285),"toLowerCase",e(470),e(514)];return(yc=function(){return t})()}function Vf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(){var e=R;const t=wc,n=yc();for(;;)try{if(-parseInt(t(224))/1+parseInt(t(230))/2+-parseInt(t(242))/3*(parseInt(t(238))/4)+-parseInt(t(236))/5+-parseInt(t(228))/6*(-parseInt(t(252))/7)+-parseInt(t(240))/8+parseInt(t(227))/9==959733)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n.shift())}})();class bc{static[fe(241)](t,n=!1){const r=fe;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[R(429)](t,n=!1){var r=R;const i=fe;return n?this[i(244)](t)[i(233)](/ /g," "):t[r(429)]()}static[R(741)](t){const n=fe;return this[n(249)](n(241))(t)}static[fe(234)](t){const n=fe;return this[n(249)](n(220))(t)}static[fe(225)](t){var n=R;const r=fe;return this[r(239)](t)[n(527)](((i,o)=>o===0?i[n(429)]():this[r(222)](i[r(220)]())))[r(253)]("")}static[fe(229)](t){var n=R;const r=fe;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[fe(243)](t){const n=fe;return this[n(239)](t)[n(253)]("-")}static[R(761)](t){const n=fe;return this[R(410)](t)[n(253)]("_")}static[fe(245)](t){return this[fe(244)](t).replace(/ /g,".")}static[fe(221)](t){const n=fe;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=fe;return this[n(244)](t)[n(233)](/ /g,"-")}static[fe(237)](t){return this[fe(239)](t)}static[fe(239)](t){const n=fe;return t[n(233)](/([a-z])([A-Z])/g,n(231))[n(233)](/[\s_-]+/g," ")[n(220)]()[n(247)](/[a-zà-öø-ÿ0-9]+/gi)||[]}static[R(538)](t){var n=R;const r=fe;return this[r(239)](t)[n(527)]((i=>i[r(220)]()))[r(253)](" ")}static[fe(222)](t){const n=fe;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=fe;return this[R(410)](t)[n(250)]((r=>this[n(222)](r)))[n(253)](" ")}}function wc(e,t){const n=yc();return(wc=function(r,i){return n[r-=220]})(e,t)}Vf(bc,R(748),((e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:i=fe(223)}={splitChar:" ",joinChar:" ",to:fe(223)})=>{const o=fe,s=e!==void 0?e[o(226)]():"";return s?t?bc[o(235)](s):s[o(251)](n).map((a=>{var c=bt;const u=o;return i===u(232)?a[u(248)](0)[c(571)]()+a[u(246)](1)[c(429)]():a[u(248)](0).toUpperCase()+a[u(246)](1)[u(220)]()}))[o(253)](r):""})),Vf(bc,fe(249),(e=>t=>{var n=R;const r=fe;if(!t)return"";const i=t[r(246)](0,1),o=t[r(246)](1);return i[e]!==void 0&&n(672)==typeof i[e]?i[e]()+o:t}));const s2=Ec;function Ec(e,t){const n=Sc();return(Ec=function(r,i){return n[r-=328]})(e,t)}function bt(e,t){var n=ya();return(bt=function(r,i){return n[r-=141]})(e,t)}function Sc(){var e=R;const t=[e(460),e(638),"pascal",e(620),e(152),e(353),"object",e(796),e(719),e(761),e(536),e(222),e(758),e(356),e(747),e(704),e(527),e(194),e(681),e(561)];return(Sc=function(){return t})()}(function(){var e=R;const t=Ec,n=Sc();for(;;)try{if(parseInt(t(337))/1*(parseInt(t(342))/2)+-parseInt(t(329))/3+parseInt(t(346))/4+parseInt(t(345))/5+-parseInt(t(341))/6+-parseInt(t(333))/7*(-parseInt(t(339))/8)+-parseInt(t(330))/9==892829)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),R(681),s2(332);function _c(){var e=R;const t=[e(314),e(249),e(764),e(792),"7920680CrCzXO",e(776),"kebab",e(532),e(400),"1889976zPDrSf",e(681),e(165),"574270pCgwUB"];return(_c=function(){return t})()}function zf(e,t){const n=_c();return(zf=function(r,i){return n[r-=199]})(e,t)}function Hf(e,t){const n=Cc();return(Hf=function(r,i){return n[r-=310]})(e,t)}function Cc(){var e=R;const t=["strategy","5941134AnJjDR",e(435),"REQUIRED",e(403),e(298),e(507),e(277),e(304),e(185),e(217),"168yAApGZ","210166RwrXjV",e(288),"replacer",e(660),e(341),e(431),e(422),e(497),"parameters.search"];return(Cc=function(){return t})()}function jf(e,t){const n=Tc();return(jf=function(r,i){return n[r-=245]})(e,t)}function Tc(){var e=R;const t=[e(757),e(288),"749930AnkLQM",e(345),e(475),e(244),e(395),e(316),"77UAdnad",e(161),e(245),e(446),e(286),e(725)];return(Tc=function(){return t})()}function Ic(){var e=R;const t=[e(235),e(583),e(580),e(224),e(355),e(787),e(653),e(256),e(612),"90faVQnR",e(486)];return(Ic=function(){return t})()}function qf(e,t){const n=Ic();return(qf=function(r,i){return n[r-=199]})(e,t)}function xc(){var e=R;const t=["location",e(728),e(574),"2xpcQKU","push","768628jYCGxS",e(756),"24FLVsmp",e(752),e(293),"978200aOzrna",e(488),"63KlvtSY",e(277),e(553),e(231),e(679),e(336),e(507),e(422),e(527)];return(xc=function(){return t})()}function Wf(e,t){const n=xc();return(Wf=function(r,i){return n[r-=482]})(e,t)}function Ac(e,t){const n=kc();return(Ac=function(r,i){return n[r-=252]})(e,t)}function kc(){var e=R;const t=[e(759),e(605),e(261),e(585),e(790),e(383),e(637),"104DOhoZO","preconnect",e(215),e(175),"5jiSoDi",e(658)];return(kc=function(){return t})()}(function(){var e=R;const t=zf,n=_c();for(;;)try{if(parseInt(t(206))/1*(-parseInt(t(208))/2)+-parseInt(t(199))/3*(parseInt(t(210))/4)+parseInt(t(204))/5+-parseInt(t(201))/6+-parseInt(t(200))/7+parseInt(t(209))/8+parseInt(t(205))/9==606311)break;n[e(795)](n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=R;const t=Hf,n=Cc();for(;;)try{if(parseInt(t(317))/1*(-parseInt(t(321))/2)+-parseInt(t(314))/3*(parseInt(t(319))/4)+parseInt(t(325))/5*(-parseInt(t(310))/6)+-parseInt(t(313))/7*(-parseInt(t(320))/8)+-parseInt(t(324))/9+parseInt(t(328))/10+parseInt(t(311))/11==808336)break;n.push(n[e(189)]())}catch{n.push(n[e(189)]())}})(),(function(){var e=R;const t=jf,n=Tc();for(;;)try{if(-parseInt(t(252))/1+-parseInt(t(249))/2*(-parseInt(t(257))/3)+parseInt(t(254))/4+-parseInt(t(253))/5*(-parseInt(t(258))/6)+parseInt(t(246))/7+-parseInt(t(245))/8*(parseInt(t(250))/9)+-parseInt(t(256))/10*(parseInt(t(248))/11)==300232)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=qf,n=Ic();for(;;)try{if(-parseInt(t(200))/1*(parseInt(t(203))/2)+parseInt(t(209))/3+parseInt(t(202))/4+-parseInt(t(206))/5*(parseInt(t(201))/6)+-parseInt(t(199))/7*(parseInt(t(208))/8)+parseInt(t(207))/9*(parseInt(t(205))/10)+parseInt(t(204))/11==198596)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=Wf,n=xc();for(;;)try{if(parseInt(t(488))/1+-parseInt(t(497))/2*(parseInt(t(496))/3)+-parseInt(t(501))/4*(parseInt(t(487))/5)+-parseInt(t(482))/6+parseInt(t(499))/7+-parseInt(t(495))/8+-parseInt(t(485))/9*(-parseInt(t(483))/10)==155517)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})(),(function(){var e=R;const t=Ac,n=kc();for(;;)try{if(parseInt(t(254))/1+parseInt(t(257))/2+parseInt(t(260))/3+-parseInt(t(252))/4*(-parseInt(t(253))/5)+-parseInt(t(258))/6+parseInt(t(256))/7+parseInt(t(262))/8*(-parseInt(t(261))/9)==402722)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})(),(function(){var e=R;const t=Rc,n=Pc();for(;;)try{if(parseInt(t(397))/1*(-parseInt(t(389))/2)+-parseInt(t(394))/3*(parseInt(t(383))/4)+parseInt(t(391))/5+-parseInt(t(384))/6*(-parseInt(t(388))/7)+parseInt(t(382))/8*(-parseInt(t(393))/9)+parseInt(t(386))/10+parseInt(t(392))/11==453357)break;n[e(795)](n.shift())}catch{n[e(795)](n[e(189)]())}})();function Rc(e,t){const n=Pc();return(Rc=function(r,i){return n[r-=382]})(e,t)}function Pc(){var e=R;const t=[e(581),e(589),e(702),e(759),"api","9885ktAjwX","515144gJwABd",e(461),e(352),e(455),e(709),"environment",e(782),e(360),e(790),e(609)];return(Pc=function(){return t})()}function Oc(e,t){const n=Lc();return(Oc=function(r,i){return n[r-=188]})(e,t)}function Lc(){var e=R;const t=[e(513),e(744),e(230),e(151),e(354),e(170),e(638),"42ZfbLkm",e(529),e(527),"length",e(656),e(793),e(328),e(479),e(737),"84AZtHRP"];return(Lc=function(){return t})()}(function(){var e=R;const t=Oc,n=Lc();for(;;)try{if(parseInt(t(200))/1*(-parseInt(t(191))/2)+parseInt(t(195))/3*(-parseInt(t(193))/4)+-parseInt(t(196))/5*(parseInt(t(192))/6)+-parseInt(t(188))/7+-parseInt(t(203))/8+-parseInt(t(190))/9*(parseInt(t(189))/10)+parseInt(t(202))/11*(parseInt(t(204))/12)==863321)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const Oo=Nc;function Nc(e,t){const n=Mc();return(Nc=function(r,i){return n[r-=135]})(e,t)}(function(){var e=R;const t=Nc,n=Mc();for(;;)try{if(-parseInt(t(139))/1*(parseInt(t(147))/2)+-parseInt(t(142))/3+-parseInt(t(140))/4+-parseInt(t(143))/5*(-parseInt(t(148))/6)+parseInt(t(137))/7*(parseInt(t(141))/8)+-parseInt(t(138))/9+-parseInt(t(136))/10*(-parseInt(t(145))/11)==902131)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})();const a2={environment:e=>typeof e===Oo(146)&&/^(sandbox|production)$/[R(690)](e),version:e=>e===Oo(144)||typeof e===Oo(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[Oo(135)](e)},c2=e=>{var t;((n,r)=>{var i=R;const o=Oc;if(n&&r){const s=Object[i(359)](n)[i(422)]((a=>!r[o(194)](a)||r[a]===void 0||!n[a](r[a])))[o(197)]((a=>new Io(It[o(201)],a,!0)));if(s[o(198)]){const[a]=s;throw a}}})(a2,e),(t=e)&&(Fa=Object.assign({},Fa,t))};function Mc(){var e=R;const t=[e(591),e(576),e(611),"4202RbmDMY",e(445),e(727),e(517),e(690),e(624),e(292),e(717),e(299),"1611912xHkDlR",e(452)];return(Mc=function(){return t})()}function Dc(){var e=R;const t=[e(379),e(380),e(686),e(522),"248VddyCN","1828569LfJoFC","11940faSemP",e(661),e(482),"9YYlhsV",e(457),e(651),e(375),e(255),e(641),e(160)];return(Dc=function(){return t})()}(function(){var e=R;const t=Fc,n=Dc();for(;;)try{if(-parseInt(t(271))/1*(-parseInt(t(278))/2)+-parseInt(t(275))/3+-parseInt(t(274))/4*(-parseInt(t(266))/5)+-parseInt(t(280))/6*(-parseInt(t(272))/7)+parseInt(t(277))/8*(-parseInt(t(279))/9)+parseInt(t(269))/10*(-parseInt(t(270))/11)+-parseInt(t(276))/12*(-parseInt(t(268))/13)==356241)break;n[e(795)](n.shift())}catch{n[e(795)](n.shift())}})();function Fc(e,t){const n=Dc();return(Fc=function(r,i){return n[r-=266]})(e,t)}function Uc(){var e=R;const t=[e(422),e(530),e(338),e(202),"push",e(183),e(740),e(763),"137247nsOmnY",e(544),e(554),e(628),e(297),e(555)];return(Uc=function(){return t})()}function Gf(e,t){const n=Uc();return(Gf=function(r,i){return n[r-=169]})(e,t)}function Kf(e,t){var n=Bc();return(Kf=function(r,i){return n[r-=337]})(e,t)}function Bc(){var e=R,t=[e(466),e(762),e(255),e(548),e(391),e(557),e(277),e(706),"2051dwZdDh",e(199),e(503),e(342),e(422),"182295YeOYne",e(382),e(575),e(520),e(629),"apply","40247440IrIkgT",e(672),"push","getOwnPropertyDescriptors","indexOf",e(326),e(359)];return(Bc=function(){return t})()}function $c(){var e=R,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return($c=function(){return t})()}function Yf(e,t){var n=$c();return(Yf=function(r,i){return n[r-=171]})(e,t)}function Vc(){var e=["INVALID","UNHANDLED","HTTP","UNAUTHORIZED","13163230kGdpsc","856juyAkB","TIMEOUT","350256uPlzjN","5054ruXNQI","2450577zCNjjI","2339148NeQscF","REQUEST_TIMEOUT","REQUIRED","BAD_REQUEST","60389xcocgx","11tPlygx","NOT_FOUND","301vJXIvb","UNABLE_TO_FIND","NOT_LOADED","6497910YprBBF","40ngIbUX","UNDEFINED"];return(Vc=function(){return e})()}var Lo,wn,kt,Zf,wt,En,Jf,Xf,No,Qf,zc,Mo;function Do(e,t){var n=Vc();return(Do=function(r,i){return n[r-=335]})(e,t)}function Hc(e,t){var n=jc();return(Hc=function(r,i){return n[r-=341]})(e,t)}function jc(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(jc=function(){return e})()}function qc(e,t){var n=Wc();return(qc=function(r,i){return n[r-=235]})(e,t)}function Wc(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(Wc=function(){return e})()}function Gc(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(Gc=function(){return e})()}function ep(e,t){var n=Gc();return(ep=function(r,i){return n[r-=366]})(e,t)}function Fo(e,t){const n=Kc();return(Fo=function(r,i){return n[r-=152]})(e,t)}(function(){var e=R;const t=Gf,n=Uc();for(;;)try{if(-parseInt(t(172))/1*(-parseInt(t(174))/2)+parseInt(t(179))/3+parseInt(t(177))/4*(-parseInt(t(173))/5)+-parseInt(t(182))/6*(-parseInt(t(181))/7)+parseInt(t(169))/8+-parseInt(t(170))/9+parseInt(t(178))/10*(-parseInt(t(180))/11)==757080)break;n[e(795)](n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Kf,n=Bc();;)try{if(parseInt(t(355))/1+parseInt(t(342))/2*(parseInt(t(357))/3)+parseInt(t(338))/4+-parseInt(t(362))/5+parseInt(t(340))/6*(parseInt(t(339))/7)+parseInt(t(358))/8*(parseInt(t(344))/9)+-parseInt(t(350))/10==959569)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=R,t=Yf,n=$c();;)try{if(-parseInt(t(172))/1+-parseInt(t(175))/2*(-parseInt(t(173))/3)+parseInt(t(174))/4+-parseInt(t(177))/5+-parseInt(t(171))/6*(-parseInt(t(180))/7)+-parseInt(t(178))/8*(parseInt(t(179))/9)+parseInt(t(176))/10==940869)break;n.push(n[e(189)]())}catch{n[e(795)](n[e(189)]())}})(),(function(){for(var e=Do,t=Vc();;)try{if(parseInt(e(336))/1*(-parseInt(e(350))/2)+-parseInt(e(351))/3+parseInt(e(352))/4+parseInt(e(340))/5*(parseInt(e(349))/6)+parseInt(e(356))/7*(-parseInt(e(347))/8)+parseInt(e(339))/9+-parseInt(e(346))/10*(-parseInt(e(357))/11)===589533)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(wn=Lo||(Lo={}))[(kt=Do)(354)]="REQUIRED",wn[kt(341)]=kt(341),wn[kt(337)]="UNABLE_TO_FIND",wn.NOT_LOADED=kt(338),wn[kt(342)]=kt(342),wn.HTTP=kt(344),wn[kt(348)]=kt(348),wn[kt(343)]=kt(343),wt=Zf||(Zf={}),En=Do,wt[wt.OK=200]="OK",wt[wt[En(355)]=400]=En(355),wt[wt[En(335)]=404]=En(335),wt[wt.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",wt[wt[En(353)]=408]=En(353),wt[wt.UNAUTHORIZED=401]=En(345),(function(){for(var e=Hc,t=jc();;)try{if(parseInt(e(345))/1+-parseInt(e(344))/2+-parseInt(e(351))/3+parseInt(e(347))/4+-parseInt(e(350))/5*(-parseInt(e(346))/6)+parseInt(e(343))/7+parseInt(e(348))/8===704730)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(Xf=Jf||(Jf={}))[(No=Hc)(349)]=No(342),Xf[No(352)]=No(341),(function(){for(var e=qc,t=Wc();;)try{if(-parseInt(e(236))/1+-parseInt(e(248))/2+parseInt(e(243))/3*(parseInt(e(245))/4)+parseInt(e(242))/5*(-parseInt(e(239))/6)+parseInt(e(237))/7*(-parseInt(e(244))/8)+parseInt(e(246))/9+-parseInt(e(238))/10*(-parseInt(e(241))/11)===902110)break;t.push(t.shift())}catch{t.push(t.shift())}})(),zc=Qf||(Qf={}),Mo=qc,zc.PRODUCTION=Mo(240),zc[Mo(235)]=Mo(247),(function(){for(var e=ep,t=Gc();;)try{if(-parseInt(e(368))/1*(-parseInt(e(376))/2)+-parseInt(e(371))/3*(parseInt(e(367))/4)+parseInt(e(374))/5*(parseInt(e(373))/6)+parseInt(e(370))/7*(parseInt(e(372))/8)+-parseInt(e(366))/9+-parseInt(e(377))/10*(-parseInt(e(378))/11)+-parseInt(e(369))/12*(parseInt(e(375))/13)===152250)break;t.push(t.shift())}catch{t.push(t.shift())}})(),(function(){const e=Fo,t=Kc();for(;;)try{if(-parseInt(e(166))/1*(parseInt(e(155))/2)+parseInt(e(157))/3+parseInt(e(164))/4+-parseInt(e(159))/5+parseInt(e(158))/6*(parseInt(e(168))/7)+parseInt(e(165))/8*(-parseInt(e(152))/9)+parseInt(e(154))/10===424938)break;t.push(t.shift())}catch{t.push(t.shift())}})();const u2=()=>new Promise(((e,t)=>{const n=Fo;if(((r=ko[R(172)])=>{const i=Fc;try{return document.querySelectorAll(i(273)+r+i(281))[i(267)]>0}catch{return!1}})()&&window[n(153)])e(window[n(153)]);else if(!window[n(153)]){const r=(()=>{const i=Fo,o=document.createElement(i(161));return o.src=ko.getFullCdn(i(156),i(163)),Rf(o),o})();return r.onload=()=>{const i=n;window[i(153)]?e(window.APTokenizer):t(new Io(Lo[i(167)],i(160),!0))},void(r[n(162)]=()=>t(new Io(Lo[n(169)],"SCRIPT",!0)))}}));function Kc(){const e=["31456JYMHzf","928wCafiN","156wRIJHE","UNDEFINED","2317DECIua","NOT_LOADED","62802oYTinX","APTokenizer","20534150rAmYXS","8482vGJDwh","tokenizer-sdk","793641JyeeYi","2676hrMTeo","2887350YWJLUu","Astropay Web Tokenizer","script","onerror","astropay-tokenizer.min.js"];return(Kc=function(){return e})()}var Yc=cn;function tp(e,t,n,r,i,o,s){var a=cn;try{var c=e[o](s),u=c[a(293)]}catch(l){return void n(l)}c[a(304)]?t(u):Promise.resolve(u)[a(303)](r,i)}(function(){for(var e=cn,t=Zc();;)try{if(-parseInt(e(297))/1+-parseInt(e(301))/2*(parseInt(e(302))/3)+parseInt(e(292))/4+parseInt(e(305))/5+-parseInt(e(300))/6+parseInt(e(295))/7*(parseInt(e(294))/8)+parseInt(e(306))/9*(parseInt(e(298))/10)===667472)break;t.push(t.shift())}catch{t.push(t.shift())}})(),Promise[Yc(308)]()[Yc(303)]((()=>{var e=Yc;typeof window!==e(299)&&!window[e(291)]&&((()=>{const t=Rc;Po(t(385),hr[t(395)][t(390)][Un()[t(387)]]),Po(t(385),hr[t(395)][t(396)][Un()[t(387)]])})(),(()=>{var t=R;const n=Ac;Po(n(263),hr[n(255)][n(259)][Un()[n(264)]]),Po(n(263),hr[n(255)][t(363)][Un()[n(264)]])})())}));const l2=(np=function*(e){c2(e);const t={initRevealer:(n=e)=>{var r,i=cn;return(r=window[i(291)])===null||r===void 0?void 0:r[i(307)](n)},initCollector:(n=e)=>{var r,i=cn;return(r=window[i(291)])===null||r===void 0?void 0:r[i(289)](n)}};return new Promise(((n,r)=>{var i=cn;typeof window!==i(299)?window[i(291)]?n(t):u2()[i(303)]((()=>{n(t)}))[i(296)]((o=>{r(o)})):r(i(290))}))},rp=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=np[cn(309)](e,t);function o(a){tp(i,n,r,o,s,"next",a)}function s(a){tp(i,n,r,o,s,"throw",a)}o(void 0)}))},function(e){return rp[cn(309)](this,arguments)});var np,rp;function cn(e,t){var n=Zc();return(cn=function(r,i){return n[r-=289]})(e,t)}function Zc(){var e=["APTokenizer","4582976tSGCgi","value","373232tEwSlg","63KVvFap","catch","1156122MmdZsQ","142260eHWUOj","undefined","7303908VsgDsd","6URBYWa","276963Gnzkoo","then","done","3355345JCZnlM","684orEnOE","initRevealer","resolve","apply","initCollector","new SDKError(ErrorType.UNDEFINED, 'window', true)"];return(Zc=function(){return e})()}var Jc=function(e,t){return Jc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Jc(e,t)};function rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jc(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var U=function(){return U=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},U.apply(this,arguments)};function Uo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function M(e,t,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(l){try{u(r.next(l))}catch(d){s(d)}}function c(l){try{u(r.throw(l))}catch(d){s(d)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((r=r.apply(e,t||[])).next())})}function N(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(l){u=[6,l],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Q(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >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 ee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function gr(e){return this instanceof gr?(this.v=e,this):new gr(e)}function d2(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),i[Symbol.asyncIterator]=function(){return this},i;function s(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){r[h]&&(i[h]=function(g){return new Promise(function(m,v){o.push([h,g,m,v])>1||c(h,g)})},p&&(i[h]=p(i[h])))}function c(h,p){try{u(r[h](p))}catch(g){f(o[0][3],g)}}function u(h){h.value instanceof gr?Promise.resolve(h.value.v).then(l,d):f(o[0][2],h)}function l(h){c("next",h)}function d(h){c("throw",h)}function f(h,p){h(p),o.shift(),o.length&&c(o[0][0],o[0][1])}}function f2(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Q=="function"?Q(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}typeof SuppressedError=="function"&&SuppressedError;var Sn;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(Sn||(Sn={}));var Mt;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(Mt||(Mt={}));var ip="-",Bo="AMP",p2="".concat(Bo,"_unsent"),op="$default_instance",sp="https://api2.amplitude.com/2/httpapi",h2="https://api.eu.amplitude.com/2/httpapi",g2="https://api2.amplitude.com/batch",m2="https://api.eu.amplitude.com/batch",v2="utm_campaign",y2="utm_content",b2="utm_id",w2="utm_medium",E2="utm_source",S2="utm_term",ap="dclid",cp="fbclid",up="gbraid",lp="gclid",dp="ko_click_id",fp="li_fat_id",pp="msclkid",hp="rdt_cid",gp="ttclid",mp="twclid",vp="wbraid",$o={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},Vo=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],_2=["authorization","cookie","set-cookie"],C2=1e3,Xc=function(e){if(Object.keys(e).length>C2)return!1;for(var t in e){var n=e[t];if(!yp(t,n))return!1}return!0},yp=function(e,t){var n,r;if(typeof e!="string")return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if(typeof a=="object")i=i&&Xc(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(t==null)return!1;if(typeof t=="object")return Xc(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},pi=(function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return U({},this._properties)},e.prototype.set=function(t,n){return this._safeSet(Ee.SET,t,n),this},e.prototype.setOnce=function(t,n){return this._safeSet(Ee.SET_ONCE,t,n),this},e.prototype.append=function(t,n){return this._safeSet(Ee.APPEND,t,n),this},e.prototype.prepend=function(t,n){return this._safeSet(Ee.PREPEND,t,n),this},e.prototype.postInsert=function(t,n){return this._safeSet(Ee.POSTINSERT,t,n),this},e.prototype.preInsert=function(t,n){return this._safeSet(Ee.PREINSERT,t,n),this},e.prototype.remove=function(t,n){return this._safeSet(Ee.REMOVE,t,n),this},e.prototype.add=function(t,n){return this._safeSet(Ee.ADD,t,n),this},e.prototype.unset=function(t){return this._safeSet(Ee.UNSET,t,ip),this},e.prototype.clearAll=function(){return this._properties={},this._properties[Ee.CLEAR_ALL]=ip,this},e.prototype._safeSet=function(t,n,r){if(this._validate(t,n,r)){var i=this._properties[t];return i===void 0&&(i={},this._properties[t]=i),i[n]=r,this._propertySet.add(n),!0}return!1},e.prototype._validate=function(t,n,r){return this._properties[Ee.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:t===Ee.ADD?typeof r=="number":t!==Ee.UNSET&&t!==Ee.REMOVE?yp(n,r):!0},e})(),Ee;(function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"})(Ee||(Ee={}));var T2=[Ee.CLEAR_ALL,Ee.UNSET,Ee.SET,Ee.SET_ONCE,Ee.ADD,Ee.APPEND,Ee.PREPEND,Ee.PREINSERT,Ee.POSTINSERT,Ee.REMOVE],I2="Event tracked successfully",x2="Unexpected error occurred",A2="Event rejected due to exceeded retry count",k2="Event skipped due to optOut config",R2="Event rejected due to missing API key",P2="Invalid API key",O2="Client not initialized",Me;(function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"})(Me||(Me={}));var mr=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Me.Unknown),{event:e,code:t,message:n}},ke=function(){var e="ampIntegrationContext";if(typeof globalThis<"u"&&typeof globalThis[e]<"u")return globalThis[e];if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},L2=function(e){return e?(e^Math.random()*16>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,_n)},bp=ee([],$(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),_n=function(e){var t,n=ke();if(!(!((t=n==null?void 0:n.crypto)===null||t===void 0)&&t.getRandomValues))return L2(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=r[6]&15|64,r[8]=r[8]&63|128,ee([],$(r.entries()),!1).map(function(i){var o=$(i,2),s=o[0],a=o[1];return[4,6,8,10].includes(s)?"-".concat(bp[a]):bp[a]}).join("")},N2=(function(){function e(t){this.client=t,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(t,n){var r,i;return M(this,void 0,void 0,function(){return N(this,function(o){switch(o.label){case 0:return this.plugins.some(function(s){return s.name===t.name})?(this.loggerProvider.warn("Plugin with name ".concat(t.name," already exists, skipping registration")),[2]):(t.name===void 0&&(t.name=_n(),this.loggerProvider.warn(`Plugin name is undefined.
|
|
528
|
+
Generating a random UUID for plugin name: `.concat(t.name,`.
|
|
529
|
+
Set a name for the plugin to prevent it from being added multiple times.`))),t.type=(r=t.type)!==null&&r!==void 0?r:"enrichment",[4,(i=t.setup)===null||i===void 0?void 0:i.call(t,n,this.client)]);case 1:return o.sent(),this.plugins.push(t),[2]}})})},e.prototype.deregister=function(t,n){var r;return M(this,void 0,void 0,function(){var i,o;return N(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(a){return a.name===t}),i===-1?(n.loggerProvider.warn("Plugin with name ".concat(t," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(r=o.teardown)===null||r===void 0?void 0:r.call(o)]);case 1:return s.sent(),[2]}})})},e.prototype.reset=function(t){this.applying=!1;var n=this.plugins;n.map(function(r){var i;return(i=r.teardown)===null||i===void 0?void 0:i.call(r)}),this.plugins=[],this.client=t},e.prototype.push=function(t){var n=this;return new Promise(function(r){n.queue.push([t,r]),n.scheduleApply(0)})},e.prototype.scheduleApply=function(t){var n=this;this.applying||(this.applying=!0,setTimeout(function(){n.apply(n.queue.shift()).then(function(){n.applying=!1,n.queue.length>0&&n.scheduleApply(0)})},t))},e.prototype.apply=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s,a,c,h,p,u,l,d,f,h,p,g,m,v,y,b,w,C;return N(this,function(_){switch(_.label){case 0:if(!t)return[2];n=$(t,1),r=n[0],i=$(t,2),o=i[1],this.loggerProvider.log("Timeline.apply: Initial event",r),s=this.plugins.filter(function(E){return E.type==="before"}),_.label=1;case 1:_.trys.push([1,6,7,8]),a=Q(s),c=a.next(),_.label=2;case 2:return c.done?[3,5]:(h=c.value,h.execute?[4,h.execute(U({},r))]:[3,4]);case 3:if(p=_.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),_.label=4;case 4:return c=a.next(),[3,2];case 5:return[3,8];case 6:return u=_.sent(),y={error:u},[3,8];case 7:try{c&&!c.done&&(b=a.return)&&b.call(a)}finally{if(y)throw y.error}return[7];case 8:l=this.plugins.filter(function(E){return E.type==="enrichment"||E.type===void 0}),_.label=9;case 9:_.trys.push([9,14,15,16]),d=Q(l),f=d.next(),_.label=10;case 10:return f.done?[3,13]:(h=f.value,h.execute?[4,h.execute(U({},r))]:[3,12]);case 11:if(p=_.sent(),p===null)return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),o({event:r,code:0,message:""}),[2];r=p,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(h.name),"', event: ").concat(JSON.stringify(r))),_.label=12;case 12:return f=d.next(),[3,10];case 13:return[3,16];case 14:return g=_.sent(),w={error:g},[3,16];case 15:try{f&&!f.done&&(C=d.return)&&C.call(d)}finally{if(w)throw w.error}return[7];case 16:return m=this.plugins.filter(function(E){return E.type==="destination"}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(r))),v=m.map(function(E){var P=U({},r);return E.execute(P).catch(function(T){return mr(P,0,String(T))})}),Promise.all(v).then(function(E){var P=$(E,1),T=P[0],I=T||mr(r,100,"Event not tracked, no destination plugins on the instance");o(I)}),[2]}})})},e.prototype.flush=function(){return M(this,void 0,void 0,function(){var t,n,r,i=this;return N(this,function(o){switch(o.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map(function(s){return i.apply(s)}))];case 1:return o.sent(),n=this.plugins.filter(function(s){return s.type==="destination"}),r=n.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(r)];case 2:return o.sent(),[2]}})})},e.prototype.onIdentityChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onIdentityChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onSessionIdChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onSessionIdChanged)===null||r===void 0||r.call(n,t)})},e.prototype.onOptOutChanged=function(t){this.plugins.forEach(function(n){var r;(r=n.onOptOutChanged)===null||r===void 0||r.call(n,t)})},e})(),M2=function(e,t,n){var r=typeof e=="string"?{event_type:e}:e;return U(U(U({},r),n),t&&{event_properties:t})},wp=function(e,t){var n=U(U({},t),{event_type:Mt.IDENTIFY,user_properties:e.getUserProperties()});return n},D2=function(e,t,n,r){var i,o=U(U({},r),{event_type:Mt.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)});return o},F2=function(e,t,n){var r,i=new pi;i.set(e,t);var o=U(U({},n),{event_type:Mt.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)});return o},U2=function(e,t){return U(U({},t),{event_type:Mt.REVENUE,event_properties:e.getEventProperties()})},ct=function(e){return{promise:e||Promise.resolve()}},B2=(function(){function e(t){t===void 0&&(t="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new N2(this),this.name=t}return e.prototype._init=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){switch(n.label){case 0:return this.config=t,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q")];case 1:return n.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s,a,c,u;return N(this,function(l){switch(l.label){case 0:n=this[t],this[t]=[],l.label=1;case 1:l.trys.push([1,8,9,10]),r=Q(n),i=r.next(),l.label=2;case 2:return i.done?[3,7]:(o=i.value,s=o(),s&&"promise"in s?[4,s.promise]:[3,4]);case 3:return l.sent(),[3,6];case 4:return[4,s];case 5:l.sent(),l.label=6;case 6:return i=r.next(),[3,2];case 7:return[3,10];case 8:return a=l.sent(),c={error:a},[3,10];case 9:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(c)throw c.error}return[7];case 10:return this[t].length?[4,this.runQueuedFunctions(t)]:[3,12];case 11:l.sent(),l.label=12;case 12:return[2]}})})},e.prototype.track=function(t,n,r){var i=M2(t,n,r);return ct(this.dispatch(i))},e.prototype.identify=function(t,n){var r=wp(t,n);return ct(this.dispatch(r))},e.prototype.groupIdentify=function(t,n,r,i){var o=D2(t,n,r,i);return ct(this.dispatch(o))},e.prototype.setGroup=function(t,n,r){var i=F2(t,n,r);return ct(this.dispatch(i))},e.prototype.revenue=function(t,n){var r=U2(t,n);return ct(this.dispatch(r))},e.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),ct())},e.prototype._addPlugin=function(t){return ct(this.timeline.register(t,this.config))},e.prototype.remove=function(t){return this.isReady?this._removePlugin(t):(this.q.push(this._removePlugin.bind(this,t)),ct())},e.prototype._removePlugin=function(t){return ct(this.timeline.deregister(t,this.config))},e.prototype.dispatchWithCallback=function(t,n){if(!this.isReady)return n(mr(t,0,O2));this.process(t).then(n)},e.prototype.dispatch=function(t){return M(this,void 0,void 0,function(){var n=this;return N(this,function(r){return this.isReady?[2,this.process(t)]:[2,new Promise(function(i){n.dispatchQ.push(n.dispatchWithCallback.bind(n,t,i))})]})})},e.prototype.getOperationAppliedUserProperties=function(t){var n={};if(t===void 0)return n;var r={};return Object.keys(t).forEach(function(i){Object.values(Sn).includes(i)||(r[i]=t[i])}),T2.forEach(function(i){if(Object.keys(t).includes(i)){var o=t[i];switch(i){case Sn.CLEAR_ALL:Object.keys(n).forEach(function(s){delete n[s]});break;case Sn.UNSET:Object.keys(o).forEach(function(s){delete n[s]});break;case Sn.SET:Object.assign(n,o);break}}}),Object.assign(n,r),n},e.prototype.process=function(t){return M(this,void 0,void 0,function(){var n,o,r,i,o;return N(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),this.config.optOut?[2,mr(t,0,k2)]:(t.event_type===Mt.IDENTIFY&&(n=this.getOperationAppliedUserProperties(t.user_properties),this.timeline.onIdentityChanged({userProperties:n})),[4,this.timeline.push(t)]);case 1:return o=s.sent(),o.code===200?this.config.loggerProvider.log(o.message):o.code===100?this.config.loggerProvider.warn(o.message):this.config.loggerProvider.error(o.message),[2,o];case 2:return r=s.sent(),i=String(r),this.config.loggerProvider.error(i),o=mr(t,0,i),[2,o];case 3:return[2]}})})},e.prototype.setOptOut=function(t){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!t));return}this._setOptOut(t)},e.prototype._setOptOut=function(t){this.config.optOut!==t&&(this.timeline.onOptOutChanged(t),this.config.optOut=!!t)},e.prototype.flush=function(){return ct(this.timeline.flush())},e.prototype.plugin=function(t){var n=this.timeline.plugins.find(function(r){return r.name===t});if(n===void 0){this.config.loggerProvider.debug("Cannot find plugin with name ".concat(t));return}return n},e.prototype.plugins=function(t){return this.timeline.plugins.filter(function(n){return n instanceof t})},e})(),$2=(function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(t){return this.productId=t,this},e.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},e.prototype.setPrice=function(t){return this.price=t,this},e.prototype.setRevenueType=function(t){return this.revenueType=t,this},e.prototype.setCurrency=function(t){return this.currency=t,this},e.prototype.setRevenue=function(t){return this.revenue=t,this},e.prototype.setReceipt=function(t){return this.receipt=t,this},e.prototype.setReceiptSig=function(t){return this.receiptSig=t,this},e.prototype.setEventProperties=function(t){return Xc(t)&&(this.properties=t),this},e.prototype.getEventProperties=function(){var t=this.properties?U({},this.properties):{};return t[Gt.REVENUE_PRODUCT_ID]=this.productId,t[Gt.REVENUE_QUANTITY]=this.quantity,t[Gt.REVENUE_PRICE]=this.price,t[Gt.REVENUE_TYPE]=this.revenueType,t[Gt.REVENUE_CURRENCY]=this.currency,t[Gt.REVENUE]=this.revenue,t[Gt.RECEIPT]=this.receipt,t[Gt.RECEIPT_SIG]=this.receiptSig,t},e})(),Gt;(function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"})(Gt||(Gt={}));var V2=function(e,t){var n=Math.max(t,1);return e.reduce(function(r,i,o){var s=Math.floor(o/n);return r[s]||(r[s]=[]),r[s].push(i),r},[])},Et;(function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"})(Et||(Et={}));var zo="Amplitude Logger ",Ep=(function(){function e(){this.logLevel=Et.None}return e.prototype.disable=function(){this.logLevel=Et.None},e.prototype.enable=function(t){t===void 0&&(t=Et.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<Et.Verbose||console.log("".concat(zo,"[Log]: ").concat(t.join(" ")))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<Et.Warn||console.warn("".concat(zo,"[Warn]: ").concat(t.join(" ")))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<Et.Error||console.error("".concat(zo,"[Error]: ").concat(t.join(" ")))},e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<Et.Debug||console.log("".concat(zo,"[Debug]: ").concat(t.join(" ")))},e})(),Ho=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:op,logLevel:Et.Warn,loggerProvider:new Ep,offline:!1,optOut:!1,serverUrl:sp,serverZone:"US",useBatch:!1}},z2=(function(){function e(t){var n,r,i,o;this._optOut=!1;var s=Ho();this.apiKey=t.apiKey,this.flushIntervalMillis=(n=t.flushIntervalMillis)!==null&&n!==void 0?n:s.flushIntervalMillis,this.flushMaxRetries=t.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=t.flushQueueSize||s.flushQueueSize,this.instanceName=t.instanceName||s.instanceName,this.loggerProvider=t.loggerProvider||s.loggerProvider,this.logLevel=(r=t.logLevel)!==null&&r!==void 0?r:s.logLevel,this.minIdLength=t.minIdLength,this.plan=t.plan,this.ingestionMetadata=t.ingestionMetadata,this.offline=t.offline!==void 0?t.offline:s.offline,this.optOut=(i=t.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=t.serverUrl,this.serverZone=t.serverZone||s.serverZone,this.storageProvider=t.storageProvider,this.transportProvider=t.transportProvider,this.useBatch=(o=t.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var a=Sp(t.serverUrl,t.serverZone,t.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(t){this._optOut=t},enumerable:!1,configurable:!0}),e})(),H2=function(e,t){return e==="EU"?t?m2:h2:t?g2:sp},Sp=function(e,t,n){if(e===void 0&&(e=""),t===void 0&&(t=Ho().serverZone),n===void 0&&(n=Ho().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Ho().serverZone;return{serverZone:r,serverUrl:H2(r,n)}},j2=(function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(t,n){this.sdk.metrics.histogram[t]=n},e})();function _p(e){return e>=200&&e<300}var Cp=function(e){e===void 0&&(e=0);var t=new Error().stack||"";return t.split(`
|
|
530
|
+
`).slice(2+e).map(function(n){return n.trim()})},Ie=function(e){return function(){var t=U({},e.config),n=t.loggerProvider,r=t.logLevel;return{logger:n,logLevel:r}}},q2=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");try{for(var i=Q(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in e)e=e[s];else return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},xe=function(e,t){return function(){var n,r,i={};try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=q2(e,a)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},Ae=function(e,t,n,r,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=n(),c=a.logger,u=a.logLevel;if(u&&u<Et.Debug||!u||!c)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:Cp(1),time:{start:new Date().toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),c.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=new Date().toISOString()),c.debug(JSON.stringify(l,null,2))),d}};function W2(e){return e instanceof Error?e.message:String(e)}function jo(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var G2=(function(){function e(t){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=t==null?void 0:t.diagnosticsClient}return e.prototype.setup=function(t){var n;return M(this,void 0,void 0,function(){var r,i=this;return N(this,function(o){switch(o.label){case 0:return this.config=t,this.storageKey="".concat(p2,"_").concat(this.config.apiKey.substring(0,10)),[4,(n=this.config.storageProvider)===null||n===void 0?void 0:n.get(this.storageKey)];case 1:return r=o.sent(),r&&r.length>0&&Promise.all(r.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(t){var n=this;return t.insert_id||(t.insert_id=_n()),new Promise(function(r){var i={event:t,attempts:0,callback:function(o){return r(o)},timeout:0};n.queue.push(i),n.schedule(n.config.flushIntervalMillis),n.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(t){var n=this;return t.filter(function(r){return r.attempts+=1,r.attempts<n.config.flushMaxRetries?!0:(n.fulfillRequest([r],500,A2),!1)})},e.prototype.scheduleEvents=function(t){var n=this;t.forEach(function(r){n.schedule(r.timeout===0?n.config.flushIntervalMillis:r.timeout)})},e.prototype.schedule=function(t){var n=this;if(!this.config.offline&&(this.scheduleId===null||this.scheduleId&&t>this.scheduledTimeout)){this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=t,this.scheduleId=setTimeout(function(){n.queue=n.queue.map(function(r){return r.timeout=0,r}),n.flush(!0)},t);return}},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(t){return t===void 0&&(t=!1),M(this,void 0,void 0,function(){var n,r,i,o=this;return N(this,function(s){switch(s.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),n=[],r=[],this.queue.forEach(function(a){return a.timeout===0?n.push(a):r.push(a)}),i=V2(n,this.config.flushQueueSize),[4,i.reduce(function(a,c){return M(o,void 0,void 0,function(){return N(this,function(u){switch(u.label){case 0:return[4,a];case 1:return u.sent(),[4,this.send(c,t)];case 2:return[2,u.sent()]}})})},Promise.resolve())]);case 1:return s.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}})})},e.prototype.send=function(t,n){return n===void 0&&(n=!0),M(this,void 0,void 0,function(){var r,i,o,s,a;return N(this,function(c){switch(c.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,R2)];r={api_key:this.config.apiKey,events:t.map(function(u){var l=u.event;l.extra;var d=Uo(l,["extra"]);return d}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new j2,c.label=1;case 1:return c.trys.push([1,3,,4]),i=Sp(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,r)];case 2:return o=c.sent(),o===null?(this.fulfillRequest(t,0,x2),[2]):n?(this.handleResponse(o,t),[3,4]):("body"in o?this.fulfillRequest(t,o.statusCode,"".concat(o.status,": ").concat(jo(o))):this.fulfillRequest(t,o.statusCode,o.status),[2]);case 3:return s=c.sent(),a=W2(s),this.config.loggerProvider.error(a),this.handleResponse({status:Me.Failed,statusCode:0},t),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,n){var r=t.status;switch(r){case Me.Success:{this.handleSuccessResponse(t,n);break}case Me.Invalid:{this.handleInvalidResponse(t,n);break}case Me.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,n);break}case Me.RateLimit:{this.handleRateLimitResponse(t,n);break}default:{this.config.loggerProvider.warn(`{code: 0, error: "Status '`.concat(r,"' provided for ").concat(n.length,' events"}')),this.handleOtherResponse(n);break}}},e.prototype.handleSuccessResponse=function(t,n){this.fulfillRequest(n,t.statusCode,I2)},e.prototype.handleInvalidResponse=function(t,n){var r=this;if(t.body.missingField||t.body.error.startsWith(P2)){this.fulfillRequest(n,t.statusCode,t.body.error);return}var i=ee(ee(ee(ee([],$(Object.values(t.body.eventsWithInvalidFields)),!1),$(Object.values(t.body.eventsWithMissingFields)),!1),$(Object.values(t.body.eventsWithInvalidIdLengths)),!1),$(t.body.silencedEvents),!1).flat(),o=new Set(i),s=n.filter(function(c,u){if(o.has(u)){r.fulfillRequest([c],t.statusCode,t.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(jo(t));var a=this.removeEventsExceedFlushMaxRetries(s);this.scheduleEvents(a)},e.prototype.handlePayloadTooLargeResponse=function(t,n){if(n.length===1){this.fulfillRequest(n,t.statusCode,t.body.error);return}this.config.loggerProvider.warn(jo(t)),this.config.flushQueueSize/=2;var r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.handleRateLimitResponse=function(t,n){var r=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),s=t.body.throttledEvents,a=new Set(i),c=new Set(o),u=new Set(s),l=n.filter(function(f,h){if(f.event.user_id&&a.has(f.event.user_id)||f.event.device_id&&c.has(f.event.device_id)){r.fulfillRequest([f],t.statusCode,t.body.error);return}return u.has(h)&&(f.timeout=r.throttleTimeout),!0});l.length>0&&this.config.loggerProvider.warn(jo(t));var d=this.removeEventsExceedFlushMaxRetries(l);this.scheduleEvents(d)},e.prototype.handleOtherResponse=function(t){var n=this,r=t.map(function(o){return o.timeout=o.attempts*n.retryTimeout,o}),i=this.removeEventsExceedFlushMaxRetries(r);this.scheduleEvents(i)},e.prototype.fulfillRequest=function(t,n,r){var i,o,s;_p(n)?(s=this.diagnosticsClient)===null||s===void 0||s.increment("analytics.events.sent",t.length):((i=this.diagnosticsClient)===null||i===void 0||i.increment("analytics.events.dropped",t.length),(o=this.diagnosticsClient)===null||o===void 0||o.recordEvent("analytics.events.dropped",{events:t.map(function(a){return a.event.event_type}),code:n,message:r,stack_trace:Cp()})),this.removeEvents(t),t.forEach(function(a){return a.callback(mr(a.event,n,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var t=this.queue.map(function(n){return n.event});this.config.storageProvider.set(this.storageKey,t)}},e.prototype.removeEvents=function(t){this.queue=this.queue.filter(function(n){return!t.some(function(r){return r.event.insert_id===n.event.insert_id})}),this.saveEvents()},e})(),K2=(function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Y2(),platform:"Web",os:void 0,deviceModel:void 0}},e})(),Y2=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Z2=(function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(n){t(n)}),this.queue=[])},e})(),Cn=function(){return Cn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Cn.apply(this,arguments)};function qo(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Tp(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],s;try{for(;(t===void 0||t-- >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}typeof SuppressedError=="function"&&SuppressedError;var Wo=function(e,t){var n,r,i=["string","number","boolean","undefined"],o=typeof e,s=typeof t;if(o!==s)return!1;try{for(var a=qo(i),c=a.next();!c.done;c=a.next()){var u=c.value;if(u===o)return e===t}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;var l=Array.isArray(e),d=Array.isArray(t);if(l!==d)return!1;if(l&&d){for(var f=0;f<e.length;f++)if(!Wo(e[f],t[f]))return!1}else{var h=Object.keys(e).sort(),p=Object.keys(t).sort();if(!Wo(h,p))return!1;var g=!0;return Object.keys(e).forEach(function(m){Wo(e[m],t[m])||(g=!1)}),g}return!0},J2="$set",X2="$unset",Q2="$clearAll";Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var ew=(function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,n=Cn({},this.identity.userProperties),r=Cn(Cn({},this.identity),{userProperties:n});return{setUserId:function(i){return r.userId=i,this},setDeviceId:function(i){return r.deviceId=i,this},setUserProperties:function(i){return r.userProperties=i,this},setOptOut:function(i){return r.optOut=i,this},updateUserProperties:function(i){var o,s,a,c,u,l,d=r.userProperties||{};try{for(var f=qo(Object.entries(i)),h=f.next();!h.done;h=f.next()){var p=Tp(h.value,2),g=p[0],m=p[1];switch(g){case J2:try{for(var v=(a=void 0,qo(Object.entries(m))),y=v.next();!y.done;y=v.next()){var b=Tp(y.value,2),w=b[0],C=b[1];d[w]=C}}catch(P){a={error:P}}finally{try{y&&!y.done&&(c=v.return)&&c.call(v)}finally{if(a)throw a.error}}break;case X2:try{for(var _=(u=void 0,qo(Object.keys(m))),E=_.next();!E.done;E=_.next()){var w=E.value;delete d[w]}}catch(P){u={error:P}}finally{try{E&&!E.done&&(l=_.return)&&l.call(_)}finally{if(u)throw u.error}}break;case Q2:d={};break}}}catch(P){o={error:P}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(o)throw o.error}}return r.userProperties=d,this},commit:function(){return t.setIdentity(r),this}}},e.prototype.getIdentity=function(){return Cn({},this.identity)},e.prototype.setIdentity=function(t){var n=Cn({},this.identity);this.identity=Cn({},t),Wo(n,this.identity)||this.listeners.forEach(function(r){r(t)})},e.prototype.addIdentityListener=function(t){this.listeners.add(t)},e.prototype.removeIdentityListener=function(t){this.listeners.delete(t)},e})(),hi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,tw=(function(){function e(){this.identityStore=new ew,this.eventBridge=new Z2,this.applicationContextProvider=new K2}return e.getInstance=function(t){return hi.analyticsConnectorInstances||(hi.analyticsConnectorInstances={}),hi.analyticsConnectorInstances[t]||(hi.analyticsConnectorInstances[t]=new e),hi.analyticsConnectorInstances[t]},e})(),gi=function(e){return e===void 0&&(e=op),tw.getInstance(e)},nw=function(e,t){gi(t).identityStore.editIdentity().setUserId(e).commit()},rw=function(e,t){gi(t).identityStore.editIdentity().setDeviceId(e).commit()},iw=(function(){function e(){this.name="identity",this.type="before",this.identityStore=gi().identityStore}return e.prototype.execute=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){return n=t.user_properties,n&&this.identityStore.editIdentity().updateUserProperties(n).commit(),[2,t]})})},e.prototype.setup=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return t.instanceName&&(this.identityStore=gi(t.instanceName).identityStore),[2]})})},e})(),Ip=function(e,t){t===void 0&&(t=Date.now());var n=Date.now(),r=n-t;return r>e},xp=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Bo,t,e.substring(0,n)].filter(Boolean).join("_")},ow=function(e){return"".concat(Bo.toLowerCase(),"_").concat(e.substring(0,6))},sw=function(){var e,t,n,r;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(r=(n=(t=(e=navigator.languages)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:navigator.language)!==null&&n!==void 0?n:i)!==null&&r!==void 0?r:""},Go=function(){var e,t=ke();if(!(!((e=t==null?void 0:t.location)===null||e===void 0)&&e.search))return{};var n=t.location.search.substring(1).split("&").filter(Boolean),r=n.reduce(function(i,o){var s=o.split("=",2),a=Ap(s[0]),c=Ap(s[1]);return c&&(i[a]=c),i},{});return r},Ap=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}},Qc=function(e,t){return!t||!t.length?!0:t.some(function(n){return typeof n=="string"?e===n:e.match(n)})},mi=function(e,t){var n=e;try{n=decodeURI(e)}catch(r){t==null||t.error("Malformed URI sequence: ",r)}return n},aw=function(e){var t=0;if(e.length===0)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return t},kp=function(e,t){var n=aw(e.toString()),r=Math.abs(n),i=r*31,o=i%1e5;return o/1e5<t},eu=(function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2,!0]})})},e.prototype.get=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return[2,this.memoryStorage.get(t)]})})},e.prototype.getRaw=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return[4,this.get(t)];case 1:return n=r.sent(),[2,n?JSON.stringify(n):void 0]}})})},e.prototype.set=function(t,n){return M(this,void 0,void 0,function(){return N(this,function(r){return this.memoryStorage.set(t,n),[2]})})},e.prototype.remove=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){return this.memoryStorage.delete(t),[2]})})},e.prototype.reset=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return this.memoryStorage.clear(),[2]})})},e})(),tu=(function(){function e(t){this.options=U({},t)}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:if(!ke())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,t.set(n,e.testValue)];case 2:return i.sent(),[4,t.get(n)];case 3:return r=i.sent(),[2,r===e.testValue];case 4:return i.sent(),[2,!1];case 5:return[4,t.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){var n;return M(this,void 0,void 0,function(){var r,i;return N(this,function(o){switch(o.label){case 0:return[4,this.getRaw(t)];case 1:if(r=o.sent(),!r)return[2,void 0];try{return i=(n=cw(r))!==null&&n!==void 0?n:uw(r),i===void 0?(console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]):[2,JSON.parse(i)]}catch{return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(t,", value: ").concat(r)),[2,void 0]}return[2]}})})},e.prototype.getRaw=function(t){var n,r;return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){return i=ke(),o=(r=(n=i==null?void 0:i.document)===null||n===void 0?void 0:n.cookie.split("; "))!==null&&r!==void 0?r:[],s=o.find(function(c){return c.indexOf(t+"=")===0}),s?[2,s.substring(t.length+1)]:[2,void 0]})})},e.prototype.set=function(t,n){var r;return M(this,void 0,void 0,function(){var i,o,s,a,c,u,l;return N(this,function(d){try{i=(r=this.options.expirationDays)!==null&&r!==void 0?r:0,o=n!==null?i:-1,s=void 0,o&&(a=new Date,a.setTime(a.getTime()+o*24*60*60*1e3),s=a),c="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(n)))),s&&(c+="; expires=".concat(s.toUTCString())),c+="; path=/",this.options.domain&&(c+="; domain=".concat(this.options.domain)),this.options.secure&&(c+="; Secure"),this.options.sameSite&&(c+="; SameSite=".concat(this.options.sameSite)),u=ke(),u&&(u.document.cookie=c)}catch(f){l=f instanceof Error?f.message:String(f),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(t,". Error: ").concat(l))}return[2]})})},e.prototype.remove=function(t){return M(this,void 0,void 0,function(){return N(this,function(n){switch(n.label){case 0:return[4,this.set(t,null)];case 1:return n.sent(),[2]}})})},e.prototype.reset=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2]})})},e})(),cw=function(e){try{return decodeURIComponent(atob(e))}catch{return}},uw=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},Rp=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Bo,t,e.substring(0,n)].filter(Boolean).join("_")},nu=(function(){function e(t){this.storage=t}return e.prototype.isEnabled=function(){return M(this,void 0,void 0,function(){var t,n,r,i;return N(this,function(o){switch(o.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return o.sent(),[4,n.get(r)];case 3:return i=o.sent(),[2,i===t];case 4:return o.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return o.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(t)];case 1:return n=r.sent(),n?[2,JSON.parse(n)]:[2,void 0];case 2:return r.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(t){var n;return M(this,void 0,void 0,function(){return N(this,function(r){return[2,((n=this.storage)===null||n===void 0?void 0:n.getItem(t))||void 0]})})},e.prototype.set=function(t,n){var r;return M(this,void 0,void 0,function(){return N(this,function(i){try{(r=this.storage)===null||r===void 0||r.setItem(t,JSON.stringify(n))}catch{}return[2]})})},e.prototype.remove=function(t){var n;return M(this,void 0,void 0,function(){return N(this,function(r){try{(n=this.storage)===null||n===void 0||n.removeItem(t)}catch{}return[2]})})},e.prototype.reset=function(){var t;return M(this,void 0,void 0,function(){return N(this,function(n){try{(t=this.storage)===null||t===void 0||t.clear()}catch{}return[2]})})},e})(),lw=10,dw=1,ie={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},Pp={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},Op=(function(){function e(t,n){this.dbPromise=null,this.logger=n,this.dbName="AMP_diagnostics_".concat(t.substring(0,10))}return e.isSupported=function(){var t;return((t=ke())===null||t===void 0?void 0:t.indexedDB)!==void 0},e.prototype.getDB=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var t=this;return new Promise(function(n,r){var i=indexedDB.open(t.dbName,dw);i.onerror=function(){t.dbPromise=null,r(new Error("Failed to open IndexedDB"))},i.onsuccess=function(){var o=i.result;o.onclose=function(){t.dbPromise=null,t.logger.debug("DiagnosticsStorage: DB connection closed.")},o.onerror=function(s){t.logger.debug("DiagnosticsStorage: A global database error occurred.",s),o.close()},n(o)},i.onupgradeneeded=function(o){var s=o.target.result;t.createTables(s)}})},e.prototype.createTables=function(t){if(t.objectStoreNames.contains(ie.TAGS)||t.createObjectStore(ie.TAGS,{keyPath:"key"}),t.objectStoreNames.contains(ie.COUNTERS)||t.createObjectStore(ie.COUNTERS,{keyPath:"key"}),t.objectStoreNames.contains(ie.HISTOGRAMS)||t.createObjectStore(ie.HISTOGRAMS,{keyPath:"key"}),!t.objectStoreNames.contains(ie.EVENTS)){var n=t.createObjectStore(ie.EVENTS,{keyPath:"id",autoIncrement:!0});n.createIndex("time_idx","time",{unique:!1})}t.objectStoreNames.contains(ie.INTERNAL)||t.createObjectStore(ie.INTERNAL,{keyPath:"key"})},e.prototype.setTags=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.TAGS],"readwrite"),i=r.objectStore(ie.TAGS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to set tags",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.put({key:f,value:h});p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to set tag",f,h,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",o),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.COUNTERS],"readwrite"),i=r.objectStore(ie.COUNTERS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to increment counters",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.get(f);p.onsuccess=function(){var g=p.result,m=g?g.value:0,v=i.put({key:f,value:m+h});v.onerror=function(y){s.logger.debug("DiagnosticsStorage: Failed to update counter",f,y)}},p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to read existing counter",f,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",o),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),Object.entries(t).length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.HISTOGRAMS],"readwrite"),i=r.objectStore(ie.HISTOGRAMS),[2,new Promise(function(c){var u=Object.entries(t);r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",l),c()},u.forEach(function(l){var d=$(l,2),f=d[0],h=d[1],p=i.get(f);p.onsuccess=function(){var g=p.result,m;g?m={key:f,count:g.count+h.count,min:Math.min(g.min,h.min),max:Math.max(g.max,h.max),sum:g.sum+h.sum}:m={key:f,count:h.count,min:h.min,max:h.max,sum:h.sum};var v=i.put(m);v.onerror=function(y){s.logger.debug("DiagnosticsStorage: Failed to set histogram stats",f,y)}},p.onerror=function(g){s.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",f,g)}})})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",o),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(t){return M(this,void 0,void 0,function(){var n,r,i,o,s=this;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t.length===0?[2]:[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([ie.EVENTS],"readwrite"),i=r.objectStore(ie.EVENTS),[2,new Promise(function(c){r.oncomplete=function(){c()},r.onabort=function(l){s.logger.debug("DiagnosticsStorage: Failed to add event records",l),c()};var u=i.count();u.onsuccess=function(){var l=u.result,d=Math.max(0,lw-l);d<t.length&&s.logger.debug("DiagnosticsStorage: Only added ".concat(d," of ").concat(t.length," events due to storage limit")),t.slice(0,d).forEach(function(f){var h=i.add(f);h.onerror=function(p){s.logger.debug("DiagnosticsStorage: Failed to add event record",p)}})},u.onerror=function(l){s.logger.debug("DiagnosticsStorage: Failed to count existing events",l)}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",o),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(t,n){return M(this,void 0,void 0,function(){var r,i,o,s;return N(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return r=a.sent(),i=r.transaction([ie.INTERNAL],"readwrite"),o=i.objectStore(ie.INTERNAL),[2,new Promise(function(c,u){i.onabort=function(){return u(new Error("Failed to set internal value"))};var l=o.put({key:t,value:n});l.onsuccess=function(){return c()},l.onerror=function(){return u(new Error("Failed to set internal value"))}})];case 2:return s=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",s),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(t){return M(this,void 0,void 0,function(){var n,r,i,o;return N(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=s.sent(),r=n.transaction([ie.INTERNAL],"readonly"),i=r.objectStore(ie.INTERNAL),[2,new Promise(function(a,c){r.onabort=function(){return c(new Error("Failed to get internal value"))};var u=i.get(t);u.onsuccess=function(){return a(u.result)},u.onerror=function(){return c(new Error("Failed to get internal value"))}})];case 2:return o=s.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",o),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return M(this,void 0,void 0,function(){var t,n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getInternal(Pp.LAST_FLUSH_TIMESTAMP)];case 1:return t=r.sent(),[2,t?parseInt(t.value,10):void 0];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",n),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(t){return M(this,void 0,void 0,function(){var n;return N(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.setInternal(Pp.LAST_FLUSH_TIMESTAMP,t.toString())];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",n),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.clear();s.onsuccess=function(){return r()},s.onerror=function(){return i(new Error("Failed to clear table ".concat(n)))}})},e.prototype.getAllAndClear=function(){return M(this,void 0,void 0,function(){var t,n,r,i,o,s,a,c;return N(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return t=u.sent(),n=t.transaction([ie.TAGS,ie.COUNTERS,ie.HISTOGRAMS,ie.EVENTS],"readwrite"),[4,Promise.all([this.getAllFromStore(n,ie.TAGS),this.getAllFromStore(n,ie.COUNTERS),this.getAllFromStore(n,ie.HISTOGRAMS),this.getAllFromStore(n,ie.EVENTS)])];case 2:return r=$.apply(void 0,[u.sent(),4]),i=r[0],o=r[1],s=r[2],a=r[3],[4,Promise.all([this.clearTable(n,ie.COUNTERS),this.clearTable(n,ie.HISTOGRAMS),this.clearTable(n,ie.EVENTS)])];case 3:return u.sent(),[2,{tags:i,counters:o,histogramStats:s,events:a}];case 4:return c=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",c),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(t,n){return new Promise(function(r,i){var o=t.objectStore(n),s=o.getAll();s.onsuccess=function(){return r(s.result)},s.onerror=function(){return i(new Error("Failed to get all from ".concat(n)))}})},e})(),fw=1e3,Ko=300*1e3,pw="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",hw="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",ru=1e4,gw=10,mw=(function(){function e(t,n,r,i){r===void 0&&(r="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=t,this.logger=n,this.serverUrl=r==="US"?pw:hw,this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(i,null,2)),this.config=U({enabled:!0,sampleRate:0},i),this.startTimestamp=Date.now(),this.shouldTrack=kp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,Op.isSupported()?this.storage=new Op(t,n):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&this.increment("sdk.diagnostics.sampled.in.and.enabled")}return e.prototype.isStorageAndTrackEnabled=function(){return!!this.storage&&!!this.shouldTrack},e.prototype.setTag=function(t,n){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryTags).length>=ru){this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit");return}this.inMemoryTags[t]=n,this.startTimersIfNeeded()}},e.prototype.increment=function(t,n){if(n===void 0&&(n=1),!!this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryCounters).length>=ru){this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit");return}this.inMemoryCounters[t]=(this.inMemoryCounters[t]||0)+n,this.startTimersIfNeeded()}},e.prototype.recordHistogram=function(t,n){if(this.isStorageAndTrackEnabled()){if(Object.keys(this.inMemoryHistograms).length>=ru){this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");return}var r=this.inMemoryHistograms[t];r?(r.count+=1,r.min=Math.min(r.min,n),r.max=Math.max(r.max,n),r.sum+=n):this.inMemoryHistograms[t]={count:1,min:n,max:n,sum:n},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(t,n){if(this.isStorageAndTrackEnabled()){if(this.inMemoryEvents.length>=gw){this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit");return}this.inMemoryEvents.push({event_name:t,time:Date.now(),event_properties:n}),this.startTimersIfNeeded()}},e.prototype.startTimersIfNeeded=function(){var t=this;this.saveTimer||(this.saveTimer=setTimeout(function(){t.saveAllDataToStorage().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to save all data to storage",n)}).finally(function(){t.saveTimer=null})},fw)),this.flushTimer||(this.flushTimer=setTimeout(function(){t._flush().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to flush",n)}).finally(function(){t.flushTimer=null})},Ko))},e.prototype.saveAllDataToStorage=function(){return M(this,void 0,void 0,function(){var t,n,r,i;return N(this,function(o){switch(o.label){case 0:return this.storage?(t=U({},this.inMemoryTags),n=U({},this.inMemoryCounters),r=U({},this.inMemoryHistograms),i=ee([],$(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(t),this.storage.incrementCounters(n),this.storage.setHistogramStats(r),this.storage.addEventRecords(i)])]):[2];case 1:return o.sent(),[2]}})})},e.prototype._flush=function(){return M(this,void 0,void 0,function(){var t,n,r,i,o,s,a,c,u,l;return N(this,function(d){switch(d.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return d.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return t=d.sent(),n=t.tags,r=t.counters,i=t.histogramStats,o=t.events,this.storage.setLastFlushTimestamp(Date.now()),s={},n.forEach(function(f){s[f.key]=f.value}),a={},r.forEach(function(f){a[f.key]=f.value}),c={},i.forEach(function(f){c[f.key]={count:f.count,min:f.min,max:f.max,avg:Math.round(f.sum/f.count*100)/100}}),u=o.map(function(f){return{event_name:f.event_name,time:f.time,event_properties:f.event_properties}}),Object.keys(a).length===0&&Object.keys(c).length===0&&u.length===0?[2]:(l={tags:s,histogram:c,counters:a,events:u},this.fetch(l),[2])}})})},e.prototype.fetch=function(t){return M(this,void 0,void 0,function(){var n,r;return N(this,function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!ke())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return n=i.sent(),n.ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return r=i.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",r),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:return this.storage?(t=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return n=i.sent()||-1,n===-1?(this.storage.setLastFlushTimestamp(t),this._setFlushTimer(Ko),[2]):(r=t-n,r>=Ko?(this._flush(),[2]):(this._setFlushTimer(Ko-r),[2]))}})})},e.prototype._setFlushTimer=function(t){var n=this;this.flushTimer=setTimeout(function(){n._flush().catch(function(r){n.logger.debug("DiagnosticsClient: Failed to flush",r)}).finally(function(){n.flushTimer=null})},t)},e.prototype._setSampleRate=function(t){this.logger.debug("DiagnosticsClient: Setting sample rate to",t),this.config.sampleRate=t,this.shouldTrack=kp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e})(),iu=(function(){function e(){}return e.prototype.send=function(t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(t){var n,r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E;if(typeof t!="object")return null;var P=t.code||0,T=this.buildStatus(P);switch(T){case Me.Success:return{status:T,statusCode:P,body:{eventsIngested:(n=t.events_ingested)!==null&&n!==void 0?n:0,payloadSizeBytes:(r=t.payload_size_bytes)!==null&&r!==void 0?r:0,serverUploadTime:(i=t.server_upload_time)!==null&&i!==void 0?i:0}};case Me.Invalid:return{status:T,statusCode:P,body:{error:(o=t.error)!==null&&o!==void 0?o:"",missingField:(s=t.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(a=t.events_with_invalid_fields)!==null&&a!==void 0?a:{},eventsWithMissingFields:(c=t.events_with_missing_fields)!==null&&c!==void 0?c:{},eventsWithInvalidIdLengths:(u=t.events_with_invalid_id_lengths)!==null&&u!==void 0?u:{},epsThreshold:(l=t.eps_threshold)!==null&&l!==void 0?l:0,exceededDailyQuotaDevices:(d=t.exceeded_daily_quota_devices)!==null&&d!==void 0?d:{},silencedDevices:(f=t.silenced_devices)!==null&&f!==void 0?f:[],silencedEvents:(h=t.silenced_events)!==null&&h!==void 0?h:[],throttledDevices:(p=t.throttled_devices)!==null&&p!==void 0?p:{},throttledEvents:(g=t.throttled_events)!==null&&g!==void 0?g:[]}};case Me.PayloadTooLarge:return{status:T,statusCode:P,body:{error:(m=t.error)!==null&&m!==void 0?m:""}};case Me.RateLimit:return{status:T,statusCode:P,body:{error:(v=t.error)!==null&&v!==void 0?v:"",epsThreshold:(y=t.eps_threshold)!==null&&y!==void 0?y:0,throttledDevices:(b=t.throttled_devices)!==null&&b!==void 0?b:{},throttledUsers:(w=t.throttled_users)!==null&&w!==void 0?w:{},exceededDailyQuotaDevices:(C=t.exceeded_daily_quota_devices)!==null&&C!==void 0?C:{},exceededDailyQuotaUsers:(_=t.exceeded_daily_quota_users)!==null&&_!==void 0?_:{},throttledEvents:(E=t.throttled_events)!==null&&E!==void 0?E:[]}};case Me.Timeout:default:return{status:T,statusCode:P}}},e.prototype.buildStatus=function(t){return _p(t)?Me.Success:t===429?Me.RateLimit:t===413?Me.PayloadTooLarge:t===408?Me.Timeout:t>=400&&t<500?Me.Invalid:t>=500?Me.Failed:Me.Unknown},e})(),vw=(function(e){rt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){switch(a.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(r),method:"POST"},[4,fetch(n,i)];case 1:return o=a.sent(),[4,o.text()];case 2:s=a.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},t})(iu),yw=(function(){function e(t,n){this.key="AMP_remote_config_".concat(t.substring(0,10)),this.logger=n}return e.prototype.fetchConfig=function(){var t=null,n={remoteConfig:null,lastFetch:new Date};try{t=localStorage.getItem(this.key)}catch(i){return this.logger.debug("Remote config localstorage failed to access: ",i),Promise.resolve(n)}if(t===null)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(n);try{var r=JSON.parse(t);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(i){return this.logger.debug("Remote config localstorage failed to parse: ",i),localStorage.removeItem(this.key),Promise.resolve(n)}},e.prototype.setConfig=function(t){try{return localStorage.setItem(this.key,JSON.stringify(t)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(n){this.logger.debug("Remote config localstorage failed to set: ",n)}return Promise.resolve(!1)},e})(),bw="https://sr-client-cfg.amplitude.com/config",ww="https://sr-client-cfg.eu.amplitude.com/config",Ew=3,Sw=1e3,_w=(function(){function e(t,n,r,i){r===void 0&&(r="US"),this.callbackInfos=[],this.apiKey=t,this.serverUrl=i||(r==="US"?bw:ww),this.logger=n,this.storage=new yw(t,n)}return e.prototype.subscribe=function(t,n,r){var i=_n(),o={id:i,key:t,deliveryMode:n,callback:r};return this.callbackInfos.push(o),n==="all"?this.subscribeAll(o):this.subscribeWaitForRemote(o,n.timeout),i},e.prototype.unsubscribe=function(t){var n=this.callbackInfos.findIndex(function(r){return r.id===t});return n===-1?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(t," doesn't exist.")),!1):(this.callbackInfos.splice(n,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(t,".")),!0)},e.prototype.updateConfigs=function(){return M(this,void 0,void 0,function(){var t,n=this;return N(this,function(r){switch(r.label){case 0:return[4,this.fetch()];case 1:return t=r.sent(),this.storage.setConfig(t),this.callbackInfos.forEach(function(i){n.sendCallback(i,t,"remote")}),[2]}})})},e.prototype.subscribeAll=function(t){return M(this,void 0,void 0,function(){var n,r,i,o=this;return N(this,function(s){switch(s.label){case 0:return n=this.fetch().then(function(a){o.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(a))),o.sendCallback(t,a,"remote"),o.storage.setConfig(a)}),r=this.storage.fetchConfig().then(function(a){return a}),[4,Promise.race([n,r])];case 1:return i=s.sent(),i!==void 0&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(i))),this.sendCallback(t,i,"cache")),[4,n];case 2:return s.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(t,n){return M(this,void 0,void 0,function(){var r,i,i;return N(this,function(o){switch(o.label){case 0:r=new Promise(function(s,a){setTimeout(function(){a("Timeout exceeded")},n)}),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,Promise.race([this.fetch(),r])];case 2:return i=o.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(t,i,"remote"),this.storage.setConfig(i),[3,5];case 3:return o.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return i=o.sent(),i.remoteConfig!==null?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(t,i,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(t,i,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(t,n,r){t.lastCallback=new Date;var i;t.key?i=t.key.split(".").reduce(function(o,s){return o===null?o:s in o?o[s]:null},n.remoteConfig):i=n.remoteConfig,t.callback(i,r,n.lastFetch)},e.prototype.fetch=function(t,n){return t===void 0&&(t=Ew),n===void 0&&(n=Sw),M(this,void 0,void 0,function(){var r,i,o,s,a,c,u=this;return N(this,function(l){switch(l.label){case 0:r=n/t,i={remoteConfig:null,lastFetch:new Date},o=function(d){var f,h,p,g,m,v;return N(this,function(y){switch(y.label){case 0:f=new AbortController,h=setTimeout(function(){return f.abort()},n),y.label=1;case 1:return y.trys.push([1,7,8,9]),[4,fetch(s.getUrlParams(),{method:"GET",headers:{Accept:"*/*"},signal:f.signal})];case 2:return p=y.sent(),p.ok?[3,4]:[4,p.text()];case 3:return g=y.sent(),s.logger.debug("Remote config client fetch with retry time ".concat(t," failed with ").concat(p.status,": ").concat(g)),[3,6];case 4:return[4,p.json()];case 5:return m=y.sent(),[2,{value:{remoteConfig:m,lastFetch:new Date}}];case 6:return[3,9];case 7:return v=y.sent(),v instanceof Error&&v.name==="AbortError"?s.logger.debug("Remote config client fetch with retry time ".concat(t," timed out after ").concat(n,"ms")):s.logger.debug("Remote config client fetch with retry time ".concat(t," is rejected because: "),v),[3,9];case 8:return clearTimeout(h),[7];case 9:return d<t-1?[4,new Promise(function(b){return setTimeout(b,u.getJitterDelay(r))})]:[3,11];case 10:y.sent(),y.label=11;case 11:return[2]}})},s=this,a=0,l.label=1;case 1:return a<t?[5,o(a)]:[3,4];case 2:if(c=l.sent(),typeof c=="object")return[2,c.value];l.label=3;case 3:return a++,[3,1];case 4:return[2,i]}})})},e.prototype.getJitterDelay=function(t){return Math.floor(Math.random()*t)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e})(),Cw=null,Tw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],Lp="data-amp-track-",Iw=["div","span","h1","h2","h3","h4","h5","h6"],xw=["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]'],Aw=ee(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],$(xw),!1),kw=["*"],Rw=1e3,Pw=4,Ow=50;function Lw(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function Np(e,t,n){if(e){var r=t.map(Dp),i=n.map(Dp);Mp({json:e,allowlist:r,excludelist:i,ancestors:[]})}}function Mp(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,s=e.excludelist,a=e.ancestors,c=e.parentObject,u=e.targetKey;i||(i=r);var l=Object.keys(i);try{for(var d=Q(l),f=d.next();!f.done;f=d.next()){var h=f.value,p=ee(ee([],$(a),!1),[h],!1);Lw(i[h])?(!Fp(p,o)||Fp(p,s))&&delete i[h]:Mp({json:r,targetObject:i[h],allowlist:o,excludelist:s,ancestors:p,parentObject:i,targetKey:h})}}catch(g){t={error:g}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}Object.keys(i).length===0&&c&&u&&delete c[u]}function Dp(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function ou(e,t,n,r){if(n===void 0&&(n=0),r===void 0&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&t[r]==="**";)r++;return r===t.length}var i=t[r];if(i==="**"){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(ou(e,t,o,r+1))return!0;return!1}else return i==="*"||i===e[n]?ou(e,t,n+1,r+1):!1}function Fp(e,t){return t.some(function(n){return ou(e,n)})}var Nw=500,Up=100,Mw=(function(){function e(t){this.request=t}return e.prototype.headers=function(t){var n,r;t===void 0&&(t=[]);var i=this.request.headers,o={};if(Array.isArray(i))i.forEach(function(d){var f=$(d,2),h=f[0],p=f[1];o[h]=p});else if(i instanceof Headers)i.forEach(function(d,f){o[f]=d});else if(typeof i=="object"&&i!==null)try{for(var s=Q(Object.entries(i)),a=s.next();!a.done;a=s.next()){var c=$(a.value,2),u=c[0],l=c[1];o[u]=l}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Yo(o,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(typeof this._bodySize=="number")return this._bodySize;var t=ke();if(t!=null&&t.TextEncoder){var n=this.request.body;return this._bodySize=Bp(n,Up),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.request.body=="string"?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,su(r,t,n)])})})},e})(),Dw=(function(){function e(t,n){this.bodyRaw=t,this.requestHeaders=n}return e.prototype.headers=function(t){return t===void 0&&(t=[]),Yo(this.requestHeaders,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Bp(this.bodyRaw,Up)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return typeof this.bodyRaw=="string"?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.body,[2,su(r,t,n)])})})},e})();function Bp(e,t){var n,r,i,o=ke(),s=o==null?void 0:o.TextEncoder;if(s){var a;if(typeof e=="string")a=e,i=new s().encode(a).length;else if(e instanceof Blob)a=e,i=a.size;else if(e instanceof URLSearchParams)a=e,i=new s().encode(a.toString()).length;else if(ArrayBuffer.isView(e))a=e,i=a.byteLength;else if(e instanceof ArrayBuffer)a=e,i=a.byteLength;else if(e instanceof FormData){var c=e,u=0,l=0;try{for(var d=Q(c.entries()),f=d.next();!f.done;f=d.next()){var h=$(f.value,2),p=h[0],g=h[1];if(u+=p.length,typeof g=="string")u+=new s().encode(g).length;else if(g instanceof Blob)u+=g.size;else return;if(++l>=t)return}}catch(m){n={error:m}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}i=u}else if(e instanceof ReadableStream){a=e;return}return i}}var Fw=(function(){function e(t){this.response=t}return e.prototype.headers=function(t){var n;if(t===void 0&&(t=[]),this.response.headers instanceof Headers){var r=this.response.headers,i={};return(n=r==null?void 0:r.forEach)===null||n===void 0||n.call(r,function(o,s){i[s]=o}),Yo(i,{allow:t})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var t,n;if(this._bodySize!==void 0)return this._bodySize;var r=(n=(t=this.response.headers)===null||t===void 0?void 0:t.get)===null||n===void 0?void 0:n.call(t,"content-length"),i=r?parseInt(r,10):void 0;return this._bodySize=i,i},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return M(this,void 0,void 0,function(){var t,n,r;return N(this,function(i){switch(i.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),i.label=1;case 1:return i.trys.push([1,3,,4]),t=this.clonedResponse.text(),n=new Promise(function(o){return setTimeout(function(){return o(null)},Nw)}),[4,Promise.race([t,n])];case 2:return r=i.sent(),[2,r];case 3:return i.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){switch(i.label){case 0:return t.length===0?[2,null]:[4,this.text()];case 1:return r=i.sent(),[2,su(r,t,n)]}})})},e})(),Uw=(function(){function e(t,n,r,i){this.statusCode=t,this.headersString=n,this.size=r,this.getJson=i}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(t){var n,r;if(t===void 0&&(t=[]),!this.headersString)return{};var i={},o=this.headersString.split(`\r
|
|
531
|
+
`);try{for(var s=Q(o),a=s.next();!a.done;a=s.next()){var c=a.value,u=$(c.split(": "),2),l=u[0],d=u[1];l&&d&&(i[l]=d)}}catch(f){n={error:f}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Yo(i,{allow:t})},e.prototype.json=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),M(this,void 0,void 0,function(){var r;return N(this,function(i){return t.length===0?[2,null]:(r=this.getJson(),r?(Np(r,t,n),[2,r]):[2,null])})})},e})();function su(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Np(r,t,n),r}catch{return null}}var vi;(function(e){e.REDACT="redact",e.REMOVE="remove"})(vi||(vi={}));var $p="[REDACTED]",Yo=function(e,t){var n,r,i=t.allow,o=i===void 0?[]:i,s=t.strategy,a=s===void 0?vi.REMOVE:s,c=ee([],$(_2),!1),u={},l=function(p){var g=p.toLowerCase();c.find(function(m){return m.toLowerCase()===g})?a===vi.REDACT&&(u[p]=$p):o.find(function(m){return m.toLowerCase()===g})?u[p]=e[p]:a===vi.REDACT&&(u[p]=$p)};try{for(var d=Q(Object.keys(e)),f=d.next();!f.done;f=d.next()){var h=f.value;l(h)}}catch(p){n={error:p}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}return u},Bw=(function(){function e(t,n,r,i,o,s,a,c,u,l,d){a===void 0&&(a=0),this.type=t,this.method=n,this.timestamp=r,this.startTime=i,this.url=o,this.requestWrapper=s,this.status=a,this.duration=c,this.responseWrapper=u,this.error=l,this.endTime=d}return e.prototype.toSerializable=function(){var t,n,r,i,o={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:(t=this.requestWrapper)===null||t===void 0?void 0:t.headers(ee([],$(Vo),!1)),requestBodySize:(n=this.requestWrapper)===null||n===void 0?void 0:n.bodySize,responseHeaders:(r=this.responseWrapper)===null||r===void 0?void 0:r.headers(ee([],$(Vo),!1)),responseBodySize:(i=this.responseWrapper)===null||i===void 0?void 0:i.bodySize};return Object.fromEntries(Object.entries(o).filter(function(s){var a=$(s,2);a[0];var c=a[1];return c!==void 0}))},e})();function $w(e){return typeof e=="object"&&e!==null&&"url"in e&&"method"in e}var Vw=(function(){function e(t,n){n===void 0&&(n=_n()),this.callback=t,this.id=n}return e})(),zw=(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=ke();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var t=ke();return!!t&&!!t.fetch},e.prototype.subscribe=function(t,n){var r,i,o,s,a,c,u,l,d,f;if(this.logger||(this.logger=n),this.eventCallbacks.set(t.id,t),!this.isObserving){var h=(o=(i=(r=this.globalScope)===null||r===void 0?void 0:r.XMLHttpRequest)===null||i===void 0?void 0:i.prototype)===null||o===void 0?void 0:o.open,p=(c=(a=(s=this.globalScope)===null||s===void 0?void 0:s.XMLHttpRequest)===null||a===void 0?void 0:a.prototype)===null||c===void 0?void 0:c.send,g=(d=(l=(u=this.globalScope)===null||u===void 0?void 0:u.XMLHttpRequest)===null||l===void 0?void 0:l.prototype)===null||d===void 0?void 0:d.setRequestHeader;h&&p&&g&&this.observeXhr(h,p,g);var m=(f=this.globalScope)===null||f===void 0?void 0:f.fetch;m&&this.observeFetch(m),this.isObserving=!0}},e.prototype.unsubscribe=function(t){this.eventCallbacks.delete(t.id)},e.prototype.triggerEventCallbacks=function(t){var n=this;this.eventCallbacks.forEach(function(r){var i;try{r.callback(t)}catch(o){(i=n.logger)===null||i===void 0||i.debug("an unexpected error occurred while triggering event callbacks",o)}})},e.prototype.handleNetworkRequestEvent=function(t,n,r,i,o,s,a){var c;if(!(s===void 0||a===void 0)){var u,l="GET";if($w(n)?(u=n.url,l=n.method):u=(c=n==null?void 0:n.toString)===null||c===void 0?void 0:c.call(n),u)try{var d=new URL(u);u="".concat(d.protocol,"//").concat(d.host).concat(d.pathname).concat(d.search).concat(d.hash)}catch{}l=(r==null?void 0:r.method)||l;var f,h;i&&(f=i.status),o&&(h={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},f=0);var p=Math.floor(performance.now()-a),g=Math.floor(s+p),m=new Bw(t,l,s,s,u,r,f,p,i,h,g);this.triggerEventCallbacks(m)}},e.prototype.getTimestamps=function(){var t,n;return{startTime:(t=Date.now)===null||t===void 0?void 0:t.call(Date),durationStart:(n=performance==null?void 0:performance.now)===null||n===void 0?void 0:n.call(performance)}},e.prototype.observeFetch=function(t){var n=this;!this.globalScope||!t||(this.globalScope.fetch=function(r,i){return M(n,void 0,void 0,function(){var o,s,a,c,u,l;return N(this,function(d){switch(d.label){case 0:try{o=this.getTimestamps()}catch(f){(u=this.logger)===null||u===void 0||u.debug("an unexpected error occurred while retrieving timestamps",f)}d.label=1;case 1:return d.trys.push([1,3,,4]),[4,t(r,i)];case 2:return s=d.sent(),[3,4];case 3:return c=d.sent(),a=c,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",r,i?new Mw(i):void 0,s?new Fw(s):void 0,a,o==null?void 0:o.startTime,o==null?void 0:o.durationStart)}catch(f){(l=this.logger)===null||l===void 0||l.debug("an unexpected error occurred while handling fetch",f)}if(s)return[2,s];throw a}})})})},e.createXhrJsonParser=function(t,n){return function(){var r,i;try{if(t.responseType==="json"){if(!((r=n.globalScope)===null||r===void 0)&&r.structuredClone)return n.globalScope.structuredClone(t.response)}else if(["text",""].includes(t.responseType))return JSON.parse(t.responseText)}catch(o){return o instanceof Error&&o.name==="InvalidStateError"&&((i=n.logger)===null||i===void 0||i.error("unexpected error when retrieving responseText. responseType='".concat(t.responseType,"'"))),null}return null}},e.prototype.observeXhr=function(t,n,r){if(!(!this.globalScope||!t||!n)){var i=this.globalScope.XMLHttpRequest.prototype,o=this;i.open=function(){for(var s,a,c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var l=this,d=$(c,2),f=d[0],h=d[1];try{l.$$AmplitudeAnalyticsEvent=U({method:f,url:(s=h==null?void 0:h.toString)===null||s===void 0?void 0:s.call(h),headers:{}},o.getTimestamps())}catch(p){(a=o.logger)===null||a===void 0||a.error("an unexpected error occurred while calling xhr open",p)}return t.apply(l,c)},i.send=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var c=this,u=c,l=e.createXhrJsonParser(c,o),d=s[0],f=u.$$AmplitudeAnalyticsEvent;return u.addEventListener("loadend",function(){var h;try{var p=u.getAllResponseHeaders(),g=u.getResponseHeader("content-length"),m=new Uw(u.status,p,g?parseInt(g,10):void 0,l),v=u.$$AmplitudeAnalyticsEvent.headers,y=new Dw(d,v);f.status=u.status,o.handleNetworkRequestEvent("xhr",{url:f.url,method:f.method},y,m,void 0,f.startTime,f.durationStart)}catch(b){(h=o.logger)===null||h===void 0||h.error("an unexpected error occurred while handling xhr send",b)}}),n.apply(u,s)},i.setRequestHeader=function(s,a){var c,u=this;try{u.$$AmplitudeAnalyticsEvent.headers[s]=a}catch(l){(c=o.logger)===null||c===void 0||c.error("an unexpected error occurred while calling xhr setRequestHeader",l)}r.apply(u,[s,a])}}},e})(),Vp=new zw,zp=(function(){function e(){}return e.prototype.parse=function(){return M(this,void 0,void 0,function(){return N(this,function(t){return[2,U(U(U(U({},$o),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=Go(),n=t[v2],r=t[y2],i=t[b2],o=t[w2],s=t[E2],a=t[S2];return{utm_campaign:n,utm_content:r,utm_id:i,utm_medium:o,utm_source:s,utm_term:a}},e.prototype.getReferrer=function(){var t,n,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=(n=(t=r.referrer)===null||t===void 0?void 0:t.split("/")[2])!==null&&n!==void 0?n:void 0}catch{}return r},e.prototype.getClickIds=function(){var t,n=Go();return t={},t[ap]=n[ap],t[cp]=n[cp],t[up]=n[up],t[lp]=n[lp],t[dp]=n[dp],t[fp]=n[fp],t[pp]=n[pp],t[hp]=n[hp],t[gp]=n[gp],t[mp]=n[mp],t[vp]=n[vp],t},e})(),yi="data-amp-mask",Tn="*****",Hw=/\b(?:\d[ -]*?){13,16}\b/,jw=/(\d{3}-?\d{2}-?\d{4})/g,qw=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,au=function(e,t){var n,r;if(t===void 0&&(t=[]),typeof e!="string")return"";var i=e;i=i.replace(Hw,Tn),i=i.replace(jw,Tn),i=i.replace(qw,Tn);try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,Tn)}catch{}}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},cu=function(e){if(typeof document>"u"||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(yi)?Tn:e?e(document.title):document.title},vr=function(e,t){return typeof e=="boolean"?e:(e==null?void 0:e[t])!==!1},Hp=function(e){return vr(e,"attribution")},Ww=function(e){return vr(e,"fileDownloads")},Gw=function(e){return vr(e,"formInteractions")},jp=function(e){return vr(e,"pageViews")},qp=function(e){return vr(e,"sessions")},Kw=function(e){return vr(e,"pageUrlEnrichment")},Wp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.networkTracking===!0||typeof e.networkTracking=="object")},Gp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.elementInteractions===!0||typeof e.elementInteractions=="object")},Yw=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e.webVitals===!0},Kp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions=="object")},Zw=function(e){if(Gp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.elementInteractions=="object")return e.autocapture.elementInteractions},Jw=function(e){if(Kp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.frustrationInteractions=="object")return e.autocapture.frustrationInteractions},Xw=function(e){var t;if(Wp(e.autocapture)){var n=void 0;return typeof e.autocapture=="object"&&typeof e.autocapture.networkTracking=="object"?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),U(U({},n),{captureRules:(t=n==null?void 0:n.captureRules)===null||t===void 0?void 0:t.map(function(r){var i,o,s;if(!((i=r.urls)===null||i===void 0)&&i.length&&(!((o=r.hosts)===null||o===void 0)&&o.length)){var a=JSON.stringify(r.hosts),c=JSON.stringify(r.urls);return(s=e.loggerProvider)===null||s===void 0||s.warn("Found network capture rule with both urls='".concat(c,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),U(U({},r),{hosts:void 0})}return r})})}},Qw=function(e){var t=function(){return!1},n=void 0,r,i=e.pageCounter,o=jp(e.defaultTracking);return o&&(t=void 0,r=void 0,e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews=="object"&&("trackOn"in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(r=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:n,eventType:r,pageCounter:i}},eE=function(e){return Hp(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?U({},e.defaultTracking.attribution):{}},uu=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,s=r.resolve,a=e&&e[i];if(typeof a=="function"){var c=a.apply(e,o);typeof s=="function"&&s(c==null?void 0:c.promise)}}return e},lu=function(e){var t=e;return t&&t._q!==void 0},du="2.30.0",Yp="amplitude-ts",tE="Web",nE="$remote",rE=(function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(Yp,"/").concat(du),typeof navigator<"u"&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(t){return this.config=t,Promise.resolve(void 0)},e.prototype.execute=function(t){var n,r;return M(this,void 0,void 0,function(){var i,o,s,a;return N(this,function(c){return i=new Date().getTime(),o=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1,s=(r=t.event_id)!==null&&r!==void 0?r:o+1,this.config.lastEventId=s,t.time||(this.config.lastEventTime=i),a=U(U(U(U(U(U(U(U({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:tE}),this.config.trackingOptions.language&&{language:sw()}),this.config.trackingOptions.ipAddress&&{ip:nE}),{insert_id:_n(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),t),{event_id:s,library:this.library,user_agent:this.userAgent}),[2,a]})})},e})(),Zo=1e3,Zp=(function(e){rt(t,e);function t(n){var r=this,i,o,s;try{s=(i=ke())===null||i===void 0?void 0:i.localStorage}catch(a){(o=n==null?void 0:n.loggerProvider)===null||o===void 0||o.debug("Failed to access localStorage. error=".concat(JSON.stringify(a))),s=void 0}return r=e.call(this,s)||this,r.loggerProvider=n==null?void 0:n.loggerProvider,r}return t.prototype.set=function(n,r){var i;return M(this,void 0,void 0,function(){var o;return N(this,function(s){switch(s.label){case 0:return Array.isArray(r)&&r.length>Zo?(o=r.length-Zo,[4,e.prototype.set.call(this,n,r.slice(0,Zo))]):[3,2];case 1:return s.sent(),(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(o," events because the queue length exceeded ").concat(Zo,".")),[3,4];case 2:return[4,e.prototype.set.call(this,n,r)];case 3:s.sent(),s.label=4;case 4:return[2]}})})},t})(nu),iE=(function(e){rt(t,e);function t(){var n;return e.call(this,(n=ke())===null||n===void 0?void 0:n.sessionStorage)||this}return t})(nu),oE=(function(e){rt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={done:4},n}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i=this;return N(this,function(o){return[2,new Promise(function(s,a){typeof XMLHttpRequest>"u"&&a(new Error("XHRTransport is not supported."));var c=new XMLHttpRequest;c.open("POST",n,!0),c.onreadystatechange=function(){if(c.readyState===i.state.done){var u=c.responseText;try{s(i.buildResponse(JSON.parse(u)))}catch{s(i.buildResponse({code:c.status}))}}},c.setRequestHeader("Content-Type","application/json"),c.setRequestHeader("Accept","*/*"),c.send(JSON.stringify(r))})]})})},t})(iu),sE=(function(e){rt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(n,r){return M(this,void 0,void 0,function(){var i=this;return N(this,function(o){return[2,new Promise(function(s,a){var c=ke();if(!(c!=null&&c.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var u=JSON.stringify(r),l=c.navigator.sendBeacon(n,JSON.stringify(r));return s(l?i.buildResponse({code:200,events_ingested:r.events.length,payload_size_bytes:u.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(d){a(d)}})]})})},t})(iu),aE=function(e,t,n){return n===void 0&&(n=!0),M(void 0,void 0,void 0,function(){var r,i,o,s,a,c,u,l,d;return N(this,function(f){switch(f.label){case 0:return r=ow(e),[4,t.getRaw(r)];case 1:return i=f.sent(),i?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:f.sent(),f.label=3;case 3:return o=$(i.split("."),6),s=o[0],a=o[1],c=o[2],u=o[3],l=o[4],d=o[5],[2,{deviceId:s,userId:cE(a),sessionId:fu(u),lastEventId:fu(d),lastEventTime:fu(l),optOut:!!c}]}})})},fu=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},cE=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Dt="[Amplitude]",Jp="".concat(Dt," Form Started"),uE="".concat(Dt," Form Submitted"),lE="".concat(Dt," File Downloaded"),Xp="session_start",Qp="session_end",dE="".concat(Dt," File Extension"),fE="".concat(Dt," File Name"),pE="".concat(Dt," Link ID"),hE="".concat(Dt," Link Text"),gE="".concat(Dt," Link URL"),pu="".concat(Dt," Form ID"),hu="".concat(Dt," Form Name"),gu="".concat(Dt," Form Destination"),Jo="cookie",mE="US",vE=(function(e){rt(t,e);function t(n,r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E,P,T,I,A,O,D,F,V,z,be,oe,J,re,G,ue,te,Ce,ge){i===void 0&&(i=new eu),o===void 0&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),u===void 0&&(u=1e3),l===void 0&&(l=5),d===void 0&&(d=30),f===void 0&&(f=Jo),v===void 0&&(v=new Ep),y===void 0&&(y=Et.Warn),w===void 0&&(w=!1),C===void 0&&(C=!1),P===void 0&&(P=""),T===void 0&&(T=mE),A===void 0&&(A=1800*1e3),O===void 0&&(O=new Zp({loggerProvider:v})),D===void 0&&(D={ipAddress:!0,language:!0,platform:!0}),F===void 0&&(F="fetch"),V===void 0&&(V=!1),z===void 0&&(z=!0),ue===void 0&&(ue=!0),te===void 0&&(te=0);var B=e.call(this,{apiKey:n,storageProvider:O,transportProvider:eh(F)})||this;return B.apiKey=n,B.appVersion=r,B.cookieOptions=o,B.defaultTracking=s,B.autocapture=a,B.flushIntervalMillis=u,B.flushMaxRetries=l,B.flushQueueSize=d,B.identityStorage=f,B.ingestionMetadata=h,B.instanceName=p,B.loggerProvider=v,B.logLevel=y,B.minIdLength=b,B.offline=w,B.partnerId=_,B.plan=E,B.serverUrl=P,B.serverZone=T,B.sessionTimeout=A,B.storageProvider=O,B.trackingOptions=D,B.transport=F,B.useBatch=V,B.fetchRemoteConfig=z,B.networkTrackingOptions=re,B.identify=G,B.enableDiagnostics=ue,B.diagnosticsSampleRate=te,B.diagnosticsClient=Ce,B.remoteConfig=ge,B.version=du,B._optOut=!1,B._cookieStorage=i,B.deviceId=c,B.lastEventId=g,B.lastEventTime=m,B.optOut=C,B.sessionId=I,B.pageCounter=oe,B.userId=be,B.debugLogsEnabled=J,B.loggerProvider.enable(J?Et.Debug:B.logLevel),B.networkTrackingOptions=re,B.identify=G,B.enableDiagnostics=ue,B.diagnosticsSampleRate=te,B.diagnosticsClient=Ce,z&&(B.remoteConfig||(B.remoteConfig={fetchRemoteConfig:z}),B.remoteConfig.fetchRemoteConfig||(B.remoteConfig.fetchRemoteConfig=z)),B}return Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(n){this._cookieStorage!==n&&(this._cookieStorage=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(n){this._deviceId!==n&&(this._deviceId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(n){this._userId!==n&&(this._userId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(n){this._sessionId!==n&&(this._sessionId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(n){this._optOut!==n&&(this._optOut=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(n){this._lastEventTime!==n&&(this._lastEventTime=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(n){this._lastEventId!==n&&(this._lastEventId=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(n){this._pageCounter!==n&&(this._pageCounter=n,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(n){this._debugLogsEnabled!==n&&(this._debugLogsEnabled=n,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var n={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled};this.cookieStorage.set(xp(this.apiKey),n)},t})(z2),yE=function(e,t,n){return t===void 0&&(t={}),M(void 0,void 0,void 0,function(){var r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w,C,_,E,P,T,I,A,O,D,F,V,z,be,oe,J,re,G,ue,te,Ce,ge,B,Ct,Tt,on,or,Id;return N(this,function(sr){switch(sr.label){case 0:return r=t.identityStorage||Jo,E={},r===Jo?[3,1]:(o="",[3,5]);case 1:return(T=(P=t.cookieOptions)===null||P===void 0?void 0:P.domain)!==null&&T!==void 0?(s=T,[3,4]):[3,2];case 2:return[4,wE()];case 3:s=sr.sent(),sr.label=4;case 4:o=s,sr.label=5;case 5:return i=U.apply(void 0,[(E.domain=o,E.expiration=365,E.sameSite="Lax",E.secure=!1,E.upgrade=!0,E),t.cookieOptions]),a=bE(t.identityStorage,i),[4,aE(e,a,(A=(I=t.cookieOptions)===null||I===void 0?void 0:I.upgrade)!==null&&A!==void 0?A:!0)];case 6:return c=sr.sent(),[4,a.get(xp(e))];case 7:return u=sr.sent(),l=Go(),d=l.ampTimestamp?Number(l.ampTimestamp):void 0,f=d?Date.now()<d:!0,h=(z=(V=(F=(O=t.deviceId)!==null&&O!==void 0?O:f?(D=l.ampDeviceId)!==null&&D!==void 0?D:l.deviceId:void 0)!==null&&F!==void 0?F:u==null?void 0:u.deviceId)!==null&&V!==void 0?V:c.deviceId)!==null&&z!==void 0?z:_n(),p=(be=u==null?void 0:u.lastEventId)!==null&&be!==void 0?be:c.lastEventId,g=(oe=u==null?void 0:u.lastEventTime)!==null&&oe!==void 0?oe:c.lastEventTime,m=(re=(J=t.optOut)!==null&&J!==void 0?J:u==null?void 0:u.optOut)!==null&&re!==void 0?re:c.optOut,v=(G=u==null?void 0:u.sessionId)!==null&&G!==void 0?G:c.sessionId,y=(te=(ue=t.userId)!==null&&ue!==void 0?ue:u==null?void 0:u.userId)!==null&&te!==void 0?te:c.userId,n.previousSessionDeviceId=(Ce=u==null?void 0:u.deviceId)!==null&&Ce!==void 0?Ce:c.deviceId,n.previousSessionUserId=(ge=u==null?void 0:u.userId)!==null&&ge!==void 0?ge:c.userId,b={ipAddress:(Ct=(B=t.trackingOptions)===null||B===void 0?void 0:B.ipAddress)!==null&&Ct!==void 0?Ct:!0,language:(on=(Tt=t.trackingOptions)===null||Tt===void 0?void 0:Tt.language)!==null&&on!==void 0?on:!0,platform:(Id=(or=t.trackingOptions)===null||or===void 0?void 0:or.platform)!==null&&Id!==void 0?Id:!0},w=u==null?void 0:u.pageCounter,C=u==null?void 0:u.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),_=new vE(e,t.appVersion,a,i,t.defaultTracking,t.autocapture,h,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,r,t.ingestionMetadata,t.instanceName,p,g,t.loggerProvider,t.logLevel,t.minIdLength,t.offline,m,t.partnerId,t.plan,t.serverUrl,t.serverZone,v,t.sessionTimeout,t.storageProvider,b,t.transport,t.useBatch,t.fetchRemoteConfig,y,w,C,t.networkTrackingOptions,t.identify,t.enableDiagnostics,void 0,void 0,t.remoteConfig),[4,_.storageProvider.isEnabled()];case 8:return sr.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new eu),[2,_]}})})},bE=function(e,t){switch(e===void 0&&(e=Jo),t===void 0&&(t={}),e){case"localStorage":return new Zp;case"sessionStorage":return new iE;case"none":return new eu;case"cookie":default:return new tu(U(U({},t),{expirationDays:t.expiration}))}},eh=function(e){return e==="xhr"?new oE:e==="beacon"?new sE:new vw},wE=function(e){return M(void 0,void 0,void 0,function(){var t,n,r,i,o,o,s,a,c,u;return N(this,function(l){switch(l.label){case 0:return[4,new tu().isEnabled()];case 1:if(!l.sent()||typeof location>"u"||!location.hostname)return[2,""];for(t=location.hostname,n=t.split("."),r=[],i="AMP_TLDTEST",o=n.length-2;o>=0;--o)r.push(n.slice(o).join("."));o=0,l.label=2;case 2:return o<r.length?(s=r[o],a={domain:"."+s},c=new tu(a),[4,c.set(i,1)]):[3,7];case 3:return l.sent(),[4,c.get(i)];case 4:return u=l.sent(),u?[4,c.remove(i)]:[3,6];case 5:return l.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}})})},EE=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},SE="[Amplitude] Page Viewed",_E=function(e){e===void 0&&(e={});var t,n=ke(),r=void 0,i=!1,o,s=e.trackOn,a=e.trackHistoryChanges,c=e.eventType,u=c===void 0?SE:c,l=function(v){var y=v;try{y=decodeURI(v)}catch(b){r==null||r.error("Malformed URI sequence: ",b)}return y},d=function(){return M(void 0,void 0,void 0,function(){var v,y,b;return N(this,function(w){switch(w.label){case 0:return v=l(typeof location<"u"&&location.href||""),b={event_type:u},y=[{}],[4,CE()];case 1:return[2,(b.event_properties=U.apply(void 0,[U.apply(void 0,y.concat([w.sent()])),{"[Amplitude] Page Domain":typeof location<"u"&&location.hostname||"","[Amplitude] Page Location":v,"[Amplitude] Page Path":typeof location<"u"&&l(location.pathname)||"","[Amplitude] Page Title":cu(au),"[Amplitude] Page URL":v.split("?")[0]}]),b)]}})})},f=function(){return typeof s>"u"||typeof s=="function"&&s()},h=typeof location<"u"?location.href:null,p=function(){return M(void 0,void 0,void 0,function(){var v,y,b,w;return N(this,function(C){switch(C.label){case 0:return v=location.href,y=IE(a,v,h||"")&&f(),h=v,y?(r==null||r.log("Tracking page view event"),t!=null?[3,1]:[3,3]):[3,4];case 1:return w=(b=t).track,[4,d()];case 2:w.apply(b,[C.sent()]),C.label=3;case 3:C.label=4;case 4:return[2]}})})},g=function(){p()},m={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(v,y){return M(void 0,void 0,void 0,function(){var b,w;return N(this,function(C){switch(C.label){case 0:return t=y,o=v,r=v.loggerProvider,r.log("Installing @amplitude/plugin-page-view-tracking-browser"),i=!0,n&&(n.addEventListener("popstate",g),n.history.pushState=new Proxy(n.history.pushState,{apply:function(_,E,P){var T=$(P,3),I=T[0],A=T[1],O=T[2];_.apply(E,[I,A,O]),i&&p()}})),f()?(r.log("Tracking page view event"),w=(b=t).track,[4,d()]):[3,2];case 1:w.apply(b,[C.sent()]),C.label=2;case 2:return[2]}})})},execute:function(v){return M(void 0,void 0,void 0,function(){var y;return N(this,function(b){switch(b.label){case 0:return s==="attribution"&&TE(v)?(r==null||r.log("Enriching campaign event to page view event with campaign parameters"),[4,d()]):[3,2];case 1:y=b.sent(),v.event_type=y.event_type,v.event_properties=U(U({},v.event_properties),y.event_properties),b.label=2;case 2:return o&&v.event_type===u&&(o.pageCounter=o.pageCounter?o.pageCounter+1:1,v.event_properties=U(U({},v.event_properties),{"[Amplitude] Page Counter":o.pageCounter})),[2,v]}})})},teardown:function(){return M(void 0,void 0,void 0,function(){return N(this,function(v){return n&&(n.removeEventListener("popstate",g),i=!1),[2]})})}};return m},CE=function(){return M(void 0,void 0,void 0,function(){var e;return N(this,function(t){switch(t.label){case 0:return e=EE,[4,new zp().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},TE=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,n=t[Sn.SET]||{},r=t[Sn.UNSET]||{},i=ee(ee([],$(Object.keys(n)),!1),$(Object.keys(r)),!1);return Object.keys($o).every(function(o){return i.includes(o)})}return!1},IE=function(e,t,n){switch(e){case"pathOnly":{if(n=="")return!0;var r=new URL(t),i=new URL(n),o=r.origin+r.pathname,s=i.origin+i.pathname;return o!==s}default:return t!==n}},xE=function(){var e,t=[],n=function(u,l,d){u.addEventListener(l,d),t.push({element:u,type:l,handler:d})},r=function(){t.forEach(function(u){var l=u.element,d=u.type,f=u.handler;l==null||l.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o="enrichment",s=function(u,l){return M(void 0,void 0,void 0,function(){var d,f;return N(this,function(h){return d=function(){if(!l){u.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if(!(typeof document>"u")){var p=function(m){var v=!1;n(m,"change",function(){var y,b=th(m);v||l.track(Jp,(y={},y[pu]=yr(m.id),y[hu]=yr(m.name),y[gu]=b,y)),v=!0}),n(m,"submit",function(){var y,b,w=th(m);v||l.track(Jp,(y={},y[pu]=yr(m.id),y[hu]=yr(m.name),y[gu]=w,y)),l.track(uE,(b={},b[pu]=yr(m.id),b[hu]=yr(m.name),b[gu]=w,b)),v=!1})},g=Array.from(document.getElementsByTagName("form"));g.forEach(p),typeof MutationObserver<"u"&&(e=new MutationObserver(function(m){m.forEach(function(v){v.addedNodes.forEach(function(y){y.nodeName==="FORM"&&p(y),"querySelectorAll"in y&&typeof y.querySelectorAll=="function"&&Array.from(y.querySelectorAll("form")).map(p)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=ke(),f?f.addEventListener("load",d):u.loggerProvider.debug("Form interaction tracking is not installed because global is undefined.")),[2]})})},a=function(u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return[2,u]})})},c=function(){return M(void 0,void 0,void 0,function(){return N(this,function(u){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:c}},yr=function(e){if(typeof e=="string")return e},th=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(t??""),window.location.href).href}catch{}return t},AE=function(){var e,t=[],n=function(u,l,d){u.addEventListener(l,d),t.push({element:u,type:l,handler:d})},r=function(){t.forEach(function(u){var l=u.element,d=u.type,f=u.handler;l==null||l.removeEventListener(d,f)}),t=[]},i="@amplitude/plugin-file-download-tracking-browser",o="enrichment",s=function(u,l){return M(void 0,void 0,void 0,function(){var d,f;return N(this,function(h){return d=function(){if(!l){u.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if(!(typeof document>"u")){var p=function(v){var y;try{y=new URL(v.href,window.location.href)}catch{return}var b=g.exec(y.href),w=b==null?void 0:b[1];w&&n(v,"click",function(){var C;w&&l.track(lE,(C={},C[dE]=w,C[fE]=y.pathname,C[pE]=v.id,C[hE]=v.text,C[gE]=v.href,C))})},g=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/,m=Array.from(document.getElementsByTagName("a"));m.forEach(p),typeof MutationObserver<"u"&&(e=new MutationObserver(function(v){v.forEach(function(y){y.addedNodes.forEach(function(b){b.nodeName==="A"&&p(b),"querySelectorAll"in b&&typeof b.querySelectorAll=="function"&&Array.from(b.querySelectorAll("a")).map(p)})})}),e.observe(document.body,{subtree:!0,childList:!0}))}},document.readyState==="complete"?d():(f=ke(),f?f.addEventListener("load",d):u.loggerProvider.debug("File download tracking is not installed because global is undefined.")),[2]})})},a=function(u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return[2,u]})})},c=function(){return M(void 0,void 0,void 0,function(){return N(this,function(u){return e==null||e.disconnect(),r(),[2]})})};return{name:i,type:o,setup:s,execute:a,teardown:c}},nh=!1,kE=function(e){if(!(nh||e.defaultTracking!==void 0)){var t=`\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:
|
|
532
|
+
|
|
533
|
+
amplitude.init(<YOUR_API_KEY>, {
|
|
534
|
+
defaultTracking: true,
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),nh=!0}},RE=function(){var e="@amplitude/plugin-network-checker-browser",t="before",n=ke(),r=[],i=function(c,u){n!=null&&n.addEventListener&&(n==null||n.addEventListener(c,u),r.push({type:c,handler:u}))},o=function(){r.forEach(function(c){var u=c.type,l=c.handler;n==null||n.removeEventListener(u,l)}),r=[]},s=function(c,u){return M(void 0,void 0,void 0,function(){return N(this,function(l){return typeof navigator>"u"?(c.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),c.offline=!1,[2]):(c.offline=!navigator.onLine,i("online",function(){c.loggerProvider.debug("Network connectivity changed to online."),c.offline=!1,setTimeout(function(){u.flush()},c.flushIntervalMillis)}),i("offline",function(){c.loggerProvider.debug("Network connectivity changed to offline."),c.offline=!0}),[2])})})},a=function(){return M(void 0,void 0,void 0,function(){return N(this,function(c){return o(),[2]})})};return{name:e,type:t,setup:s,teardown:a}};function rh(e){var t,n,r,i,o,s,a,c,u,l,d;if(!(typeof e!="object"||e===null)&&!Array.isArray(e)){var f=Object.keys(e);try{for(var h=Q(f),p=h.next();!p.done;p=h.next()){var g=p.value;try{var m=e[g];typeof(m==null?void 0:m.enabled)=="boolean"&&(m.enabled?(delete m.enabled,Object.keys(m).length===0&&(e[g]=!0)):e[g]=!1),rh(m)}catch{}}}catch(A){t={error:A}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}try{if(!((u=(c=(a=e.autocapture)===null||a===void 0?void 0:a.networkTracking)===null||c===void 0?void 0:c.captureRules)===null||u===void 0)&&u.length)try{for(var v=Q(e.autocapture.networkTracking.captureRules),y=v.next();!y.done;y=v.next()){var b=y.value;try{for(var w=(o=void 0,Q(["responseHeaders","requestHeaders"])),C=w.next();!C.done;C=w.next()){var _=C.value,E=(l=b[_])!==null&&l!==void 0?l:{},P=E.captureSafeHeaders,T=E.allowlist;if(!(!P&&!T)){if(T!==void 0&&!Array.isArray(T)){delete b[_];continue}b[_]=ee(ee([],$(P?Vo:[]),!1),$(T??[]),!1)}}}catch(A){o={error:A}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}}}catch(A){r={error:A}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}}catch{}var I=(d=e.autocapture)===null||d===void 0?void 0:d.frustrationInteractions;I&&(I.rageClick&&(I.rageClicks=I.rageClick,delete I.rageClick),I.deadClick&&(I.deadClicks=I.deadClick,delete I.deadClick))}}function ih(e,t,n){var r,i,o=[];try{for(var s=Q(t??[]),a=s.next();!a.done;a=s.next()){var c=a.value;try{o.push(new RegExp(c))}catch(u){n.loggerProvider.warn("Invalid regex pattern: ".concat(c),u)}}}catch(u){r={error:u}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return e.concat(o)}function PE(e,t){var n,r,i,o,s,a,c;if(e){rh(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",JSON.stringify(e));var u=e;if(u&&"autocapture"in u){if(typeof u.autocapture=="boolean"&&(t.autocapture=u.autocapture),typeof u.autocapture=="object"&&u.autocapture!==null){var l=U({},u.autocapture);if(t.autocapture===void 0&&(t.autocapture=u.autocapture),typeof u.autocapture.elementInteractions=="object"&&u.autocapture.elementInteractions!==null&&(!((i=u.autocapture.elementInteractions.pageUrlAllowlistRegex)===null||i===void 0)&&i.length)){l.elementInteractions=U({},u.autocapture.elementInteractions);var d=l.elementInteractions,f=(o=d.pageUrlAllowlist)!==null&&o!==void 0?o:[],h=u.autocapture.elementInteractions.pageUrlAllowlistRegex;d.pageUrlAllowlist=ih(f,h,t),delete d.pageUrlAllowlistRegex}if(typeof u.autocapture.networkTracking=="object"&&u.autocapture.networkTracking!==null&&(!((s=u.autocapture.networkTracking.captureRules)===null||s===void 0)&&s.length)){l.networkTracking=U({},u.autocapture.networkTracking);var p=l.networkTracking,g=(a=p.captureRules)!==null&&a!==void 0?a:[];try{for(var m=Q(g),v=m.next();!v.done;v=m.next()){var y=v.value;y.urls=ih((c=y.urls)!==null&&c!==void 0?c:[],y.urlsRegex,t),delete y.urlsRegex}}catch(b){n={error:b}}finally{try{v&&!v.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}typeof t.autocapture=="boolean"&&(t.autocapture=U({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},l)),typeof t.autocapture=="object"&&(t.autocapture=U(U({},t.autocapture),l))}t.defaultTracking=t.autocapture}t.loggerProvider.debug("Browser config after remote config update:",JSON.stringify(t))}catch(b){t.loggerProvider.error("Failed to apply remote configuration because of error: ",b)}}}var OE="@amplitude/plugin-autocapture-browser",LE="@amplitude/plugin-frustration-browser",mu="[Amplitude] Element Clicked",NE="[Amplitude] Dead Click",oh="[Amplitude] Rage Click",ME="[Amplitude] Element Changed",DE="[Amplitude] Element ID",FE="[Amplitude] Element Class",sh="[Amplitude] Element Tag",ah="[Amplitude] Element Text",UE="[Amplitude] Element Hierarchy",BE="[Amplitude] Element Href",$E="[Amplitude] Element Position Left",VE="[Amplitude] Element Position Top",zE="[Amplitude] Element Aria Label",HE="[Amplitude] Element Attributes",jE="[Amplitude] Element Parent Label",ch="[Amplitude] Page URL",qE="[Amplitude] Page Title",WE="[Amplitude] Viewport Height",GE="[Amplitude] Viewport Width",Xo="https://app.amplitude.com",KE="https://app.eu.amplitude.com",YE="https://apps.stag2.amplitude.com",ZE={US:Xo,EU:KE,STAGING:YE},JE="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",XE="amp-visual-tagging-selector-highlight",uh="data-amp-mask-attributes",QE=25;function Se(e){return typeof e=="function"}function vu(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var yu=vu(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
538
|
+
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
|
539
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Qo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var bi=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Q(s),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(Se(l))try{l()}catch(g){o=g instanceof yu?g.errors:[g]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=Q(d),h=f.next();!h.done;h=f.next()){var p=h.value;try{fh(p)}catch(g){o=o??[],g instanceof yu?o=ee(ee([],$(o)),$(g.errors)):o.push(g)}}}catch(g){r={error:g}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}if(o)throw new yu(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)fh(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Qo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Qo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),lh=bi.EMPTY;function dh(e){return e instanceof bi||e&&"closed"in e&&Se(e.remove)&&Se(e.add)&&Se(e.unsubscribe)}function fh(e){Se(e)?e():e.unsubscribe()}var eS={Promise:void 0},tS={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ee([e,t],$(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function ph(e){tS.setTimeout(function(){throw e})}function bu(){}function es(e){e()}var wu=(function(e){rt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,dh(n)&&n.add(r)):r.destination=iS,r}return t.create=function(n,r,i){return new wi(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(bi),nS=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ts(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ts(r)}else ts(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ts(n)}},e})(),wi=(function(e){rt(t,e);function t(n,r,i){var o=e.call(this)||this,s;return Se(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,o.destination=new nS(s),o}return t})(wu);function ts(e){ph(e)}function rS(e){throw e}var iS={closed:!0,next:bu,error:rS,complete:bu},Eu=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function hh(e){return e}function oS(e){return e.length===0?hh:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var De=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=aS(t)?t:new wi(t,n,r);return es(function(){var s=i,a=s.operator,c=s.source;o.add(a?a.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=gh(n),new n(function(i,o){var s=new wi({next:function(a){try{t(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:i});r.subscribe(s)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Eu]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=gh(t),new t(function(r,i){var o;n.subscribe(function(s){return o=s},function(s){return i(s)},function(){return r(o)})})},e.create=function(t){return new e(t)},e})();function gh(e){var t;return(t=e??eS.Promise)!==null&&t!==void 0?t:Promise}function sS(e){return e&&Se(e.next)&&Se(e.error)&&Se(e.complete)}function aS(e){return e&&e instanceof wu||sS(e)&&dh(e)}function cS(e){return Se(e==null?void 0:e.lift)}function St(e){return function(t){if(cS(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function Je(e,t,n,r,i){return new uS(e,t,n,r,i)}var uS=(function(e){rt(t,e);function t(n,r,i,o,s,a){var c=e.call(this,n)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=r?function(u){try{r(u)}catch(l){n.error(l)}}:e.prototype._next,c._error=o?function(u){try{o(u)}catch(l){n.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=i?function(){try{i()}catch(u){n.error(u)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(wu),lS=vu(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),mh=(function(e){rt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new vh(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new lS},t.prototype.next=function(n){var r=this;es(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var s=Q(r.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(n)}}catch(u){i={error:u}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;es(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;es(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,s=i.isStopped,a=i.observers;return o||s?lh:(this.currentObservers=null,a.push(n),new bi(function(){r.currentObservers=null,Qo(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,s=r.isStopped;i?n.error(o):s&&n.complete()},t.prototype.asObservable=function(){var n=new De;return n.source=this,n},t.create=function(n,r){return new vh(n,r)},t})(De),vh=(function(e){rt(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:lh},t})(mh),dS={now:function(){return Date.now()}},fS=(function(e){rt(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(bi),yh={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ee([e,t],$(n)))},clearInterval:function(e){return clearInterval(e)},delegate:void 0},pS=(function(e){rt(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,s=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(s,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(s,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),yh.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&yh.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(s){i=!0,o=s||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Qo(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(fS),bh=(function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=dS.now,e})(),hS=(function(e){rt(t,e);function t(n,r){r===void 0&&(r=bh.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t})(bh),Ei=new hS(pS),gS=Ei,Su=new De(function(e){return e.complete()});function wh(e){return e&&Se(e.schedule)}function Eh(e){return e[e.length-1]}function mS(e){return wh(Eh(e))?e.pop():void 0}function vS(e,t){return typeof Eh(e)=="number"?e.pop():t}var _u=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function Sh(e){return Se(e==null?void 0:e.then)}function _h(e){return Se(e[Eu])}function Ch(e){return Symbol.asyncIterator&&Se(e==null?void 0:e[Symbol.asyncIterator])}function Th(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function yS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ih=yS();function xh(e){return Se(e==null?void 0:e[Ih])}function Ah(e){return d2(this,arguments,function(){var n,r,i,o;return N(this,function(s){switch(s.label){case 0:n=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,gr(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,gr(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,gr(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function kh(e){return Se(e==null?void 0:e.getReader)}function Xe(e){if(e instanceof De)return e;if(e!=null){if(_h(e))return bS(e);if(_u(e))return wS(e);if(Sh(e))return ES(e);if(Ch(e))return Rh(e);if(xh(e))return SS(e);if(kh(e))return _S(e)}throw Th(e)}function bS(e){return new De(function(t){var n=e[Eu]();if(Se(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function wS(e){return new De(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function ES(e){return new De(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,ph)})}function SS(e){return new De(function(t){var n,r;try{for(var i=Q(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function Rh(e){return new De(function(t){CS(e,t).catch(function(n){return t.error(n)})})}function _S(e){return Rh(Ah(e))}function CS(e,t){var n,r,i,o;return M(this,void 0,void 0,function(){var s,a;return N(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=f2(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),!!r.done)return[3,4];if(s=r.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function In(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function Ph(e,t){return t===void 0&&(t=0),St(function(n,r){n.subscribe(Je(r,function(i){return In(r,e,function(){return r.next(i)},t)},function(){return In(r,e,function(){return r.complete()},t)},function(i){return In(r,e,function(){return r.error(i)},t)}))})}function Oh(e,t){return t===void 0&&(t=0),St(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function TS(e,t){return Xe(e).pipe(Oh(t),Ph(t))}function IS(e,t){return Xe(e).pipe(Oh(t),Ph(t))}function xS(e,t){return new De(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function AS(e,t){return new De(function(n){var r;return In(n,t,function(){r=e[Ih](),In(n,t,function(){var i,o,s;try{i=r.next(),o=i.value,s=i.done}catch(a){n.error(a);return}s?n.complete():n.next(o)},0,!0)}),function(){return Se(r==null?void 0:r.return)&&r.return()}})}function Lh(e,t){if(!e)throw new Error("Iterable cannot be null");return new De(function(n){In(n,t,function(){var r=e[Symbol.asyncIterator]();In(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function kS(e,t){return Lh(Ah(e),t)}function RS(e,t){if(e!=null){if(_h(e))return TS(e,t);if(_u(e))return xS(e,t);if(Sh(e))return IS(e,t);if(Ch(e))return Lh(e,t);if(xh(e))return AS(e,t);if(kh(e))return kS(e,t)}throw Th(e)}function PS(e,t){return t?RS(e,t):Xe(e)}function Nh(e){return e instanceof Date&&!isNaN(e)}var OS=vu(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function LS(e,t){var n=Nh(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,o=n.with,s=o===void 0?NS:o,a=n.scheduler,c=a===void 0?Ei:a,u=n.meta,l=u===void 0?null:u;if(r==null&&i==null)throw new TypeError("No timeout provided.");return St(function(d,f){var h,p,g=null,m=0,v=function(y){p=In(f,c,function(){try{h.unsubscribe(),Xe(s({meta:l,lastValue:g,seen:m})).subscribe(f)}catch(b){f.error(b)}},y)};h=d.subscribe(Je(f,function(y){p==null||p.unsubscribe(),m++,f.next(g=y),i>0&&v(i)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),g=null})),!m&&v(r!=null?typeof r=="number"?r:+r-c.now():i)})}function NS(e){throw new OS(e)}function He(e,t){return St(function(n,r){var i=0;n.subscribe(Je(r,function(o){r.next(e.call(t,o,i++))}))})}var MS=Array.isArray;function DS(e,t){return MS(t)?e.apply(void 0,ee([],$(t))):e(t)}function FS(e){return He(function(t){return DS(e,t)})}function US(e,t,n,r,i,o,s,a){var c=[],u=0,l=0,d=!1,f=function(){d&&!c.length&&!u&&t.complete()},h=function(g){return u<r?p(g):c.push(g)},p=function(g){u++;var m=!1;Xe(n(g,l++)).subscribe(Je(t,function(v){t.next(v)},function(){m=!0},void 0,function(){if(m)try{u--;for(var v=function(){var y=c.shift();s||p(y)};c.length&&u<r;)v();f()}catch(y){t.error(y)}}))};return e.subscribe(Je(t,h,function(){d=!0,f()})),function(){}}function Si(e,t,n){return n===void 0&&(n=1/0),Se(t)?Si(function(r,i){return He(function(o,s){return t(r,o,i,s)})(Xe(e(r,i)))},n):(typeof t=="number"&&(n=t),St(function(r,i){return US(r,i,e,n)}))}function BS(e){return e===void 0&&(e=1/0),Si(hh,e)}var $S=["addListener","removeListener"],VS=["addEventListener","removeEventListener"],zS=["on","off"];function br(e,t,n,r){if(Se(n)&&(r=n,n=void 0),r)return br(e,t,n).pipe(FS(r));var i=$(qS(e)?VS.map(function(a){return function(c){return e[a](t,c,n)}}):HS(e)?$S.map(Mh(e,t)):jS(e)?zS.map(Mh(e,t)):[],2),o=i[0],s=i[1];if(!o&&_u(e))return Si(function(a){return br(a,t,n)})(Xe(e));if(!o)throw new TypeError("Invalid event target");return new De(function(a){var c=function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];return a.next(1<u.length?u:u[0])};return o(c),function(){return s(c)}})}function Mh(e,t){return function(n){return function(r){return e[n](t,r)}}}function HS(e){return Se(e.addListener)&&Se(e.removeListener)}function jS(e){return Se(e.on)&&Se(e.off)}function qS(e){return Se(e.addEventListener)&&Se(e.removeEventListener)}function Dh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=gS);var r=-1;return t!=null&&(wh(t)?n=t:r=t),new De(function(i){var o=Nh(e)?+e-n.now():e;o<0&&(o=0);var s=0;return n.schedule(function(){i.closed||(i.next(s++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function Cu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=mS(e),r=vS(e,1/0),i=e;return i.length?i.length===1?Xe(i[0]):BS(r)(PS(i,n)):Su}var WS=Array.isArray;function GS(e){return e.length===1&&WS(e[0])?e[0]:e}function Qe(e,t){return St(function(n,r){var i=0;n.subscribe(Je(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function KS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=GS(e),e.length===1?Xe(e[0]):new De(YS(e))}function YS(e){return function(t){for(var n=[],r=function(o){n.push(Xe(e[o]).subscribe(Je(t,function(s){if(n){for(var a=0;a<n.length;a++)a!==o&&n[a].unsubscribe();n=null}t.next(s)})))},i=0;n&&!t.closed&&i<e.length;i++)r(i)}}function ZS(e){return St(function(t,n){var r=[];return t.subscribe(Je(n,function(i){return r.push(i)},function(){n.next(r),n.complete()})),Xe(e).subscribe(Je(n,function(){var i=r;r=[],n.next(i)},bu)),function(){r=null}})}function JS(e,t){return t===void 0&&(t=Ei),St(function(n,r){var i=null,o=null,s=null,a=function(){if(i){i.unsubscribe(),i=null;var u=o;o=null,r.next(u)}};function c(){var u=s+e,l=t.now();if(l<u){i=this.schedule(void 0,u-l),r.add(i);return}a()}n.subscribe(Je(r,function(u){o=u,s=t.now(),i||(i=t.schedule(c,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function Tu(e){return e<=0?function(){return Su}:St(function(t,n){var r=0;t.subscribe(Je(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function XS(e){return He(function(){return e})}function QS(e,t){return Si(function(n,r){return Xe(e(n,r)).pipe(Tu(1),XS(n))})}function e_(e,t){t===void 0&&(t=Ei);var n=Dh(e,t);return QS(function(){return n})}function t_(){return St(function(e,t){var n,r=!1;e.subscribe(Je(t,function(i){var o=n;n=i,r&&t.next([o,i]),r=!0}))})}function $n(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new mh}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,s=o===void 0?!0:o,a=e.resetOnRefCountZero,c=a===void 0?!0:a;return function(u){var l,d,f,h=0,p=!1,g=!1,m=function(){d==null||d.unsubscribe(),d=void 0},v=function(){m(),l=f=void 0,p=g=!1},y=function(){var b=l;v(),b==null||b.unsubscribe()};return St(function(b,w){h++,!g&&!p&&m();var C=f=f??n();w.add(function(){h--,h===0&&!g&&!p&&(d=Iu(y,c))}),C.subscribe(w),!l&&h>0&&(l=new wi({next:function(_){return C.next(_)},error:function(_){g=!0,m(),d=Iu(v,i,_),C.error(_)},complete:function(){p=!0,m(),d=Iu(v,s),C.complete()}}),Xe(b).subscribe(l))})(u)}}function Iu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new wi({next:function(){i.unsubscribe(),e()}});return Xe(t.apply(void 0,ee([],$(n)))).subscribe(i)}}function n_(e,t){return St(function(n,r){var i=null,o=0,s=!1,a=function(){return s&&!i&&r.complete()};n.subscribe(Je(r,function(c){i==null||i.unsubscribe();var u=0,l=o++;Xe(e(c,l)).subscribe(i=Je(r,function(d){return r.next(t?t(c,d,l,u++):d)},function(){i=null,a()}))},function(){s=!0,a()}))})}function r_(e,t){return St(function(n,r){var i=t??{},o=i.leading,s=o===void 0?!0:o,a=i.trailing,c=a===void 0?!1:a,u=!1,l=null,d=null,f=!1,h=function(){d==null||d.unsubscribe(),d=null,c&&(m(),f&&r.complete())},p=function(){d=null,f&&r.complete()},g=function(v){return d=Xe(e(v)).subscribe(Je(r,h,p))},m=function(){if(u){u=!1;var v=l;l=null,r.next(v),!f&&g(v)}};n.subscribe(Je(r,function(v){u=!0,l=v,!(d&&!d.closed)&&(s?m():g(v))},function(){f=!0,!(c&&u&&d&&!d.closed)&&r.complete()}))})}function i_(e,t,n){t===void 0&&(t=Ei);var r=Dh(e,t);return r_(function(){return r},n)}var o_=["input","select","textarea"],Fh=function(e,t){var n,r=(n=window==null?void 0:window.getComputedStyle)===null||n===void 0?void 0:n.call(window,e);return(r==null?void 0:r.getPropertyValue("cursor"))==="pointer"&&t==="click"},_i=function(e,t,n){return n===void 0&&(n=!1),function(r,i){var o,s,a=e.pageUrlAllowlist,c=e.pageUrlExcludelist,u=e.shouldTrackEventResolver,l=(s=(o=i==null?void 0:i.tagName)===null||o===void 0?void 0:o.toLowerCase)===null||s===void 0?void 0:s.call(o);if(!l)return!1;if(u)return u(r,i);if(!Qc(window.location.href,a)||c&&c.length>0&&Qc(window.location.href,c))return!1;var d=String(i==null?void 0:i.getAttribute("type"))||"";if(typeof d=="string")switch(d.toLowerCase()){case"hidden":return!1;case"password":return!1}var f=Fh(i,r);if(n&&f)return!0;if(t){var h=t.some(function(p){var g;return!!(!((g=i==null?void 0:i.matches)===null||g===void 0)&&g.call(i,p))});if(!h)return!1}switch(l){case"input":case"select":case"textarea":return r==="change"||r==="click";default:return f?!0:r==="click"}}},s_=function(e){var t,n,r,i=(n=(t=e==null?void 0:e.tagName)===null||t===void 0?void 0:t.toLowerCase)===null||n===void 0?void 0:n.call(t),o=e instanceof HTMLElement?((r=e.getAttribute("contenteditable"))===null||r===void 0?void 0:r.toLowerCase())==="true":!1;return!o_.includes(i)&&!o},a_=function(e){return e?e.split(",").map(function(t){return t.trim()}).filter(function(t){return t.length>0&&t!=="id"&&t!=="class"}):[]},c_=function(e,t){return Object.entries(e).reduce(function(n,r){var i=$(r,2),o=i[0],s=i[1];if(o.startsWith(t)){var a=o.replace(t,"");a&&(n[a]=s||"")}return n},{})},u_=function(e){return e==null||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0},Uh=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return u_(r)||(t[n]=r),t},{})},xu=function(e,t){return e?t.some(function(n){var r;return(r=e==null?void 0:e.matches)===null||r===void 0?void 0:r.call(e,n)})?e:xu(e==null?void 0:e.parentElement,t):null},l_=function(e){return new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),(r=document.head)===null||r===void 0||r.appendChild(i)}catch(o){n(o)}})};function d_(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var Ci=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function f_(e){return e.type==="click"||e.type==="change"}var Bh="1.17.0",p_=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",uh,yi]),h_=["type"],g_=["svg","path","g"],m_=["password","hidden"],v_=128;function y_(e,t){var n,r,i,o,s,a;if(e===null)return null;var c=String(e.tagName).toLowerCase(),u={tag:c},l=Array.from((o=(i=e.parentElement)===null||i===void 0?void 0:i.children)!==null&&o!==void 0?o:[]);l.length&&(u.index=l.indexOf(e),u.indexOfType=l.filter(function(C){return C.tagName===e.tagName}).indexOf(e));var d=(a=(s=e.previousElementSibling)===null||s===void 0?void 0:s.tagName)===null||a===void 0?void 0:a.toLowerCase();d&&(u.prevSib=String(d));var f=e.getAttribute("id");f&&(u.id=String(f));var h=Array.from(e.classList);h.length&&(u.classes=h);var p={},g=Array.from(e.attributes),m=g.filter(function(C){return!p_.has(C.name)}),v=!s_(e);if(!m_.includes(String(e.getAttribute("type")))&&!g_.includes(c))try{for(var y=Q(m),b=y.next();!b.done;b=y.next()){var w=b.value;if(!(v&&!h_.includes(w.name))){if(t.has(w.name)){p[w.name]=Tn;continue}p[w.name]=String(w.value).substring(0,v_)}}}catch(C){n={error:C}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(p).length&&(u.attrs=p),u}function b_(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&n.tagName!=="HTML";)t.push(n),n=n.parentElement;return t}var w_=function(e,t){try{if(e.sourceType==="DOM_ELEMENT"){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch{return}},E_=function(e,t,n){e.forEach(function(r){if(typeof r!="string"&&r.actionType==="ATTACH_EVENT_PROPERTY"){var i=n.extractDataFromDataSource(r.dataSource,t.closestTrackedAncestor);t.targetElementProperties[r.destinationKey]=i}})},Au=(function(){function e(t,n){var r,i,o=this,s;this.replaceSensitiveString=function(f){return au(f,o.additionalMaskTextPatterns)},this.getHierarchy=function(f){var h,p,g,m,v=performance.now(),y=[];if(!f)return[];for(var b=b_(f),w=new Map,C=b.length-1;C>=0;C--){var _=b[C];if(_){var E=a_(_.getAttribute(uh)),P=C===b.length-1?[]:(g=w.get(b[C+1]))!==null&&g!==void 0?g:new Set,T=new Set(ee(ee([],$(P),!1),$(E),!1));w.set(_,T)}}y=b.map(function(V){var z;return y_(V,(z=w.get(V))!==null&&z!==void 0?z:new Set)});var I=function(V){V!=null&&V.attrs&&Object.entries(V.attrs).forEach(function(z){var be=$(z,2),oe=be[0],J=be[1];V.attrs&&(V.attrs[oe]=o.replaceSensitiveString(J))})};try{for(var A=Q(y),O=A.next();!O.done;O=A.next()){var D=O.value;I(D)}}catch(V){h={error:V}}finally{try{O&&!O.done&&(p=A.return)&&p.call(A)}finally{if(h)throw h.error}}var F=performance.now();return(m=o.diagnosticsClient)===null||m===void 0||m.recordHistogram("autocapturePlugin.getHierarchy",F-v),y},this.getNearestLabel=function(f){var h=f.parentElement;if(!h)return"";var p;try{p=h.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch{p=null}return p?o.getText(p):o.getNearestLabel(h)},this.getEventProperties=function(f,h,p){var g,m,v,y,b=(v=(m=h==null?void 0:h.tagName)===null||m===void 0?void 0:m.toLowerCase)===null||v===void 0?void 0:v.call(m),w=typeof h.getBoundingClientRect=="function"?h.getBoundingClientRect():{left:null,top:null},C=o.getHierarchy(h),_=(y=C[0])===null||y===void 0?void 0:y.attrs,E=o.getNearestLabel(h),P=c_(_??{},p),T=(g={},g[UE]=C,g[sh]=b,g[ah]=o.getText(h),g[$E]=w.left==null?null:Math.round(w.left),g[VE]=w.top==null?null:Math.round(w.top),g[HE]=P,g[jE]=E,g[ch]=mi(window.location.href.split("?")[0]),g[qE]=cu(o.replaceSensitiveString),g[WE]=window.innerHeight,g[GE]=window.innerWidth,g);return T[DE]=h.getAttribute("id")||"",T[FE]=h.getAttribute("class"),T[zE]=_==null?void 0:_["aria-label"],b==="a"&&f==="click"&&h instanceof HTMLAnchorElement&&(T[BE]=o.replaceSensitiveString(h.href)),Uh(T)},this.addAdditionalEventProperties=function(f,h,p,g,m){m===void 0&&(m=!1);var v={event:f,timestamp:Date.now(),type:h};if(f_(v)&&v.event.target!==null){if(m){var y=Fh(v.event.target,v.type);if(y)return v.closestTrackedAncestor=v.event.target,v.targetElementProperties=o.getEventProperties(v.type,v.closestTrackedAncestor,g),v}var b=xu(v.event.target,p);return b&&(v.closestTrackedAncestor=b,v.targetElementProperties=o.getEventProperties(v.type,b,g)),v}return v},this.extractDataFromDataSource=function(f,h){if(f.sourceType==="DOM_ELEMENT"){var p=w_(f,h);return p?f.elementExtractType==="TEXT"?o.getText(p):f.elementExtractType==="ATTRIBUTE"&&f.attribute?p.getAttribute(f.attribute):void 0:void 0}},this.getText=function(f){var h=f.closest("[".concat(yi,"]"))!==null;if(h)return Tn;var p="";if(!f.querySelector("[".concat(yi,"], [contenteditable]")))p=f.innerText||"";else{var g=f.cloneNode(!0);g.querySelectorAll("[".concat(yi,"], [contenteditable]")).forEach(function(m){m.innerText=Tn}),p=g.innerText||""}return o.replaceSensitiveString(p.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(f){var h,p,g;if(!f)return{};var m=(g=(p=f==null?void 0:f.tagName)===null||p===void 0?void 0:p.toLowerCase)===null||g===void 0?void 0:g.call(p),v=(h={},h[sh]=m,h[ah]=o.getText(f),h[ch]=window.location.href.split("?")[0],h);return Uh(v)},this.diagnosticsClient=n==null?void 0:n.diagnosticsClient;var a=(s=t.maskTextRegex)!==null&&s!==void 0?s:[],c=[];try{for(var u=Q(a),l=u.next();!l.done;l=u.next()){var d=l.value;if(c.length>=QE)break;if(d instanceof RegExp)c.push(d);else if("pattern"in d&&typeof d.pattern=="string")try{c.push(new RegExp(d.pattern,"i"))}catch{}}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}this.additionalMaskTextPatterns=c}return e})(),S_=(function(){function e(t){var n=t===void 0?{}:t,r=n.origin,i=r===void 0?Xo:r,o=this;this.endpoint=Xo,this.requestCallbacks={},this.onSelect=function(s){o.notify({action:"element-selected",data:s})},this.onTrack=function(s,a){s==="selector-mode-changed"?o.notify({action:"track-selector-mode-changed",data:a}):s==="selector-moved"&&o.notify({action:"track-selector-moved",data:a})},this.endpoint=i}return e.prototype.notify=function(t){var n,r,i,o;(r=(n=this.logger)===null||n===void 0?void 0:n.debug)===null||r===void 0||r.call(n,"Message sent: ",JSON.stringify(t)),(o=(i=window.opener)===null||i===void 0?void 0:i.postMessage)===null||o===void 0||o.call(i,t,this.endpoint)},e.prototype.sendRequest=function(t,n,r){var i=this;r===void 0&&(r={timeout:15e3});var o=d_(),s={id:o,action:t,args:n},a=new Promise(function(c,u){i.requestCallbacks[o]={resolve:c,reject:u},i.notify(s),(r==null?void 0:r.timeout)>0&&setTimeout(function(){u(new Error("".concat(t," timed out (id: ").concat(o,")"))),delete i.requestCallbacks[o]},r.timeout)});return a},e.prototype.handleResponse=function(t){var n;if(!this.requestCallbacks[t.id]){(n=this.logger)===null||n===void 0||n.warn("No callback found for request id: ".concat(t.id));return}this.requestCallbacks[t.id].resolve(t.responseData),delete this.requestCallbacks[t.id]},e.prototype.setup=function(t){var n=this,r=t===void 0?{dataExtractor:new Au({})}:t,i=r.logger,o=r.endpoint,s=r.isElementSelectable,a=r.cssSelectorAllowlist,c=r.actionClickAllowlist,u=r.dataExtractor;this.logger=i,o&&this.endpoint===Xo&&(this.endpoint=o);var l=null;window.addEventListener("message",function(d){var f,h,p,g,m;if((h=(f=n.logger)===null||f===void 0?void 0:f.debug)===null||h===void 0||h.call(f,"Message received: ",JSON.stringify(d)),n.endpoint===d.origin){var v=d==null?void 0:d.data,y=v==null?void 0:v.action;if(y)if("id"in v)(g=(p=n.logger)===null||p===void 0?void 0:p.debug)===null||g===void 0||g.call(p,"Received Response to previous request: ",JSON.stringify(d)),n.handleResponse(v);else if(y==="ping")n.notify({action:"pong"});else if(y==="initialize-visual-tagging-selector"){var b=v==null?void 0:v.data;l_(JE).then(function(){var w;l=(w=window==null?void 0:window.amplitudeVisualTaggingSelector)===null||w===void 0?void 0:w.call(window,{getEventTagProps:u.getEventTagProps,isElementSelectable:function(C){return s?s((b==null?void 0:b.actionType)||"click",C):!0},onTrack:n.onTrack,onSelect:n.onSelect,visualHighlightClass:XE,messenger:n,cssSelectorAllowlist:a,actionClickAllowlist:c,extractDataFromDataSource:u.extractDataFromDataSource,dataExtractor:u,diagnostics:{autocapture:{version:Bh}}}),n.notify({action:"selector-loaded"})}).catch(function(){var w;(w=n.logger)===null||w===void 0||w.warn("Failed to initialize visual tagging selector")})}else y==="close-visual-tagging-selector"&&((m=l==null?void 0:l.close)===null||m===void 0||m.call(l))}}),this.notify({action:"page-loaded"})},e})(),__=5;function C_(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.clickObservable,a=s.pipe(t_(),Qe(function(d){var f=$(d,2),h=f[0],p=f[1],g=h.event.target!==p.event.target,m=Math.abs(p.event.screenX-h.event.screenX)<=20&&Math.abs(p.event.screenY-h.event.screenY)<=20;return g&&!m})),c=s.pipe(JS(r.debounceTime),He(function(){return"timeout"})),u=Cu(a,c),l=s.pipe(e_(0),Qe(Ci),Qe(function(d){return i("click",d.closestTrackedAncestor)}),He(function(d){return o(d)}),ZS(u));return l.subscribe(function(d){var f,h,p=(d.length>=__,mu);try{for(var g=Q(d),m=g.next();!m.done;m=g.next()){var v=m.value;t==null||t.track(p,v.targetElementProperties)}}catch(y){f={error:y}}finally{try{m&&!m.done&&(h=g.return)&&h.call(g)}finally{if(f)throw f.error}}})}function T_(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.changeObservable,a=s.pipe(Qe(Ci),Qe(function(c){return i("change",c.closestTrackedAncestor)}),He(function(c){return o(c)}));return a.subscribe(function(c){t==null||t.track(ME,r("change",c.closestTrackedAncestor))})}function I_(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,s=e.shouldTrackActionClick,a=n.clickObservable,c=n.mutationObservable,u=n.navigateObservable,l=a.pipe(Qe(function(p){return!o("click",p.closestTrackedAncestor)}),He(function(p){var g=xu(p.event.target,r.actionClickAllowlist);return p.closestTrackedAncestor=g,p.closestTrackedAncestor!==null&&(p.targetElementProperties=i(p.type,p.closestTrackedAncestor)),p}),Qe(Ci),Qe(function(p){return s("click",p.closestTrackedAncestor)})),d=[c];u&&d.push(u);var f=Cu.apply(void 0,ee([],$(d),!1)),h=l.pipe(n_(function(p){return f.pipe(Tu(1),LS({first:500,with:function(){return Su}}),He(function(){return p}))}));return h.subscribe(function(p){t==null||t.track(mu,i("click",p.closestTrackedAncestor))})}var $h=function(){return new De(function(e){var t=new MutationObserver(function(n){e.next(n)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Vh=function(e){return e===void 0&&(e="click"),br(document,e,{capture:!0})},x_=function(e,t){try{if(t.subprop_key==="[Amplitude] Element Text")return t.subprop_op==="is"&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if(t.subprop_key==="[Amplitude] Element Hierarchy")return t.subprop_op==="autotrack css match"&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(n){return console.error("Error matching event to filter",n),!1}return!1},ku={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},zh=function(e){var t,n,r,i,o=Object.values(ku).reduce(function(h,p){return h[p]=new Set,h},{});if(!e)return o;try{for(var s=Q(e),a=s.next();!a.done;a=s.next()){var c=a.value;try{try{for(var u=(r=void 0,Q(c.definition)),l=u.next();!l.done;l=u.next()){var d=l.value,f=ku[d.event_type];f&&o[f].add(c.id)}}catch(h){r={error:h}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}catch(h){console.warn("Skipping Labeled Event due to malformed definition",c==null?void 0:c.id,h)}}}catch(h){t={error:h}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},Hh=function(e){var t,n,r,i,o=new Map;try{for(var s=Q(e),a=s.next();!a.done;a=s.next()){var c=a.value;try{for(var u=(r=void 0,Q(c.conditions)),l=u.next();!l.done;l=u.next()){var d=l.value;if(d.type==="LABELED_EVENT"){var f=d.match.eventId,h=o.get(f);h||(h=[],o.set(f,h)),h.push(c)}}}catch(p){r={error:p}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}}}catch(p){t={error:p}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return o},A_=function(e,t){return t.filter(function(n){return n.definition.some(function(r){return ku[r.event_type]===e.type&&r.filters.every(function(i){return x_(e,i)})})})},k_=function(e,t){var n,r,i,o,s=new Set;try{for(var a=Q(e),c=a.next();!c.done;c=a.next()){var u=c.value,l=t.get(u.id);if(l)try{for(var d=(i=void 0,Q(l)),f=d.next();!f.done;f=d.next()){var h=f.value;s.add(h)}}catch(p){i={error:p}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return Array.from(s)},R_=(function(){function e(t,n,r,i){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.dataExtractor=r,this.options=i}return e.prototype.evaluate=function(t){var n,r,i=this.options.pageActions;if(!i)return t;var o=A_(t,Array.from(this.groupedLabeledEvents[t.type]).map(function(l){return i.labeledEvents[l]})),s=k_(o,this.labeledEventToTriggerMap);try{for(var a=Q(s),c=a.next();!c.done;c=a.next()){var u=c.value;E_(u.actions,t,this.dataExtractor)}}catch(l){n={error:l}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return t},e.prototype.update=function(t,n,r){this.groupedLabeledEvents=t,this.labeledEventToTriggerMap=n,this.options=r},e})(),P_=function(e,t,n,r){return new R_(e,t,n,r)},Kt;(function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"})(Kt||(Kt={}));var O_=function(e,t){var n,r,i,o,s,a,c,u;e===void 0&&(e={}),t==null||t.diagnosticsClient.setTag("plugin.autocapture.version",Bh);var l=e.dataAttributePrefix,d=l===void 0?Lp:l,f=e.visualTaggingOptions,h=f===void 0?{enabled:!0,messenger:new S_}:f;e.cssSelectorAllowlist=(n=e.cssSelectorAllowlist)!==null&&n!==void 0?n:Tw,e.actionClickAllowlist=(r=e.actionClickAllowlist)!==null&&r!==void 0?r:Iw,e.debounceTime=(i=e.debounceTime)!==null&&i!==void 0?i:0,e.pageUrlExcludelist=(o=e.pageUrlExcludelist)===null||o===void 0?void 0:o.reduce(function(I,A){if(typeof A=="string"&&I.push(A),A instanceof RegExp&&I.push(A),typeof A=="object"&&A!==null&&"pattern"in A)try{I.push(new RegExp(A.pattern))}catch(O){return console.warn("Invalid regex pattern: ".concat(A.pattern),O),I}return I},[]);var p=OE,g="enrichment",m=[],v=new Au(e,t),y=function(){var I,A=Vh().pipe(He(function(V){return v.addAdditionalEventProperties(V,"click",e.cssSelectorAllowlist,d)}),$n()),O=br(document,"change",{capture:!0}).pipe(He(function(V){return v.addAdditionalEventProperties(V,"change",e.cssSelectorAllowlist,d)}),$n()),D;window.navigation&&(D=br(window.navigation,"navigate").pipe(He(function(V){return v.addAdditionalEventProperties(V,"navigate",e.cssSelectorAllowlist,d)}),$n()));var F=$h().pipe(He(function(V){return v.addAdditionalEventProperties(V,"mutation",e.cssSelectorAllowlist,d)}),$n());return I={},I[Kt.ClickObservable]=A,I[Kt.ChangeObservable]=O,I[Kt.NavigateObservable]=D,I[Kt.MutationObservable]=F,I},b=zh(Object.values((a=(s=e.pageActions)===null||s===void 0?void 0:s.labeledEvents)!==null&&a!==void 0?a:{})),w=Hh((u=(c=e.pageActions)===null||c===void 0?void 0:c.triggers)!==null&&u!==void 0?u:[]),C=P_(b,w,v,e),_=function(I){var A,O;I&&(e.pageActions=U(U({},e.pageActions),I),b=zh(Object.values((A=e.pageActions.labeledEvents)!==null&&A!==void 0?A:{})),w=Hh((O=e.pageActions.triggers)!==null&&O!==void 0?O:[]),C.update(b,w,e))},E=function(I,A){return M(void 0,void 0,void 0,function(){var O,D,F,V,z,be,oe,J,re,G;return N(this,function(ue){return typeof document>"u"?[2]:(I.fetchRemoteConfig&&(I.remoteConfigClient?I.remoteConfigClient.subscribe("analyticsSDK.pageActions","all",function(te){_(te)}):I.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),O=_i(e,e.cssSelectorAllowlist),D=_i(e,e.actionClickAllowlist),F=y(),V=C_({allObservables:F,options:e,amplitude:A,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(V),z=T_({allObservables:F,getEventProperties:function(){for(var te=[],Ce=0;Ce<arguments.length;Ce++)te[Ce]=arguments[Ce];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:A,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(z),be=I_({allObservables:F,options:e,getEventProperties:function(){for(var te=[],Ce=0;Ce<arguments.length;Ce++)te[Ce]=arguments[Ce];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:A,shouldTrackEvent:O,shouldTrackActionClick:D}),m.push(be),(re=I==null?void 0:I.loggerProvider)===null||re===void 0||re.log("".concat(p," has been successfully added.")),window.opener&&h.enabled&&(oe=e.cssSelectorAllowlist,J=e.actionClickAllowlist,(G=h.messenger)===null||G===void 0||G.setup(U(U({dataExtractor:v,logger:I==null?void 0:I.loggerProvider},(I==null?void 0:I.serverZone)&&{endpoint:ZE[I.serverZone]}),{isElementSelectable:_i(e,ee(ee([],$(oe),!1),$(J),!1)),cssSelectorAllowlist:oe,actionClickAllowlist:J}))),[2])})})},P=function(I){return M(void 0,void 0,void 0,function(){return N(this,function(A){return[2,I]})})},T=function(){return M(void 0,void 0,void 0,function(){var I,A,O,D,F;return N(this,function(V){try{for(I=Q(m),A=I.next();!A.done;A=I.next())O=A.value,O.unsubscribe()}catch(z){D={error:z}}finally{try{A&&!A.done&&(F=I.return)&&F.call(I)}finally{if(D)throw D.error}}return[2]})})};return{name:p,type:g,setup:E,execute:P,teardown:T}},jh=3e3;function L_(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,o=n.clickObservable,s=n.mutationObservable,a=n.navigateObservable,c=o.pipe(Qe(Ci),Qe(function(f){return i("click",f.closestTrackedAncestor)}),Qe(function(f){var h=f.event.target;return h.closest('a[target="_blank"]')===null})),u=[s];a&&u.push(a);var l=Cu.apply(void 0,ee([],$(u),!1)),d=c.pipe(Si(function(f){var h,p=new De(function(g){return h=setTimeout(function(){return g.next(f)},jh),function(){clearTimeout(h)}});return KS(p,l.pipe(Tu(1),He(function(){return null}))).pipe(Qe(function(g){return g!==null}))}),i_(jh));return d.subscribe(function(f){var h={"[Amplitude] X":f.event.clientX,"[Amplitude] Y":f.event.clientY};t.track(NE,U(U({},r("click",f.closestTrackedAncestor)),h),{time:f.timestamp})})}var Ru=Pw,qh=Rw,Wh=Ow;function Gh(e,t){var n,r,i,o,s=t.event,a=s.clientX,c=s.clientY;e.yMin=Math.min((n=e.yMin)!==null&&n!==void 0?n:c,c),e.yMax=Math.max((r=e.yMax)!==null&&r!==void 0?r:c,c),e.xMin=Math.min((i=e.xMin)!==null&&i!==void 0?i:a,a),e.xMax=Math.max((o=e.xMax)!==null&&o!==void 0?o:a,a),e.isOutOfBounds=e.yMax-e.yMin>Wh||e.xMax-e.xMin>Wh}function Kh(e){var t=e[0],n=e[e.length-1],r=U({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(i){return{X:i.event.clientX,Y:i.event.clientY,Time:i.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties);return{rageClickEvent:r,time:t.timestamp}}function N_(e,t){var n=Math.max(0,e.length-Ru+1),r=e[n];return t.timestamp-r.timestamp>=qh}function M_(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function D_(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackRageClick,i=n.clickObservable,o=[],s={},a;function c(u){o=[],s={},u&&(Gh(s,u),o.push(u))}return i.pipe(Qe(Ci),Qe(function(u){return r("click",u.closestTrackedAncestor)}),He(function(u){if(a&&clearTimeout(a),Gh(s,u),o.length===0)return o.push(u),null;if(M_(o,u)||N_(o,u)||s.isOutOfBounds){var l=o.length>=Ru?Kh(o):null;return c(u),l}return o.push(u),o.length>=Ru&&(a=setTimeout(function(){var d=Kh(o),f=d.rageClickEvent,h=d.time;t.track(oh,f,{time:h}),c()},qh)),null}),Qe(function(u){return u!==null})).subscribe(function(u){u!==null&&t.track(oh,u.rageClickEvent,{time:u.time})})}var F_=function(e){var t,n,r,i,o;e===void 0&&(e={});var s=LE,a="enrichment",c=[],u=(n=(t=e.rageClicks)===null||t===void 0?void 0:t.cssSelectorAllowlist)!==null&&n!==void 0?n:kw,l=(i=(r=e.deadClicks)===null||r===void 0?void 0:r.cssSelectorAllowlist)!==null&&i!==void 0?i:Aw,d=(o=e.dataAttributePrefix)!==null&&o!==void 0?o:Lp,f=new Au(e),h=ee([],$(new Set(ee(ee([],$(u),!1),$(l),!1))),!1),p=function(){var y,b=Vh("pointerdown").pipe(He(function(_){return f.addAdditionalEventProperties(_,"click",h,d,!0)}),$n()),w;window.navigation&&(w=br(window.navigation,"navigate").pipe(He(function(_){return f.addAdditionalEventProperties(_,"navigate",h,d)}),$n()));var C=$h().pipe(He(function(_){return f.addAdditionalEventProperties(_,"mutation",h,d)}),$n());return y={},y[Kt.ClickObservable]=b,y[Kt.ChangeObservable]=new De,y[Kt.NavigateObservable]=w,y[Kt.MutationObservable]=C,y},g=function(y,b){return M(void 0,void 0,void 0,function(){var w,C,_,E,P,T;return N(this,function(I){return typeof document>"u"?[2]:(w=_i(e,u),C=_i(e,l),_=p(),E=D_({allObservables:_,amplitude:b,shouldTrackRageClick:w}),c.push(E),P=L_({amplitude:b,allObservables:_,getEventProperties:function(A,O){return f.getEventProperties(A,O,d)},shouldTrackDeadClick:C}),c.push(P),(T=y==null?void 0:y.loggerProvider)===null||T===void 0||T.log("".concat(s," has been successfully added.")),[2])})})},m=function(y){return M(void 0,void 0,void 0,function(){return N(this,function(b){return[2,y]})})},v=function(){return M(void 0,void 0,void 0,function(){var y,b,w,C,_;return N(this,function(E){try{for(y=Q(c),b=y.next();!b.done;b=y.next())w=b.value,w.unsubscribe()}catch(P){C={error:P}}finally{try{b&&!b.done&&(_=y.return)&&_.call(y)}finally{if(C)throw C.error}}return[2]})})};return{name:s,type:a,setup:g,execute:m,teardown:v}},U_="@amplitude/plugin-network-capture-browser",Yh="[Amplitude] Network Request",Zh="500-599";function ns(e,t){var n=t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),r="^"+n.replace(/\*/g,".*")+"$",i=new RegExp(r);return i.test(e)}function Jh(e,t){var n,r,i=t.split(",");try{for(var o=Q(i),s=o.next();!s.done;s=o.next()){var a=s.value,c=$(a.split("-").map(Number),2),u=c[0],l=c[1];if(e===u&&l===void 0||e>=u&&e<=l)return!0}}catch(d){n={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function B_(e,t,n,r,i){if(!(e.hosts&&!e.hosts.find(function(s){return ns(t,s)}))&&!(r&&e.urls&&!Qc(r,e.urls))&&!(i&&e.methods&&!e.methods.find(function(s){return i.toLowerCase()===s.toLowerCase()||s==="*"}))){if(n||n===0){var o=e.statusCodeRange||Zh;if(!Jh(n,o))return!1}return!0}}function Xh(e){var t;if(e)try{var n=(t=ke())===null||t===void 0?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),s=r.href,a=r.host;r.hash="",r.search="";var c=r.href;return{query:i,fragment:o,href:s,hrefWithoutQueryOrHash:c,host:a}}catch{return}}function $_(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if(typeof n!="string")return!1;var r=JSON.parse(n),i=r.events;if(i.find(function(o){return o.event_type===Yh}))return!0}catch{}return!1}function Qh(e){if(typeof e!="object"||e===null){if(e)return ee([],$(Vo),!1);if(e===void 0){var t=void 0;return t}return}if(e.length!==0)return e}function eg(e){var t,n;return!(!((t=e==null?void 0:e.allowlist)===null||t===void 0)&&t.length)&&!(!((n=e==null?void 0:e.blocklist)===null||n===void 0)&&n.length)}function V_(e,t){var n;t===void 0&&(t={});var r=Xh(e.url);if(!r)return!1;var i=r.host;if(t.ignoreAmplitudeRequests!==!1&&(ns(i,"*.amplitude.com")||ns(i,"amplitude.com"))||!((n=t.ignoreHosts)===null||n===void 0)&&n.find(function(s){return ns(i,s)})||!t.captureRules&&e.status!==void 0&&!Jh(e.status,Zh))return!1;if(t.captureRules){var o;if(ee([],$(t.captureRules),!1).reverse().find(function(s){if(o=B_(s,i,e.status,e.url,e.method),o){var a=Qh(s.responseHeaders);if(e.responseWrapper&&a){var c=e.responseWrapper.headers(a);c&&(e.responseHeaders=c)}var u=Qh(s.requestHeaders);if(e.requestWrapper&&u){var l=e.requestWrapper.headers(u);l&&(e.requestHeaders=l)}e.responseWrapper&&s.responseBody&&!eg(s.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(s.responseBody.allowlist,s.responseBody.blocklist)),e.requestWrapper&&s.requestBody&&!eg(s.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(s.requestBody.allowlist,s.requestBody.blocklist))}return o!==void 0}),!o)return!1}return!(e.requestWrapper&&$_(i,e.requestWrapper))}function z_(e,t,n,r){return M(this,void 0,void 0,function(){var i,o,s;return N(this,function(a){switch(a.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=$.apply(void 0,[a.sent(),2]),o=i[0],s=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(c){r==null||r.debug("Failed to stringify request body",c)}if(s)try{e["[Amplitude] Response Body"]=JSON.stringify(s)}catch{r==null||r.debug("Failed to stringify response body")}a.label=2;case 2:return n==null||n.track(Yh,e),[2]}})})}function H_(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider,o=t.networkObservable,s=o.pipe(Qe(function(a){return V_(a.event,n)}));return s.subscribe(function(a){var c,u,l,d=a.event,f=Xh(d.url);if(f){var h=(u=d.responseWrapper)===null||u===void 0?void 0:u.bodySize,p=(l=d.requestWrapper)===null||l===void 0?void 0:l.bodySize,g=(c={},c["[Amplitude] URL"]=f.hrefWithoutQueryOrHash,c["[Amplitude] URL Query"]=f.query,c["[Amplitude] URL Fragment"]=f.fragment,c["[Amplitude] Request Method"]=d.method,c["[Amplitude] Status Code"]=d.status,c["[Amplitude] Start Time"]=d.startTime,c["[Amplitude] Completion Time"]=d.endTime,c["[Amplitude] Duration"]=d.duration,c["[Amplitude] Request Body Size"]=p,c["[Amplitude] Response Body Size"]=h,c["[Amplitude] Request Type"]=d.type,c["[Amplitude] Request Headers"]=d.requestHeaders,c["[Amplitude] Response Headers"]=d.responseHeaders,c);z_(g,d,r,i)}})}var Pu;(function(e){e.NetworkObservable="networkObservable"})(Pu||(Pu={}));var j_=function(e){e===void 0&&(e={});var t=U_,n="enrichment",r,i=[],o=function(l,d){var f={event:l,timestamp:Date.now(),type:d};return f},s=function(){var l,d=new De(function(f){var h=new Vw(function(p){var g=o(p,"network");f.next(g)});return Vp.subscribe(h,r),function(){Vp.unsubscribe(h)}});return l={},l[Pu.NetworkObservable]=d,l},a=function(l,d){return M(void 0,void 0,void 0,function(){var f,h;return N(this,function(p){return typeof document>"u"?[2]:(f=s(),r=l==null?void 0:l.loggerProvider,h=H_({allObservables:f,networkTrackingOptions:e,amplitude:d,loggerProvider:r}),i.push(h),r==null||r.log("".concat(t," has been successfully added.")),[2])})})},c=function(l){return M(void 0,void 0,void 0,function(){return N(this,function(d){return[2,l]})})},u=function(){return M(void 0,void 0,void 0,function(){var l,d,f,h,p;return N(this,function(g){try{for(l=Q(i),d=l.next();!d.done;d=l.next())f=d.value,f.unsubscribe()}catch(m){h={error:m}}finally{try{d&&!d.done&&(p=l.return)&&p.call(l)}finally{if(h)throw h.error}}return[2]})})};return{name:t,type:n,setup:a,execute:c,teardown:u}},q_="web-vitals-browser",W_="[Amplitude] Web Vitals";let tg=-1;const wr=e=>{addEventListener("pageshow",(t=>{t.persisted&&(tg=t.timeStamp,e(t))}),!0)},Yt=(e,t,n,r)=>{let i,o;return s=>{t.value>=0&&(s||r)&&(o=t.value-(i??0),(o||i===void 0)&&(i=t.value,t.delta=o,t.rating=((a,c)=>a>c[1]?"poor":a>c[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ou=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Lu=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ti=()=>{const e=Lu();return(e==null?void 0:e.activationStart)??0},Zt=(e,t=-1)=>{const n=Lu();let r="navigate";return tg>=0?r="back-forward-cache":n&&(document.prerendering||Ti()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Nu=new WeakMap;function Mu(e,t){return Nu.get(e)||Nu.set(e,new t),Nu.get(e)}class G_{constructor(){S(this,"t");S(this,"i",0);S(this,"o",[])}h(t){var i;if(t.hadRecentInput)return;const n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this.i+=t.value,this.o.push(t)):(this.i=t.value,this.o=[t]),(i=this.t)==null||i.call(this,t)}}const Ii=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((i=>{Promise.resolve().then((()=>{t(i.getEntries())}))}));return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Du=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Er=-1;const ng=new Set,rg=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Fu=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of ng)t();isFinite(Er)||(Er=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Fu,!0))}},rs=()=>{var e;if(Er<0){const t=Ti();Er=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter((r=>r.name==="hidden"&&r.startTime>t))[0])==null?void 0:e.startTime)??rg(),addEventListener("visibilitychange",Fu,!0),addEventListener("prerenderingchange",Fu,!0),wr((()=>{setTimeout((()=>{Er=rg()}))}))}return{get firstHiddenTime(){return Er},onHidden(t){ng.add(t)}}},is=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},ig=[1800,3e3],og=(e,t={})=>{is((()=>{const n=rs();let r,i=Zt("FCP");const o=Ii("paint",(s=>{for(const a of s)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(i.value=Math.max(a.startTime-Ti(),0),i.entries.push(a),r(!0)))}));o&&(r=Yt(e,i,ig,t.reportAllChanges),wr((s=>{i=Zt("FCP"),r=Yt(e,i,ig,t.reportAllChanges),Ou((()=>{i.value=performance.now()-s.timeStamp,r(!0)}))})))}))},sg=[.1,.25],K_=(e,t={})=>{const n=rs();og(Du((()=>{let r,i=Zt("CLS",0);const o=Mu(t,G_),s=c=>{for(const u of c)o.h(u);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=Ii("layout-shift",s);a&&(r=Yt(e,i,sg,t.reportAllChanges),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),wr((()=>{o.i=0,i=Zt("CLS",0),r=Yt(e,i,sg,t.reportAllChanges),Ou((()=>r()))})),setTimeout(r))})))};let ag=0,Uu=1/0,os=0;const Y_=e=>{for(const t of e)t.interactionId&&(Uu=Math.min(Uu,t.interactionId),os=Math.max(os,t.interactionId),ag=os?(os-Uu)/7+1:0)};let Bu;const cg=()=>Bu?ag:performance.interactionCount??0,Z_=()=>{"interactionCount"in performance||Bu||(Bu=Ii("event",Y_,{type:"event",buffered:!0,durationThreshold:0}))};let ug=0;class J_{constructor(){S(this,"u",[]);S(this,"l",new Map);S(this,"m");S(this,"p")}v(){ug=cg(),this.u.length=0,this.l.clear()}L(){const t=Math.min(this.u.length-1,Math.floor((cg()-ug)/50));return this.u[t]}h(t){var i,o;if((i=this.m)==null||i.call(this,t),!t.interactionId&&t.entryType!=="first-input")return;const n=this.u.at(-1);let r=this.l.get(t.interactionId);if(r||this.u.length<10||t.duration>n.P){if(r?t.duration>r.P?(r.entries=[t],r.P=t.duration):t.duration===r.P&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],P:t.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort(((s,a)=>a.P-s.P)),this.u.length>10){const s=this.u.splice(10);for(const a of s)this.l.delete(a.id)}(o=this.p)==null||o.call(this,r)}}}const lg=e=>{const t=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?e():(e=Du(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},dg=[200,500],X_=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=rs();is((()=>{Z_();let r,i=Zt("INP");const o=Mu(t,J_),s=c=>{lg((()=>{for(const l of c)o.h(l);const u=o.L();u&&u.P!==i.value&&(i.value=u.P,i.entries=u.entries,r())}))},a=Ii("event",s,{durationThreshold:t.durationThreshold??40});r=Yt(e,i,dg,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),wr((()=>{o.v(),i=Zt("INP"),r=Yt(e,i,dg,t.reportAllChanges)})))}))};class Q_{constructor(){S(this,"m")}h(t){var n;(n=this.m)==null||n.call(this,t)}}const fg=[2500,4e3],eC=(e,t={})=>{is((()=>{const n=rs();let r,i=Zt("LCP");const o=Mu(t,Q_),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)o.h(u),u.startTime<n.firstHiddenTime&&(i.value=Math.max(u.startTime-Ti(),0),i.entries=[u],r())},a=Ii("largest-contentful-paint",s);if(a){r=Yt(e,i,fg,t.reportAllChanges);const c=Du((()=>{s(a.takeRecords()),a.disconnect(),r(!0)})),u=l=>{l.isTrusted&&(lg(c),removeEventListener(l.type,u,{capture:!0}))};for(const l of["keydown","click","visibilitychange"])addEventListener(l,u,{capture:!0});wr((l=>{i=Zt("LCP"),r=Yt(e,i,fg,t.reportAllChanges),Ou((()=>{i.value=performance.now()-l.timeStamp,r(!0)}))}))}}))},pg=[800,1800],$u=e=>{document.prerendering?is((()=>$u(e))):document.readyState!=="complete"?addEventListener("load",(()=>$u(e)),!0):setTimeout(e)},tC=(e,t={})=>{let n=Zt("TTFB"),r=Yt(e,n,pg,t.reportAllChanges);$u((()=>{const i=Lu();i&&(n.value=Math.max(i.responseStart-Ti(),0),n.entries=[i],r(!0),wr((()=>{n=Zt("TTFB",0),r=Yt(e,n,pg,t.reportAllChanges),r(!0)})))}))};function nC(e){var t,n=((t=e.entries[0])===null||t===void 0?void 0:t.startTime)||0;return performance.timeOrigin+n}function xi(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(nC(e)),navigationStart:Math.floor(performance.timeOrigin)}}var rC=function(){var e=null,t=ke(),n=t==null?void 0:t.document,r=t==null?void 0:t.location,i=function(a,c){return M(void 0,void 0,void 0,function(){var u,l,d;return N(this,function(f){return u=function(h){var p;if(!h)return"";var g=h;try{g=decodeURI(h)}catch(m){(p=a.loggerProvider)===null||p===void 0||p.error("Malformed URI sequence: ",m)}return g},n===void 0?[2]:(l=u(r==null?void 0:r.href),d={"[Amplitude] Page Domain":(r==null?void 0:r.hostname)||"","[Amplitude] Page Location":l,"[Amplitude] Page Path":u(r==null?void 0:r.pathname),"[Amplitude] Page Title":typeof document<"u"&&document.title||"","[Amplitude] Page URL":l.split("?")[0]},eC(function(h){d["[Amplitude] LCP"]=xi(h)}),og(function(h){d["[Amplitude] FCP"]=xi(h)}),X_(function(h){d["[Amplitude] INP"]=xi(h)}),K_(function(h){d["[Amplitude] CLS"]=xi(h)}),tC(function(h){d["[Amplitude] TTFB"]=xi(h)}),e=function(){n.visibilityState==="hidden"&&e&&(c.track(W_,d),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e),[2])})})},o=function(a){return M(void 0,void 0,void 0,function(){return N(this,function(c){return[2,a]})})},s=function(){return M(void 0,void 0,void 0,function(){return N(this,function(a){return e&&(n==null||n.removeEventListener("visibilitychange",e)),[2]})})};return{name:q_,type:"enrichment",setup:i,execute:o,teardown:s}},hg=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},iC=function(e){return Object.values(e).every(function(t){return!t})},oC=function(e,t,n,r,i){i===void 0&&(i=!0),e.referrer;var o=e.referring_domain,s=Uo(e,["referrer","referring_domain"]),a=t||{};a.referrer;var c=a.referring_domain,u=Uo(a,["referrer","referring_domain"]);if(sC(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&iC(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var l=JSON.stringify(s)!==JSON.stringify(u),d=hg(o||"")!==hg(c||""),f=!t||l||d;return f?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),f},sC=function(e,t){return e===void 0&&(e=[]),t===void 0&&(t=""),e.some(function(n){return n instanceof RegExp?n.test(t):n===t})},aC=function(e,t){var n=U(U({},$o),e),r=Object.entries(n).reduce(function(i,o){var s,a=$(o,2),c=a[0],u=a[1];return i.setOnce("initial_".concat(c),(s=u??t.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),u?i.set(c,u):i.unset(c)},new pi);return wp(r)},cC=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},uC=(function(){function e(t,n){var r;this.shouldTrackNewCampaign=!1,this.options=U({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:cC((r=n.cookieOptions)===null||r===void 0?void 0:r.domain)},t),this.storage=n.cookieStorage,this.storageKey=Rp(n.apiKey,"MKTG"),this.webExpStorageKey=Rp(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=$o,this.sessionTimeout=n.sessionTimeout,this.lastEventTime=n.lastEventTime,this.logger=n.loggerProvider,n.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return M(this,void 0,void 0,function(){var t,n;return N(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:return n=$.apply(void 0,[r.sent(),2]),this.currentCampaign=n[0],this.previousCampaign=n[1],t=this.lastEventTime?Ip(this.sessionTimeout,this.lastEventTime):!0,oC(this.currentCampaign,this.previousCampaign,this.options,this.logger,t)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return M(this,void 0,void 0,function(){var t;return N(this,function(n){switch(n.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return t=n.sent(),t?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[4,Promise.all([t||new zp().parse(),this.storage.get(this.storageKey)])];case 4:return[2,n.sent()]}})})},e.prototype.generateCampaignEvent=function(t){this.shouldTrackNewCampaign=!1;var n=aC(this.currentCampaign,this.options);return t&&(n.event_id=t),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e})(),ss="AMP_CURRENT_PAGE",as="AMP_PREVIOUS_PAGE",Sr="AMP_URL_INFO",Ai;(function(e){e.Direct="direct",e.Internal="internal",e.External="external"})(Ai||(Ai={}));var lC=new Set([Mt.IDENTIFY,Mt.GROUP_IDENTIFY,Mt.REVENUE]),dC=function(){var e=ke(),t=void 0,n=!1,r=void 0,i=!1,o=!1,s=function(d){var f;try{var h=mi(d,r);f=new URL(h).hostname}catch(p){r==null||r.error("Could not parse URL: ",p)}return f},a=function(d){var f=typeof location<"u"&&location.hostname||"",h=d?s(d):void 0;switch(h){case void 0:return Ai.Direct;case f:return Ai.Internal;default:return Ai.External}},c=function(){return M(void 0,void 0,void 0,function(){var d,f,h,p,g;return N(this,function(m){switch(m.label){case 0:return t&&n?[4,t.get(Sr)]:[3,3];case 1:return d=m.sent(),f=mi(typeof location<"u"&&location.href||""),h=(d==null?void 0:d[ss])||"",p=void 0,f===h?p=(d==null?void 0:d[as])||"":h?p=h:p=document.referrer||"",[4,t.set(Sr,(g={},g[ss]=f,g[as]=p,g))];case 2:m.sent(),m.label=3;case 3:return[2]}})})},u=function(){c()},l={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(d,f){return M(void 0,void 0,void 0,function(){return N(this,function(h){switch(h.label){case 0:return r=d.loggerProvider,r.log("Installing @amplitude/plugin-page-url-enrichment-browser"),o=!0,e?(t=new nu(e.sessionStorage),[4,t.isEnabled()]):[3,2];case 1:n=h.sent(),e.addEventListener("popstate",u),i||(e.history.pushState=new Proxy(e.history.pushState,{apply:function(p,g,m){var v=$(m,3),y=v[0],b=v[1],w=v[2];p.apply(g,[y,b,w]),o&&u()}}),e.history.replaceState=new Proxy(e.history.replaceState,{apply:function(p,g,m){var v=$(m,3),y=v[0],b=v[1],w=v[2];p.apply(g,[y,b,w]),o&&u()}}),i=!0),h.label=2;case 2:return[2]}})})},execute:function(d){return M(void 0,void 0,void 0,function(){var f,h,p,g,m;return N(this,function(v){switch(v.label){case 0:return f=mi(typeof location<"u"&&location.href||""),t&&n?[4,t.get(Sr)]:[3,5];case 1:return h=v.sent(),h!=null&&h[ss]?[3,3]:[4,t.set(Sr,(m={},m[ss]=f,m[as]=document.referrer||"",m))];case 2:v.sent(),v.label=3;case 3:return[4,t.get(Sr)];case 4:if(p=v.sent(),g="",p&&(g=p[as]||""),lC.has(d.event_type))return[2,d];d.event_properties=U(U({},d.event_properties||{}),{"[Amplitude] Page Domain":ki(d,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":ki(d,"[Amplitude] Page Location",f),"[Amplitude] Page Path":ki(d,"[Amplitude] Page Path",typeof location<"u"&&mi(location.pathname)||""),"[Amplitude] Page Title":ki(d,"[Amplitude] Page Title",cu(au)),"[Amplitude] Page URL":ki(d,"[Amplitude] Page URL",f.split("?")[0]),"[Amplitude] Previous Page Location":g,"[Amplitude] Previous Page Type":a(g)}),v.label=5;case 5:return[2,d]}})})},teardown:function(){return M(void 0,void 0,void 0,function(){return N(this,function(d){switch(d.label){case 0:return e&&(e.removeEventListener("popstate",u),o=!1),t&&n?[4,t.set(Sr,{})]:[3,2];case 1:d.sent(),d.label=2;case 2:return[2]}})})}};return l};function ki(e,t,n){return e.event_properties||(e.event_properties={}),e.event_properties[t]===void 0?n:e.event_properties[t]}var fC=(function(e){rt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._diagnosticsSampleRate=0,n}return t.prototype.init=function(n,r,i){n===void 0&&(n="");var o,s;return arguments.length>2?(o=r,s=i):typeof r=="string"?(o=r,s=void 0):(o=r==null?void 0:r.userId,s=r),ct(this._init(U(U({},s),{userId:o,apiKey:n})))},t.prototype._init=function(n){var r,i,o,s,a;return M(this,void 0,void 0,function(){var c,u,l,d,f,h,p,g,m,v=this;return N(this,function(y){switch(y.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,yE(n.apiKey,n,this)]);case 1:return c=y.sent(),!((r=c.remoteConfig)===null||r===void 0)&&r.fetchRemoteConfig?(u=new _w(c.apiKey,c.loggerProvider,c.serverZone,(i=c.remoteConfig)===null||i===void 0?void 0:i.serverUrl),[4,new Promise(function(b){u==null||u.subscribe("configs.analyticsSDK.browserSDK","all",function(w,C,_){c.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:w,source:C,lastFetch:_},null,2)),w&&PE(w,c),b()})})]):[3,3];case 2:y.sent(),y.label=3;case 3:return l=new mw(c.apiKey,c.loggerProvider,c.serverZone,{enabled:c.enableDiagnostics,sampleRate:c.diagnosticsSampleRate||this._diagnosticsSampleRate}),l.setTag("library","".concat(Yp,"/").concat(du)),[4,e.prototype._init.call(this,c)];case 4:return y.sent(),this.logBrowserOptions(c),this.config.diagnosticsClient=l,this.config.remoteConfigClient=u,Hp(this.config.defaultTracking)?(d=eE(this.config),this.webAttribution=new uC(d,this.config),[4,this.webAttribution.init()]):[3,6];case 5:y.sent(),y.label=6;case 6:return f=Go(),h=f.ampTimestamp?Number(f.ampTimestamp):void 0,p=h?Date.now()<h:!0,this.config.identify&&this.identify(this.config.identify),g=p&&!Number.isNaN(Number(f.ampSessionId))?Number(f.ampSessionId):void 0,this.setSessionId((a=(s=(o=n.sessionId)!==null&&o!==void 0?o:g)!==null&&s!==void 0?s:this.config.sessionId)!==null&&a!==void 0?a:Date.now()),m=gi(n.instanceName),m.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Cw?[3,8]:[4,this.add(RE()).promise];case 7:y.sent(),y.label=8;case 8:return[4,this.add(new G2({diagnosticsClient:l})).promise];case 9:return y.sent(),[4,this.add(new rE).promise];case 10:return y.sent(),[4,this.add(new iw).promise];case 11:return y.sent(),kE(this.config),Ww(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(AE()).promise]):[3,13];case 12:y.sent(),y.label=13;case 13:return Gw(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(xE()).promise]):[3,15];case 14:y.sent(),y.label=15;case 15:return jp(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(_E(Qw(this.config))).promise]):[3,17];case 16:y.sent(),y.label=17;case 17:return Gp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(O_(Zw(this.config),{diagnosticsClient:l})).promise]):[3,19];case 18:y.sent(),y.label=19;case 19:return Kp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(F_(Jw(this.config))).promise]):[3,21];case 20:y.sent(),y.label=21;case 21:return Wp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(j_(Xw(this.config))).promise]):[3,23];case 22:y.sent(),y.label=23;case 23:return Yw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(rC()).promise]):[3,25];case 24:y.sent(),y.label=25;case 25:return Kw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(dC()).promise]):[3,27];case 26:y.sent(),y.label=27;case 27:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 28:return y.sent(),m.eventBridge.setEventReceiver(function(b){var w=b.eventProperties||{},C=w.time,_=Uo(w,["time"]),E=typeof C=="number"?{time:C}:void 0;v.track(b.eventType,_,E)}),[2]}})})},t.prototype.getUserId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.userId},t.prototype.setUserId=function(n){if(!this.config){this.q.push(this.setUserId.bind(this,n));return}this.config.loggerProvider.debug("function setUserId: ",n),(n!==this.config.userId||n===void 0)&&(this.config.userId=n,this.timeline.onIdentityChanged({userId:n}),nw(n,this.config.instanceName))},t.prototype.getDeviceId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.deviceId},t.prototype.setDeviceId=function(n){if(!this.config){this.q.push(this.setDeviceId.bind(this,n));return}this.config.loggerProvider.debug("function setDeviceId: ",n),n!==this.config.deviceId&&(this.config.deviceId=n,this.timeline.onIdentityChanged({deviceId:n}),rw(n,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(_n()),this.setUserId(void 0)},t.prototype.getIdentity=function(){var n,r;return{deviceId:(n=this.config)===null||n===void 0?void 0:n.deviceId,userId:(r=this.config)===null||r===void 0?void 0:r.userId,userProperties:this.userProperties}},t.prototype.getOptOut=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.optOut},t.prototype.getSessionId=function(){var n;return(n=this.config)===null||n===void 0?void 0:n.sessionId},t.prototype.setSessionId=function(n){var r,i=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,n)),ct(Promise.resolve());if(n===this.config.sessionId)return ct(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",n);var o=this.getSessionId();o!==n&&this.timeline.onSessionIdChanged(n);var s=this.config.lastEventTime,a=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1;this.config.sessionId=n,this.config.lastEventTime=void 0,this.config.pageCounter=0,qp(this.config.defaultTracking)&&(o&&s&&i.push(this.track(Qp,void 0,{device_id:this.previousSessionDeviceId,event_id:++a,session_id:o,time:s+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var c=this.trackCampaignEventIfNeeded(++a,i);return qp(this.config.defaultTracking)&&i.push(this.track(Xp,void 0,{event_id:c?++a:a,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,ct(Promise.all(i))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(n){if(!this.config){this.q.push(this.setTransport.bind(this,n));return}this.config.transportProvider=eh(n)},t.prototype.identify=function(n,r){if(lu(n)){var i=n._q;n._q=[],n=uu(new pi,i)}return r!=null&&r.user_id&&this.setUserId(r.user_id),r!=null&&r.device_id&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,n,r)},t.prototype.groupIdentify=function(n,r,i,o){if(lu(i)){var s=i._q;i._q=[],i=uu(new pi,s)}return e.prototype.groupIdentify.call(this,n,r,i,o)},t.prototype.revenue=function(n,r){if(lu(n)){var i=n._q;n._q=[],n=uu(new $2,i)}return e.prototype.revenue.call(this,n,r)},t.prototype.trackCampaignEventIfNeeded=function(n,r){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var i=this.webAttribution.generateCampaignEvent(n);return r?r.push(this.track(i).promise):this.track(i),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(n){return M(this,void 0,void 0,function(){var r,i,o;return N(this,function(s){return r=Date.now(),i=Ip(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),n.event_type!==Xp&&n.event_type!==Qp&&(!n.session_id||n.session_id===this.getSessionId())&&(i||o?(this.setSessionId(r),o&&this.config.loggerProvider.log("Created a new session for new campaign.")):i||this.trackCampaignEventIfNeeded()),n.event_type===Mt.IDENTIFY&&n.user_properties&&(this.userProperties=this.getOperationAppliedUserProperties(n.user_properties)),[2,e.prototype.process.call(this,n)]})})},t.prototype.logBrowserOptions=function(n){try{var r=U(U({},n),{apiKey:n.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(r))}catch(i){this.config.loggerProvider.error("Error logging browser config",i)}},t.prototype._setDiagnosticsSampleRate=function(n){if(!(n>1||n<0)&&!this.config){this._diagnosticsSampleRate=n;return}},t})(B2),gg=function(){var e=new fC;return{init:Ae(e.init.bind(e),"init",Ie(e),xe(e,["config"])),add:Ae(e.add.bind(e),"add",Ie(e),xe(e,["config.apiKey","timeline.plugins"])),remove:Ae(e.remove.bind(e),"remove",Ie(e),xe(e,["config.apiKey","timeline.plugins"])),track:Ae(e.track.bind(e),"track",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),logEvent:Ae(e.logEvent.bind(e),"logEvent",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),identify:Ae(e.identify.bind(e),"identify",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),groupIdentify:Ae(e.groupIdentify.bind(e),"groupIdentify",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),setGroup:Ae(e.setGroup.bind(e),"setGroup",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),revenue:Ae(e.revenue.bind(e),"revenue",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),flush:Ae(e.flush.bind(e),"flush",Ie(e),xe(e,["config.apiKey","timeline.queue.length"])),getUserId:Ae(e.getUserId.bind(e),"getUserId",Ie(e),xe(e,["config","config.userId"])),setUserId:Ae(e.setUserId.bind(e),"setUserId",Ie(e),xe(e,["config","config.userId"])),getDeviceId:Ae(e.getDeviceId.bind(e),"getDeviceId",Ie(e),xe(e,["config","config.deviceId"])),setDeviceId:Ae(e.setDeviceId.bind(e),"setDeviceId",Ie(e),xe(e,["config","config.deviceId"])),reset:Ae(e.reset.bind(e),"reset",Ie(e),xe(e,["config","config.userId","config.deviceId"])),getSessionId:Ae(e.getSessionId.bind(e),"getSessionId",Ie(e),xe(e,["config"])),setSessionId:Ae(e.setSessionId.bind(e),"setSessionId",Ie(e),xe(e,["config"])),extendSession:Ae(e.extendSession.bind(e),"extendSession",Ie(e),xe(e,["config"])),setOptOut:Ae(e.setOptOut.bind(e),"setOptOut",Ie(e),xe(e,["config"])),setTransport:Ae(e.setTransport.bind(e),"setTransport",Ie(e),xe(e,["config"])),getIdentity:Ae(e.getIdentity.bind(e),"getIdentity",Ie(e),xe(e,["config"])),getOptOut:Ae(e.getOptOut.bind(e),"getOptOut",Ie(e),xe(e,["config"])),_setDiagnosticsSampleRate:Ae(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",Ie(e),xe(e,["config"]))}};gg();const Vu={production:"be237974d6ba66e5ed3bbf56ac4b6e48",development:"000e3bbcc2c10d22df926468ee9aef91"},pC={plan:{version:"168",branch:"main",source:"checkout-library",versionId:"6c9f59d1-26b3-4926-a2f0-d7d68292d669"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}};class mg{constructor(t){S(this,"event_type","AstroPay Payment Card Clicked");this.event_properties=t,this.event_properties=t}}class vg{constructor(t){S(this,"event_type","AstroPay Payment Clicked");this.event_properties=t,this.event_properties=t}}class yg{constructor(t){S(this,"event_type","AstroPay Payment Impression");this.event_properties=t,this.event_properties=t}}class bg{constructor(t){S(this,"event_type","AstroPay Payment Link Copied");this.event_properties=t,this.event_properties=t}}class wg{constructor(t){S(this,"event_type","AstroPay Payment Phone Number Entered");this.event_properties=t,this.event_properties=t}}class Eg{constructor(t){S(this,"event_type","AstroPay Payment Started");this.event_properties=t,this.event_properties=t}}class Sg{constructor(t){S(this,"event_type","AstroPay Payment User Identified");this.event_properties=t,this.event_properties=t}}const Ri=()=>({promise:Promise.resolve()});class hC{constructor(){S(this,"disabled",!1);S(this,"amplitude")}get client(){return this.isInitializedAndEnabled(),this.amplitude}get isLoaded(){return this.amplitude!=null}isInitializedAndEnabled(){return this.amplitude?!this.disabled:(console.error("ERROR: Ampli is not yet initialized. Have you called ampli.load() on app start?"),!1)}load(t){if(this.disabled=t.disabled??!1,this.amplitude)return console.warn("WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup."),Ri();let n=null;if(t.client&&"apiKey"in t.client?n=t.client.apiKey:"environment"in t&&(n=Vu[t.environment]),t.client&&"instance"in t.client)this.amplitude=t.client.instance;else if(n){this.amplitude=gg();const r=t.client&&"configuration"in t.client?t.client.configuration:{};return this.amplitude.init(n,void 0,{...pC,...r})}else console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'");return Ri()}identify(t,n,r){if(!this.isInitializedAndEnabled())return Ri();t&&(r={...r,user_id:t});const i=new pi,o=n;if(o!=null)for(const[s,a]of Object.entries(o))i.set(s,a);return this.amplitude.identify(i,r)}flush(){return this.isInitializedAndEnabled()?this.amplitude.flush():Ri()}track(t,n){return this.isInitializedAndEnabled()?this.amplitude.track(t,void 0,n):Ri()}astroPayPaymentCardClicked(t,n){return this.track(new mg(t),n)}astroPayPaymentClicked(t,n){return this.track(new vg(t),n)}astroPayPaymentImpression(t,n){return this.track(new yg(t),n)}astroPayPaymentLinkCopied(t,n){return this.track(new bg(t),n)}astroPayPaymentPhoneNumberEntered(t,n){return this.track(new wg(t),n)}astroPayPaymentStarted(t,n){return this.track(new Eg(t),n)}astroPayPaymentUserIdentified(t,n){return this.track(new Sg(t),n)}}const cs=new hC;class Pi{}S(Pi,"init",()=>{const n=Ze.getEnvironment()==="production";cs.load({environment:n?"production":"development",client:{apiKey:n?Vu.production:Vu.development}})}),S(Pi,"trackEvent",(t,n,r)=>{typeof t=="string"?cs.client.track(t,n,r):cs.track(t)}),S(Pi,"cleanData",()=>{cs.client.reset()});const us={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},un=console,_r={};Object.keys(us).forEach(e=>{_r[e]=un[e]});const Oi="Datadog Browser SDK:",ae={debug:_r.debug.bind(un,Oi),log:_r.log.bind(un,Oi),info:_r.info.bind(un,Oi),warn:_r.warn.bind(un,Oi),error:_r.error.bind(un,Oi)},ls="https://docs.datadoghq.com",gC=`${ls}/real_user_monitoring/browser/troubleshooting`,zu="More details:";function _g(e,t){return(...n)=>{try{return e(...n)}catch(r){ae.error(t,r)}}}function xn(e){return e!==0&&Math.random()*100<=e}function ds(e,t){return+e.toFixed(t)}function mC(e){return Li(e)&&e>=0&&e<=100}function Li(e){return typeof e=="number"}const et=1e3,ut=60*et,Cg=60*ut,Tg=365*(24*Cg);function fs(e){return{relative:e,timeStamp:yC(e)}}function vC(e){return{relative:Hu(e),timeStamp:e}}function yC(e){const t=Rt()-performance.now();return t>Ni()?Math.round(Cr(t,e)):wC(e)}function bC(){return Math.round(Rt()-Cr(Ni(),performance.now()))}function K(e){return Li(e)?ds(e*1e6,0):e}function Rt(){return new Date().getTime()}function Ue(){return Rt()}function Pt(){return performance.now()}function it(){return{relative:Pt(),timeStamp:Ue()}}function Ig(){return{relative:0,timeStamp:Ni()}}function je(e,t){return t-e}function Cr(e,t){return e+t}function Hu(e){return e-Ni()}function wC(e){return Math.round(Cr(Ni(),e))}function EC(e){return e<Tg}let ju;function Ni(){return ju===void 0&&(ju=performance.timing.navigationStart),ju}const Mi=1024,xg=1024*Mi,SC=/[^\u0000-\u007F]/;function Ag(e){return SC.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function _C(e){const t=e.reduce((i,o)=>i+o.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}function Di(e){return{...e}}function ps(e,t){return Object.keys(e).some(n=>e[n]===t)}function Vn(e){return Object.keys(e).length===0}function CC(e,t){const n={};for(const r of Object.keys(e))n[r]=t(e[r]);return n}function Jt(){if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get(){return this},configurable:!0});let e=_dd_temp_;return delete Object.prototype._dd_temp_,typeof e!="object"&&(typeof self=="object"?e=self:typeof window=="object"?e=window:e={}),e}function An(e,t){const n=Jt();let r;return n.Zone&&typeof n.Zone.__symbol__=="function"&&(r=e[n.Zone.__symbol__(t)]),r||(r=e[t]),r}let qu,kg=!1;function TC(e){qu=e}function IC(e){kg=e}function Z(e){return function(){return zn(e,this,arguments)}}function zn(e,t,n){try{return e.apply(t,n)}catch(r){ln(r)}}function ln(e){if(Wu(e),qu)try{qu(e)}catch(t){Wu(t)}}function Wu(...e){kg&&ae.error("[MONITOR]",...e)}function Be(e,t){return An(Jt(),"setTimeout")(Z(e),t)}function lt(e){An(Jt(),"clearTimeout")(e)}function Tr(e,t){return An(Jt(),"setInterval")(Z(e),t)}function hs(e){An(Jt(),"clearInterval")(e)}class me{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.observers.push(t),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter(n=>t!==n),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(t){this.observers.forEach(n=>n(t))}}function Rg(...e){return new me(t=>{const n=e.map(r=>r.subscribe(i=>t.notify(i)));return()=>n.forEach(r=>r.unsubscribe())})}function kn(e,t,n){const r=n&&n.leading!==void 0?n.leading:!0,i=n&&n.trailing!==void 0?n.trailing:!0;let o=!1,s,a;return{throttled:(...c)=>{if(o){s=c;return}r?e(...c):s=c,o=!0,a=Be(()=>{i&&s&&e(...s),o=!1,s=void 0},t)},cancel:()=>{lt(a),o=!1,s=void 0}}}function ce(){}function qe(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,qe)}const gs=/([\w-]+)\s*=\s*([^;]+)/g;function Fi(e,t){for(gs.lastIndex=0;;){const n=gs.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function xC(e){const t=new Map;for(gs.lastIndex=0;;){const n=gs.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function Pg(e,t,n=""){const r=e.charCodeAt(t-1),o=r>=55296&&r<=56319?t+1:t;return e.length<=o?e:`${e.slice(0,o)}${n}`}function AC(){return Og()===0}function kC(){return Og()===1}let ms;function Og(){return ms??(ms=RC())}function RC(e=window){var t;const n=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(n)?0:((t=e.navigator.vendor)===null||t===void 0?void 0:t.indexOf("Apple"))===0||/safari/i.test(n)&&!/chrome|android/i.test(n)?1:2}function Ui(e,t,n=0,r){const i=new Date;i.setTime(i.getTime()+n);const o=`expires=${i.toUTCString()}`,s=r&&r.crossSite?"none":"strict",a=r&&r.domain?`;domain=${r.domain}`:"",c=r&&r.secure?";secure":"",u=r&&r.partitioned?";partitioned":"";document.cookie=`${e}=${t};${o};path=/;samesite=${s}${a}${c}${u}`}function Gu(e){return Fi(document.cookie,e)}let Ku;function Rn(e){return Ku||(Ku=xC(document.cookie)),Ku.get(e)}function Lg(e,t){Ui(e,"",0,t)}function PC(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${qe()}`,n="test";Ui(t,n,ut,e);const r=Gu(t)===n;return Lg(t,e),r}catch(t){return ae.error(t),!1}}let Yu;function OC(){if(Yu===void 0){const e=`dd_site_test_${qe()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!Gu(e);)r=`${n.pop()}.${r}`,Ui(e,t,et,{domain:r});Lg(e,{domain:r}),Yu=r}return Yu}const Ir="_dd_s";function LC(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function Ng(e){return Object.values(e)}function Zu(e){return Object.entries(e)}const Hn=4*Cg,Mg=15*ut,NC=Tg,Bi={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Dg=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Ju="&";function MC(e){return!!e&&(e.indexOf(Ju)!==-1||Dg.test(e))}const DC="1";function jn(e,t){const n={isExpired:DC};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=qe()),n}function vs(e){return Vn(e)}function Fg(e){return!vs(e)}function ys(e){return e.isExpired!==void 0||!FC(e)}function FC(e){return(e.created===void 0||Rt()-Number(e.created)<Hn)&&(e.expire===void 0||Rt()<Number(e.expire))}function Ug(e){e.expire=String(Rt()+Mg)}function Xu(e){return Zu(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Ju)}function Bg(e){const t={};return MC(e)&&e.split(Ju).forEach(n=>{const r=Dg.exec(n);if(r!==null){const[,i,o]=r;i==="aid"?t.anonymousId=o:t[i]=o}}),t}const UC="_dd",BC="_dd_r",$C="_dd_l",VC="rum",zC="logs";function HC(e){if(!Rn(Ir)){const n=Rn(UC),r=Rn(BC),i=Rn($C),o={};n&&(o.id=n),i&&/^[01]$/.test(i)&&(o[zC]=i),r&&/^[012]$/.test(r)&&(o[VC]=r),Fg(o)&&(Ug(o),e.persistSession(o))}}function $g(e){const t=KC(e);return PC(t)?{type:Bi.COOKIE,cookieOptions:t}:void 0}function jC(e,t){const n={isLockEnabled:AC(),persistSession:qC(t),retrieveSession:GC,expireSession:r=>WC(t,r,e)};return HC(n),n}function qC(e){return t=>{Ui(Ir,Xu(t),Mg,e)}}function WC(e,t,n){const r=jn(t,n);Ui(Ir,Xu(r),n.trackAnonymousUser?NC:Hn,e)}function GC(){const e=Gu(Ir);return Bg(e)}function KC(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=OC()),t}const YC="_dd_test_";function Vg(){try{const e=qe(),t=`${YC}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Bi.LOCAL_STORAGE}:void 0}catch{return}}function ZC(e){return{isLockEnabled:!1,persistSession:zg,retrieveSession:JC,expireSession:t=>XC(t,e)}}function zg(e){localStorage.setItem(Ir,Xu(e))}function JC(){const e=localStorage.getItem(Ir);return Bg(e)}function XC(e,t){zg(jn(e,t))}const QC=10,eT=100,Hg=[];let bs;function qn(e,t,n=0){var r;const{isLockEnabled:i,persistSession:o,expireSession:s}=t,a=f=>o({...f,lock:u}),c=()=>{const f=t.retrieveSession(),h=f.lock;return f.lock&&delete f.lock,{session:f,lock:h}};if(bs||(bs=e),e!==bs){Hg.push(e);return}if(i&&n>=eT){jg(t);return}let u,l=c();if(i){if(l.lock){ws(e,t,n);return}if(u=qe(),a(l.session),l=c(),l.lock!==u){ws(e,t,n);return}}let d=e.process(l.session);if(i&&(l=c(),l.lock!==u)){ws(e,t,n);return}if(d&&(ys(d)?s(d):(Ug(d),i?a(d):o(d))),i&&!(d&&ys(d))){if(l=c(),l.lock!==u){ws(e,t,n);return}o(l.session),d=l.session}(r=e.after)===null||r===void 0||r.call(e,d||l.session),jg(t)}function ws(e,t,n){Be(()=>{qn(e,t,n+1)},QC)}function jg(e){bs=void 0;const t=Hg.shift();t&&qn(t,e)}const qg=et;function tT(e){switch(e.sessionPersistence){case Bi.COOKIE:return $g(e);case Bi.LOCAL_STORAGE:return Vg();case void 0:{let t=$g(e);return!t&&e.allowFallbackToLocalStorage&&(t=Vg()),t}default:ae.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function nT(e,t,n,r){const i=new me,o=new me,s=new me,a=e.type===Bi.COOKIE?jC(t,e.cookieOptions):ZC(t),{expireSession:c}=a,u=Tr(p,qg);let l;m();const{throttled:d,cancel:f}=kn(()=>{qn({process:E=>{if(vs(E))return;const P=g(E);return v(P),P},after:E=>{Fg(E)&&!y()&&C(E),l=E}},a)},qg);function h(){qn({process:E=>y()?g(E):void 0},a)}function p(){qn({process:E=>ys(E)?jn(E,t):void 0,after:g},a)}function g(E){return ys(E)&&(E=jn(E,t)),y()&&(b(E)?w():(s.notify({previousState:l,newState:E}),l=E)),E}function m(){qn({process:E=>{if(vs(E))return jn(E,t)},after:E=>{l=E}},a)}function v(E){if(vs(E))return!1;const{trackingType:P,isTracked:T}=r(E[n]);E[n]=P,delete E.isExpired,T&&!E.id&&(E.id=qe(),E.created=String(Rt()))}function y(){return l[n]!==void 0}function b(E){return l.id!==E.id||l[n]!==E[n]}function w(){l=jn(l,t),o.notify()}function C(E){l=E,i.notify()}function _(E){qn({process:P=>({...P,...E}),after:g},a)}return{expandOrRenewSession:d,expandSession:h,getSession:()=>l,renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s,restartSession:m,expire:()=>{f(),c(l),g(jn(l,t))},stop:()=>{hs(u)},updateSessionState:_}}const Qu={GRANTED:"granted",NOT_GRANTED:"not-granted"};function rT(e){const t=new me;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Qu.GRANTED},observable:t}}function xr(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=Ar(Object.prototype),i=Ar(Array.prototype),o=Ar(Object.getPrototypeOf(e)),s=Ar(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),i(),o(),s()}}function Ar(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):ce}function el(e){return Es(e,location.href).href}function iT(e){try{return!!Es(e)}catch{return!1}}function oT(e){const t=Es(e).pathname;return t[0]==="/"?t:`/${t}`}function Es(e,t){const n=sT();if(n)try{return t!==void 0?new n(e,t):new n(e)}catch(o){throw new Error(`Failed to construct URL: ${String(o)} ${xr({url:e,base:t})}`)}if(t===void 0&&!/:/.test(e))throw new Error(`Invalid URL: '${e}'`);let r=document;const i=r.createElement("a");if(t!==void 0){r=document.implementation.createHTMLDocument("");const o=r.createElement("base");o.href=t,r.head.appendChild(o),r.body.appendChild(i)}return i.href=e,i}const Wg=URL;let Ss;function sT(){if(Ss===void 0)try{Ss=new Wg("http://test/path").href==="http://test/path"}catch{Ss=!1}return Ss?Wg:void 0}const Gg="datad0g.com",aT="dd0g-gov.com",Wn="datadoghq.com",cT="datadoghq.eu",uT="ddog-gov.com",lT="pci.browser-intake-datadoghq.com",dT=["ddsource","ddtags"];function kr(e,t,n){const r=fT(e,t);return{build(i,o){const s=pT(e,t,n,i,o);return r(s)},tags:n,urlPrefix:r(""),trackType:t}}function fT(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const o=el(r);return s=>`${o}?ddforward=${encodeURIComponent(`${n}?${s}`)}`}if(typeof r=="function")return o=>r({path:n,parameters:o});const i=Kg(t,e);return o=>`https://${i}${n}?${o}`}function Kg(e,t){const{site:n=Wn,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===Wn)return lT;if(r&&n===Wn)return`${r}.${Wn}`;if(n===aT)return`http-intake.logs.${n}`;const i=n.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}function pT({clientToken:e,internalAnalyticsSubdomain:t},n,r,i,{retry:o,encoding:s}){const a=["sdk_version:6.6.3",`api:${i}`].concat(r);o&&a.push(`retry_count:${o.count}`,`retry_after:${o.lastFailureStatus}`);const c=["ddsource=browser",`ddtags=${encodeURIComponent(a.join(","))}`,`dd-api-key=${e}`,`dd-evp-origin-version=${encodeURIComponent("6.6.3")}`,"dd-evp-origin=browser",`dd-request-id=${qe()}`];return s&&c.push(`dd-evp-encoding=${s}`),n==="rum"&&c.push(`batch_time=${Ue()}`),t&&c.reverse(),c.join("&")}const hT=200;function gT(e){const{env:t,service:n,version:r,datacenter:i}=e,o=[];return t&&o.push(_s("env",t)),n&&o.push(_s("service",n)),r&&o.push(_s("version",r)),i&&o.push(_s("datacenter",i)),o}function _s(e,t){const n=hT-e.length-1;(t.length>n||mT(t))&&ae.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${zu} ${ls}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function mT(e){return vT()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function vT(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function yT(e){const t=e.site||Wn,n=gT(e),r=bT(e,n);return{replica:wT(e,n),site:t,...r}}function bT(e,t){return{logsEndpointBuilder:kr(e,"logs",t),rumEndpointBuilder:kr(e,"rum",t),profilingEndpointBuilder:kr(e,"profile",t),sessionReplayEndpointBuilder:kr(e,"replay",t)}}function wT(e,t){if(!e.replica)return;const n={...e,site:Wn,clientToken:e.replica.clientToken},r={logsEndpointBuilder:kr(n,"logs",t),rumEndpointBuilder:kr(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function ET(e){return dT.every(t=>e.includes(t))}const $i={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},tl={ALL:"all",SAMPLED:"sampled"};function nl(e,t){return e!=null&&typeof e!="string"?(ae.error(`${t} must be defined as a string`),!1):!0}function ST(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(ae.error(`Site should be a valid Datadog site. ${zu} ${ls}/getting_started/site/.`),!1):!0}function Rr(e,t){return e!==void 0&&!mC(e)?(ae.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function _T(e){var t,n,r,i,o,s;if(!e||!e.clientToken){ae.error("Client Token is not configured, we will not send any data.");return}if(!(!ST(e.site)||!Rr(e.sessionSampleRate,"Session")||!Rr(e.telemetrySampleRate,"Telemetry")||!Rr(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!Rr(e.telemetryUsageSampleRate,"Telemetry Usage")||!nl(e.version,"Version")||!nl(e.env,"Env")||!nl(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ps(Qu,e.trackingConsent)){ae.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&_g(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:tT(e),sessionSampleRate:(t=e.sessionSampleRate)!==null&&t!==void 0?t:100,telemetrySampleRate:(n=e.telemetrySampleRate)!==null&&n!==void 0?n:20,telemetryConfigurationSampleRate:(r=e.telemetryConfigurationSampleRate)!==null&&r!==void 0?r:5,telemetryUsageSampleRate:(i=e.telemetryUsageSampleRate)!==null&&i!==void 0?i:5,service:e.service||void 0,silentMultipleInit:!!e.silentMultipleInit,allowUntrustedEvents:!!e.allowUntrustedEvents,trackingConsent:(o=e.trackingConsent)!==null&&o!==void 0?o:Qu.GRANTED,trackAnonymousUser:(s=e.trackAnonymousUser)!==null&&s!==void 0?s:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Mi,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*et,batchMessagesLimit:50,messageBytesLimit:256*Mi,...yT(e)}}}function CT(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:e.sessionPersistence,allow_fallback_to_local_storage:!!e.allowFallbackToLocalStorage,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent}}var Gn;(function(e){e.WRITABLE_RESOURCE_GRAPHQL="writable_resource_graphql",e.MISSING_URL_CONTEXT_TELEMETRY="missing_url_context_telemetry",e.USER_ACCOUNT_TRACE_HEADER="user_account_trace_header",e.PROFILING="profiling"})(Gn||(Gn={}));const rl=new Set;function TT(e){Array.isArray(e)&&IT(e.filter(t=>ps(Gn,t)))}function IT(e){e.forEach(t=>{rl.add(t)})}function Cs(e){return rl.has(e)}function xT(){return rl}const Vi="?";function Pn(e){const t=[];let n=il(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
|
|
540
|
+
`).forEach(i=>{const o=RT(i)||OT(i)||NT(i)||FT(i);o&&(!o.func&&o.line&&(o.func=Vi),t.push(o))}),{message:il(e,"message"),name:il(e,"name"),stack:t}}const Yg="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Pr="(?::(\\d+))",AT=new RegExp(`^\\s*at (.*?) ?\\(${Yg}${Pr}?${Pr}?\\)?\\s*$`,"i"),kT=new RegExp(`\\((\\S*)${Pr}${Pr}\\)`);function RT(e){const t=AT.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,i=kT.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Vi,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const PT=new RegExp(`^\\s*at ?${Yg}${Pr}?${Pr}??\\s*$`,"i");function OT(e){const t=PT.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:Vi,line:t[2]?+t[2]:void 0,url:t[1]}}const LT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function NT(e){const t=LT.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Vi,line:+t[3],url:t[2]}}const MT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,DT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function FT(e){const t=MT.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=DT.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(","):[],column:t[5]?+t[5]:void 0,func:t[1]||Vi,line:t[4]?+t[4]:void 0,url:t[3]}}function il(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function UT(e,t,n,r){const i=[{url:t,column:r,line:n}],{name:o,message:s}=$T(e);return{name:o,message:s,stack:i}}const BT=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function $T(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=BT.exec(e)),{name:t,message:n}}function Ts(e){const n=new Error(e);n.name="HandlingStack";let r;return zn(()=>{const i=Pn(n);i.stack=i.stack.slice(2),r=Or(i)}),r}function Or(e){let t=Zg(e);return e.stack.forEach(n=>{const r=n.func==="?"?"<anonymous>":n.func,i=n.args&&n.args.length>0?`(${n.args.join(", ")})`:"",o=n.line?`:${n.line}`:"",s=n.line&&n.column?`:${n.column}`:"";t+=`
|
|
541
|
+
at ${r}${i} @ ${n.url}${o}${s}`}),t}function Zg(e){return`${e.name||"Error"}: ${e.message}`}function dt(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!="function")if(t in e&&t.startsWith("on"))i=ce;else return{stop:ce};let o=!1;const s=function(){if(o)return i.apply(this,arguments);const a=Array.from(arguments);let c;zn(n,null,[{target:this,parameters:a,onPostCall:l=>{c=l},handlingStack:r?Ts("instrumented method"):void 0}]);const u=i.apply(this,a);return c&&zn(c,null,[u]),u};return e[t]=s,{stop:()=>{o=!0,e[t]===s&&(e[t]=i)}}}function zi(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:ce};const i=ce;let o=(a,c)=>{Be(()=>{o!==i&&n(a,c)},0)};const s=function(a){r.set.call(this,a),o(this,a)};return Object.defineProperty(e,t,{set:s}),{stop:()=>{var a;((a=Object.getOwnPropertyDescriptor(e,t))===null||a===void 0?void 0:a.set)===s&&Object.defineProperty(e,t,r),o=i}}}const VT=220*Mi,zT="$",HT=3;function Re(e,t=VT){const n=Ar(Object.prototype),r=Ar(Array.prototype),i=[],o=new WeakMap,s=ol(e,zT,void 0,i,o),a=JSON.stringify(s);let c=a?a.length:0;if(c>t){al(t,"discarded",e);return}for(;i.length>0&&c<t;){const u=i.shift();let l=0;if(Array.isArray(u.source))for(let d=0;d<u.source.length;d++){const f=ol(u.source[d],u.path,d,i,o);if(f!==void 0?c+=JSON.stringify(f).length:c+=4,c+=l,l=1,c>t){al(t,"truncated",e);break}u.target[d]=f}else for(const d in u.source)if(Object.prototype.hasOwnProperty.call(u.source,d)){const f=ol(u.source[d],u.path,d,i,o);if(f!==void 0&&(c+=JSON.stringify(f).length+l+d.length+HT,l=1),c>t){al(t,"truncated",e);break}u.target[d]=f}}return n(),r(),s}function ol(e,t,n,r,i){const o=WT(e);if(!o||typeof o!="object")return jT(o);const s=sl(o);if(s!=="[Object]"&&s!=="[Array]"&&s!=="[Error]")return s;const a=e;if(i.has(a))return`[Reference seen at ${i.get(a)}]`;const c=n!==void 0?`${t}.${n}`:t,u=Array.isArray(o)?[]:{};return i.set(a,c),r.push({source:o,target:u,path:c}),u}function jT(e){return typeof e=="bigint"?`[BigInt] ${e.toString()}`:typeof e=="function"?`[Function] ${e.name||"unknown"}`:typeof e=="symbol"?`[Symbol] ${e.description||e.toString()}`:e}function sl(e){try{if(e instanceof Event)return qT(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;const n=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(n&&n[1])return`[${n[1]}]`}catch{}return"[Unserializable]"}function qT(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?sl(e.currentTarget):null,target:e.target?sl(e.target):null}}function WT(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function al(e,t,n){ae.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const Jg="No stack, consider using an instance of Error";function Xg({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:o,source:s,handling:a}){const c=On(t),u=GT(e,c,o,t),l=KT(c,e)?Or(e):Jg,d=c?tm(t,s):void 0,f=e?e.name:void 0,h=Qg(t),p=em(t);return{startClocks:i,source:s,handling:a,handlingStack:n,componentStack:r,originalError:t,type:f,message:u,stack:l,causes:d,fingerprint:h,context:p}}function GT(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${xr(Re(r))}`}function KT(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function Qg(e){return On(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function em(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function On(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function tm(e,t){let n=e;const r=[];for(;On(n==null?void 0:n.cause)&&r.length<10;){const i=Pn(n.cause);r.push({message:n.cause.message,source:t,type:i==null?void 0:i.name,stack:i&&Or(i)}),n=n.cause}return r.length?r:void 0}const Lr={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function YT(e){const t=(i,o)=>{const s=Xg({stackTrace:i,originalError:o,startClocks:it(),nonErrorPrefix:"Uncaught",source:Lr.SOURCE,handling:"unhandled"});e.notify(s)},{stop:n}=ZT(t),{stop:r}=JT(t);return{stop:()=>{n(),r()}}}function ZT(e){return dt(window,"onerror",({parameters:[t,n,r,i,o]})=>{let s;On(o)?s=Pn(o):s=UT(t,n,r,i),e(s,o??t)})}function JT(e){return dt(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=Pn(n);e(r,n)})}function XT(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return IC},enumerable:!1}),t}function QT(e,t,n){const r=e[t];r&&!r.q&&r.version&&ae.warn("SDK is loaded more than once. This is unsupported and might have unexpected behavior."),e[t]=n,r&&r.q&&r.q.forEach(i=>_g(i,"onReady callback threw an error:")())}function nm(e,t){t.silentMultipleInit||ae.error(`${e} is already initialized.`)}function _e(e,t,n,r,i){return ft(e,t,[n],r,i)}function ft(e,t,n,r,{once:i,capture:o,passive:s}={}){const a=Z(f=>{!f.isTrusted&&!f.__ddIsTrusted&&!e.allowUntrustedEvents||(i&&d(),r(f))}),c=s?{capture:o,passive:s}:o,u=window.EventTarget&&t instanceof EventTarget?window.EventTarget.prototype:t,l=An(u,"addEventListener");n.forEach(f=>l.call(t,f,a,c));function d(){const f=An(u,"removeEventListener");n.forEach(h=>f.call(t,h,a,c))}return{stop:d}}const Hi={intervention:"intervention",cspViolation:"csp_violation"};function eI(e,t){const n=[];t.includes(Hi.cspViolation)&&n.push(nI(e));const r=t.filter(i=>i!==Hi.cspViolation);return r.length&&n.push(tI(r)),Rg(...n)}function tI(e){return new me(t=>{if(!window.ReportingObserver)return;const n=Z((i,o)=>i.forEach(s=>t.notify(rI(s)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function nI(e){return new me(t=>{const{stop:n}=_e(e,document,"securitypolicyviolation",r=>{t.notify(iI(r))});return n})}function rI(e){const{type:t,body:n}=e;return rm({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:im(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function iI(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return rm({type:e.effectiveDirective,message:`${Hi.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:im(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${Pg(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function rm(e){return{startClocks:it(),source:Lr.REPORT,handling:"unhandled",...e}}function im(e,t,n,r,i){return n?Or({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:i??void 0}]}):void 0}function cl(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function Kn(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Is(e,t,n=oI()){if(t===void 0)return e;if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const i=t.flags||[t.global?"g":"",t.ignoreCase?"i":"",t.multiline?"m":"",t.sticky?"y":"",t.unicode?"u":""].join("");return new RegExp(t.source,i)}if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){const i=Array.isArray(e)?e:[];for(let o=0;o<t.length;++o)i[o]=Is(i[o],t[o],n);return i}const r=Kn(e)==="object"?e:{};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Is(r[i],t[i],n));return r}function ul(e){return Is(void 0,e)}function Ft(...e){let t;for(const n of e)n!=null&&(t=Is(t,n));return t}function oI(){if(typeof WeakSet<"u"){const t=new WeakSet;return{hasAlreadyBeenSeen(n){const r=t.has(n);return r||t.add(n),r}}}const e=[];return{hasAlreadyBeenSeen(t){const n=e.indexOf(t)>=0;return n||e.push(t),n}}}function om(){var e;const t=window.navigator;return{status:t.onLine?"connected":"not_connected",interfaces:t.connection&&t.connection.type?[t.connection.type]:void 0,effective_type:(e=t.connection)===null||e===void 0?void 0:e.effectiveType}}function sm(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const sI=500;function am(){const e=[];return{add:i=>{e.push(i)>sI&&e.splice(0,1)},remove:i=>{sm(e,i)},drain:i=>{e.forEach(o=>o(i)),e.length=0}}}const Yn={log:"log",configuration:"configuration",usage:"usage"},aI=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],cI=[uT];let cm=am(),Nr=e=>{cm.add(()=>Nr(e))};function uI(e,t){let n;const r=new me,i=new Set,o=!cI.includes(t.site)&&xn(t.telemetrySampleRate),s={[Yn.log]:o,[Yn.configuration]:o&&xn(t.telemetryConfigurationSampleRate),[Yn.usage]:o&&xn(t.telemetryUsageSampleRate)},a=lI();Nr=u=>{const l=xr(u);if(s[u.type]&&i.size<t.maxTelemetryEventsPerPage&&!i.has(l)){const d=c(e,u,a);r.notify(d),cl("telemetry",d),i.add(l)}},TC(ll);function c(u,l,d){return Ft({type:"telemetry",date:Ue(),service:u,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:Ft(l,{runtime_env:d,connectivity:om(),sdk_setup:"npm"}),experimental_features:Array.from(xT())},n!==void 0?n():{})}return{setContextProvider:u=>{n=u},observable:r,enabled:o}}function lI(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function dI(){cm.drain()}function fI(e){return e.site===Gg}function dn(e,t){Wu(us.debug,e,t),Nr({type:Yn.log,message:e,status:"debug",...t})}function ll(e,t){Nr({type:Yn.log,status:"error",...hI(e),...t})}function pI(e){Nr({type:Yn.configuration,configuration:e})}function ot(e){Nr({type:Yn.usage,usage:e})}function hI(e){if(On(e)){const t=Pn(e);return{error:{kind:t.name,stack:Or(gI(t))},message:t.message}}return{error:{stack:Jg},message:`Uncaught ${xr(e)}`}}function gI(e){return e.stack=e.stack.filter(t=>!t.url||aI.some(n=>t.url.startsWith(n))),e}const ji=1/0,mI=ut;let qi=null;const xs=new Set;function vI(){xs.forEach(e=>e())}function Mr({expireDelay:e,maxEntries:t}){let n=[];const r=[];qi||(qi=Tr(()=>vI(),mI));const i=()=>{const h=Pt()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const p=n.pop();p&&r.push(p.startTime)}};xs.add(i);function o(h,p){const g={value:h,startTime:p,endTime:ji,remove:()=>{sm(n,g)},close:m=>{g.endTime=m}};return t&&n.length>=t&&n.pop(),n.unshift(g),g}function s(h=ji,p={returnInactive:!1}){for(const g of n)if(g.startTime<=h){if(p.returnInactive||h<=g.endTime)return g.value;break}}function a(h){const p=n[0];p&&p.endTime===ji&&p.close(h)}function c(h=ji,p=0){const g=Cr(h,p);return n.filter(m=>m.startTime<=g&&h<=m.endTime).map(m=>m.value)}function u(){return n.map(({startTime:h,endTime:p,value:g})=>({startTime:h,endTime:p===ji?"Infinity":p,value:g}))}function l(){return r}function d(){n=[]}function f(){xs.delete(i),xs.size===0&&qi&&(hs(qi),qi=null)}return{add:o,find:s,closeActive:a,findAll:c,reset:d,stop:f,getAllEntries:u,getDeletedEntries:l}}const yI=ut,bI=Hn;function wI(e,t,n,r){const i=new me,o=new me,s=nT(e.sessionStoreStrategyType,e,t,n),a=Mr({expireDelay:bI});s.renewObservable.subscribe(()=>{a.add(c(),Pt()),i.notify()}),s.expireObservable.subscribe(()=>{o.notify(),a.closeActive(Pt())}),s.expandOrRenewSession(),a.add(c(),Ig().relative),r.observable.subscribe(()=>{r.isGranted()?s.expandOrRenewSession():s.expire()}),EI(e,()=>{r.isGranted()&&s.expandOrRenewSession()}),SI(e,()=>s.expandSession()),_I(e,()=>s.restartSession());function c(){return{id:s.getSession().id,trackingType:s.getSession()[t],isReplayForced:!!s.getSession().forcedReplay,anonymousId:s.getSession().anonymousId}}return{findSession:(u,l)=>a.find(u,l),renewObservable:i,expireObservable:o,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}function EI(e,t){const{stop:n}=ft(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function SI(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=_e(e,document,"visibilitychange",n);Tr(n,yI)}function _I(e,t){const{stop:n}=_e(e,window,"resume",t,{capture:!0})}function CI(e){return e>=500}function TI(e){try{return e.clone()}catch{return}}const II=80*Mi,xI=32,um=3*xg,AI=ut,lm=et;function dm(e,t,n,r,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?pm(e,t,n,{onSuccess:()=>hm(0,t,n,r,i),onFailure:()=>{t.queuedPayloads.enqueue(e),fm(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function fm(e,t,n,r){e.transportStatus===2&&Be(()=>{const i=e.queuedPayloads.first();pm(i,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=lm,hm(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(AI,e.currentBackoffTime*2),fm(e,t,n,r)}})},e.currentBackoffTime)}function pm(e,t,n,{onSuccess:r,onFailure:i}){t.bandwidthMonitor.add(e),n(e,o=>{t.bandwidthMonitor.remove(e),kI(o)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:o.status},i()):(t.transportStatus=0,r())})}function hm(e,t,n,r,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${um/xg}MiB`,source:Lr.AGENT,startClocks:it()}),t.queueFullReported=!0);const o=t.queuedPayloads;for(t.queuedPayloads=gm();o.size()>0;)dm(o.dequeue(),t,n,r,i)}function kI(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||CI(e.status))}function RI(){return{transportStatus:0,currentBackoffTime:lm,bandwidthMonitor:PI(),queuedPayloads:gm(),queueFullReported:!1}}function gm(){const e=[];return{bytesCount:0,enqueue(t){this.isFull()||(e.push(t),this.bytesCount+=t.bytesCount)},first(){return e[0]},dequeue(){const t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=um}}}function PI(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=II&&this.ongoingRequestCount<xI},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function mm(e,t,n){const r=RI(),i=(o,s)=>NI(e,t,o,s);return{send:o=>{dm(o,r,i,e.trackType,n)},sendOnExit:o=>{OI(e,t,o)}}}function OI(e,t,n){if(!!navigator.sendBeacon&&n.bytesCount<t)try{const i=e.build("beacon",n);if(navigator.sendBeacon(i,n.data))return}catch(i){LI(i)}dl(e,n)}let vm=!1;function LI(e){vm||(vm=!0,ln(e))}function NI(e,t,n,r){if(MI()&&n.bytesCount<t){const o=e.build("fetch-keepalive",n);fetch(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(Z(s=>r==null?void 0:r({status:s.status,type:s.type}))).catch(Z(()=>dl(e,n,r)))}else dl(e,n,r)}function dl(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then(Z(i=>n==null?void 0:n({status:i.status,type:i.type}))).catch(Z(()=>n==null?void 0:n({status:0})))}function MI(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Dr(){const e=DI();if(e)return{getCapabilities(){var t;return JSON.parse(((t=e.getCapabilities)===null||t===void 0?void 0:t.call(e))||"[]")},getPrivacyLevel(){var t;return(t=e.getPrivacyLevel)===null||t===void 0?void 0:t.call(e)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){const i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function ym(e){const t=Dr();return!!t&&t.getCapabilities().includes(e)}function Zn(e){var t;e===void 0&&(e=(t=Jt().location)===null||t===void 0?void 0:t.hostname);const n=Dr();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function DI(){return Jt().DatadogEventBridge}const Fr={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function FI(e){return new me(t=>{const{stop:n}=ft(e,window,["visibilitychange","freeze"],i=>{i.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Fr.HIDDEN}):i.type==="freeze"&&t.notify({reason:Fr.FROZEN})},{capture:!0}),r=_e(e,window,"beforeunload",()=>{t.notify({reason:Fr.UNLOADING})}).stop;return()=>{n(),r()}})}function bm(e){return Ng(Fr).includes(e)}function UI({encoder:e,request:t,flushController:n,messageBytesLimit:r}){let i={};const o=n.flushObservable.subscribe(d=>l(d));function s(d,f,h){n.notifyBeforeAddMessage(f),h!==void 0?(i[h]=d,n.notifyAfterAddMessage()):e.write(e.isEmpty?d:`
|
|
542
|
+
${d}`,p=>{n.notifyAfterAddMessage(p-f)})}function a(d){return d!==void 0&&i[d]!==void 0}function c(d){const f=i[d];delete i[d];const h=e.estimateEncodedBytesCount(f);n.notifyAfterRemoveMessage(h)}function u(d,f){const h=xr(d),p=e.estimateEncodedBytesCount(h);if(p>=r){ae.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${zu} ${gC}/#technical-limitations`);return}a(f)&&c(f),s(h,p,f)}function l(d){const f=Ng(i).join(`
|
|
543
|
+
`);i={};const h=bm(d.reason),p=h?t.sendOnExit:t.send;if(h&&e.isAsync){const g=e.finishSync();g.outputBytesCount&&p(wm(g));const m=[g.pendingData,f].filter(Boolean).join(`
|
|
544
|
+
`);m&&p({data:m,bytesCount:Ag(m)})}else f&&e.write(e.isEmpty?f:`
|
|
545
|
+
${f}`),e.finish(g=>{p(wm(g))})}return{flushController:n,add:u,upsert:u,stop:o.unsubscribe}}function wm(e){let t;return typeof e.output=="string"?t=e.output:t=new Blob([e.output],{type:"text/plain"}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}function BI({messagesLimit:e,bytesLimit:t,durationLimit:n,pageMayExitObservable:r,sessionExpireObservable:i}){const o=r.subscribe(p=>l(p.reason)),s=i.subscribe(()=>l("session_expire")),a=new me(()=>()=>{o.unsubscribe(),s.unsubscribe()});let c=0,u=0;function l(p){if(u===0)return;const g=u,m=c;u=0,c=0,h(),a.notify({reason:p,messagesCount:g,bytesCount:m})}let d;function f(){d===void 0&&(d=Be(()=>{l("duration_limit")},n))}function h(){lt(d),d=void 0}return{flushObservable:a,get messagesCount(){return u},notifyBeforeAddMessage(p){c+p>=t&&l("bytes_limit"),u+=1,c+=p,f()},notifyAfterAddMessage(p=0){c+=p,u>=e?l("messages_limit"):c>=t&&l("bytes_limit")},notifyAfterRemoveMessage(p){c-=p,u-=1,u===0&&h()}}}function $I(e,t,n,r,i,o,s=UI){const a=u(e,t),c=n&&u(e,n);function u(l,{endpoint:d,encoder:f}){return s({encoder:f,request:mm(d,l.batchBytesLimit,r),flushController:BI({messagesLimit:l.batchMessagesLimit,bytesLimit:l.batchBytesLimit,durationLimit:l.flushTimeout,pageMayExitObservable:i,sessionExpireObservable:o}),messageBytesLimit:l.messageBytesLimit})}return{flushObservable:a.flushController.flushObservable,add(l,d=!0){a.add(l),c&&d&&c.add(n.transformMessage?n.transformMessage(l):l)},upsert:(l,d)=>{a.upsert(l,d),c&&c.upsert(n.transformMessage?n.transformMessage(l):l,d)},stop:()=>{a.stop(),c&&c.stop()}}}function VI(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const i=Ag(n);t+=i,e+=n,r&&r(i)},finish(n){n(this.finishSync())},finishSync(){const n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:""};return e="",t=0,n},estimateEncodedBytesCount(n){return n.length}}}class zI{constructor(){this.callbacks={}}notify(t,n){const r=this.callbacks[t];r&&r.forEach(i=>i(n))}subscribe(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter(r=>n!==r)}}}}function fl(e,t,n){let r=0,i=!1;return{isLimitReached(){if(r===0&&Be(()=>{r=0},ut),r+=1,r<=t||i)return i=!1,!1;if(r===t+1){i=!0;try{n({message:`Reached max number of ${e}s by minute: ${t}`,source:Lr.AGENT,startClocks:it()})}finally{i=!1}}return!0}}}function pl(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:ce}):_e(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function HI(e,t){return new Promise(n=>{pl(e,t,n)})}let hl;const gl=new WeakMap;function jI(e){return hl||(hl=qI(e)),hl}function qI(e){return new me(t=>{const{stop:n}=dt(XMLHttpRequest.prototype,"open",WI),{stop:r}=dt(XMLHttpRequest.prototype,"send",o=>{GI(o,e,t)},{computeHandlingStack:!0}),{stop:i}=dt(XMLHttpRequest.prototype,"abort",KI);return()=>{n(),r(),i()}})}function WI({target:e,parameters:[t,n]}){gl.set(e,{state:"open",method:String(t).toUpperCase(),url:el(String(n))})}function GI({target:e,handlingStack:t},n,r){const i=gl.get(e);if(!i)return;const o=i;o.state="start",o.startClocks=it(),o.isAborted=!1,o.xhr=e,o.handlingStack=t;let s=!1;const{stop:a}=dt(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(u(),a(),s)return;s=!0;const l=i;l.state="complete",l.duration=je(o.startClocks.timeStamp,Ue()),l.status=e.status,r.notify(Di(l))},{stop:u}=_e(n,e,"loadend",c);r.notify(o)}function KI({target:e}){const t=gl.get(e);t&&(t.isAborted=!0)}let ml;function Em(){return ml||(ml=YI()),ml}function YI(){return new me(e=>{if(!window.fetch)return;const{stop:t}=dt(window,"fetch",n=>ZI(n,e),{computeHandlingStack:!0});return t})}function ZI({parameters:e,onPostCall:t,handlingStack:n},r){const[i,o]=e;let s=o&&o.method;s===void 0&&i instanceof Request&&(s=i.method);const a=s!==void 0?String(s).toUpperCase():"GET",c=i instanceof Request?i.url:el(String(i)),u=it(),l={state:"start",init:o,input:i,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),e[0]=l.input,e[1]=l.init,t(d=>JI(r,d,l))}function JI(e,t,n){const r=n;function i(o){r.state="resolve",Object.assign(r,o),e.notify(r)}t.then(Z(o=>{i({response:o,responseType:o.type,status:o.status,isAborted:!1})}),Z(o=>{var s,a;i({status:0,isAborted:((a=(s=r.init)===null||s===void 0?void 0:s.signal)===null||a===void 0?void 0:a.aborted)||o instanceof DOMException&&o.code===DOMException.ABORT_ERR,error:o})}))}function Sm(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(Z(e),t);return()=>window.cancelIdleCallback(n)}return QI(e)}const XI=50;function QI(e){const t=Rt(),n=Be(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,XI-(Rt()-t))})},0);return()=>lt(n)}const e3=et,t3=30;function n3(){const e=[];function t(r){let i;if(r.didTimeout){const o=performance.now();i=()=>t3-(performance.now()-o)}else i=r.timeRemaining.bind(r);for(;i()>0&&e.length;)e.shift()();e.length&&n()}function n(){Sm(t,{timeout:e3})}return{push(r){e.push(r)===1&&n()}}}let vl={};function r3(e){const t=e.map(n=>(vl[n]||(vl[n]=i3(n)),vl[n]));return Rg(...t)}function i3(e){return new me(t=>{const n=un[e];return un[e]=(...r)=>{n.apply(console,r);const i=Ts("console error");zn(()=>{t.notify(o3(r,e,i))})},()=>{un[e]=n}})}function o3(e,t,n){const r=e.map(o=>s3(o)).join(" ");let i;if(t===us.error){const o=e.find(On);i={stack:o?Or(Pn(o)):void 0,fingerprint:Qg(o),causes:o?tm(o,"console"):void 0,startClocks:it(),message:r,source:Lr.CONSOLE,handling:"handled",handlingStack:n,context:em(o),originalError:o}}return{api:t,message:r,error:i,handlingStack:n}}function s3(e){return typeof e=="string"?Re(e):On(e)?Zg(Pn(e)):xr(Re(e),void 0,2)}function a3(e){const t=Kn(e)==="object";return t||ae.error("Unsupported context:",e),t}function yl(e,t,n){const r={...e};for(const[i,{required:o,type:s}]of Object.entries(t))s==="string"&&i in r&&(r[i]=String(r[i])),o&&!(i in e)&&ae.warn(`The property ${i} of ${n} is required; context will not be sent to the intake.`);return r}function As(e="",{propertiesConfig:t={}}={}){let n={};const r=new me,i={getContext:()=>ul(n),setContext:o=>{a3(o)?n=Re(yl(o,t,e)):i.clearContext(),r.notify()},setContextProperty:(o,s)=>{n=Re(yl({...n,[o]:s},t,e)),r.notify()},removeContextProperty:o=>{delete n[o],yl(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}const c3="_dd_c",u3=[];function bl(e,t,n,r){const i=l3(n,r);u3.push(_e(e,window,"storage",({key:u})=>{i===u&&s()})),t.changeObservable.subscribe(a);const o=Ft(c(),t.getContext());Vn(o)||t.setContext(o);function s(){t.setContext(c())}function a(){localStorage.setItem(i,JSON.stringify(t.getContext()))}function c(){const u=localStorage.getItem(i);return u?JSON.parse(u):{}}}function l3(e,t){return`${c3}_${e}_${t}`}const $e={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},st={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function d3(e,t,n){const r=e.getReader();let i=0;o();function o(){r.read().then(Z(a=>{if(a.done){s();return}i+=a.value.length,i>n.bytesLimit?s():o()}),Z(a=>t(a)))}function s(){r.cancel().catch(ce),t(void 0,void 0,void 0)}}const f3="datadog-synthetics-public-id",p3="datadog-synthetics-result-id",h3="datadog-synthetics-injects-rum";function _m(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||Rn(h3))}function g3(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||Rn(f3);return typeof e=="string"?e:void 0}function m3(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||Rn(p3);return typeof e=="string"?e:void 0}function wl(e){const t=Kn(e);return t==="string"||t==="function"||e instanceof RegExp}function Cm(e,t,n=!1){return e.some(r=>{try{if(typeof r=="function")return r(t);if(r instanceof RegExp)return r.test(t);if(typeof r=="string")return n?t.startsWith(r):r===t}catch(i){ae.error(i)}return!1})}function v3(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function y3(e,t,n){function r(o){return!t.wasInPageStateDuringPeriod("frozen",o.startClocks.relative,o.duration)}function i(o){r(o)&&e.notify(12,w3(o))}return{addDurationVital:i,startDurationVital:(o,s={})=>Tm(n,o,s),stopDurationVital:(o,s={})=>{Im(i,n,o,s)}}}function Tm({vitalsByName:e,vitalsByReference:t},n,r={}){const i={name:n,startClocks:it(),context:r.context,description:r.description},o={__dd_vital_reference:!0};return e.set(n,i),t.set(o,i),o}function Im(e,{vitalsByName:t,vitalsByReference:n},r,i={}){const o=typeof r=="string"?t.get(r):n.get(r);o&&(e(b3(o,o.startClocks,i,it())),typeof r=="string"?t.delete(r):n.delete(r))}function b3(e,t,n,r){var i;return{name:e.name,type:"duration",startClocks:t,duration:je(t.timeStamp,r.timeStamp),context:Ft(e.context,n.context),description:(i=n.description)!==null&&i!==void 0?i:e.description}}function w3(e,t){const n={date:e.startClocks.timeStamp,vital:{id:qe(),type:e.type,name:e.name,duration:K(e.duration),description:e.description},type:"vital"};return n._dd={vital:{computed_value:!0}},{rawRumEvent:n,startTime:e.startClocks.relative,duration:e.duration,customerContext:e.context,domainContext:{}}}function xm(e,t,n){if(e)for(const r of e){const i=r[t];i&&i(n)}}function E3(){return km(64)}function Am(){return km(63)}function km(e){const t=crypto.getRandomValues(new Uint32Array(2));return e===63&&(t[t.length-1]>>>=1),{toString(n=10){let r=t[1],i=t[0],o="";do{const s=r%n*4294967296+i;r=Math.floor(r/n),i=Math.floor(s/n),o=(s%n).toString(n)+o}while(r||i);return o}}}function Ur(e){return e.toString(16).padStart(16,"0")}let ks;function S3(e,t){if(t===100)return!0;if(t===0)return!1;if(ks&&e===ks.sessionId)return ks.decision;let n;return window.BigInt?n=_3(BigInt(`0x${e.split("-")[4]}`),t):n=xn(t),ks={sessionId:e,decision:n},n}function _3(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),i=e*n%r;return Number(i)<=t/100*Number(r)}function C3(e){const t=e;return Kn(t)==="object"&&wl(t.match)&&Array.isArray(t.propagatorTypes)}function T3(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function I3(e,t,n){return{clearTracingIfNeeded:T3,traceFetch:r=>Rm(e,r,t,n,i=>{var o;if(r.input instanceof Request&&!(!((o=r.init)===null||o===void 0)&&o.headers))r.input=new Request(r.input),Object.keys(i).forEach(s=>{r.input.headers.append(s,i[s])});else{r.init=Di(r.init);const s=[];r.init.headers instanceof Headers?r.init.headers.forEach((a,c)=>{s.push([c,a])}):Array.isArray(r.init.headers)?r.init.headers.forEach(a=>{s.push(a)}):r.init.headers&&Object.keys(r.init.headers).forEach(a=>{s.push([a,r.init.headers[a]])}),r.init.headers=s.concat(Zu(i))}}),traceXhr:(r,i)=>Rm(e,r,t,n,o=>{Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])})})}}function Rm(e,t,n,r,i){const o=n.findTrackedSession();if(!o)return;const s=e.allowedTracingUrls.find(u=>Cm([u.match],t.url,!0));if(!s)return;const a=S3(o.id,e.traceSampleRate);(a||e.traceContextInjection===tl.ALL)&&(t.traceSampled=a,t.traceId=E3(),t.spanId=Am(),i(x3(t.traceId,t.spanId,t.traceSampled,s.propagatorTypes,r,e)))}function x3(e,t,n,r,i,o){const s={};if(r.forEach(a=>{switch(a){case"datadog":{Object.assign(s,{"x-datadog-origin":"rum","x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?"1":"0","x-datadog-trace-id":e.toString()});break}case"tracecontext":{Object.assign(s,{traceparent:`00-0000000000000000${Ur(e)}-${Ur(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(s,{b3:`${Ur(e)}-${Ur(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(s,{"X-B3-TraceId":Ur(e),"X-B3-SpanId":Ur(t),"X-B3-Sampled":n?"1":"0"});break}}}),Cs(Gn.USER_ACCOUNT_TRACE_HEADER)&&o.propagateTraceBaggage){const a=i().user.id,c=i().account.id,u=[];typeof a=="string"&&u.push(`usr.id=${encodeURIComponent(a)}`),typeof c=="string"&&u.push(`account.id=${encodeURIComponent(c)}`),u.length>0&&(s.baggage=u.join(","))}return s}const Pm=["tracecontext","datadog"];function A3(e){var t,n,r,i,o,s,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&ae.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){ae.error("Application ID is not configured, no RUM data will be collected.");return}if(!Rr(e.sessionReplaySampleRate,"Session Replay")||!Rr(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){ae.error("Excluded Activity Urls should be an array");return}const c=k3(e);if(!c)return;const u=_T(e);if(!u)return;const l=Cs(Gn.PROFILING),d=(t=e.sessionReplaySampleRate)!==null&&t!==void 0?t:0;return{applicationId:e.applicationId,version:e.version||void 0,actionNameAttribute:e.actionNameAttribute,sessionReplaySampleRate:d,startSessionReplayRecordingManually:e.startSessionReplayRecordingManually!==void 0?!!e.startSessionReplayRecordingManually:d===0,traceSampleRate:(n=e.traceSampleRate)!==null&&n!==void 0?n:100,rulePsr:Li(e.traceSampleRate)?e.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:(r=e.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:e.workerUrl,compressIntakeRequests:!!e.compressIntakeRequests,trackUserInteractions:!!(!((i=e.trackUserInteractions)!==null&&i!==void 0)||i),trackViewsManually:!!e.trackViewsManually,trackResources:!!(!((o=e.trackResources)!==null&&o!==void 0)||o),trackLongTasks:!!(!((s=e.trackLongTasks)!==null&&s!==void 0)||s),subdomain:e.subdomain,defaultPrivacyLevel:ps($i,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:$i.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ps(tl,e.traceContextInjection)?e.traceContextInjection:tl.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:l&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...u}}function k3(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){ae.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){ae.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{wl(n)?t.push({match:n,propagatorTypes:Pm}):C3(n)?t.push(n):ae.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function R3(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{wl(n)?Pm.forEach(r=>t.add(r)):Kn(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function P3(e){var t;const n=CT(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0,selected_tracing_propagators:R3(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(e.excludedActivityUrls)&&e.excludedActivityUrls.length>0,use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:(t=e.plugins)===null||t===void 0?void 0:t.map(r=>{var i;return{name:r.name,...(i=r.getConfigurationTelemetry)===null||i===void 0?void 0:i.call(r)}}),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,...n}}const O3="v1";function L3(e,t){M3(e,n=>{t(N3(e,n))})}function N3(e,t){return{...e,...t}}function M3(e,t){const n=new XMLHttpRequest;_e(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Om()}),_e(e,n,"error",function(){Om()}),n.open("GET",D3(e)),n.send()}function D3(e){return`https://sdk-configuration.${Kg("rum",e)}/${O3}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Om(){ae.error("Error fetching the remote configuration.")}function F3(e){const t=Lm();return e.storeContextsAcrossPages&&bl(e,t,"rum",2),t}function Lm(){return As("global context")}function U3(e){const t=Nm();return e.storeContextsAcrossPages&&bl(e,t,"rum",1),t}function Nm(){return As("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function B3(e){const t=Mm();return e.storeContextsAcrossPages&&bl(e,t,"rum",4),t}function Mm(){return As("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function $3({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,i){const o=am(),s=Lm();El(s,$e.globalContext,o);const a=Nm();El(a,$e.userContext,o);const c=Mm();El(c,$e.accountContext,o);let u,l,d,f;const h=n.observable.subscribe(g),p={};function g(){if(!d||!f||!n.isGranted())return;h.unsubscribe();let b;if(f.trackViewsManually){if(!u)return;o.remove(u.callback),b=u.options}const w=i(f,l,b);o.drain(w)}function m(b){const w=Zn();if(w&&(b=V3(b)),d=b,pI(P3(b)),f){nm("DD_RUM",b);return}const C=A3(b);if(C){if(!w&&!C.sessionStoreStrategyType){ae.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!w&&t&&(l=t(C,"Datadog RUM",ce),!l)||(f=C,Em().subscribe(ce),n.tryToInit(C.trackingConsent),g())}}const v=b=>{o.add(w=>w.addDurationVital(b))};return{init(b,w){if(!b){ae.error("Missing configuration");return}TT(b.enableExperimentalFeatures),d=b,!(e&&_m())&&(xm(b.plugins,"onInit",{initConfiguration:b,publicApi:w}),b.remoteConfigurationId?L3(b,m):m(b))},get initConfiguration(){return d},getInternalContext:ce,stopSession:ce,addTiming(b,w=Ue()){o.add(C=>C.addTiming(b,w))},startView(b,w=it()){const C=_=>{_.startView(b,w)};o.add(C),u||(u={options:b,callback:C},g())},setViewName(b){o.add(w=>w.setViewName(b))},setViewContext(b){o.add(w=>w.setViewContext(b))},setViewContextProperty(b,w){o.add(C=>C.setViewContextProperty(b,w))},getViewContext:()=>p,globalContext:s,userContext:a,accountContext:c,addAction(b){o.add(w=>w.addAction(b))},addError(b){o.add(w=>w.addError(b))},addFeatureFlagEvaluation(b,w){o.add(C=>C.addFeatureFlagEvaluation(b,w))},startDurationVital(b,w){return Tm(r,b,w)},stopDurationVital(b,w){Im(v,r,b,w)},addDurationVital:v}}function V3(e){var t,n;return{...e,applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100,defaultPrivacyLevel:(t=e.defaultPrivacyLevel)!==null&&t!==void 0?t:(n=Dr())===null||n===void 0?void 0:n.getPrivacyLevel()}}function El(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(i=>i[t].setContext(r))})}function z3(e,t,n,r={}){const i=rT(),o=v3();let s=$3(r,i,o,(l,d,f)=>{const h=e(l,t,n,f,d&&r.createDeflateEncoder?p=>r.createDeflateEncoder(l,d,p):VI,i,o);return t.onRumStart(h.lifeCycle,l,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,l,h.session,h.viewHistory),s=H3(s,h),xm(l.plugins,"onRumStart",{strategy:s}),h});const a=Z(l=>{const d=typeof l=="object"?l:{name:l};s.startView(d),ot({feature:"start-view"})});function c(l,d,f){return Z((...h)=>(ot({feature:f}),s[l][d](...h)))}const u=XT({init:Z(l=>{s.init(l,u)}),setTrackingConsent:Z(l=>{i.update(l),ot({feature:"set-tracking-consent",tracking_consent:l})}),setViewName:Z(l=>{s.setViewName(l),ot({feature:"set-view-name"})}),setViewContext:Z(l=>{s.setViewContext(l),ot({feature:"set-view-context"})}),setViewContextProperty:Z((l,d)=>{s.setViewContextProperty(l,d),ot({feature:"set-view-context-property"})}),getViewContext:Z(()=>(ot({feature:"set-view-context-property"}),s.getViewContext())),getInternalContext:Z(l=>s.getInternalContext(l)),getInitConfiguration:Z(()=>ul(s.initConfiguration)),addAction:(l,d)=>{const f=Ts("action");zn(()=>{s.addAction({name:Re(l),context:Re(d),startClocks:it(),type:"custom",handlingStack:f}),ot({feature:"add-action"})})},addError:(l,d)=>{const f=Ts("error");zn(()=>{s.addError({error:l,handlingStack:f,context:Re(d),startClocks:it()}),ot({feature:"add-error"})})},addTiming:Z((l,d)=>{s.addTiming(Re(l),d)}),setGlobalContext:c($e.globalContext,st.setContext,"set-global-context"),getGlobalContext:c($e.globalContext,st.getContext,"get-global-context"),setGlobalContextProperty:c($e.globalContext,st.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c($e.globalContext,st.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c($e.globalContext,st.clearContext,"clear-global-context"),setUser:c($e.userContext,st.setContext,"set-user"),getUser:c($e.userContext,st.getContext,"get-user"),setUserProperty:c($e.userContext,st.setContextProperty,"set-user-property"),removeUserProperty:c($e.userContext,st.removeContextProperty,"remove-user-property"),clearUser:c($e.userContext,st.clearContext,"clear-user"),setAccount:c($e.accountContext,st.setContext,"set-account"),getAccount:c($e.accountContext,st.getContext,"get-account"),setAccountProperty:c($e.accountContext,st.setContextProperty,"set-account-property"),removeAccountProperty:c($e.accountContext,st.removeContextProperty,"remove-account-property"),clearAccount:c($e.accountContext,st.clearContext,"clear-account"),startView:a,stopSession:Z(()=>{s.stopSession(),ot({feature:"stop-session"})}),addFeatureFlagEvaluation:Z((l,d)=>{s.addFeatureFlagEvaluation(Re(l),Re(d)),ot({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:Z(()=>t.getSessionReplayLink()),startSessionReplayRecording:Z(l=>{t.start(l),ot({feature:"start-session-replay-recording",force:l&&l.force})}),stopSessionReplayRecording:Z(()=>t.stop()),addDurationVital:Z((l,d)=>{ot({feature:"add-duration-vital"}),s.addDurationVital({name:Re(l),type:"duration",startClocks:vC(d.startTime),duration:d.duration,context:Re(d&&d.context),description:Re(d&&d.description)})}),startDurationVital:Z((l,d)=>(ot({feature:"start-duration-vital"}),s.startDurationVital(Re(l),{context:Re(d&&d.context),description:Re(d&&d.description)}))),stopDurationVital:Z((l,d)=>{ot({feature:"stop-duration-vital"}),s.stopDurationVital(typeof l=="string"?Re(l):l,{context:Re(d&&d.context),description:Re(d&&d.description)})})});return u}function H3(e,t){return{init:n=>{nm("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function j3(){const e=Dm();return new me(t=>{if(!e)return;const n=new e(Z(()=>t.notify()));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Dm(){let e;const t=window;if(t.Zone&&(e=An(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(ce),r=An(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function q3(){const e=new me,{stop:t}=dt(window,"open",()=>e.notify());return{observable:e,stop:t}}function W3(e,t,n,r,i){return{get:o=>{const s=n.findView(o),a=i.findUrl(o),c=t.findTrackedSession(o);if(c&&s&&a){const u=r.findActionId(o);return{application_id:e,session_id:c.id,user_action:u?{id:u}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}const G3=zI,K3=Hn;function Y3(e){const t=Mr({expireDelay:K3});e.subscribe(1,r=>{t.add(n(r),r.startClocks.relative)}),e.subscribe(6,({endClocks:r})=>{t.closeActive(r.relative)}),e.subscribe(3,r=>{const i=t.find(r.startClocks.relative);i&&r.name&&(i.name=r.name),i&&r.context&&(i.context=r.context)}),e.subscribe(10,()=>{t.reset()});function n(r){return{service:r.service,version:r.version,context:r.context,id:r.id,name:r.name,startClocks:r.startClocks}}return{findView:r=>t.find(r),getAllEntries:()=>t.getAllEntries(),getDeletedEntries:()=>t.getDeletedEntries(),stop:()=>{t.stop()}}}const Fm="initial_document",Z3=[["document",e=>Fm===e],["xhr",e=>e==="xmlhttprequest"],["fetch",e=>e==="fetch"],["beacon",e=>e==="beacon"],["css",(e,t)=>/\.css$/i.test(t)],["js",(e,t)=>/\.js$/i.test(t)],["image",(e,t)=>["image","img","icon"].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],["font",(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],["media",(e,t)=>["audio","video"].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function J3(e){const t=e.name;if(!iT(t))return dn(`Failed to construct URL for "${e.name}"`),"other";const n=oT(t);for(const[r,i]of Z3)if(i(e.initiatorType,n))return r;return"other"}function Um(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function X3(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Bm(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?je(n,r):t}function Q3(e){if(!Vm(e))return;const{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:o,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:h}=e,p={download:Jn(t,f,h),first_byte:Jn(t,d,f)};return 0<r&&r<n&&(p.worker=Jn(t,r,n)),n<l&&(p.connect=Jn(t,c,l),c<=u&&u<=l&&(p.ssl=Jn(t,u,l))),n<a&&(p.dns=Jn(t,s,a)),t<o&&(p.redirect=Jn(t,i,o)),p}function $m(e){return e.duration>=0}function Vm(e){const t=Um(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=e5(e)?Um(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function e5(e){return e.redirectEnd>e.startTime}function Jn(e,t,n){if(e<=t&&t<=n)return{duration:K(je(t,n)),start:K(je(e,t))}}function zm(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Hm(e){return e.deliveryType===""?"other":e.deliveryType}function t5(e){if(e.startTime<e.responseStart){const{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function Sl(e){return e&&!ET(e)}const n5=/data:(.+)?(;base64)?,/g,jm=24e3;function qm(e){return e.length<=jm?!1:e.substring(0,5)==="data:"?(e=e.substring(0,jm),!0):!1}function Wm(e){return`${e.match(n5)[0]}[...]`}let Gm=1;function r5(e,t,n,r){const i=I3(t,n,r);i5(e,t,i),o5(e,i)}function i5(e,t,n){const r=jI(t).subscribe(i=>{const o=i;if(Sl(o.url))switch(o.state){case"start":n.traceXhr(o,o.xhr),o.requestIndex=Km(),e.notify(7,{requestIndex:o.requestIndex,url:o.url});break;case"complete":n.clearTracingIfNeeded(o),e.notify(8,{duration:o.duration,method:o.method,requestIndex:o.requestIndex,spanId:o.spanId,startClocks:o.startClocks,status:o.status,traceId:o.traceId,traceSampled:o.traceSampled,type:"xhr",url:o.url,xhr:o.xhr,isAborted:o.isAborted,handlingStack:o.handlingStack});break}});return{stop:()=>r.unsubscribe()}}function o5(e,t){const n=Em().subscribe(r=>{const i=r;if(Sl(i.url))switch(i.state){case"start":t.traceFetch(i),i.requestIndex=Km(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":s5(i,o=>{t.clearTracingIfNeeded(i),e.notify(8,{duration:o,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"fetch",url:i.url,response:i.response,init:i.init,input:i.input,isAborted:i.isAborted,handlingStack:i.handlingStack})});break}});return{stop:()=>n.unsubscribe()}}function Km(){const e=Gm;return Gm+=1,e}function s5(e,t){const n=e.response&&TI(e.response);!n||!n.body?t(je(e.startClocks.timeStamp,Ue())):d3(n.body,()=>{t(je(e.startClocks.timeStamp,Ue()))},{bytesLimit:Number.POSITIVE_INFINITY})}function Ym(e){return Li(e)&&e<0?void 0:e}function Zm({lifeCycle:e,isChildEvent:t,onChange:n=ce}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(13,o=>{var s;if(!(o.type==="view"||o.type==="vital"||!t(o)))switch(o.type){case"error":r.errorCount+=1,n();break;case"action":r.actionCount+=1,o.action.frustration&&(r.frustrationCount+=o.action.frustration.type.length),n();break;case"long_task":r.longTaskCount+=1,n();break;case"resource":!((s=o._dd)===null||s===void 0)&&s.discarded||(r.resourceCount+=1,n());break}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}function a5(e,t){const n=Rt();let r=!1;const{stop:i}=ft(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:Pt(),processingEnd:Pt(),startTime:a.timeStamp,duration:0,name:"",cancelable:!1,target:null,toJSON:()=>({})};a.type==="pointerdown"?o(e,c):s(c)},{passive:!0,capture:!0});return{stop:i};function o(a,c){ft(a,window,["pointerup","pointercancel"],u=>{u.type==="pointerup"&&s(c)},{once:!0})}function s(a){if(!r){r=!0,i();const c=a.processingStart-a.startTime;c>=0&&c<Rt()-n&&t(a)}}}var pe;(function(e){e.EVENT="event",e.FIRST_INPUT="first-input",e.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",e.LAYOUT_SHIFT="layout-shift",e.LONG_TASK="longtask",e.LONG_ANIMATION_FRAME="long-animation-frame",e.NAVIGATION="navigation",e.PAINT="paint",e.RESOURCE="resource",e.VISIBILITY_STATE="visibility-state"})(pe||(pe={}));function Xt(e,t){return new me(n=>{if(!window.PerformanceObserver)return;const r=c=>{const u=l5(c);u.length>0&&n.notify(u)};let i,o=!0;const s=new PerformanceObserver(Z(c=>{o?i=Be(()=>r(c.getEntries())):r(c.getEntries())}));try{s.observe(t)}catch{if([pe.RESOURCE,pe.NAVIGATION,pe.LONG_TASK,pe.PAINT].includes(t.type)){t.buffered&&(i=Be(()=>r(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch{return}}}o=!1,c5(e);let a;return!Xn(pe.FIRST_INPUT)&&t.type===pe.FIRST_INPUT&&({stop:a}=a5(e,c=>{r([c])})),()=>{s.disconnect(),a&&a(),lt(i)}})}let Wi;function c5(e){return!Wi&&u5()&&"addEventListener"in performance&&(Wi=_e(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{Wi==null||Wi.stop()}}function u5(){return window.performance!==void 0&&"getEntries"in performance}function Xn(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function l5(e){return e.filter(t=>!d5(t))}function d5(e){return e.entryType===pe.RESOURCE&&(!Sl(e.name)||!$m(e))}const Jm=100,f5=100;function _l(e,t,n,r,i,o){const s=h5(e,t,n,r);return p5(s,i,o)}function p5(e,t,n){let r,i=!1;const o=Be(Z(()=>u({hadActivity:!1})),Jm),s=n!==void 0?Be(Z(()=>u({hadActivity:!0,end:Ue()})),n):void 0,a=e.subscribe(({isBusy:l})=>{lt(o),lt(r);const d=Ue();l||(r=Be(Z(()=>u({hadActivity:!0,end:d})),f5))}),c=()=>{i=!0,lt(o),lt(r),lt(s),a.unsubscribe()};function u(l){i||(c(),t(l))}return{stop:c}}function h5(e,t,n,r){return new me(i=>{const o=[];let s,a=0;return o.push(t.subscribe(c),n.subscribe(c),Xt(r,{type:pe.RESOURCE}).subscribe(u=>{u.some(l=>!Cl(r,l.name))&&c()}),e.subscribe(7,u=>{Cl(r,u.url)||(s===void 0&&(s=u.requestIndex),a+=1,c())}),e.subscribe(8,u=>{Cl(r,u.url)||s===void 0||u.requestIndex<s||(a-=1,c())})),()=>{o.forEach(u=>u.unsubscribe())};function c(){i.notify({isBusy:a>0})}})}function Cl(e,t){return Cm(e.excludedActivityUrls,t)}function Xm(e){return e.nodeType===Node.TEXT_NODE}function g5(e){return e.nodeType===Node.COMMENT_NODE}function Br(e){return e.nodeType===Node.ELEMENT_NODE}function Rs(e){return Br(e)&&!!e.shadowRoot}function Tl(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Br(t.host)}function m5(e){return e.childNodes.length>0||Rs(e)}function Qm(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;Rs(e)&&t(e.shadowRoot)}function Ps(e){return Tl(e)?e.host:e.parentNode}const H={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:$i.ALLOW,MASK:$i.MASK,MASK_USER_INPUT:$i.MASK_USER_INPUT},Il="data-dd-privacy",v5="hidden",y5="dd-privacy-",Ln="***",ev="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",b5={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},w5="x";function Qt(e,t,n){if(n&&n.has(e))return n.get(e);const r=Ps(e),i=r?Qt(r,t,n):t,o=nv(e),s=tv(o,i);return n&&n.set(e,s),s}function tv(e,t){switch(t){case H.HIDDEN:case H.IGNORE:return t}switch(e){case H.ALLOW:case H.MASK:case H.MASK_USER_INPUT:case H.HIDDEN:case H.IGNORE:return e;default:return t}}function nv(e){if(Br(e)){if(e.tagName==="BASE")return H.ALLOW;if(e.tagName==="INPUT"){const t=e;if(t.type==="password"||t.type==="email"||t.type==="tel"||t.type==="hidden")return H.MASK;const n=t.getAttribute("autocomplete");if(n&&(n.startsWith("cc-")||n.endsWith("-password")))return H.MASK}if(e.matches($r(H.HIDDEN)))return H.HIDDEN;if(e.matches($r(H.MASK)))return H.MASK;if(e.matches($r(H.MASK_USER_INPUT)))return H.MASK_USER_INPUT;if(e.matches($r(H.ALLOW)))return H.ALLOW;if(S5(e))return H.IGNORE}}function Os(e,t){switch(t){case H.MASK:case H.HIDDEN:case H.IGNORE:return!0;case H.MASK_USER_INPUT:return Xm(e)?rv(e.parentNode):rv(e);default:return!1}}function rv(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;const t=e;if(t.tagName==="INPUT")switch(t.type){case"button":case"color":case"reset":case"submit":return!1}return!!b5[t.tagName]}const E5=e=>e.replace(/\S/g,w5);function iv(e,t,n){var r;const i=(r=e.parentElement)===null||r===void 0?void 0:r.tagName;let o=e.textContent||"";if(t&&!o.trim())return;const s=n;if(i==="SCRIPT")o=Ln;else if(s===H.HIDDEN)o=Ln;else if(Os(e,s))if(i==="DATALIST"||i==="SELECT"||i==="OPTGROUP"){if(!o.trim())return}else i==="OPTION"?o=Ln:o=E5(o);return o}function S5(e){if(e.nodeName==="SCRIPT")return!0;if(e.nodeName==="LINK"){const n=t("rel");return/preload|prefetch/i.test(n)&&t("as")==="script"||n==="shortcut icon"||n==="icon"}if(e.nodeName==="META"){const n=t("name"),r=t("rel"),i=t("property");return/^msapplication-tile(image|color)$/.test(n)||n==="application-name"||r==="icon"||r==="apple-touch-icon"||r==="shortcut icon"||n==="keywords"||n==="description"||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n==="pinterest"||n==="robots"||n==="googlebot"||n==="bingbot"||e.hasAttribute("http-equiv")||n==="author"||n==="generator"||n==="framework"||n==="publisher"||n==="progid"||/^article:/.test(i)||/^product:/.test(i)||n==="google-site-verification"||n==="yandex-verification"||n==="csrf-token"||n==="p:domain_verify"||n==="verify-v1"||n==="verification"||n==="shopify-checkout-api-token"}function t(n){return(e.getAttribute(n)||"").toLowerCase()}return!1}function $r(e){return`[${Il}="${e}"], .${y5}${e}`}const xl="data-dd-action-name",_5="Masked Element";function C5(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const i=ov(e,xl)||n&&ov(e,n);return i?{name:i,nameSource:"custom_attribute"}:r===H.MASK?{name:_5,nameSource:"mask_placeholder"}:sv(e,n,T5,t)||sv(e,n,I5,t)||{name:"",nameSource:"blank"}}function ov(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return cv(av(r.trim()))}const T5=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Ls(e.labels[0],t)},e=>{if(e.nodeName==="INPUT"){const t=e,n=t.getAttribute("type");if(n==="button"||n==="submit"||n==="reset")return{name:t.value,nameSource:"text_content"}}},(e,t,n)=>{if(e.nodeName==="BUTTON"||e.nodeName==="LABEL"||e.getAttribute("role")==="button")return Ls(e,t,n)},e=>Gi(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(i=>A5(e,i)).filter(i=>!!i).map(i=>uv(i,t,n)).join(" "),nameSource:"text_content"}},e=>Gi(e,"alt"),e=>Gi(e,"name"),e=>Gi(e,"title"),e=>Gi(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Ls(e.options[0],t)}],I5=[(e,t,n)=>Ls(e,t,n)],x5=10;function sv(e,t,n,r){let i=e,o=0;for(;o<=x5&&i&&i.nodeName!=="BODY"&&i.nodeName!=="HTML"&&i.nodeName!=="HEAD";){for(const s of n){const a=s(i,t,r);if(a){const{name:c,nameSource:u}=a,l=c&&c.trim();if(l)return{name:cv(av(l)),nameSource:u}}}if(i.nodeName==="FORM")break;i=i.parentElement,o+=1}}function av(e){return e.replace(/\s+/g," ")}function cv(e){return e.length>100?`${Pg(e,100)} [...]`:e}function A5(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Gi(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Ls(e,t,n){return{name:uv(e,t,n)||"",nameSource:"text_content"}}function uv(e,t,n){if(!e.isContentEditable){if("innerText"in e){let r=e.innerText;const i=o=>{const s=e.querySelectorAll(o);for(let a=0;a<s.length;a+=1){const c=s[a];if("innerText"in c){const u=c.innerText;u&&u.trim().length>0&&(r=r.replace(u,""))}}};return i(`[${xl}]`),t&&i(`[${t}]`),n&&i(`${$r(H.HIDDEN)}, ${$r(H.MASK)}`),r}return e.textContent}}const lv=[xl,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],k5=[fv,P5],R5=[fv,O5,L5];function Ki(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const i=pv(r,k5,M5,t,n);if(i)return i;n=pv(r,R5,D5,t,n)||Ns(N5(r),n),r=r.parentElement}return n}function dv(e){return/[0-9]/.test(e)}function P5(e){if(e.id&&!dv(e.id))return`#${CSS.escape(e.id)}`}function O5(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!dv(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function L5(e){return CSS.escape(e.tagName)}function fv(e,t){if(t){const r=n(t);if(r)return r}for(const r of lv){const i=n(r);if(i)return i}function n(r){if(e.hasAttribute(r))return`${CSS.escape(e.tagName)}[${r}="${CSS.escape(e.getAttribute(r))}"]`}}function N5(e){let t=e.parentElement.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return`${CSS.escape(e.tagName)}:nth-of-type(${n})`}function pv(e,t,n,r,i){for(const o of t){const s=o(e,r);if(s&&n(e,s,i))return Ns(s,i)}}function M5(e,t,n){return e.ownerDocument.querySelectorAll(Ns(t,n)).length===1}function D5(e,t,n){let r;if(n===void 0)r=s=>s.matches(t);else{const s=Ns(`${t}:scope`,n);r=a=>a.querySelector(s)!==null}let o=e.parentElement.firstElementChild;for(;o;){if(o!==e&&r(o))return!1;o=o.nextElementSibling}return!0}function Ns(e,t){return t?`${e}>${t}`:e}const hv=et,F5=100;function U5(e,t){const n=[];let r=0,i;o(e);function o(c){c.stopObservable.subscribe(s),n.push(c),lt(i),i=Be(a,hv)}function s(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){lt(i),r===0&&(r=1,s())}return{tryAppend:c=>r!==0?!1:n.length>0&&!B5(n[n.length-1].event,c.event)?(a(),!1):(o(c),!0),stop:()=>{a()}}}function B5(e,t){return e.target===t.target&&$5(e,t)<=F5&&e.timeStamp-t.timeStamp<=hv}function $5(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function V5(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},o;const s=[_e(e,window,"pointerdown",a=>{mv(a)&&(r=gv(),i={selection:!1,input:!1,scroll:!1},o=t(a))},{capture:!0}),_e(e,window,"selectionchange",()=>{(!r||!gv())&&(i.selection=!0)},{capture:!0}),_e(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),_e(e,window,"pointerup",a=>{if(mv(a)&&o){const c=i;n(o,a,()=>c),o=void 0}},{capture:!0}),_e(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function gv(){const e=window.getSelection();return!e||e.isCollapsed}function mv(e){return e.target instanceof Element&&e.isPrimary!==!1}const vv=3;function z5(e,t){if(H5(e))return t.addFrustration("rage_click"),e.some(yv)&&t.addFrustration("dead_click"),t.hasError&&t.addFrustration("error_click"),{isRage:!0};const n=e.some(r=>r.getUserActivity().selection);return e.forEach(r=>{r.hasError&&r.addFrustration("error_click"),yv(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function H5(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(vv-1);t+=1)if(e[t+vv-1].event.timeStamp-e[t].event.timeStamp<=et)return!0;return!1}const j5='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function yv(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(j5)}const bv=10*et,Yi=new Map;function q5(e){const t=Yi.get(e);return Yi.delete(e),t}function wv(e,t){Yi.set(e,t),Yi.forEach((n,r)=>{je(r,Pt())>bv&&Yi.delete(r)})}const W5=5*ut;function G5(e,t,n,r){const i=Mr({expireDelay:W5}),o=new me;let s;e.subscribe(10,()=>{i.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Fr.UNLOADING&&l()});const{stop:a}=V5(r,{onPointerDown:d=>K5(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},h,p)=>{Y5(r,e,t,n,i,o,u,d,h,p,f)}});return{stop:()=>{l(),o.notify(),a()},actionContexts:{findActionId:d=>i.findAll(d)}};function u(d){if(!s||!s.tryAppend(d)){const f=d.clone();s=U5(d,h=>{J5(h,f)})}}function l(){s&&s.stop()}}function K5(e,t,n,r,i){const o=e.enablePrivacyForActionName?Qt(r.target,e.defaultPrivacyLevel):H.ALLOW;if(o===H.HIDDEN)return;const s=Z5(r,o,e);let a=!1;return _l(t,n,i,e,c=>{a=c.hadActivity},Jm),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function Y5(e,t,n,r,i,o,s,a,c,u,l){var d;const f=Ev(t,i,u,a,c);s(f);const h=(d=a==null?void 0:a.target)===null||d===void 0?void 0:d.selector;h&&wv(c.timeStamp,h);const{stop:p}=_l(t,n,r,e,v=>{v.hadActivity&&v.end<f.startClocks.timeStamp?f.discard():v.hadActivity?f.stop(v.end):l()?f.stop(f.startClocks.timeStamp):f.stop()},bv),g=t.subscribe(5,({endClocks:v})=>{f.stop(v.timeStamp)}),m=o.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),p(),m.unsubscribe()})}function Z5(e,t,n){const r=e.target.getBoundingClientRect(),i=Ki(e.target,n.actionNameAttribute);i&&wv(e.timeStamp,i);const o=C5(e.target,n,t);return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:i},position:{x:Math.round(e.clientX-r.left),y:Math.round(e.clientY-r.top)},name:o.name,nameSource:o.nameSource}}function Ev(e,t,n,r,i){const o=qe(),s=it(),a=t.add(o,s.relative),c=Zm({lifeCycle:e,isChildEvent:p=>p.action!==void 0&&(Array.isArray(p.action.id)?p.action.id.includes(o):p.action.id===o)});let u=0,l;const d=[],f=new me;function h(p){u===0&&(l=p,u=1,l?a.close(Hu(l)):a.remove(),c.stop(),f.notify())}return{event:i,stop:h,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:n,addFrustration:p=>{d.push(p)},startClocks:s,isStopped:()=>u===1||u===2,clone:()=>Ev(e,t,n,r,i),validate:p=>{if(h(),u!==1)return;const{resourceCount:g,errorCount:m,longTaskCount:v}=c.eventCounts,y={duration:l&&je(s.timeStamp,l),startClocks:s,id:o,frustrationTypes:d,counts:{resourceCount:g,errorCount:m,longTaskCount:v},events:p??[i],event:i,...r};e.notify(0,y),u=2},discard:()=>{h(),u=2}}}function J5(e,t){const{isRage:n}=z5(e,t);n?(e.forEach(r=>r.discard()),t.stop(Ue()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function X5(e,t,n,r,i){e.subscribe(0,a=>e.notify(12,Sv(a))),t.register(0,({startTime:a,eventType:c})=>{if(c!=="error"&&c!=="resource"&&c!=="long_task")return;const u=o.findActionId(a);if(u)return{type:c,action:{id:u}}});let o={findActionId:ce},s=ce;return i.trackUserInteractions&&({actionContexts:o,stop:s}=G5(e,n,r,i)),{addAction:a=>{e.notify(12,Sv(a))},actionContexts:o,stop:s}}function Sv(e){const t=Ms(e)?{action:{id:e.id,loading_time:Ym(K(e.duration)),frustration:{type:e.frustrationTypes},error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},_dd:{action:{target:e.target,position:e.position,name_source:e.nameSource}}}:void 0,n=Ft({action:{id:qe(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Ms(e)?e.duration:void 0,i=Ms(e)?void 0:e.context,o=Ms(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:i,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:o}}function Ms(e){return e.type!=="custom"}function Q5(e){const t=r3([us.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function e4(e,t){const n=eI(e,[Hi.cspViolation,Hi.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function t4(e,t){const n=new me;return Q5(n),YT(n),e4(t,n),n.subscribe(r=>e.notify(14,{error:r})),n4(e)}function n4(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=Ft(t.context,n),e.notify(12,{customerContext:n,...r4(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:o})=>{const s=On(t)?Pn(t):void 0,a=Xg({stackTrace:s,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:Lr.CUSTOM,handling:"handled"});e.notify(14,{customerContext:o,error:a})}}}function r4(e){const t={date:e.startClocks.timeStamp,error:{id:qe(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:"browser",fingerprint:e.fingerprint,csp:e.csp},type:"error"},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startTime:e.startClocks.relative,domainContext:n}}const _v=new WeakSet;function i4(e){if(!performance||!("getEntriesByName"in performance))return;const t=performance.getEntriesByName(e.url,"resource");if(!t.length||!("toJSON"in t[0]))return;const n=t.filter(r=>!_v.has(r)).filter(r=>$m(r)&&Vm(r)).filter(r=>o4(r,e.startClocks.relative,Cv({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return _v.add(n[0]),n[0].toJSON()}function Cv(e){return Cr(e.startTime,e.duration)}function o4(e,t,n){return e.startTime>=t-1&&Cv(e)<=Cr(n,1)}const s4=2*ut;function a4(e){const t=c4(e)||u4(e);if(!(!t||t.traceTime<=Rt()-s4))return t.traceId}function c4(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return Tv(t&&t.content,n&&n.content)}function u4(e){const t=l4(e);if(t)return Tv(Fi(t,"trace-id"),Fi(t,"trace-time"))}function Tv(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function l4(e){for(let t=0;t<e.childNodes.length;t+=1){const n=Iv(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;t-=1){const n=e.body.childNodes[t],r=Iv(n);if(r)return r;if(!Xm(n))break}}function Iv(e){if(e&&g5(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function xv(){if(Xn(pe.NAVIGATION)){const n=performance.getEntriesByType(pe.NAVIGATION)[0];if(n)return n}const e=d4(),t={entryType:pe.NAVIGATION,initiatorType:"navigation",name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function d4(){const e={},t=performance.timing;for(const n in t)if(Li(t[n])){const r=n,i=t[r];e[r]=i===0?0:Hu(i)}return e}function f4(e,t,n=xv){pl(e,"interactive",()=>{const r=n(),i=Object.assign(r.toJSON(),{entryType:pe.RESOURCE,initiatorType:Fm,duration:r.responseEnd,traceId:a4(document),toJSON:()=>({...i,toJSON:void 0})});t(i)})}function p4(e,t,n,r=n3(),i=f4){e.subscribe(8,a=>{s(()=>h4(a,t,n))});const o=Xt(t,{type:pe.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)X3(c)||s(()=>Av(c,t))});i(t,a=>{s(()=>Av(a,t))});function s(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{o.unsubscribe()}}}function h4(e,t,n){const r=i4(e),i=r?fs(r.startTime):e.startClocks,o=g4(e,t);if(!t.trackResources&&!o)return;const s=e.type==="xhr"?"xhr":"fetch",a=r?kv(r):void 0,c=r?Bm(r):v4(n,i,e.duration),u=Ft({date:i.timeStamp,resource:{id:qe(),type:s,duration:K(c),method:e.method,status_code:e.status,protocol:r&&zm(r),url:qm(e.url)?Wm(e.url):e.url,delivery_type:r&&Hm(r)},type:"resource",_dd:{discarded:!t.trackResources}},o,a);return{startTime:i.relative,duration:c,rawRumEvent:u,domainContext:{performanceEntry:r,xhr:e.xhr,response:e.response,requestInput:e.input,requestInit:e.init,error:e.error,isAborted:e.isAborted,handlingStack:e.handlingStack}}}function Av(e,t){const n=fs(e.startTime),r=m4(e,t);if(!t.trackResources&&!r)return;const i=J3(e),o=kv(e),s=Bm(e),a=Ft({date:n.timeStamp,resource:{id:qe(),type:i,duration:K(s),url:e.name,status_code:y4(e.responseStatus),protocol:zm(e),delivery_type:Hm(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,o);return{startTime:n.relative,duration:s,rawRumEvent:a,domainContext:{performanceEntry:e}}}function kv(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...t5(e),...Q3(e)}}}function g4(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function m4(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Am().toString(),rule_psr:t.rulePsr}}}function v4(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function y4(e){return e===0?void 0:e}function b4(e,t,n){const{stop:r,eventCounts:i}=Zm({lifeCycle:e,isChildEvent:o=>o.view.id===t,onChange:n});return{stop:r,eventCounts:i}}const w4=10*ut;function E4(e,t,n){return{stop:Xt(e,{type:pe.PAINT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<w4);o&&n(o.startTime)}).unsubscribe}}function S4(e,t,n){const r=Xt(e,{type:pe.FIRST_INPUT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.startTime<t.timeStamp);if(o){const s=je(o.startTime,o.processingStart);let a;o.target&&Br(o.target)&&(a=Ki(o.target,e.actionNameAttribute)),n({delay:s>=0?s:0,time:o.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function _4(e,t,n=xv){return I4(e,()=>{const r=n();T4(r)||t(C4(r))})}function C4(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Pt()?e.responseStart:void 0}}function T4(e){return e.loadEventEnd<=0}function I4(e,t){let n;const{stop:r}=pl(e,"complete",()=>{n=Be(()=>t())});return{stop:()=>{r(),lt(n)}}}const x4=10*ut;function A4(e,t,n,r){let i=1/0;const{stop:o}=ft(e,n,["pointerdown","keydown"],c=>{i=c.timeStamp},{capture:!0,once:!0});let s=0;const a=Xt(e,{type:pe.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const u=LC(c,l=>l.entryType===pe.LARGEST_CONTENTFUL_PAINT&&l.startTime<i&&l.startTime<t.timeStamp&&l.startTime<x4&&l.size>s);if(u){let l;u.element&&(l=Ki(u.element,e.actionNameAttribute)),r({value:u.startTime,targetSelector:l,resourceUrl:k4(u)}),s=u.size}});return{stop:()=>{o(),a.unsubscribe()}}}function k4(e){return e.url===""?void 0:e.url}function Rv(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:ce};if(Xn(pe.VISIBILITY_STATE)){const i=performance.getEntriesByType(pe.VISIBILITY_STATE).find(o=>o.name==="hidden");if(i)return{timeStamp:i.startTime,stop:ce}}let n=1/0;const{stop:r}=ft(e,t,["pagehide","visibilitychange"],i=>{(i.type==="pagehide"||document.visibilityState==="hidden")&&(n=i.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function R4(e,t,n){const r={},{stop:i}=_4(e,l=>{t(l.loadEvent),r.navigationTimings=l,n()}),o=Rv(e),{stop:s}=E4(e,o,l=>{r.firstContentfulPaint=l,n()}),{stop:a}=A4(e,o,window,l=>{r.largestContentfulPaint=l,n()}),{stop:c}=S4(e,o,l=>{r.firstInput=l,n()});function u(){i(),s(),a(),c(),o.stop()}return{stop:u,initialViewMetrics:r}}function P4(e,t,n){if(!D4())return{stop:ce};let r=0,i;n({value:0});const o=M4(),s=Xt(e,{type:pe.LAYOUT_SHIFT,buffered:!0}).subscribe(a=>{var c;for(const u of a){if(u.hadRecentInput||u.startTime<t)continue;const{cumulatedValue:l,isMaxValue:d}=o.update(u);if(d){const f=O4(u.sources);i={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:je(t,u.startTime),previousRect:f==null?void 0:f.previousRect,currentRect:f==null?void 0:f.currentRect,devicePixelRatio:window.devicePixelRatio}}if(l>r){r=l;const f=(c=i==null?void 0:i.target)===null||c===void 0?void 0:c.deref();n({value:ds(r,4),targetSelector:f&&Ki(f,e.actionNameAttribute),time:i==null?void 0:i.time,previousRect:i!=null&&i.previousRect?Pv(i.previousRect):void 0,currentRect:i!=null&&i.currentRect?Pv(i.currentRect):void 0,devicePixelRatio:i==null?void 0:i.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function O4(e){return e.find(t=>!!t.node&&Br(t.node))}function Pv({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const L4=5*et,N4=et;function M4(){let e=0,t,n,r=0;return{update:i=>{const o=t===void 0||i.startTime-n>=N4||i.startTime-t>=L4;let s;return o?(t=n=i.startTime,r=e=i.value,s=!0):(e+=i.value,n=i.startTime,s=i.value>r,s&&(r=i.value)),{cumulatedValue:e,isMaxValue:s}}}}function D4(){return Xn(pe.LAYOUT_SHIFT)&&"WeakRef"in window}let Ds,Ov=0,Al=1/0,kl=0;function F4(){"interactionCount"in performance||Ds||(Ds=new window.PerformanceObserver(Z(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(Al=Math.min(Al,n.interactionId),kl=Math.max(kl,n.interactionId),Ov=(kl-Al)/7+1)})})),Ds.observe({type:"event",buffered:!0,durationThreshold:0}))}const Lv=()=>Ds?Ov:window.performance.interactionCount||0,Nv=10,U4=1*ut;function B4(e,t,n){if(!z4())return{getInteractionToNextPaint:()=>{},setViewEnd:ce,stop:ce};const{getViewInteractionCount:r,stopViewInteractionCount:i}=V4(n);let o=1/0;const s=$4(r);let a=-1,c,u;function l(h){for(const g of h)g.interactionId&&g.startTime>=t&&g.startTime<=o&&s.process(g);const p=s.estimateP98Interaction();p&&p.duration!==a&&(a=p.duration,u=je(t,p.startTime),c=q5(p.startTime),!c&&p.target&&Br(p.target)&&(c=Ki(p.target,e.actionNameAttribute)))}const d=Xt(e,{type:pe.FIRST_INPUT,buffered:!0}).subscribe(l),f=Xt(e,{type:pe.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,U4),targetSelector:c,time:u};if(r())return{value:0}},setViewEnd:h=>{o=h,i()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function $4(e){const t=[];function n(){t.sort((r,i)=>i.duration-r.duration).splice(Nv)}return{process(r){const i=t.findIndex(s=>r.interactionId===s.interactionId),o=t[t.length-1];i!==-1?r.duration>t[i].duration&&(t[i]=r,n()):(t.length<Nv||r.duration>o.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function V4(e){F4();const t=e==="initial_load"?0:Lv();let n={stopped:!1};function r(){return Lv()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function z4(){return Xn(pe.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function H4(e,t,n,r,i,o,s){let a=i==="initial_load",c=!0;const u=[],l=Rv(r);function d(){if(!c&&!a&&u.length>0){const h=Math.max(...u);h<l.timeStamp&&s(h)}}const{stop:f}=_l(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&u.push(je(o.timeStamp,h.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:h=>{a&&(a=!1,u.push(h),d())}}}function Mv(){let e;const t=window.visualViewport;return t?e=t.pageLeft-t.offsetLeft:window.scrollX!==void 0?e=window.scrollX:e=window.pageXOffset||0,Math.round(e)}function Rl(){let e;const t=window.visualViewport;return t?e=t.pageTop-t.offsetTop:window.scrollY!==void 0?e=window.scrollY:e=window.pageYOffset||0,Math.round(e)}let Pl;function Dv(e){return Pl||(Pl=j4(e)),Pl}function j4(e){return new me(t=>{const{throttled:n}=kn(()=>{t.notify(Fs())},200);return _e(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Fs(){const e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}const q4=et;function W4(e,t,n,r=K4(e)){let i=0,o=0,s=0;const a=r.subscribe(({scrollDepth:c,scrollTop:u,scrollHeight:l})=>{let d=!1;if(c>i&&(i=c,d=!0),l>o){o=l;const f=Pt();s=je(t.relative,f),d=!0}d&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:u,maxScrollHeight:o,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function G4(){const e=Rl(),{height:t}=Fs(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function K4(e,t=q4){return new me(n=>{function r(){n.notify(G4())}if(window.ResizeObserver){const i=kn(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,s=new ResizeObserver(Z(i.throttled));o&&s.observe(o);const a=_e(e,window,"scroll",i.throttled,{passive:!0});return()=>{i.cancel(),s.disconnect(),a.stop()}}})}function Y4(e,t,n,r,i,o,s){const a={},{stop:c,setLoadEvent:u}=H4(e,t,n,r,o,s,g=>{a.loadingTime=g,i()}),{stop:l}=W4(r,s,g=>{a.scroll=g}),{stop:d}=P4(r,s.relative,g=>{a.cumulativeLayoutShift=g,i()}),{stop:f,getInteractionToNextPaint:h,setViewEnd:p}=B4(r,s.relative,o);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:p,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const Z4=3e3,J4=5*ut,X4=5*ut;function Q4(e,t,n,r,i,o,s,a){const c=new Set;let u=d("initial_load",Ig(),a);f();let l;s&&(l=h(o));function d(p,g,m){const v=ex(t,n,r,i,e,p,g,m);return c.add(v),v.stopObservable.subscribe(()=>{c.delete(v)}),v}function f(){t.subscribe(10,()=>{u=d("route_change",void 0,{name:u.name,service:u.service,version:u.version,context:u.contextManager.getContext()})}),t.subscribe(9,()=>{u.end({sessionIsActive:!1})})}function h(p){return p.subscribe(({oldLocation:g,newLocation:m})=>{nx(g,m)&&(u.end(),u=d("route_change"))})}return{addTiming:(p,g=Ue())=>{u.addTiming(p,g)},startView:(p,g)=>{u.end({endClocks:g}),u=d("route_change",g,p)},setViewContext:p=>{u.contextManager.setContext(p)},setViewContextProperty:(p,g)=>{u.contextManager.setContextProperty(p,g)},setViewName:p=>{u.setViewName(p)},getViewContext:()=>u.contextManager.getContext(),stop:()=>{l&&l.unsubscribe(),u.end(),c.forEach(p=>p.stop())}}}function ex(e,t,n,r,i,o,s=it(),a){const c=qe(),u=new me,l={};let d=0,f;const h=Di(i),p=As();let g=!0,m=a==null?void 0:a.name;const v=(a==null?void 0:a.service)||r.service,y=(a==null?void 0:a.version)||r.version,b=a==null?void 0:a.context;b&&p.setContext(b);const w={id:c,name:m,startClocks:s,service:v,version:y,context:b};e.notify(1,w),e.notify(2,w);const{throttled:C,cancel:_}=kn(re,Z4,{leading:!1}),{setLoadEvent:E,setViewEnd:P,stop:T,stopINPTracking:I,getCommonViewMetrics:A}=Y4(e,t,n,r,J,o,s),{stop:O,initialViewMetrics:D}=o==="initial_load"?R4(r,E,J):{stop:ce,initialViewMetrics:{}},{stop:F,eventCounts:V}=b4(e,c,J),z=Tr(re,J4),be=e.subscribe(11,G=>{G.reason===Fr.UNLOADING&&re()});re(),p.changeObservable.subscribe(J);function oe(){e.notify(3,{id:c,name:m,context:p.getContext(),startClocks:s})}function J(){oe(),C()}function re(){_(),oe(),d+=1;const G=f===void 0?Ue():f.timeStamp;e.notify(4,{customTimings:l,documentVersion:d,id:c,name:m,service:v,version:y,context:p.getContext(),loadingType:o,location:h,startClocks:s,commonViewMetrics:A(),initialViewMetrics:D,duration:je(s.timeStamp,G),isActive:f===void 0,sessionIsActive:g,eventCounts:V})}return{get name(){return m},service:v,version:y,contextManager:p,stopObservable:u,end(G={}){var ue,te;f||(f=(ue=G.endClocks)!==null&&ue!==void 0?ue:it(),g=(te=G.sessionIsActive)!==null&&te!==void 0?te:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),hs(z),P(f.relative),T(),be.unsubscribe(),re(),Be(()=>{this.stop()},X4))},stop(){O(),F(),I(),u.notify()},addTiming(G,ue){if(f)return;const te=EC(ue)?ue:je(s.timeStamp,ue);l[tx(G)]=te,J()},setViewName(G){m=G,re()}}}function tx(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&ae.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function nx(e,t){return e.pathname!==t.pathname||!rx(t.hash)&&Fv(t.hash)!==Fv(e.hash)}function rx(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Fv(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function ix(e,t,n,r,i,o,s,a,c,u){return e.subscribe(4,l=>e.notify(12,ox(l,n,a))),t.register(0,({startTime:l,eventType:d})=>{const{service:f,version:h,id:p,name:g,context:m}=c.findView(l);return{type:d,service:f,version:h,context:m,view:{id:p,name:g}}}),Q4(r,e,i,o,n,s,!n.trackViewsManually,u)}function ox(e,t,n){var r,i,o,s,a,c,u,l,d,f,h,p,g,m,v,y,b,w;const C=n.getReplayStats(e.id),_=(i=(r=e.commonViewMetrics)===null||r===void 0?void 0:r.cumulativeLayoutShift)===null||i===void 0?void 0:i.devicePixelRatio,E={_dd:{document_version:e.documentVersion,replay_stats:C,cls:_?{device_pixel_ratio:_}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually}},date:e.startClocks.timeStamp,type:"view",view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:(o=e.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.value,cumulative_layout_shift_time:K((s=e.commonViewMetrics.cumulativeLayoutShift)===null||s===void 0?void 0:s.time),cumulative_layout_shift_target_selector:(a=e.commonViewMetrics.cumulativeLayoutShift)===null||a===void 0?void 0:a.targetSelector,first_byte:K((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:K((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:K((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:K((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:K(e.initialViewMetrics.firstContentfulPaint),first_input_delay:K((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:K((h=e.initialViewMetrics.firstInput)===null||h===void 0?void 0:h.time),first_input_target_selector:(p=e.initialViewMetrics.firstInput)===null||p===void 0?void 0:p.targetSelector,interaction_to_next_paint:K((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.value),interaction_to_next_paint_time:K((m=e.commonViewMetrics.interactionToNextPaint)===null||m===void 0?void 0:m.time),interaction_to_next_paint_target_selector:(v=e.commonViewMetrics.interactionToNextPaint)===null||v===void 0?void 0:v.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:K((y=e.initialViewMetrics.largestContentfulPaint)===null||y===void 0?void 0:y.value),largest_contentful_paint_target_selector:(b=e.initialViewMetrics.largestContentfulPaint)===null||b===void 0?void 0:b.targetSelector,load_event:K((w=e.initialViewMetrics.navigationTimings)===null||w===void 0?void 0:w.loadEvent),loading_time:Ym(K(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:sx(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:K(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:K(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:C?!0:void 0,is_active:e.sessionIsActive?void 0:!1},privacy:{replay_level:t.defaultPrivacyLevel}};return Vn(e.customTimings)||(E.view.custom_timings=CC(e.customTimings,K)),{rawRumEvent:E,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function sx({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:K(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:K(n)},fid:r&&{duration:K(r.delay),timestamp:K(r.time),target_selector:r.targetSelector},inp:t&&{duration:K(t.value),timestamp:K(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:K(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl}}}const ax="rum";function cx(e,t,n){const r=wI(e,ax,i=>lx(e,i),n);return r.expireObservable.subscribe(()=>{t.notify(9)}),r.renewObservable.subscribe(()=>{t.notify(10)}),r.sessionStateUpdateObservable.subscribe(({previousState:i,newState:o})=>{if(!i.forcedReplay&&o.forcedReplay){const s=r.findSession();s&&(s.isReplayForced=!0)}}),{findTrackedSession:i=>{const o=r.findSession(i);if(!(!o||!Uv(o.trackingType)))return{id:o.id,sessionReplay:o.trackingType==="1"?1:o.isReplayForced?2:0,anonymousId:o.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:"1"})}}function ux(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:ym("records")?1:0};return{findTrackedSession:()=>e,expire:ce,expireObservable:new me,setForcedReplay:ce}}function lx(e,t){let n;return dx(t)?n=t:xn(e.sessionSampleRate)?xn(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:Uv(n)}}function dx(e){return e==="0"||e==="1"||e==="2"}function Uv(e){return e==="2"||e==="1"}function fx(e,t,n,r,i,o,s){const a=e.replica,c=$I(e,{endpoint:e.rumEndpointBuilder,encoder:s(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:u=>Ft(u,{application:{id:a.applicationId}}),encoder:s(3)},r,i,o);return t.subscribe(13,u=>{u.type==="view"?c.upsert(u,u.view.id):c.add(u)}),n.subscribe(u=>c.add(u,fI(e))),c}function px(e){const t=Dr();e.subscribe(13,n=>{t.send("rum",n)})}const hx=Hn;function gx(e,t,n,r){const i=Mr({expireDelay:hx});let o;e.subscribe(1,({startClocks:c})=>{const u=r.href;i.add(a({url:u,referrer:o||document.referrer}),c.relative),o=u}),e.subscribe(6,({endClocks:c})=>{i.closeActive(c.relative)});const s=n.subscribe(({newLocation:c})=>{const u=i.find();if(u){const l=Pt();i.closeActive(l),i.add(a({url:c.href,referrer:u.referrer}),l)}});function a({url:c,referrer:u}){return{url:c,referrer:u}}return t.register(0,({startTime:c,eventType:u})=>{const{url:l,referrer:d}=i.find(c);return{type:u,view:{url:l,referrer:d}}}),{findUrl:c=>i.find(c),getAllEntries:()=>i.getAllEntries(),getDeletedEntries:()=>i.getDeletedEntries(),stop:()=>{s.unsubscribe(),i.stop()}}}function mx(e,t){let n=Di(t);return new me(r=>{const{stop:i}=vx(e,s),{stop:o}=yx(e,s);function s(){if(n.href===t.href)return;const a=Di(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{i(),o()}})}function vx(e,t){const{stop:n}=dt(Bv("pushState"),"pushState",({onPostCall:o})=>{o(t)}),{stop:r}=dt(Bv("replaceState"),"replaceState",({onPostCall:o})=>{o(t)}),{stop:i}=_e(e,window,"popstate",t);return{stop:()=>{n(),r(),i()}}}function yx(e,t){return _e(e,window,"hashchange",t)}function Bv(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const bx=Hn;function wx(e,t,n){const r=Mr({expireDelay:bx});return e.subscribe(1,({startClocks:i})=>{r.add({},i.relative)}),e.subscribe(6,({endClocks:i})=>{r.closeActive(i.relative)}),t.register(0,({startTime:i,eventType:o})=>{if(!n.trackFeatureFlagsForEvents.concat(["view","error"]).includes(o))return;const a=r.find(i);if(!(!a||Vn(a)))return{type:o,feature_flags:a}}),{addFeatureFlagEvaluation:(i,o)=>{const s=r.find();s&&(s[i]=o)}}}const Ex=10*et;let Vr,Ol;function Sx(e,t,n,r){t.enabled&&xn(e.customerDataTelemetrySampleRate)&&(zv(),Ol=!1,n.subscribe(13,()=>{Ol=!0}),r.subscribe(({bytesCount:o,messagesCount:s})=>{Ol&&(Vr.batchCount+=1,Vv(Vr.batchBytesCount,o),Vv(Vr.batchMessagesCount,s))}),Tr(_x,Ex))}function _x(){Vr.batchCount!==0&&(dn("Customer data measures",Vr),zv())}function $v(){return{min:1/0,max:0,sum:0}}function Vv(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function zv(){Vr={batchCount:0,batchBytesCount:$v(),batchMessagesCount:$v()}}const Cx=4e3,Tx=500,Ix=Hn;function xx(e,t,n=Tx){const r=Mr({expireDelay:Ix,maxEntries:Cx});let i;s(Hv(),Pt());const{stop:o}=ft(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{s(kx(c),c.timeStamp)},{capture:!0});function s(c,u=Pt()){c!==i&&(i=c,r.closeActive(u),r.add({state:i,startTime:u},u))}function a(c,u,l){return r.findAll(u,l).some(d=>d.state===c)}return e.register(0,({startTime:c,duration:u=0,eventType:l})=>{if(l==="view"){const d=r.findAll(c,u);return{type:l,_dd:{page_states:Ax(d,c,n)}}}if(l==="action"||l==="error")return{type:l,view:{in_foreground:a("active",c,0)}}}),{wasInPageStateDuringPeriod:a,addPageState:s,stop:()=>{o(),r.stop()}}}function Ax(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:i})=>({state:r,start:K(je(t,i))}))}function kx(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Hv()}function Hv(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function Rx(e){let t;const n=requestAnimationFrame(Z(()=>{t=Fs()})),r=Dv(e).subscribe(i=>{t=i}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const Px=et;function Ox(e){return new me(t=>Lx(e,n=>t.notify(n)))}function Lx(e,t){const n=Fi(document.cookie,e),r=Tr(()=>{const i=Fi(document.cookie,e);i!==n&&t(i)},Px);return()=>hs(r)}const jv="datadog-ci-visibility-test-execution-id";function Nx(e,t=Ox(jv)){var n;let r=Rn(jv)||((n=window.Cypress)===null||n===void 0?void 0:n.env("traceId"));const i=t.subscribe(o=>{r=o});return e.register(0,({eventType:o})=>{if(typeof r=="string")return{type:o,session:{type:"ci_test"},ci_test:{test_execution_id:r}}}),{stop:()=>{i.unsubscribe()}}}function Mx(e,t){const n=Xt(t,{type:pe.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const i of r){const o=fs(i.startTime),s={date:o.timeStamp,long_task:{id:qe(),entry_type:"long-animation-frame",duration:K(i.duration),blocking_duration:K(i.blockingDuration),first_ui_event_timestamp:K(i.firstUIEventTimestamp),render_start:K(i.renderStart),style_and_layout_start:K(i.styleAndLayoutStart),start_time:K(i.startTime),scripts:i.scripts.map(a=>({duration:K(a.duration),pause_duration:K(a.pauseDuration),forced_style_and_layout_duration:K(a.forcedStyleAndLayoutDuration),start_time:K(a.startTime),execution_start:K(a.executionStart),source_url:a.sourceURL,source_function_name:a.sourceFunctionName,source_char_position:a.sourceCharPosition,invoker:a.invoker,invoker_type:a.invokerType,window_attribution:a.windowAttribution}))},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop:()=>n.unsubscribe()}}function Dx(e,t){const n=Xt(t,{type:pe.LONG_TASK,buffered:!0}).subscribe(r=>{for(const i of r){if(i.entryType!==pe.LONG_TASK||!t.trackLongTasks)break;const o=fs(i.startTime),s={date:o.timeStamp,long_task:{id:qe(),entry_type:"long-task",duration:K(i.duration)},type:"long_task",_dd:{discarded:!1}};e.notify(12,{rawRumEvent:s,startTime:o.relative,duration:i.duration,domainContext:{performanceEntry:i}})}});return{stop(){n.unsubscribe()}}}function Fx(){const e={};return{register(t,n){return e[t]||(e[t]=[]),e[t].push(n),{unregister:()=>{e[t]=e[t].filter(r=>r!==n)}}},triggerHook(t,n){const i=(e[t]||[]).map(o=>o(n));return Ft(...i)}}}function Ux(e){e.register(0,({eventType:t})=>{const n=g3(),r=m3();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:_m()}}})}function Bx(e,t,n){const r=ul(e),i=n(r);return Zu(t).forEach(([o,s])=>Ll(e,r,o.split(/\.|(?=\[\])/),s)),i}function Ll(e,t,n,r){const[i,...o]=n;if(i==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>Ll(s,t[a],o,r));return}if(!(!qv(e)||!qv(t))){if(o.length>0)return Ll(e[i],t[i],o,r);$x(e,i,t[i],r)}}function $x(e,t,n,r){const i=Kn(n);i===r?e[t]=Re(n):r==="object"&&(i==="undefined"||i==="null")&&(e[t]={})}function qv(e){return Kn(e)==="object"}const zr={"view.name":"string","view.url":"string","view.referrer":"string"},Hr={context:"object"},Nl={service:"string",version:"string"};let Wv;function Vx(e,t,n,r,i,o,s,a,c){Wv={view:{"view.performance.lcp.resource_url":"string",...Hr,...zr},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...Hr,...zr,...Nl},resource:{"resource.url":"string",...Cs(Gn.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...Hr,...zr,...Nl},action:{"action.target.name":"string",...Hr,...zr,...Nl},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...Hr,...zr},vital:{...Hr,...zr}};const u={error:fl("error",e.eventRateLimiterThreshold,c),action:fl("action",e.eventRateLimiterThreshold,c),vital:fl("vital",e.eventRateLimiterThreshold,c)};t.subscribe(12,({startTime:l,duration:d,rawRumEvent:f,domainContext:h,customerContext:p})=>{const g=i.findView(l),m=o.findUrl(l),v=r.findTrackedSession(l);if(v&&g&&!m&&Cs(Gn.MISSING_URL_CONTEXT_TELEMETRY)&&dn("Missing URL entry",{debug:{eventType:f.type,startTime:l,urlEntries:o.getAllEntries(),urlDeletedEntries:o.getDeletedEntries(),viewEntries:i.getAllEntries(),viewDeletedEntries:i.getDeletedEntries()}}),v&&g&&m){const y=a(),b={_dd:{format_version:2,drift:bC(),configuration:{session_sample_rate:ds(e.sessionSampleRate,3),session_replay_sample_rate:ds(e.sessionReplaySampleRate,3)},browser_sdk_version:Zn()?"6.6.3":void 0},application:{id:e.applicationId},date:Ue(),source:"browser",session:{id:v.id,type:"user"},display:s.get(),connectivity:om(),context:y.context},w=Ft(b,n.triggerHook(0,{eventType:f.type,startTime:l,duration:d}),{context:p},f);"has_replay"in w.session||(w.session.has_replay=y.hasReplay),w.type==="view"&&(w.session.sampled_for_replay=v.sessionReplay===1),v.anonymousId&&!y.user.anonymous_id&&e.trackAnonymousUser&&(y.user.anonymous_id=v.anonymousId),Vn(y.user)||(w.usr=y.user),!Vn(y.account)&&y.account.id&&(w.account=y.account),zx(w,e.beforeSend,h,u)&&(Vn(w.context)&&delete w.context,t.notify(13,w))}})}function zx(e,t,n,r){var i;if(t){const s=Bx(e,Wv[e.type],a=>t(a,n));if(s===!1&&e.type!=="view")return!1;s===!1&&ae.warn("Can't dismiss view events using beforeSend!")}return!((i=r[e.type])===null||i===void 0?void 0:i.isLimitReached())}function Hx(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function jx(e,t,n,r,i,o,s){const a=[],c=new G3,u=Fx();c.subscribe(13,ge=>cl("rum",ge));const l=qx(e);l.setContextProvider(()=>{var ge,B;return{application:{id:e.applicationId},session:{id:(ge=p.findTrackedSession())===null||ge===void 0?void 0:ge.id},view:{id:(B=y.findView())===null||B===void 0?void 0:B.id},action:{id:A.findActionId()}}});const d=ge=>{c.notify(14,{error:ge}),dn("Error reported to customer",{"error.message":ge.message})},f=FI(e),h=f.subscribe(ge=>{c.notify(11,ge)});a.push(()=>h.unsubscribe());const p=Zn()?ux():cx(e,c,o);if(Zn())px(c);else{const ge=fx(e,c,l.observable,d,f,p.expireObservable,i);a.push(()=>ge.stop()),Sx(e,l,c,ge.flushObservable)}const g=j3(),m=mx(e,location),v=xx(u,e),y=Y3(c),b=gx(c,u,m,location),w=wx(c,u,e),{observable:C,stop:_}=q3();a.push(_);const E=F3(e),P=U3(e),T=B3(e),I=()=>Hx(E,P,T,t),{actionContexts:A,addAction:O,stop:D}=Wx(c,u,e,p,v,g,C,b,y,I,d);a.push(D),dI();const{addTiming:F,startView:V,setViewName:z,setViewContext:be,setViewContextProperty:oe,getViewContext:J,stop:re}=ix(c,u,e,location,g,C,m,t,y,r);a.push(re);const{stop:G}=p4(c,e,v);if(a.push(G),e.trackLongTasks)if(Xn(pe.LONG_ANIMATION_FRAME)){const{stop:ge}=Mx(c,e);a.push(ge)}else Dx(c,e);const{addError:ue}=t4(c,e);r5(c,e,p,I);const te=y3(c,v,s),Ce=W3(e.applicationId,p,y,A,b);return a.push(()=>n.stop()),{addAction:O,addError:ue,addTiming:F,addFeatureFlagEvaluation:w.addFeatureFlagEvaluation,startView:V,setViewContext:be,setViewContextProperty:oe,getViewContext:J,setViewName:z,lifeCycle:c,viewHistory:y,session:p,stopSession:()=>p.expire(),getInternalContext:Ce.get,startDurationVital:te.startDurationVital,stopDurationVital:te.stopDurationVital,addDurationVital:te.addDurationVital,globalContext:E,userContext:P,accountContext:T,stop:()=>{a.forEach(ge=>ge())}}}function qx(e){const t=uI("browser-rum-sdk",e);if(Zn()){const n=Dr();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function Wx(e,t,n,r,i,o,s,a,c,u,l){const d=X5(e,t,o,s,n),f=Rx(n),h=Nx(t);return Ux(t),Vx(n,e,t,r,c,a,f,u,l),{pageStateHistory:i,addAction:d.addAction,actionContexts:d.actionContexts,stop:()=>{d.stop(),h.stop(),f.stop(),c.stop(),i.stop(),a.stop()}}}function Gx(e,{session:t,viewContext:n,errorType:r}){const i=t?t.id:"no-session-id",o=[];r!==void 0&&o.push(`error-type=${r}`),n&&(o.push(`seed=${n.id}`),o.push(`from=${n.startClocks.timeStamp}`));const s=Kx(e),a=`/rum/replay/sessions/${i}`;return`${s}${a}?${o.join("&")}`}function Kx(e){const t=e.site,n=e.subdomain||Yx(e);return`https://${n?`${n}.`:""}${t}`}function Yx(e){switch(e.site){case Wn:case cT:return"app";case Gg:return"dd";default:return}}const Zx=1e3;let Ot;function Jx(e){return Us(e).segments_count}function Xx(e){Us(e).segments_count+=1}function Qx(e){Us(e).records_count+=1}function eA(e,t){Us(e).segments_total_raw_size+=t}function tA(e){return Ot==null?void 0:Ot.get(e)}function Us(e){Ot||(Ot=new Map);let t;return Ot.has(e)?t=Ot.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Ot.set(e,t),Ot.size>Zx&&nA()),t}function nA(){if(!Ot)return;const e=Ot.keys().next().value;e&&Ot.delete(e)}function Gv(e,t,n){let r=0,i=[],o,s=0;const a=[],{stop:c}=_e(e,t,"message",({data:d})=>{if(d.type!=="wrote"||d.streamId!==n)return;r+=d.additionalBytesCount,i.push(d.result),o=d.trailer;const f=a.shift();f&&f.id===d.id?f.writeCallback?f.writeCallback(d.result.byteLength):f.finishCallback&&f.finishCallback():(c(),dn("Worker responses received out of order."))});function u(){const d=i.length===0?new Uint8Array(0):_C(i.concat(o)),f={rawBytesCount:r,output:d,outputBytesCount:d.byteLength,encoding:"deflate"};return r=0,i=[],f}function l(){s>0&&(t.postMessage({action:"reset",streamId:n}),s=0)}return{isAsync:!0,get isEmpty(){return s===0},write(d,f){t.postMessage({action:"write",id:s,data:d,streamId:n}),a.push({id:s,writeCallback:f,data:d}),s+=1},finish(d){l(),a.length?(a.forEach(f=>{delete f.writeCallback}),a[a.length-1].finishCallback=()=>d(u())):d(u())},finishSync(){l();const d=a.map(f=>(delete f.writeCallback,delete f.finishCallback,f.data)).join("");return{...u(),pendingData:d}},estimateEncodedBytesCount(d){return d.length/8},stop(){c()}}}function Ml({configuredUrl:e,error:t,source:n,scriptType:r}){if(ae.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&rA(t.message)){let i;e?i=`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:i="Please make sure CSP is correctly configured.",ae.error(`${i} See documentation at ${ls}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&ll(t)}function rA(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const iA=30*et;function Kv(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob(['(()=>{function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},C=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},D=!1,M=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},j=M,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),T=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},O={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=j,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=O[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?M(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},et=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-J)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=L(s.adler,h,o,l):2===s.state.wrap&&(s.adler=T(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},at=function(t,e){for(var a,n;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},nt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(et(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=tt(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var it=[new rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(et(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)})),new rt(4,4,8,4,at),new rt(4,5,16,8,at),new rt(4,6,32,32,at),new rt(4,4,16,16,nt),new rt(8,16,32,32,nt),new rt(8,16,128,128,nt),new rt(8,32,128,256,nt),new rt(32,128,258,1024,nt),new rt(32,258,258,4096,nt)];function st(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var ht=function(t){var e,i=function(t){if(!t||!t.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){D||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),D=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=it[e.level].max_lazy,e.good_match=it[e.level].good_length,e.nice_match=it[e.level].nice_length,e.max_chain_length=it[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},lt=function(t,e){var a,n;if(!t||!t.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=T(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=T(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(et(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(et(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):it[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},_t=function(t){if(!t||!t.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},ot=new Uint8Array(256),dt=0;dt<256;dt++)ot[dt]=dt>=252?6:dt>=248?5:dt>=240?4:dt>=224?3:dt>=192?2:1;ot[254]=ot[254]=1;var ut=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ft=Object.prototype.toString;function ct(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new st;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,ht(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(O[n]);if(t.header&&(e=this.strm,a=t.header,e&&e.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ft.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t||!t.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,et(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,et(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(O[n]);this._dict_set=!0}}function pt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:e+"",streamId:a})}}function gt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}ct.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ft.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=lt(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=_t(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},ct.prototype.onData=function(t){this.chunks.push(t)},ct.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",(n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"6.6.3"};case"write":{let n=e.get(a.streamId);n||(n=new ct,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:gt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){pt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){pt(e,t)}}()})();'])))}let Pe={status:0};function Yv(e,t,n,r=Kv){switch(Pe.status===0&&oA(e,t,r),Pe.status){case 1:return Pe.initializationFailureCallbacks.push(n),Pe.worker;case 3:return Pe.worker}}function Zv(){return Pe.status}function oA(e,t,n=Kv){try{const r=n(e),{stop:i}=_e(e,r,"error",a=>{Dl(e,t,a)}),{stop:o}=_e(e,r,"message",({data:a})=>{a.type==="errored"?Dl(e,t,a.error,a.streamId):a.type==="initialized"&&aA(a.version)});r.postMessage({action:"init"}),Be(()=>sA(t),iA),Pe={status:1,worker:r,stop:()=>{i(),o()},initializationFailureCallbacks:[]}}catch(r){Dl(e,t,r)}}function sA(e){Pe.status===1&&(ae.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Pe.initializationFailureCallbacks.forEach(t=>t()),Pe={status:2})}function aA(e){Pe.status===1&&(Pe={status:3,worker:Pe.worker,stop:Pe.stop,version:e})}function Dl(e,t,n,r){Pe.status===1||Pe.status===0?(Ml({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),Pe.status===1&&Pe.initializationFailureCallbacks.forEach(i=>i()),Pe={status:2}):ll(n,{worker_version:Pe.status===3&&Pe.version,stream_id:r})}function Jv(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function cA(e,t,n,r){const i=t.findTrackedSession(),o=uA(i,r),s=n.findView();return Gx(e,{viewContext:s,errorType:o,session:i})}function uA(e,t){if(!Jv())return"browser-not-supported";if(!e)return"rum-not-tracked";if(e.sessionReplay===0)return"incorrect-session-plan";if(!t)return"replay-not-started"}function lA(e,t,n,r,i,o){let s=0,a;t.subscribe(9,()=>{(s===2||s===3)&&(l(),s=1)}),t.subscribe(10,()=>{s===1&&u()});const c=async()=>{const[d]=await Promise.all([i(),HI(e,"interactive")]);if(s!==2)return;const f=o();if(!f||!d){s=0;return}({stop:a}=d(t,e,n,r,f)),s=3};function u(d){const f=n.findTrackedSession();if(dA(f,d)){s=1;return}fA(s)||(s=2,c().catch(ln),pA(f,d)&&n.setForcedReplay())}function l(){s===3&&(a==null||a()),s=0}return{start:u,stop:l,getSessionReplayLink(){return cA(e,n,r,s!==0)},isRecording:()=>s===3}}function dA(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function fA(e){return e===2||e===3}function pA(e,t){return t&&t.force&&e.sessionReplay===0}function hA(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:ce},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function gA(e,t){if(Zn()&&!ym("records")||!Jv())return{start:ce,stop:ce,getReplayStats:()=>{},onRumStart:ce,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=hA();return{start:o=>n.start(o),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:i,isRecording:()=>Zv()===3&&n.isRecording(),getReplayStats:o=>Zv()===3?tA(o):void 0};function i(o,s,a,c,u){let l;function d(){return l||(u??(u=Yv(s,"Datadog Session Replay",()=>{n.stop()},t)),u&&(l=Gv(s,u,1))),l}n=lA(s,o,a,c,e,d),r(s)&&n.start()}}async function mA(e=vA){try{return await e()}catch(t){Ml({error:t,source:"Recorder",scriptType:"module"})}}async function vA(){return(await Promise.resolve().then(()=>o8)).startRecording}function yA(){return Jt().Profiler!==void 0}async function bA(e=wA){try{return await e()}catch(t){Ml({error:t,source:"Profiler",scriptType:"module"})}}async function wA(){return(await Promise.resolve().then(()=>b8)).createRumProfiler}function EA(){let e;function t(n,r,i,o){!yA()||!xn(r.profilingSampleRate)||bA().then(s=>{if(!s){dn("[DD_RUM] Failed to lazy load the RUM Profiler");return}e=s(r,n,i),e.start(o.findView())}).catch(ln)}return{onRumStart:t,stop:()=>{e==null||e.stop().catch(ln)}}}const SA=gA(mA),_A=EA(),_t=z3(jx,SA,_A,{startDeflateWorker:Yv,createDeflateEncoder:Gv});QT(Jt(),"DD_RUM",_t);const Jr=class Jr{init(){if(Jr.isInitialized){console.info("Tracker [DD]: already initialized");return}_t.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:Ze.getRuntimeConfig().MODE,version:Ze.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),_t.startView({name:"ap_cl_view_mounted"}),_t.startSessionReplayRecording(),Jr.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){_t==null||_t.addAction(t,n||{})}trackError(t,n){_t==null||_t.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof _t.stopSessionReplayRecording=="function"&&_t.stopSessionReplayRecording(),_t.addAction("ap_cl_view_unmounted",{reason:"component_destroyed"}),Jr.isInitialized=!1}filterEvents(t){var n,r,i;return!!(t.type==="view"&&((n=t.view.name)!=null&&n.startsWith("ap_cl_"))||t.type==="action"&&typeof((r=t.action.target)==null?void 0:r.name)=="string"&&t.action.target.name.startsWith("ap_cl_")||t.type==="error"&&((i=t.error)==null?void 0:i.source)==="custom")}};S(Jr,"isInitialized",!1);let Fl=Jr,jr=[];class We{static init(t){if(!t){console.info("Tracking disabled");return}jr=[new Fl],jr.forEach(n=>n.init())}static trackEvent(t,n){jr.forEach(r=>r.track(t,n))}static trackError(t,n){jr.forEach(r=>r.trackError(t,n))}static destroy(){jr.forEach(t=>t.destroy()),jr=[]}}const Ve=class Ve{static init(t,n){if(!t)throw console.error('AstroPay Payments Library: Missing "app-id". Call init function first.'),new Error("app-id is required for authentication.");if(Ve.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}Ve.token=t,We.init((n==null?void 0:n.tracking)??!0),Pi.init(),j.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),W.init({language:(n==null?void 0:n.language)??"en"}),Ze.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),$t.init({appName:"ap-cl",baseURL:Ze.getRuntimeConfig().API_BASE_URL,timeout:5e3}),We.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),Ve.isInitialized=!0}static registerComponent(t){Ve.components.add(t)}static unregisterComponent(t){Ve.components.delete(t)}static getToken(){if(!Ve.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return Ve.token}static destroy(){Ve.isInitialized&&(Ve.components.forEach(t=>t.destroy()),Ve.components.clear(),Ve.isInitialized=!1,We.destroy(),Ve.token="")}static isLibInitialized(){return Ve.isInitialized}};S(Ve,"isInitialized",!1),S(Ve,"token"),S(Ve,"components",new Set);let Ut=Ve;function Xv(e,t){return function(){return e.apply(t,arguments)}}const{toString:CA}=Object.prototype,{getPrototypeOf:Ul}=Object,{iterator:Bs,toStringTag:Qv}=Symbol,$s=(e=>t=>{const n=CA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bt=e=>(e=e.toLowerCase(),t=>$s(t)===e),Vs=e=>t=>typeof t===e,{isArray:qr}=Array,Wr=Vs("undefined");function Zi(e){return e!==null&&!Wr(e)&&e.constructor!==null&&!Wr(e.constructor)&&pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const e0=Bt("ArrayBuffer");function TA(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e0(e.buffer),t}const IA=Vs("string"),pt=Vs("function"),t0=Vs("number"),Ji=e=>e!==null&&typeof e=="object",xA=e=>e===!0||e===!1,zs=e=>{if($s(e)!=="object")return!1;const t=Ul(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Qv in e)&&!(Bs in e)},AA=e=>{if(!Ji(e)||Zi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},kA=Bt("Date"),RA=Bt("File"),PA=Bt("Blob"),OA=Bt("FileList"),LA=e=>Ji(e)&&pt(e.pipe),NA=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pt(e.append)&&((t=$s(e))==="formdata"||t==="object"&&pt(e.toString)&&e.toString()==="[object FormData]"))},MA=Bt("URLSearchParams"),[DA,FA,UA,BA]=["ReadableStream","Request","Response","Headers"].map(Bt),$A=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),qr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Zi(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function n0(e,t){if(Zi(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Qn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,r0=e=>!Wr(e)&&e!==Qn;function Bl(){const{caseless:e,skipUndefined:t}=r0(this)&&this||{},n={},r=(i,o)=>{const s=e&&n0(n,o)||o;zs(n[s])&&zs(i)?n[s]=Bl(n[s],i):zs(i)?n[s]=Bl({},i):qr(i)?n[s]=i.slice():(!t||!Wr(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Xi(arguments[i],r);return n}const VA=(e,t,n,{allOwnKeys:r}={})=>(Xi(t,(i,o)=>{n&&pt(i)?e[o]=Xv(i,n):e[o]=i},{allOwnKeys:r}),e),zA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jA=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Ul(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},WA=e=>{if(!e)return null;if(qr(e))return e;let t=e.length;if(!t0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},GA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ul(Uint8Array)),KA=(e,t)=>{const r=(e&&e[Bs]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},YA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ZA=Bt("HTMLFormElement"),JA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),i0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),XA=Bt("RegExp"),o0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xi(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},QA=e=>{o0(e,(t,n)=>{if(pt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},e6=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return qr(e)?r(e):r(String(e).split(t)),n},t6=()=>{},n6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r6(e){return!!(e&&pt(e.append)&&e[Qv]==="FormData"&&e[Bs])}const i6=e=>{const t=new Array(10),n=(r,i)=>{if(Ji(r)){if(t.indexOf(r)>=0)return;if(Zi(r))return r;if(!("toJSON"in r)){t[i]=r;const o=qr(r)?[]:{};return Xi(r,(s,a)=>{const c=n(s,i+1);!Wr(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},o6=Bt("AsyncFunction"),s6=e=>e&&(Ji(e)||pt(e))&&pt(e.then)&&pt(e.catch),s0=((e,t)=>e?setImmediate:t?((n,r)=>(Qn.addEventListener("message",({source:i,data:o})=>{i===Qn&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Qn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pt(Qn.postMessage)),a6=typeof queueMicrotask<"u"?queueMicrotask.bind(Qn):typeof process<"u"&&process.nextTick||s0,x={isArray:qr,isArrayBuffer:e0,isBuffer:Zi,isFormData:NA,isArrayBufferView:TA,isString:IA,isNumber:t0,isBoolean:xA,isObject:Ji,isPlainObject:zs,isEmptyObject:AA,isReadableStream:DA,isRequest:FA,isResponse:UA,isHeaders:BA,isUndefined:Wr,isDate:kA,isFile:RA,isBlob:PA,isRegExp:XA,isFunction:pt,isStream:LA,isURLSearchParams:MA,isTypedArray:GA,isFileList:OA,forEach:Xi,merge:Bl,extend:VA,trim:$A,stripBOM:zA,inherits:HA,toFlatObject:jA,kindOf:$s,kindOfTest:Bt,endsWith:qA,toArray:WA,forEachEntry:KA,matchAll:YA,isHTMLForm:ZA,hasOwnProperty:i0,hasOwnProp:i0,reduceDescriptors:o0,freezeMethods:QA,toObjectSet:e6,toCamelCase:JA,noop:t6,toFiniteNumber:n6,findKey:n0,global:Qn,isContextDefined:r0,isSpecCompliantForm:r6,toJSONObject:i6,isAsyncFn:o6,isThenable:s6,setImmediate:s0,asap:a6,isIterable:e=>e!=null&&pt(e[Bs])};function Y(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}x.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});const a0=Y.prototype,c0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{c0[e]={value:e}}),Object.defineProperties(Y,c0),Object.defineProperty(a0,"isAxiosError",{value:!0}),Y.from=(e,t,n,r,i,o)=>{const s=Object.create(a0);x.toFlatObject(e,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return Y.call(s,a,c,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const c6=null;function $l(e){return x.isPlainObject(e)||x.isArray(e)}function u0(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function l0(e,t,n){return e?e.concat(t).map(function(i,o){return i=u0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function u6(e){return x.isArray(e)&&!e.some($l)}const l6=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Hs(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!x.isUndefined(m[g])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(x.isDate(p))return p.toISOString();if(x.isBoolean(p))return p.toString();if(!c&&x.isBlob(p))throw new Y("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(p)||x.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,g,m){let v=p;if(p&&!m&&typeof p=="object"){if(x.endsWith(g,"{}"))g=r?g:g.slice(0,-2),p=JSON.stringify(p);else if(x.isArray(p)&&u6(p)||(x.isFileList(p)||x.endsWith(g,"[]"))&&(v=x.toArray(p)))return g=u0(g),v.forEach(function(b,w){!(x.isUndefined(b)||b===null)&&t.append(s===!0?l0([g],w,o):s===null?g:g+"[]",u(b))}),!1}return $l(p)?!0:(t.append(l0(m,g,o),u(p)),!1)}const d=[],f=Object.assign(l6,{defaultVisitor:l,convertValue:u,isVisitable:$l});function h(p,g){if(!x.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(p),x.forEach(p,function(v,y){(!(x.isUndefined(v)||v===null)&&i.call(t,v,x.isString(y)?y.trim():y,g,f))===!0&&h(v,g?g.concat(y):[y])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return h(e),t}function d0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Vl(e,t){this._pairs=[],e&&Hs(e,this,t)}const f0=Vl.prototype;f0.append=function(t,n){this._pairs.push([t,n])},f0.toString=function(t){const n=t?function(r){return t.call(this,r,d0)}:d0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function d6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function p0(e,t,n){if(!t)return e;const r=n&&n.encode||d6;x.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new Vl(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class h0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const g0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},f6={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Vl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},zl=typeof window<"u"&&typeof document<"u",Hl=typeof navigator=="object"&&navigator||void 0,p6=zl&&(!Hl||["ReactNative","NativeScript","NS"].indexOf(Hl.product)<0),h6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",g6=zl&&window.location.href||"http://localhost",tt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:zl,hasStandardBrowserEnv:p6,hasStandardBrowserWebWorkerEnv:h6,navigator:Hl,origin:g6},Symbol.toStringTag,{value:"Module"})),...f6};function m6(e,t){return Hs(e,new tt.classes.URLSearchParams,{visitor:function(n,r,i,o){return tt.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function v6(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y6(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function m0(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=y6(i[s])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,i)=>{t(v6(r),i,n,0)}),n}return null}function b6(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Qi={transitional:g0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(m0(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return m6(t,this.formSerializer).toString();if((a=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Hs(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),b6(t)):t}],transformResponse:[function(t){const n=this.transitional||Qi.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Qi.headers[e]={}});const w6=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),E6=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
546
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&w6[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},v0=Symbol("internals");function eo(e){return e&&String(e).trim().toLowerCase()}function js(e){return e===!1||e==null?e:x.isArray(e)?e.map(js):String(e)}function S6(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const _6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jl(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function C6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function T6(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let ht=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,u){const l=eo(c);if(!l)throw new Error("header name must be a non-empty string");const d=x.findKey(i,l);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||c]=js(a))}const s=(a,c)=>x.forEach(a,(u,l)=>o(u,l,c));if(x.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(x.isString(t)&&(t=t.trim())&&!_6(t))s(E6(t),n);else if(x.isObject(t)&&x.isIterable(t)){let a={},c,u;for(const l of t){if(!x.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?x.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}s(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=eo(t),t){const r=x.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return S6(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=eo(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||jl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=eo(s),s){const a=x.findKey(r,s);a&&(!n||jl(r,r[a],a,n))&&(delete r[a],i=!0)}}return x.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||jl(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return x.forEach(this,(i,o)=>{const s=x.findKey(r,o);if(s){n[s]=js(i),delete n[o];return}const a=t?C6(o):String(o).trim();a!==o&&delete n[o],n[a]=js(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
547
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[v0]=this[v0]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=eo(s);r[a]||(T6(i,s),r[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(ht.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(ht);function ql(e,t){const n=this||Qi,r=t||n,i=ht.from(r.headers);let o=r.data;return x.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function y0(e){return!!(e&&e.__CANCEL__)}function Gr(e,t,n){Y.call(this,e??"canceled",Y.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(Gr,Y,{__CANCEL__:!0});function b0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function I6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function x6(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[o];s||(s=u),n[i]=c,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s<t)return;const h=l&&u-l;return h?Math.round(f*1e3/h):void 0}}function A6(e,t){let n=0,r=1e3/t,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-d)))},()=>i&&s(i)]}const qs=(e,t,n=3)=>{let r=0;const i=x6(50,250);return A6(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),l=s<=a;r=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},w0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},E0=e=>(...t)=>x.asap(()=>e(...t)),k6=tt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tt.origin),tt.navigator&&/(msie|trident)/i.test(tt.navigator.userAgent)):()=>!0,R6=tt.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const s=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),x.isString(r)&&s.push("path="+r),x.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function P6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function S0(e,t,n){let r=!P6(t);return e&&(r||n==!1)?O6(e,t):t}const _0=e=>e instanceof ht?{...e}:e;function er(e,t){t=t||{};const n={};function r(u,l,d,f){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:f},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function i(u,l,d,f){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u,d,f)}else return r(u,l,d,f)}function o(u,l){if(!x.isUndefined(l))return r(void 0,l)}function s(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,l,d)=>i(_0(u),_0(l),d,!0)};return x.forEach(Object.keys({...e,...t}),function(l){const d=c[l]||i,f=d(e[l],t[l],l);x.isUndefined(f)&&d!==a||(n[l]=f)}),n}const C0=e=>{const t=er({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=ht.from(s),t.url=p0(S0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),x.isFormData(n)){if(tt.hasStandardBrowserEnv||tt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(x.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&s.set(l,d)})}}if(tt.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&k6(t.url))){const c=i&&o&&R6.read(o);c&&s.set(i,c)}return t},L6=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=C0(e);let o=i.data;const s=ht.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,l,d,f,h,p;function g(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const b=ht.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:e,request:m};b0(function(E){n(E),g()},function(E){r(E),g()},C),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(r(new Y("Request aborted",Y.ECONNABORTED,e,m)),m=null)},m.onerror=function(w){const C=w&&w.message?w.message:"Network Error",_=new Y(C,Y.ERR_NETWORK,e,m);_.event=w||null,r(_),m=null},m.ontimeout=function(){let w=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||g0;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new Y(w,C.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&x.forEach(s.toJSON(),function(w,C){m.setRequestHeader(C,w)}),x.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),u&&([f,p]=qs(u,!0),m.addEventListener("progress",f)),c&&m.upload&&([d,h]=qs(c),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(l=b=>{m&&(r(!b||b.type?new Gr(null,e,m):b),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const y=I6(i.url);if(y&&tt.protocols.indexOf(y)===-1){r(new Y("Unsupported protocol "+y+":",Y.ERR_BAD_REQUEST,e));return}m.send(o||null)})},N6=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof Y?l:new Gr(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,o(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>x.asap(a),c}},M6=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},D6=async function*(e,t){for await(const n of F6(e))yield*M6(n,t)},F6=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},T0=(e,t,n,r)=>{const i=D6(e,t);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){a(),c.close();return}let d=l.byteLength;if(n){let f=o+=d;n(f)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},I0=64*1024,{isFunction:Ws}=x,U6=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:x0,TextEncoder:A0}=x.global,k0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},B6=e=>{e=x.merge.call({skipUndefined:!0},U6,e);const{fetch:t,Request:n,Response:r}=e,i=t?Ws(t):typeof fetch=="function",o=Ws(n),s=Ws(r);if(!i)return!1;const a=i&&Ws(x0),c=i&&(typeof A0=="function"?(p=>g=>p.encode(g))(new A0):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&k0(()=>{let p=!1;const g=new n(tt.origin,{body:new x0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),l=s&&a&&k0(()=>x.isReadableStream(new r("").body)),d={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(g,m)=>{let v=g&&g[p];if(v)return v.call(g);throw new Y(`Response type '${p}' is not supported`,Y.ERR_NOT_SUPPORT,m)})});const f=async p=>{if(p==null)return 0;if(x.isBlob(p))return p.size;if(x.isSpecCompliantForm(p))return(await new n(tt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(x.isArrayBufferView(p)||x.isArrayBuffer(p))return p.byteLength;if(x.isURLSearchParams(p)&&(p=p+""),x.isString(p))return(await c(p)).byteLength},h=async(p,g)=>{const m=x.toFiniteNumber(p.getContentLength());return m??f(g)};return async p=>{let{url:g,method:m,data:v,signal:y,cancelToken:b,timeout:w,onDownloadProgress:C,onUploadProgress:_,responseType:E,headers:P,withCredentials:T="same-origin",fetchOptions:I}=C0(p),A=t||fetch;E=E?(E+"").toLowerCase():"text";let O=N6([y,b&&b.toAbortSignal()],w),D=null;const F=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let V;try{if(_&&u&&m!=="get"&&m!=="head"&&(V=await h(P,v))!==0){let G=new n(g,{method:"POST",body:v,duplex:"half"}),ue;if(x.isFormData(v)&&(ue=G.headers.get("content-type"))&&P.setContentType(ue),G.body){const[te,Ce]=w0(V,qs(E0(_)));v=T0(G.body,I0,te,Ce)}}x.isString(T)||(T=T?"include":"omit");const z=o&&"credentials"in n.prototype,be={...I,signal:O,method:m.toUpperCase(),headers:P.normalize().toJSON(),body:v,duplex:"half",credentials:z?T:void 0};D=o&&new n(g,be);let oe=await(o?A(D,I):A(g,be));const J=l&&(E==="stream"||E==="response");if(l&&(C||J&&F)){const G={};["status","statusText","headers"].forEach(ge=>{G[ge]=oe[ge]});const ue=x.toFiniteNumber(oe.headers.get("content-length")),[te,Ce]=C&&w0(ue,qs(E0(C),!0))||[];oe=new r(T0(oe.body,I0,te,()=>{Ce&&Ce(),F&&F()}),G)}E=E||"text";let re=await d[x.findKey(d,E)||"text"](oe,p);return!J&&F&&F(),await new Promise((G,ue)=>{b0(G,ue,{data:re,headers:ht.from(oe.headers),status:oe.status,statusText:oe.statusText,config:p,request:D})})}catch(z){throw F&&F(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new Y("Network Error",Y.ERR_NETWORK,p,D),{cause:z.cause||z}):Y.from(z,z&&z.code,p,D)}}},$6=new Map,R0=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,c,u,l=$6;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:B6(t)),l=u;return u};R0();const Wl={http:c6,xhr:L6,fetch:{get:R0}};x.forEach(Wl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const P0=e=>`- ${e}`,V6=e=>x.isFunction(e)||e===null||e===!1,O0={getAdapter:(e,t)=>{e=x.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!V6(r)&&(i=Wl[(a=String(r)).toLowerCase()],i===void 0))throw new Y(`Unknown adapter '${a}'`);if(i&&(x.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
548
|
+
`+s.map(P0).join(`
|
|
549
|
+
`):" "+P0(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:Wl};function Gl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gr(null,e)}function L0(e){return Gl(e),e.headers=ht.from(e.headers),e.data=ql.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),O0.getAdapter(e.adapter||Qi.adapter,e)(e).then(function(r){return Gl(e),r.data=ql.call(e,e.transformResponse,r),r.headers=ht.from(r.headers),r},function(r){return y0(r)||(Gl(e),r&&r.response&&(r.response.data=ql.call(e,e.transformResponse,r.response),r.response.headers=ht.from(r.response.headers))),Promise.reject(r)})}const N0="1.12.2",Gs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const M0={};Gs.transitional=function(t,n,r){function i(o,s){return"[Axios v"+N0+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Y(i(s," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!M0[s]&&(M0[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}},Gs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function z6(e,t,n){if(typeof e!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new Y("option "+o+" must be "+c,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+o,Y.ERR_BAD_OPTION)}}const Ks={assertOptions:z6,validators:Gs},en=Ks.validators;let tr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new h0,response:new h0}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
550
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=er(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ks.assertOptions(r,{silentJSONParsing:en.transitional(en.boolean),forcedJSONParsing:en.transitional(en.boolean),clarifyTimeoutError:en.transitional(en.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:Ks.assertOptions(i,{encode:en.function,serialize:en.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ks.assertOptions(n,{baseUrl:en.spelling("baseURL"),withXsrfToken:en.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=ht.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let l,d=0,f;if(!c){const p=[L0.bind(this),void 0];for(p.unshift(...a),p.push(...u),f=p.length,l=Promise.resolve(n);d<f;)l=l.then(p[d++],p[d++]);return l}f=a.length;let h=n;for(;d<f;){const p=a[d++],g=a[d++];try{h=p(h)}catch(m){g.call(this,m);break}}try{l=L0.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=er(this.defaults,t);const n=S0(t.baseURL,t.url,t.allowAbsoluteUrls);return p0(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){tr.prototype[t]=function(n,r){return this.request(er(r||{},{method:t,url:n,data:(r||{}).data}))}}),x.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(er(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}tr.prototype[t]=n(),tr.prototype[t+"Form"]=n(!0)});let H6=class z1{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Gr(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new z1(function(i){t=i}),cancel:t}}};function j6(e){return function(n){return e.apply(null,n)}}function q6(e){return x.isObject(e)&&e.isAxiosError===!0}const Kl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Kl).forEach(([e,t])=>{Kl[t]=e});function D0(e){const t=new tr(e),n=Xv(tr.prototype.request,t);return x.extend(n,tr.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return D0(er(e,i))},n}const Oe=D0(Qi);Oe.Axios=tr,Oe.CanceledError=Gr,Oe.CancelToken=H6,Oe.isCancel=y0,Oe.VERSION=N0,Oe.toFormData=Hs,Oe.AxiosError=Y,Oe.Cancel=Oe.CanceledError,Oe.all=function(t){return Promise.all(t)},Oe.spread=j6,Oe.isAxiosError=q6,Oe.mergeConfig=er,Oe.AxiosHeaders=ht,Oe.formToJSON=e=>m0(x.isHTMLForm(e)?new FormData(e):e),Oe.getAdapter=O0.getAdapter,Oe.HttpStatusCode=Kl,Oe.default=Oe;const{Axios:M8,AxiosError:D8,CanceledError:F8,isCancel:U8,CancelToken:B8,VERSION:$8,all:V8,Cancel:z8,isAxiosError:H8,spread:j8,toFormData:q8,AxiosHeaders:W8,HttpStatusCode:G8,formToJSON:K8,getAdapter:Y8,mergeConfig:Z8}=Oe,to=(e,t)=>{const n=Ze.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},ye=class ye{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};S(ye,"axiosInstance"),S(ye,"config"),S(ye,"init",t=>{ye.config=t,ye.axiosInstance=Oe.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":W.getCurrent(),...t.headers}}),ye.setupInterceptors()}),S(ye,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=to(t,r),s={params:{useQueryParams:i,...n}};return await ye.getAxiosInstance().get(o,s)}),S(ye,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=to(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ye.getAxiosInstance().post(o,n,s)}),S(ye,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=to(t,r),s={params:{useQueryParams:i}};return await ye.getAxiosInstance().put(o,n,s)}),S(ye,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=to(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ye.getAxiosInstance().patch(o,n,s)}),S(ye,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=to(t,r),s={params:{useQueryParams:i,...n}};return await ye.getAxiosInstance().delete(o,s)}),S(ye,"setupInterceptors",()=>{ye.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:ye.getEncodeParams()}:t.params=r,t.data&&(t.data=Qs(t.data,"camelCase-to-snake_case")),t}),ye.axiosInstance.interceptors.response.use(t=>ye.handleResponse(t),t=>ye.handleError(t))}),S(ye,"handleResponse",t=>{const n=t.status===202,r=Qs(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),S(ye,"handleError",t=>{var i;const n=Qs((i=t.response)==null?void 0:i.data,"snake_case-to-camelCase"),r={error:(n==null?void 0:n.error)||"UNKNOWN_ERROR",internalTerm:n==null?void 0:n.internalTerm,message:(n==null?void 0:n.message)||W.translate("generic_error"),description:n==null?void 0:n.description};return Promise.reject(r)}),S(ye,"getEncodeParams",()=>{const t={app_name:ye.config.appName,app_id:Ut.getToken(),environment:Ze.getEnvironment(),platform:gf(),version:Ze.getRuntimeConfig().VERSION};return kd(t)});let $t=ye;const Kr={createPayment:"/v1/web/payments",paymentDetails:"/v1/web/payments/:paymentExternalId/detail",identifyUser:"/v1/web/payments/:paymentExternalId/identify-user",paymentStatus:"/v1/web/payments/:paymentExternalId/status",paymentMethodDetail:"/v1/web/payments/:paymentExternalId/payment-methods/:methodCode",pciToken:"v1/web/payments/pci/token"};class F0{}S(F0,"getPciToken",async t=>{try{return await $t.POST({url:Kr.pciToken,data:t})}catch(n){return We.trackError(n),Promise.reject(n)}});const W6=e=>{if(!e)return"";const n=e.replace(/\s+/g,"").split("/");if(n.length!==2)return"";let[r,i]=n;if(r.length===1&&(r="0"+r),i.length===2){const o=new Date().getFullYear(),s=Math.floor(o/100)*100;i=String(s+Number(i))}return`${r}/${i}`},G6="v1.1.3";class K6{constructor(t,n){S(this,"collector");S(this,"form");S(this,"fields");S(this,"callback");this.fields=t,this.callback=n}async init(t){try{const n=await l2({environment:this.getCardEnvironment(),version:G6});this.collector=n.initCollector(),this.form=this.collector.createForm(r=>{if(this.callback){const i=Object.entries(r).reduce((o,[s,a])=>(o[s]={isValid:a.isValid||!a.isDirty&&!a.isTouched,isTouched:a.isTouched||a.isDirty},o),{});this.callback(i)}}),this.fields.forEach(({field:r,...i})=>{this.form.field(r,i)}),t==null||t()}catch(n){throw console.error(n),n}}async tokenizeCard(t,n,r){try{const{accessToken:i}=await F0.getPciToken(t);return this.form.accessToken=i,await new Promise(o=>{this.form.submit(s=>{const a={cardNumberTkn:s.card_number.value,cvvToken:s.card_cvc.value,holderName:s.card_holder.value,expirationDate:W6(s.card_exp.value),firstSixDigits:s.card_number.details.bin.substring(0,6),lastFourDigits:s.card_number.details.lastFour,brand:s.card_number.details.brand||"unknown"};n(a),o()},()=>{r(new Error(W.translate("card_tokenization_error")))})})}catch{r(new Error(W.translate("generic_error")))}}unmount(){var t;(t=this.form)==null||t.tearDown()}getCardEnvironment(){return Ze.getEnvironment()==="production"?"production":"sandbox"}}var U0=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e))(U0||{});class Ge{}S(Ge,"postCreatePayment",async(t,n)=>{try{const r=await $t.POST({data:t,url:Kr.createPayment});return We.trackEvent("ap_cl_payment_created",{...t,initializer:n}),r}catch(r){return We.trackError(r),Promise.reject(r)}}),S(Ge,"getPaymentDetails",async(t,n)=>{try{const r=await $t.GET({url:ai(Kr.paymentDetails,{paymentExternalId:t})});return We.trackEvent("ap_cl_payment_details",{paymentExternalId:t,initializer:n}),r}catch(r){return We.trackError(r),Promise.reject(r)}}),S(Ge,"postIdentifyUser",async(t,n)=>{try{const r=await $t.POST({data:n,url:ai(Kr.identifyUser,{paymentExternalId:t})});return We.trackEvent("ap_cl_user_identified",{hasAccount:r.user.hasAccount,user:r.user.otherUserData}),r}catch(r){return We.trackError(r),Promise.reject(r)}}),S(Ge,"getPaymentStatus",async t=>{try{return await $t.GET({url:ai(Kr.paymentStatus,{paymentExternalId:t})})}catch(n){return Promise.reject(n)}}),S(Ge,"getPollingRequest",async t=>{try{const n=t.replace(/^\/?api\//,"");return await $t.GET({url:n})}catch(n){return Promise.reject(n)}}),S(Ge,"postGenericPayment",async(t,n,r)=>{try{const i=t.replace(/^\/?api\//,"");return await $t.POST({url:ai(i,{paymentExternalId:n}),data:r})}catch(i){return Promise.reject(i)}});var Nn=(e=>(e.ACCEPTED="ACCEPTED",e.FINISHED="FINISHED",e))(Nn||{});class B0{}S(B0,"getPaymentMethodDetail",async t=>{try{return await $t.GET({url:ai(Kr.paymentMethodDetail,{paymentExternalId:t.paymentExternalId,methodCode:t.methodCode})})}catch(n){return Promise.reject(n)}});class Yl{constructor(t,n,r,i){S(this,"pollingTimeout",null);S(this,"isPollingActive",!1);S(this,"remainingAttempts");this.pollingAcceptedData=t,this.onWaitingInfo=n,this.onFinished=r,this.onError=i,this.remainingAttempts=t.pollingMetadata.remainingHits,this.validatePollingData()}startPolling(){var t;if(this.pollingAcceptedData.pollingMetadata.remainingHits<=0){this.onError(new Error("Polling attempts exhausted"));return}this.isPollingActive=!0,(t=this.pollingAcceptedData.waitingInfo)!=null&&t.text&&this.onWaitingInfo&&this.onWaitingInfo(this.pollingAcceptedData.waitingInfo.text),this.executePoll()}stopPolling(){this.isPollingActive=!1,this.pollingTimeout&&(clearTimeout(this.pollingTimeout),this.pollingTimeout=null)}validatePollingData(){if(!this.pollingAcceptedData.pollingMetadata.pollingUrl)throw new Error("Invalid polling URL");if(this.pollingAcceptedData.pollingMetadata.nextHitIn<=0)throw new Error("Invalid polling interval")}executePoll(){this.isPollingActive&&(this.pollingTimeout=setTimeout(()=>{this.handlePolling().catch(t=>{this.onError(t),this.stopPolling()})},this.getPollingInterval()))}async handlePolling(){const t=await Ge.getPollingRequest(this.pollingAcceptedData.pollingMetadata.pollingUrl);t.statusCode===202&&t.pollingStatus===Nn.ACCEPTED?this.handleAccepted(t):this.handleFinished(t)}handleAccepted(t){if(this.isPollingActive){if(this.remainingAttempts=t.pollingMetadata.remainingHits,this.pollingAcceptedData=t,this.remainingAttempts<=0){const n=t.timeoutInfo.text;this.stopPolling(),this.onError(new Error(n));return}this.executePoll()}}handleFinished(t){this.stopPolling(),this.onFinished(t)}getPollingInterval(){return this.pollingAcceptedData.pollingMetadata.nextHitIn}}const Ys=(e,t)=>({fontSize:"16px",lineHeight:"24px",color:e,backgroundColor:"inherit",fontFamily:`${t.fontFamily}, sans-serif;`}),Y6=(e,{error:t=!1,disabled:n=!1})=>ne`
|
|
552
551
|
display: flex;
|
|
553
552
|
flex-direction: column;
|
|
554
553
|
gap: 12px;
|
|
@@ -598,10 +597,10 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
598
597
|
|
|
599
598
|
caret-color: ${e.textColor};
|
|
600
599
|
|
|
601
|
-
color: ${
|
|
602
|
-
border-radius: ${
|
|
603
|
-
background-color: ${
|
|
604
|
-
border: ${
|
|
600
|
+
color: ${se().textColor};
|
|
601
|
+
border-radius: ${se().borderRadius}px;
|
|
602
|
+
background-color: ${se().backgroundColor};
|
|
603
|
+
border: ${se().borderWidth}px solid ${se().borderColor};
|
|
605
604
|
|
|
606
605
|
:hover {
|
|
607
606
|
background-color: ${t||n?void 0:e.input.focus.backgroundColor};
|
|
@@ -611,9 +610,15 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
611
610
|
border-radius: ${t||n?void 0:e.input.focus.borderRadius}px;
|
|
612
611
|
}
|
|
613
612
|
}
|
|
614
|
-
|
|
613
|
+
|
|
614
|
+
& .card-input-error {
|
|
615
|
+
color: ${se(!0).textColor};
|
|
616
|
+
background-color: ${se(!0).backgroundColor};
|
|
617
|
+
border: ${se(!0).borderWidth}px solid ${se(!0).borderColor};
|
|
618
|
+
}
|
|
619
|
+
`,Z6=()=>ne`
|
|
615
620
|
width: 100%;
|
|
616
|
-
`;class pi extends se{constructor({id:n,label:r,initialHelperText:s,isValid:i=!0}){super({tag:"div",styles:()=>Z4()});S(this,"inputContainer");S(this,"labelTextElement",null);S(this,"helperTextElement",null);S(this,"id");this.id=n;const o=Jt(!i);if(this.inputContainer=document.createElement("div"),this.inputContainer.classList.add("input-container"),r){const c=document.createElement("label");this.labelTextElement=new H({text:r,size:o.label.size,lineHeight:o.label.lineHeight,weight:o.label.weight,color:o.label.color}).element,c.append(this.labelTextElement),c.htmlFor=n,this.inputContainer.append(this.labelTextElement)}const a=document.createElement("div");a.id=n,a.classList.add("form-field"),this.inputContainer.append(a),s&&(this.helperTextElement=new H({text:s,size:o.helperText.size,weight:o.helperText.weight,color:o.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.element.append(this.inputContainer)}setHelperText(n,r=!0){const s=Jt(!r);this.helperTextElement||(this.helperTextElement=new H({text:n,size:s.helperText.size,lineHeight:s.helperText.lineHeight,weight:s.helperText.weight,color:s.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.helperTextElement.textContent=n,this.helperTextElement.style.color=s.helperText.color}setValid(n){if(this.labelTextElement){const s=Jt(!n);this.labelTextElement.style.color=s.label.color}const r=this.element.querySelector(`#${this.id}`);r&&r.classList.toggle("error",!n)}resetValidation(){this.setValid(!0),this.setHelperText("",!0)}}const J4=(e,t,n)=>[{field:"#cc-holder",type:"text",name:"card_holder",placeholder:"card_holder_placeholder",autocomplete:"off",validations:["required","/^[a-zA-Z ]{0,200}$/"],styles:di(e,t)},{field:"#cc-number",type:"card-number",name:"card_number",placeholder:"4111 1111 1111 1111",autocomplete:"off",validations:["required","validCardNumber"],styles:di(e,t)},{field:"#cc-expiration-date",type:"card-expiration-date",name:"card_exp",lengthYear:n==="MM/YY"?2:4,placeholder:n,autocomplete:"off",validations:["required","validCardExpirationDate"],styles:di(e,t)},{field:"#cc-cvc",type:"card-security-code",name:"card_cvc",placeholder:"123",autocomplete:"off",validations:["required","/^\\d{3,4}$/"],styles:di(e,t)}],X4={card_holder:{isValid:!0,isTouched:!1},card_number:{isValid:!0,isTouched:!1},card_exp:{isValid:!0,isTouched:!1},card_cvc:{isValid:!0,isTouched:!1}},qf="MM/YY";class Gf extends se{constructor(n){super({tag:"div",styles:r=>Y4(r,{error:!1,disabled:!1})});S(this,"componentProps");S(this,"loadingWrapper");S(this,"btnPay",null);S(this,"cardManager",null);S(this,"cardHolderInput",null);S(this,"cardNumberInput",null);S(this,"cardExpInput",null);S(this,"cardCvvInput",null);S(this,"requiredFieldsForm",null);S(this,"formState",X4);S(this,"isFormTemplateValid",!1);S(this,"pollingService",null);this.componentProps={...n,showPaymentSummary:n.showPaymentSummary??!0,expirationDateFormat:n.expirationDateFormat??qf},this.loadingWrapper=this.createLoadingWrapper(V.translate("hold_on")),this.element.append(this.loadingWrapper),sessionStorage.getItem(gr.SESSION_ID)||sessionStorage.setItem(gr.SESSION_ID,om()),this.fetchPaymentMethodDetail()}async fetchPaymentMethodDetail(){var n,r;try{const s=await Wf.getPaymentMethodDetail({paymentExternalId:this.componentProps.paymentExternalId,methodCode:this.componentProps.paymentMethod.code});this.renderCardSection(s.fields)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(i.message)}finally{this.loadingWrapper.remove()}}renderCardSection(n){const{amount:r,currency:s,showPaymentSummary:i,expirationDateFormat:o}=this.componentProps;if(i){const c=new r1({amount:r,currency:s}).element;this.element.append(c)}this.cardHolderInput=new pi({id:"cc-holder",label:V.translate("card_holder_label")}),this.cardNumberInput=new pi({id:"cc-number",label:V.translate("card_number")});const a=document.createElement("div");a.classList.add("row-container"),this.cardExpInput=new pi({id:"cc-expiration-date",label:V.translate("card_exp_date")}),this.cardCvvInput=new pi({id:"cc-cvc",label:"CVV"}),a.append(this.cardExpInput.element,this.cardCvvInput.element),this.element.append(this.cardHolderInput.element,this.cardNumberInput.element,a),this.cardManager=new K4(J4(X().textColor,X().backgroundColor,o??qf).map(c=>({...c,placeholder:V.translate(c.placeholder)})),this.handleFormStateChange.bind(this)),this.cardManager.init(),n&&n.length>0&&this.renderRequiredFields(n),this.btnPay=new Dt({text:V.translate("pay_amount",{amount:Pi(this.componentProps.amount,this.componentProps.currency,Le.getCurrencyMode())}),onClick:()=>{this.handleSubmit()},isFullWidth:!0,iconLeft:"lock_line",isDisabled:!0}),this.element.append(this.btnPay.element)}renderRequiredFields(n){this.requiredFieldsForm=new Zg({title:V.translate("additional_information"),requiredFields:n}),this.requiredFieldsForm.setValidationChangeHandler(r=>{this.isFormTemplateValid=r,this.updateSubmitButton()}),this.element.append(this.requiredFieldsForm.element)}handleFormStateChange(n){this.formState=n,this.updateInputsValidation(),this.updateSubmitButton()}updateInputsValidation(){[{input:this.cardHolderInput,...this.formState.card_holder},{input:this.cardNumberInput,...this.formState.card_number},{input:this.cardExpInput,...this.formState.card_exp},{input:this.cardCvvInput,...this.formState.card_cvc}].forEach(({input:r,isValid:s})=>{r==null||r.setValid(s),r==null||r.setHelperText(s?"":V.translate("invalid_field"),s)})}updateSubmitButton(){var s;const r=Object.values(this.formState).every(i=>i.isValid&&i.isTouched)&&(this.requiredFieldsForm?this.isFormTemplateValid:!0);(s=this.btnPay)==null||s.setDisabled(!r)}async handleSubmit(){var n,r,s,i,o,a;try{(n=this.btnPay)==null||n.setLoading(!0);const c=await this.handleTokenizeCard(),l={paymentMethods:[{methodCode:this.componentProps.paymentMethod.code,currency:this.componentProps.currency,amount:this.componentProps.amount,user:{sessionId:sessionStorage.getItem(gr.SESSION_ID)||"",...(r=this.requiredFieldsForm)==null?void 0:r.getFormData()},cardData:c}]},{status:u,reason:d}=await Ie.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,l);if(u===jf.PENDING)await this.checkPaymentStatus(),(s=this.btnPay)==null||s.setLoading(!1),(i=this.btnPay)==null||i.setDisabled(!0);else throw new Error(d||V.translate("generic_error"))}catch(c){const l=c;console.error(l.message),this.showErrorMessage(l.message),(a=(o=this.componentProps)==null?void 0:o.onError)==null||a.call(o),this.renderRetryButton()}}async handleTokenizeCard(){return new Promise((n,r)=>{var a;if(!this.cardManager)return;const{document_type:s,document_number:i}=((a=this.requiredFieldsForm)==null?void 0:a.getFormData())??{},o={documentType:s??"",documentNumber:i??"",sessionId:sessionStorage.getItem(gr.SESSION_ID)||""};this.cardManager.tokenizeCard(o,c=>n(c),c=>{r(c)})})}showErrorMessage(n){this.element.innerHTML="";const r=new H({text:n,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.append(r)}destroy(){this.element.remove()}async checkPaymentStatus(){try{const n=await Ie.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Gt.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Gt.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopPolling()}}initializePollingService(n){this.pollingService=new _c(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}handlePollingError(n){var s,i;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(i=(s=this.componentProps)==null?void 0:s.onError)==null||i.call(s),this.renderRetryButton()}showWaitingInfo(n){this.element.innerHTML="";const r=this.createLoadingWrapper(n);r.style.minHeight="400px",this.element.append(r)}handlePaymentSuccess(n){var i,o;const r=[],s=new Oi({type:"success",title:(i=n.data.successSection)==null?void 0:i.title,description:(o=n.data.successSection)==null?void 0:o.description}).element;r.push(s),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}createLoadingWrapper(n){const r=document.createElement("div");r.classList.add("loading-wrapper");const s=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element,i=new H({text:n,size:20,lineHeight:30,weight:600,align:"center"}).element;return r.append(s,i),r}renderRetryButton(){const n=document.createElement("div");n.classList.add("center-row");const r=new Dt({text:V.translate("try_again"),variant:"text",size:"small",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.element.append(this.loadingWrapper),this.fetchPaymentMethodDetail()}}).element;n.append(r),this.element.append(n)}}var st=(e=>(e.CREDIT_CARD="EC",e.DEBIT_CARD="DR",e.CW="CW",e.DC="DC",e.CC="CC",e))(st||{});const Kf=["EC","DR","CW","DC","CC"],Q4=e=>j`
|
|
621
|
+
`;class Zs extends we{constructor({id:n,label:r,initialHelperText:i,isValid:o=!0}){super({tag:"div",styles:()=>Z6()});S(this,"inputContainer");S(this,"labelTextElement",null);S(this,"helperTextElement",null);S(this,"id");this.id=n;const s=Dn(!o);if(this.inputContainer=document.createElement("div"),this.inputContainer.classList.add("input-container"),r){const c=document.createElement("label");this.labelTextElement=new X({text:r,size:s.label.size,weight:s.label.weight,color:s.label.color}).element,c.append(this.labelTextElement),c.htmlFor=n,this.inputContainer.append(this.labelTextElement)}const a=document.createElement("div");a.id=n,a.classList.add("form-field"),this.inputContainer.append(a),i&&(this.helperTextElement=new X({text:i,size:s.helperText.size,weight:s.helperText.weight,color:s.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.element.append(this.inputContainer)}setHelperText(n,r=!0){const i=Dn(!r);this.helperTextElement||(this.helperTextElement=new X({text:n,size:i.helperText.size,weight:i.helperText.weight,color:i.helperText.color}).element,this.inputContainer.append(this.helperTextElement)),this.helperTextElement.textContent=n,this.helperTextElement.style.color=i.helperText.color}setValid(n){if(this.labelTextElement){const i=Dn(!n);this.labelTextElement.style.color=i.label.color}const r=this.element.querySelector(`#${this.id}`);r&&r.classList.toggle("card-input-error",!n)}resetValidation(){this.setValid(!0),this.setHelperText("",!0)}}const J6=(e,t,n)=>[{field:"#cc-holder",type:"text",name:"card_holder",placeholder:"card_holder_placeholder",autocomplete:"off",validations:["required","/^[a-zA-Z ]{0,200}$/"],styles:Ys(e,n)},{field:"#cc-number",type:"card-number",name:"card_number",placeholder:"4111 1111 1111 1111",autocomplete:"off",validations:["required","validCardNumber"],styles:Ys(e,n)},{field:"#cc-expiration-date",type:"card-expiration-date",name:"card_exp",lengthYear:t==="MM/YY"?2:4,placeholder:t,autocomplete:"off",validations:["required","validCardExpirationDate"],styles:Ys(e,n)},{field:"#cc-cvc",type:"card-security-code",name:"card_cvc",placeholder:"123",autocomplete:"off",validations:["required","/^\\d{3,4}$/"],styles:Ys(e,n)}],X6={card_holder:{isValid:!0,isTouched:!1},card_number:{isValid:!0,isTouched:!1},card_exp:{isValid:!0,isTouched:!1},card_cvc:{isValid:!0,isTouched:!1}},$0="MM/YY";class V0 extends we{constructor(n){super({tag:"div",styles:r=>Y6(r,{error:!1,disabled:!1})});S(this,"componentProps");S(this,"loadingWrapper");S(this,"btnPay",null);S(this,"cardManager",null);S(this,"cardHolderInput",null);S(this,"cardNumberInput",null);S(this,"cardExpInput",null);S(this,"cardCvvInput",null);S(this,"requiredFieldsForm",null);S(this,"formState",X6);S(this,"isFormTemplateValid",!1);S(this,"pollingService",null);this.componentProps={...n,showPaymentSummary:n.showPaymentSummary??!0,expirationDateFormat:n.expirationDateFormat??$0},this.loadingWrapper=this.createLoadingWrapper(W.translate("hold_on")),this.element.append(this.loadingWrapper),sessionStorage.getItem(ui.SESSION_ID)||sessionStorage.setItem(ui.SESSION_ID,ty()),this.fetchPaymentMethodDetail()}async fetchPaymentMethodDetail(){var n,r;try{const i=await B0.getPaymentMethodDetail({paymentExternalId:this.componentProps.paymentExternalId,methodCode:this.componentProps.paymentMethod.code});this.renderCardSection(i.fields)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(o.message)}finally{this.loadingWrapper.remove()}}renderCardSection(n){const{amount:r,currency:i,showPaymentSummary:o,expirationDateFormat:s}=this.componentProps;if(o){const c=new Qb({amount:r,currency:i}).element;this.element.append(c)}this.cardHolderInput=new Zs({id:"cc-holder",label:W.translate("card_holder_label")}),this.cardNumberInput=new Zs({id:"cc-number",label:W.translate("card_number")});const a=document.createElement("div");a.classList.add("row-container"),this.cardExpInput=new Zs({id:"cc-expiration-date",label:W.translate("card_exp_date")}),this.cardCvvInput=new Zs({id:"cc-cvc",label:"CVV"}),a.append(this.cardExpInput.element,this.cardCvvInput.element),this.element.append(this.cardHolderInput.element,this.cardNumberInput.element,a),this.cardManager=new K6(J6(se().textColor,s??$0,j.getStyles()).map(c=>({...c,placeholder:W.translate(c.placeholder)})),this.handleFormStateChange.bind(this)),this.cardManager.init(),n&&n.length>0&&this.renderRequiredFields(n),this.btnPay=new yn({text:W.translate("pay_amount",{amount:ha(this.componentProps.amount,this.componentProps.currency,Ze.getCurrencyMode())}),onClick:()=>{this.handleSubmit()},isFullWidth:!0,iconLeft:"lock_line",isDisabled:!0}),this.element.append(this.btnPay.element)}renderRequiredFields(n){this.requiredFieldsForm=new Wb({title:W.translate("additional_information"),requiredFields:n}),this.requiredFieldsForm.setValidationChangeHandler(r=>{this.isFormTemplateValid=r,this.updateSubmitButton()}),this.element.append(this.requiredFieldsForm.element)}handleFormStateChange(n){this.formState=n,this.updateInputsValidation(),this.updateSubmitButton()}updateInputsValidation(){[{input:this.cardHolderInput,...this.formState.card_holder},{input:this.cardNumberInput,...this.formState.card_number},{input:this.cardExpInput,...this.formState.card_exp},{input:this.cardCvvInput,...this.formState.card_cvc}].forEach(({input:r,isValid:i})=>{r==null||r.setValid(i),r==null||r.setHelperText(i?"":W.translate("invalid_field"),i)})}updateSubmitButton(){var i;const r=Object.values(this.formState).every(o=>o.isValid&&o.isTouched)&&(this.requiredFieldsForm?this.isFormTemplateValid:!0);(i=this.btnPay)==null||i.setDisabled(!r)}async handleSubmit(){var n,r,i,o,s,a,c;try{(n=this.btnPay)==null||n.setLoading(!0);const u=await this.handleTokenizeCard(),l={paymentMethods:[{methodCode:this.componentProps.paymentMethod.code,currency:this.componentProps.currency,amount:this.componentProps.amount,user:{sessionId:sessionStorage.getItem(ui.SESSION_ID)||"",...(r=this.requiredFieldsForm)==null?void 0:r.getFormData()},cardData:u}]};if((i=this.componentProps.paymentMethod)!=null&&i.uri){const{status:d,reason:f}=await Ge.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,l);if(d===U0.PENDING)await this.checkPaymentStatus(),(o=this.btnPay)==null||o.setLoading(!1),(s=this.btnPay)==null||s.setDisabled(!0);else throw new Error(f||W.translate("generic_error"))}else throw new Error(W.translate("generic_error"))}catch(u){const l=u;console.error(l.message),this.showErrorMessage(l.message),(c=(a=this.componentProps)==null?void 0:a.onError)==null||c.call(a),this.renderRetryButton()}}async handleTokenizeCard(){return new Promise((n,r)=>{var a;if(!this.cardManager)return;const{document_type:i,document_number:o}=((a=this.requiredFieldsForm)==null?void 0:a.getFormData())??{},s={documentType:i??"",documentNumber:o??"",sessionId:sessionStorage.getItem(ui.SESSION_ID)||""};this.cardManager.tokenizeCard(s,c=>n(c),c=>{r(c)})})}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;this.element.append(r)}async checkPaymentStatus(){try{const n=await Ge.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Nn.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Nn.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopPolling()}}initializePollingService(n){this.pollingService=new Yl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i),this.renderRetryButton()}showWaitingInfo(n){this.element.innerHTML="";const r=this.createLoadingWrapper(n);r.style.minHeight="400px",this.element.append(r)}handlePaymentSuccess(n){var o,s;const r=[],i=new ga({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}createLoadingWrapper(n){const r=document.createElement("div");r.classList.add("loading-wrapper");const i=new an({size:100,variant:"fetching",color:j.getStyles().primaryColor}).element,o=new X({text:n,size:"base",lineHeight:30,weight:600,align:"center"}).element;return r.append(i,o),r}renderRetryButton(){const n=document.createElement("div");n.classList.add("center-row");const r=new yn({text:W.translate("try_again"),variant:"text",size:"small",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.element.append(this.loadingWrapper),this.fetchPaymentMethodDetail()}}).element;n.append(r),this.element.append(n)}destroy(){this.stopPolling(),this.element.remove()}}class Q6{constructor(){S(this,"tracker",Pi);S(this,"astroPayPaymentImpression",t=>{this.tracker.trackEvent(new yg({component_name:t}))});S(this,"astroPayPaymentStarted",t=>{this.tracker.trackEvent(new Eg({payment_external_id:t}))});S(this,"astroPayPaymentClicked",t=>{this.tracker.trackEvent(new vg({payment_external_id:t}))});S(this,"astroPayPaymentPhoneNumberEntered",t=>{this.tracker.trackEvent(new wg({payment_external_id:t}))});S(this,"astroPayPaymentUserIdentified",t=>{this.tracker.trackEvent(new Sg({payment_external_id:t}))});S(this,"astroPayPaymentLinkCopied",t=>{this.tracker.trackEvent(new bg({payment_external_id:t}))});S(this,"astroPayPaymentCardClicked",t=>{this.tracker.trackEvent(new mg({payment_external_id:t}))})}}const fn=new Q6;var Le=(e=>(e.AP="AP",e.IX="IX",e.CREDIT_CARD="EC",e.DEBIT_CARD="DR",e.CW="CW",e.DC="DC",e.CC="CC",e))(Le||{});const z0=["EC","DR","CW","DC","CC"],ek=e=>ne`
|
|
617
622
|
background-color: ${e.backgroundColor};
|
|
618
623
|
|
|
619
624
|
display: flex;
|
|
@@ -641,17 +646,36 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
641
646
|
align-items: center;
|
|
642
647
|
gap: 8px;
|
|
643
648
|
}
|
|
644
|
-
`;class
|
|
649
|
+
`;class tk extends we{constructor(n){super({tag:"div",styles:i=>ek(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode=Le.DEBIT_CARD,Ut.registerComponent(this),fn.astroPayPaymentImpression("AstroPayCardPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:j.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),We.trackEvent("ap_cl_astropay_card_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,order:a}=this.componentProps,c={country:s,currency:o,amount:i,order:a,methodCode:this.methodCode},u=await Ge.postCreatePayment(c,"card_payment");this.renderAstroPayCardMethod(u)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(o.message)}finally{this.loadingWrapper.remove()}}renderAstroPayCardMethod(n){var i,o,s;this.element.innerHTML="";const r=(i=n.paymentMethods)==null?void 0:i.find(a=>a.enabled&&z0.includes(a.code));if(r){const a=new V0({...this.componentProps,paymentExternalId:n.paymentExternalId,paymentMethod:r,onSuccess:c=>this.showSuccessContent(c)}).element;this.element.append(a)}else(s=(o=this.componentProps)==null?void 0:o.onError)==null||s.call(o),this.showErrorMessage(W.translate("generic_error"))}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;this.element.append(r)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),We.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new la({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ut.unregisterComponent(this)}}const nk=e=>ne`
|
|
650
|
+
display: flex;
|
|
651
|
+
align-items: center;
|
|
652
|
+
gap: 10px;
|
|
653
|
+
width: 100%;
|
|
654
|
+
|
|
655
|
+
.divider-line {
|
|
656
|
+
flex-grow: 1;
|
|
657
|
+
border: none;
|
|
658
|
+
background: none;
|
|
659
|
+
border-top: ${e.divider.size}px ${e.divider.color};
|
|
660
|
+
border-top-style: ${e.divider.variant};
|
|
661
|
+
margin: 0;
|
|
662
|
+
}
|
|
663
|
+
`;class rk extends we{constructor({text:t}){super({tag:"div",styles:r=>nk(r)});const n=document.createElement("hr");if(n.classList.add("divider-line"),this.element.appendChild(n),t){const r=new X({text:t,size:"medium",weight:600,lineHeight:24}),i=document.createElement("hr");i.classList.add("divider-line"),r.render(this.element),this.element.appendChild(i)}}}class ik extends we{constructor({content:n}){super({tag:"div"});S(this,"contentElement");this.element.classList.add("accordion-content"),this.contentElement=n,this.renderContent()}renderContent(){const n=typeof this.contentElement=="function"?this.contentElement():this.contentElement;this.element.append(n)}open(){this.element.classList.add("open")}close(){this.element.classList.remove("open")}destroyContent(){super.destroy()}}const ok=()=>ne`
|
|
645
664
|
.accordion-header {
|
|
646
665
|
display: flex;
|
|
647
666
|
justify-content: flex-start;
|
|
648
667
|
align-items: center;
|
|
649
668
|
padding: 12px 0;
|
|
650
|
-
gap:
|
|
669
|
+
gap: 8px;
|
|
651
670
|
width: 100%;
|
|
652
671
|
cursor: pointer;
|
|
653
672
|
}
|
|
654
673
|
|
|
674
|
+
.title-description-wrapper {
|
|
675
|
+
display: flex;
|
|
676
|
+
flex-direction: column;
|
|
677
|
+
}
|
|
678
|
+
|
|
655
679
|
.actions-wrapper {
|
|
656
680
|
display: flex;
|
|
657
681
|
gap: 6px;
|
|
@@ -667,7 +691,6 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
667
691
|
|
|
668
692
|
.arrow-wrapper {
|
|
669
693
|
transition: transform 0.3s ease-out;
|
|
670
|
-
|
|
671
694
|
display: flex;
|
|
672
695
|
align-items: center;
|
|
673
696
|
justify-content: center;
|
|
@@ -678,10 +701,52 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
678
701
|
}
|
|
679
702
|
|
|
680
703
|
.accordion-content {
|
|
681
|
-
|
|
682
|
-
|
|
704
|
+
overflow: hidden;
|
|
705
|
+
max-height: 0;
|
|
706
|
+
opacity: 0;
|
|
707
|
+
transform: translateY(-10px);
|
|
708
|
+
transition:
|
|
709
|
+
max-height 0.4s ease-in-out,
|
|
710
|
+
opacity 0.3s ease-in-out,
|
|
711
|
+
transform 0.3s ease-in-out,
|
|
712
|
+
padding 0.3s ease-in-out;
|
|
713
|
+
padding: 0;
|
|
714
|
+
|
|
715
|
+
&.open {
|
|
716
|
+
max-height: 100%;
|
|
717
|
+
opacity: 1;
|
|
718
|
+
transform: translateY(0);
|
|
719
|
+
padding: 12px 0;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
`;class sk extends we{constructor({icon:n,title:r,description:i,content:o,isOpen:s=!1,auxImage:a,isDisabled:c=!1,onClick:u,onClose:l}){super({tag:"div",styles:()=>ok()});S(this,"isOpen");S(this,"isDisabled");S(this,"content");S(this,"onClick");S(this,"onClose");S(this,"accordionContent",null);S(this,"arrowWrapper");S(this,"header");this.isOpen=s,this.isDisabled=c,this.content=o,this.onClick=u,this.onClose=l,this.header=document.createElement("div"),this.header.classList.add("accordion-header"),this.isDisabled||this.header.addEventListener("click",this.handleClick.bind(this));const d=new vt({name:n,size:j.getFontScale().medium,color:j.getStyles().textPrimaryColor}).element,f=document.createElement("div");f.classList.add("title-description-wrapper");const h=new X({variant:"div",size:"medium",weight:500,text:r}).element;if(f.append(h),i){const g=new X({variant:"div",text:i??"",size:"xSmall",weight:400,color:j.getStyles().textSecondaryColor}).element;f.append(h,g)}this.header.append(d,f);const p=document.createElement("div");if(p.classList.add("actions-wrapper"),a&&a.length){const g=document.createElement("div");g.classList.add("aux-icons-wrapper"),a.forEach(m=>{const v=new vt({name:m,size:24}).element;g.append(v)}),p.append(g)}if(this.arrowWrapper=document.createElement("span"),this.arrowWrapper.classList.add("arrow-wrapper"),!this.isDisabled){const g=new vt({name:"arrow_down_line",size:24,color:j.getStyles().textPrimaryColor}).element;this.arrowWrapper.append(g)}p.append(this.arrowWrapper),this.header.append(p),this.element.append(this.header),this.isDisabled&&this.applyDisabledStyles(),(this.isOpen||this.isDisabled)&&(this.renderContent(),this.isDisabled||this.arrowWrapper.classList.add("rotated"))}handleClick(){var n;this.isDisabled||(n=this.onClick)==null||n.call(this)}applyDisabledStyles(){this.header.style.cursor="default",this.header.style.pointerEvents="none"}toggleContent(){this.isDisabled||(this.isOpen||(this.renderContent(),this.arrowWrapper.classList.add("rotated"),setTimeout(()=>{var n;(n=this.accordionContent)==null||n.open()},100)),this.isOpen=!0)}destroyContent(){var n,r;this.isDisabled||(this.isOpen&&((n=this.onClose)==null||n.call(this),(r=this.accordionContent)==null||r.close(),this.arrowWrapper.classList.remove("rotated"),setTimeout(()=>{var i;(i=this.accordionContent)==null||i.destroyContent(),this.accordionContent=null},200)),this.isOpen=!1)}renderContent(){this.accordionContent||(this.accordionContent=new ik({content:this.content}),this.element.append(this.accordionContent.element),this.isOpen&&setTimeout(()=>{var n;(n=this.accordionContent)==null||n.open()},100))}}class ak extends we{constructor({items:n,defaultActiveItem:r,onChangeContent:i}){super({tag:"div"});S(this,"openIndex");S(this,"accordionItems",[]);S(this,"onChangeContent");S(this,"hasSingleItem");this.hasSingleItem=n.length===1,this.openIndex=this.validateDefaultIndex(r??null,n.length),this.accordionItems=n.map((o,s)=>{const a=this.openIndex===s,c=this.hasSingleItem,u=new sk({icon:o.icon,title:o.title,description:o==null?void 0:o.description,content:o.content,isOpen:a,isDisabled:c,auxImage:o.auxImage,onClick:c?void 0:()=>{var l;this.handleItemClick(s),this.openIndex===s&&((l=o.onClickCallback)==null||l.call(o))},onClose:o.onClose});if(this.element.appendChild(u.element),s!==n.length-1){const l=new rk({text:s===0?W.translate("or"):""}).element;l.style.padding="4px 0",this.element.appendChild(l)}return u}),this.onChangeContent=i}validateDefaultIndex(n,r){return r===1?0:n!==null&&n>=0&&n<r?n:null}handleItemClick(n){var r;this.openIndex===n?this.openIndex=null:((r=this.onChangeContent)==null||r.call(this),this.openIndex=n),this.updateItems()}updateItems(){this.accordionItems.forEach((n,r)=>{this.openIndex===r?n.toggleContent():n.destroyContent()})}closeAllItems(){this.openIndex=null,this.updateItems()}}const ck=e=>ne`
|
|
723
|
+
background-color: ${e.backgroundColor};
|
|
724
|
+
|
|
725
|
+
display: flex;
|
|
726
|
+
flex-direction: column;
|
|
727
|
+
gap: 12px;
|
|
728
|
+
|
|
729
|
+
max-width: ${typeof e.width=="number"?`${e.width}px`:e.width};
|
|
730
|
+
padding: ${typeof e.paddingWrapper=="number"?`${e.paddingWrapper}px`:e.paddingWrapper};
|
|
731
|
+
border-radius: ${typeof e.borderRadiusWrapper=="number"?`${e.borderRadiusWrapper}px`:e.borderRadiusWrapper};
|
|
732
|
+
|
|
733
|
+
.loading-wrapper {
|
|
734
|
+
display: flex;
|
|
735
|
+
flex-direction: column;
|
|
736
|
+
justify-content: center;
|
|
737
|
+
align-items: center;
|
|
738
|
+
width: 100%;
|
|
739
|
+
gap: 8px;
|
|
740
|
+
min-height: 250px;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.payment-success-content {
|
|
744
|
+
display: flex;
|
|
745
|
+
flex-direction: column;
|
|
746
|
+
align-items: center;
|
|
747
|
+
gap: 8px;
|
|
683
748
|
}
|
|
684
|
-
|
|
749
|
+
`,Lt=({variant:e})=>{const t=j.getStyles();switch(e){case"highlight":return t.badge.highlight;case"error":return t.badge.error;case"success":return t.badge.success;case"warning":return t.badge.warning;case"default":default:return t.badge.default}},uk=e=>{switch(e){case"end":return"flex-end";case"center":return"center";case"space-between":return"space-between";case"start":default:return"flex-start"}},lk=({variant:e="default",isFullWidth:t,align:n})=>ne`
|
|
685
750
|
box-sizing: border-box;
|
|
686
751
|
display: flex;
|
|
687
752
|
align-items: center;
|
|
@@ -689,31 +754,31 @@ ${p}`),e.finish(m=>{f(xd(m))})}return{flushController:n,add:l,upsert:l,stop:i.un
|
|
|
689
754
|
flex-wrap: wrap;
|
|
690
755
|
|
|
691
756
|
width: ${t?"100%":"fit-content"};
|
|
692
|
-
padding: ${typeof
|
|
757
|
+
padding: ${typeof Lt({variant:e}).padding=="number"?`${Lt({variant:e}).padding}px`:Lt({variant:e}).padding};
|
|
693
758
|
|
|
694
|
-
background-color: ${
|
|
695
|
-
border-radius: ${
|
|
759
|
+
background-color: ${Lt({variant:e}).backgroundColor};
|
|
760
|
+
border-radius: ${Lt({variant:e}).borderRadius}px;
|
|
696
761
|
|
|
697
|
-
border: ${
|
|
698
|
-
${
|
|
762
|
+
border: ${Lt({variant:e}).borderWidth}px
|
|
763
|
+
${Lt({variant:e}).borderStyle} ${Lt({variant:e}).borderColor};
|
|
699
764
|
|
|
700
|
-
justify-content: ${
|
|
765
|
+
justify-content: ${uk(n)};
|
|
701
766
|
|
|
702
767
|
.badge-content {
|
|
703
768
|
display: flex;
|
|
704
769
|
align-items: center;
|
|
705
770
|
gap: 4px;
|
|
706
771
|
flex-wrap: nowrap;
|
|
707
|
-
color: ${
|
|
772
|
+
color: ${Lt({variant:e}).textColor};
|
|
708
773
|
}
|
|
709
|
-
`;class
|
|
710
|
-
]))+`;
|
|
711
|
-
Make sure your charset is UTF-8`);
|
|
712
|
-
Suggested mode is: `+t.toString(
|
|
774
|
+
`;class Zl extends we{constructor({items:t,variant:n="default",isFullWidth:r=!1,align:i="center"}){super({tag:"div",styles:()=>lk({variant:n,isFullWidth:r,align:i})}),t.forEach(({title:o,icon:s,iconLeft:a,iconRight:c})=>{const u=document.createElement("div");if(u.classList.add("badge-content"),s||a){const d=new vt({name:s||a,size:12,color:Lt({variant:n}).textColor}).element;u.append(d)}const l=new X({text:o,size:"xSmall",weight:500,color:Lt({variant:n}).textColor,align:"center"}).element;if(u.append(l),c){const d=new vt({name:c,size:12,color:Lt({variant:n}).textColor}).element;u.append(d)}this.element.append(u)})}}function dk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yr={},Jl,H0;function fk(){return H0||(H0=1,Jl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Jl}var Xl={},Mn={},j0;function nr(){if(j0)return Mn;j0=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Mn.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Mn.getSymbolTotalCodewords=function(r){return t[r]},Mn.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Mn.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Mn.isKanjiModeEnabled=function(){return typeof e<"u"},Mn.toSJIS=function(r){return e(r)},Mn}var Ql={},q0;function ed(){return q0||(q0=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,i){if(e.isValid(r))return r;try{return t(r)}catch{return i}}})(Ql)),Ql}var td,W0;function pk(){if(W0)return td;W0=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},td=e,td}var nd,G0;function hk(){if(G0)return nd;G0=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,i){const o=t*this.size+n;this.data[o]=r,i&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},nd=e,nd}var rd={},K0;function gk(){return K0||(K0=1,(function(e){const t=nr().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const i=Math.floor(r/7)+2,o=t(r),s=o===145?26:Math.ceil((o-13)/(2*i-2))*2,a=[o-7];for(let c=1;c<i-1;c++)a[c]=a[c-1]-s;return a.push(6),a.reverse()},e.getPositions=function(r){const i=[],o=e.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let c=0;c<s;c++)a===0&&c===0||a===0&&c===s-1||a===s-1&&c===0||i.push([o[a],o[c]]);return i}})(rd)),rd}var id={},Y0;function mk(){if(Y0)return id;Y0=1;const e=nr().getSymbolSize,t=7;return id.getPositions=function(r){const i=e(r);return[[0,0],[i-t,0],[0,i-t]]},id}var od={},Z0;function vk(){return Z0||(Z0=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(i){return i!=null&&i!==""&&!isNaN(i)&&i>=0&&i<=7},e.from=function(i){return e.isValid(i)?parseInt(i,10):void 0},e.getPenaltyN1=function(i){const o=i.size;let s=0,a=0,c=0,u=null,l=null;for(let d=0;d<o;d++){a=c=0,u=l=null;for(let f=0;f<o;f++){let h=i.get(d,f);h===u?a++:(a>=5&&(s+=t.N1+(a-5)),u=h,a=1),h=i.get(f,d),h===l?c++:(c>=5&&(s+=t.N1+(c-5)),l=h,c=1)}a>=5&&(s+=t.N1+(a-5)),c>=5&&(s+=t.N1+(c-5))}return s},e.getPenaltyN2=function(i){const o=i.size;let s=0;for(let a=0;a<o-1;a++)for(let c=0;c<o-1;c++){const u=i.get(a,c)+i.get(a,c+1)+i.get(a+1,c)+i.get(a+1,c+1);(u===4||u===0)&&s++}return s*t.N2},e.getPenaltyN3=function(i){const o=i.size;let s=0,a=0,c=0;for(let u=0;u<o;u++){a=c=0;for(let l=0;l<o;l++)a=a<<1&2047|i.get(u,l),l>=10&&(a===1488||a===93)&&s++,c=c<<1&2047|i.get(l,u),l>=10&&(c===1488||c===93)&&s++}return s*t.N3},e.getPenaltyN4=function(i){let o=0;const s=i.data.length;for(let c=0;c<s;c++)o+=i.data[c];return Math.abs(Math.ceil(o*100/s/5)-10)*t.N4};function n(r,i,o){switch(r){case e.Patterns.PATTERN000:return(i+o)%2===0;case e.Patterns.PATTERN001:return i%2===0;case e.Patterns.PATTERN010:return o%3===0;case e.Patterns.PATTERN011:return(i+o)%3===0;case e.Patterns.PATTERN100:return(Math.floor(i/2)+Math.floor(o/3))%2===0;case e.Patterns.PATTERN101:return i*o%2+i*o%3===0;case e.Patterns.PATTERN110:return(i*o%2+i*o%3)%2===0;case e.Patterns.PATTERN111:return(i*o%3+(i+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(i,o){const s=o.size;for(let a=0;a<s;a++)for(let c=0;c<s;c++)o.isReserved(c,a)||o.xor(c,a,n(i,c,a))},e.getBestMask=function(i,o){const s=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let u=0;u<s;u++){o(u),e.applyMask(u,i);const l=e.getPenaltyN1(i)+e.getPenaltyN2(i)+e.getPenaltyN3(i)+e.getPenaltyN4(i);e.applyMask(u,i),l<c&&(c=l,a=u)}return a}})(od)),od}var Js={},J0;function X0(){if(J0)return Js;J0=1;const e=ed(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Js.getBlocksCount=function(i,o){switch(o){case e.L:return t[(i-1)*4+0];case e.M:return t[(i-1)*4+1];case e.Q:return t[(i-1)*4+2];case e.H:return t[(i-1)*4+3];default:return}},Js.getTotalCodewordsCount=function(i,o){switch(o){case e.L:return n[(i-1)*4+0];case e.M:return n[(i-1)*4+1];case e.Q:return n[(i-1)*4+2];case e.H:return n[(i-1)*4+3];default:return}},Js}var sd={},no={},Q0;function yk(){if(Q0)return no;Q0=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let i=0;i<255;i++)e[i]=r,t[r]=i,r<<=1,r&256&&(r^=285);for(let i=255;i<512;i++)e[i]=e[i-255]})(),no.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},no.exp=function(r){return e[r]},no.mul=function(r,i){return r===0||i===0?0:e[t[r]+t[i]]},no}var e1;function bk(){return e1||(e1=1,(function(e){const t=yk();e.mul=function(r,i){const o=new Uint8Array(r.length+i.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<i.length;a++)o[s+a]^=t.mul(r[s],i[a]);return o},e.mod=function(r,i){let o=new Uint8Array(r);for(;o.length-i.length>=0;){const s=o[0];for(let c=0;c<i.length;c++)o[c]^=t.mul(i[c],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},e.generateECPolynomial=function(r){let i=new Uint8Array([1]);for(let o=0;o<r;o++)i=e.mul(i,new Uint8Array([1,t.exp(o)]));return i}})(sd)),sd}var ad,t1;function wk(){if(t1)return ad;t1=1;const e=bk();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(r.length+this.degree);i.set(r);const o=e.mod(i,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},ad=t,ad}var cd={},ud={},ld={},n1;function r1(){return n1||(n1=1,ld.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),ld}var tn={},i1;function o1(){if(i1)return tn;i1=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
|
|
775
|
+
]))+`;tn.KANJI=new RegExp(n,"g"),tn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),tn.BYTE=new RegExp(r,"g"),tn.NUMERIC=new RegExp(e,"g"),tn.ALPHANUMERIC=new RegExp(t,"g");const i=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return tn.testKanji=function(c){return i.test(c)},tn.testNumeric=function(c){return o.test(c)},tn.testAlphanumeric=function(c){return s.test(c)},tn}var s1;function rr(){return s1||(s1=1,(function(e){const t=r1(),n=o1();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!t.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},e.getBestModeForData=function(o){return n.testNumeric(o)?e.NUMERIC:n.testAlphanumeric(o)?e.ALPHANUMERIC:n.testKanji(o)?e.KANJI:e.BYTE},e.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},e.isValid=function(o){return o&&o.bit&&o.ccBits};function r(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+i)}}e.from=function(o,s){if(e.isValid(o))return o;try{return r(o)}catch{return s}}})(ud)),ud}var a1;function Ek(){return a1||(a1=1,(function(e){const t=nr(),n=X0(),r=ed(),i=rr(),o=r1(),s=7973,a=t.getBCHDigit(s);function c(f,h,p){for(let g=1;g<=40;g++)if(h<=e.getCapacity(g,p,f))return g}function u(f,h){return i.getCharCountIndicator(f,h)+4}function l(f,h){let p=0;return f.forEach(function(g){const m=u(g.mode,h);p+=m+g.getBitsLength()}),p}function d(f,h){for(let p=1;p<=40;p++)if(l(f,p)<=e.getCapacity(p,h,i.MIXED))return p}e.from=function(h,p){return o.isValid(h)?parseInt(h,10):p},e.getCapacity=function(h,p,g){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=i.BYTE);const m=t.getSymbolTotalCodewords(h),v=n.getTotalCodewordsCount(h,p),y=(m-v)*8;if(g===i.MIXED)return y;const b=y-u(g,h);switch(g){case i.NUMERIC:return Math.floor(b/10*3);case i.ALPHANUMERIC:return Math.floor(b/11*2);case i.KANJI:return Math.floor(b/13);case i.BYTE:default:return Math.floor(b/8)}},e.getBestVersionForData=function(h,p){let g;const m=r.from(p,r.M);if(Array.isArray(h)){if(h.length>1)return d(h,m);if(h.length===0)return 1;g=h[0]}else g=h;return c(g.mode,g.getLength(),m)},e.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let p=h<<12;for(;t.getBCHDigit(p)-a>=0;)p^=s<<t.getBCHDigit(p)-a;return h<<12|p}})(cd)),cd}var dd={},c1;function Sk(){if(c1)return dd;c1=1;const e=nr(),t=1335,n=21522,r=e.getBCHDigit(t);return dd.getEncodedBits=function(o,s){const a=o.bit<<3|s;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},dd}var fd={},pd,u1;function _k(){if(u1)return pd;u1=1;const e=rr();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let i,o,s;for(i=0;i+3<=this.data.length;i+=3)o=this.data.substr(i,3),s=parseInt(o,10),r.put(s,10);const a=this.data.length-i;a>0&&(o=this.data.substr(i),s=parseInt(o,10),r.put(s,a*3+1))},pd=t,pd}var hd,l1;function Ck(){if(l1)return hd;l1=1;const e=rr(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(i){return 11*Math.floor(i/2)+6*(i%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let o;for(o=0;o+2<=this.data.length;o+=2){let s=t.indexOf(this.data[o])*45;s+=t.indexOf(this.data[o+1]),i.put(s,11)}this.data.length%2&&i.put(t.indexOf(this.data[o]),6)},hd=n,hd}var gd,d1;function Tk(){if(d1)return gd;d1=1;const e=rr();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,i=this.data.length;r<i;r++)n.put(this.data[r],8)},gd=t,gd}var md,f1;function Ik(){if(f1)return md;f1=1;const e=rr(),t=nr();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(i){return i*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let i;for(i=0;i<this.data.length;i++){let o=t.toSJIS(this.data[i]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[i]+`
|
|
776
|
+
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},md=n,md}var vd={exports:{}},p1;function xk(){return p1||(p1=1,(function(e){var t={single_source_shortest_paths:function(n,r,i){var o={},s={};s[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,u,l,d,f,h,p,g,m;!a.empty();){c=a.pop(),u=c.value,d=c.cost,f=n[u]||{};for(l in f)f.hasOwnProperty(l)&&(h=f[l],p=d+h,g=s[l],m=typeof s[l]>"u",(m||g>p)&&(s[l]=p,a.push(l,p),o[l]=u))}if(typeof i<"u"&&typeof s[i]>"u"){var v=["Could not find a path from ",r," to ",i,"."].join("");throw new Error(v)}return o},extract_shortest_path_from_predecessor_list:function(n,r){for(var i=[],o=r;o;)i.push(o),n[o],o=n[o];return i.reverse(),i},find_path:function(n,r,i){var o=t.single_source_shortest_paths(n,r,i);return t.extract_shortest_path_from_predecessor_list(o,i)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,i={},o;n=n||{};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);return i.queue=[],i.sorter=n.sorter||r.default_sorter,i},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var i={value:n,cost:r};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(vd)),vd.exports}var h1;function Ak(){return h1||(h1=1,(function(e){const t=rr(),n=_k(),r=Ck(),i=Tk(),o=Ik(),s=o1(),a=nr(),c=xk();function u(v){return unescape(encodeURIComponent(v)).length}function l(v,y,b){const w=[];let C;for(;(C=v.exec(b))!==null;)w.push({data:C[0],index:C.index,mode:y,length:C[0].length});return w}function d(v){const y=l(s.NUMERIC,t.NUMERIC,v),b=l(s.ALPHANUMERIC,t.ALPHANUMERIC,v);let w,C;return a.isKanjiModeEnabled()?(w=l(s.BYTE,t.BYTE,v),C=l(s.KANJI,t.KANJI,v)):(w=l(s.BYTE_KANJI,t.BYTE,v),C=[]),y.concat(b,w,C).sort(function(E,P){return E.index-P.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function f(v,y){switch(y){case t.NUMERIC:return n.getBitsLength(v);case t.ALPHANUMERIC:return r.getBitsLength(v);case t.KANJI:return o.getBitsLength(v);case t.BYTE:return i.getBitsLength(v)}}function h(v){return v.reduce(function(y,b){const w=y.length-1>=0?y[y.length-1]:null;return w&&w.mode===b.mode?(y[y.length-1].data+=b.data,y):(y.push(b),y)},[])}function p(v){const y=[];for(let b=0;b<v.length;b++){const w=v[b];switch(w.mode){case t.NUMERIC:y.push([w,{data:w.data,mode:t.ALPHANUMERIC,length:w.length},{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.ALPHANUMERIC:y.push([w,{data:w.data,mode:t.BYTE,length:w.length}]);break;case t.KANJI:y.push([w,{data:w.data,mode:t.BYTE,length:u(w.data)}]);break;case t.BYTE:y.push([{data:w.data,mode:t.BYTE,length:u(w.data)}])}}return y}function g(v,y){const b={},w={start:{}};let C=["start"];for(let _=0;_<v.length;_++){const E=v[_],P=[];for(let T=0;T<E.length;T++){const I=E[T],A=""+_+T;P.push(A),b[A]={node:I,lastCount:0},w[A]={};for(let O=0;O<C.length;O++){const D=C[O];b[D]&&b[D].node.mode===I.mode?(w[D][A]=f(b[D].lastCount+I.length,I.mode)-f(b[D].lastCount,I.mode),b[D].lastCount+=I.length):(b[D]&&(b[D].lastCount=I.length),w[D][A]=f(I.length,I.mode)+4+t.getCharCountIndicator(I.mode,y))}}C=P}for(let _=0;_<C.length;_++)w[C[_]].end=0;return{map:w,table:b}}function m(v,y){let b;const w=t.getBestModeForData(v);if(b=t.from(y,w),b!==t.BYTE&&b.bit<w.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(b)+`.
|
|
777
|
+
Suggested mode is: `+t.toString(w));switch(b===t.KANJI&&!a.isKanjiModeEnabled()&&(b=t.BYTE),b){case t.NUMERIC:return new n(v);case t.ALPHANUMERIC:return new r(v);case t.KANJI:return new o(v);case t.BYTE:return new i(v)}}e.fromArray=function(y){return y.reduce(function(b,w){return typeof w=="string"?b.push(m(w,null)):w.data&&b.push(m(w.data,w.mode)),b},[])},e.fromString=function(y,b){const w=d(y,a.isKanjiModeEnabled()),C=p(w),_=g(C,b),E=c.find_path(_.map,"start","end"),P=[];for(let T=1;T<E.length-1;T++)P.push(_.table[E[T]].node);return e.fromArray(h(P))},e.rawSplit=function(y){return e.fromArray(d(y,a.isKanjiModeEnabled()))}})(fd)),fd}var g1;function kk(){if(g1)return Xl;g1=1;const e=nr(),t=ed(),n=pk(),r=hk(),i=gk(),o=mk(),s=vk(),a=X0(),c=wk(),u=Ek(),l=Sk(),d=rr(),f=Ak();function h(_,E){const P=_.size,T=o.getPositions(E);for(let I=0;I<T.length;I++){const A=T[I][0],O=T[I][1];for(let D=-1;D<=7;D++)if(!(A+D<=-1||P<=A+D))for(let F=-1;F<=7;F++)O+F<=-1||P<=O+F||(D>=0&&D<=6&&(F===0||F===6)||F>=0&&F<=6&&(D===0||D===6)||D>=2&&D<=4&&F>=2&&F<=4?_.set(A+D,O+F,!0,!0):_.set(A+D,O+F,!1,!0))}}function p(_){const E=_.size;for(let P=8;P<E-8;P++){const T=P%2===0;_.set(P,6,T,!0),_.set(6,P,T,!0)}}function g(_,E){const P=i.getPositions(E);for(let T=0;T<P.length;T++){const I=P[T][0],A=P[T][1];for(let O=-2;O<=2;O++)for(let D=-2;D<=2;D++)O===-2||O===2||D===-2||D===2||O===0&&D===0?_.set(I+O,A+D,!0,!0):_.set(I+O,A+D,!1,!0)}}function m(_,E){const P=_.size,T=u.getEncodedBits(E);let I,A,O;for(let D=0;D<18;D++)I=Math.floor(D/3),A=D%3+P-8-3,O=(T>>D&1)===1,_.set(I,A,O,!0),_.set(A,I,O,!0)}function v(_,E,P){const T=_.size,I=l.getEncodedBits(E,P);let A,O;for(A=0;A<15;A++)O=(I>>A&1)===1,A<6?_.set(A,8,O,!0):A<8?_.set(A+1,8,O,!0):_.set(T-15+A,8,O,!0),A<8?_.set(8,T-A-1,O,!0):A<9?_.set(8,15-A-1+1,O,!0):_.set(8,15-A-1,O,!0);_.set(T-8,8,1,!0)}function y(_,E){const P=_.size;let T=-1,I=P-1,A=7,O=0;for(let D=P-1;D>0;D-=2)for(D===6&&D--;;){for(let F=0;F<2;F++)if(!_.isReserved(I,D-F)){let V=!1;O<E.length&&(V=(E[O]>>>A&1)===1),_.set(I,D-F,V),A--,A===-1&&(O++,A=7)}if(I+=T,I<0||P<=I){I-=T,T=-T;break}}}function b(_,E,P){const T=new n;P.forEach(function(F){T.put(F.mode.bit,4),T.put(F.getLength(),d.getCharCountIndicator(F.mode,_)),F.write(T)});const I=e.getSymbolTotalCodewords(_),A=a.getTotalCodewordsCount(_,E),O=(I-A)*8;for(T.getLengthInBits()+4<=O&&T.put(0,4);T.getLengthInBits()%8!==0;)T.putBit(0);const D=(O-T.getLengthInBits())/8;for(let F=0;F<D;F++)T.put(F%2?17:236,8);return w(T,_,E)}function w(_,E,P){const T=e.getSymbolTotalCodewords(E),I=a.getTotalCodewordsCount(E,P),A=T-I,O=a.getBlocksCount(E,P),D=T%O,F=O-D,V=Math.floor(T/O),z=Math.floor(A/O),be=z+1,oe=V-z,J=new c(oe);let re=0;const G=new Array(O),ue=new Array(O);let te=0;const Ce=new Uint8Array(_.buffer);for(let on=0;on<O;on++){const or=on<F?z:be;G[on]=Ce.slice(re,re+or),ue[on]=J.encode(G[on]),re+=or,te=Math.max(te,or)}const ge=new Uint8Array(T);let B=0,Ct,Tt;for(Ct=0;Ct<te;Ct++)for(Tt=0;Tt<O;Tt++)Ct<G[Tt].length&&(ge[B++]=G[Tt][Ct]);for(Ct=0;Ct<oe;Ct++)for(Tt=0;Tt<O;Tt++)ge[B++]=ue[Tt][Ct];return ge}function C(_,E,P,T){let I;if(Array.isArray(_))I=f.fromArray(_);else if(typeof _=="string"){let V=E;if(!V){const z=f.rawSplit(_);V=u.getBestVersionForData(z,P)}I=f.fromString(_,V||40)}else throw new Error("Invalid data");const A=u.getBestVersionForData(I,P);if(!A)throw new Error("The amount of data is too big to be stored in a QR Code");if(!E)E=A;else if(E<A)throw new Error(`
|
|
713
778
|
The chosen QR Code version cannot contain this amount of data.
|
|
714
|
-
Minimum version required to store current data is: `+
|
|
715
|
-
`);const O=
|
|
716
|
-
`;return typeof a=="function"&&a(null,
|
|
779
|
+
Minimum version required to store current data is: `+A+`.
|
|
780
|
+
`);const O=b(E,P,I),D=e.getSymbolSize(E),F=new r(D);return h(F,E),p(F),g(F,E),v(F,P,0),E>=7&&m(F,E),y(F,O),isNaN(T)&&(T=s.getBestMask(F,v.bind(null,F,P))),s.applyMask(T,F),v(F,P,T),{modules:F,version:E,errorCorrectionLevel:P,maskPattern:T,segments:I}}return Xl.create=function(E,P){if(typeof E>"u"||E==="")throw new Error("No input text");let T=t.M,I,A;return typeof P<"u"&&(T=t.from(P.errorCorrectionLevel,t.M),I=u.from(P.version),A=s.from(P.maskPattern),P.toSJISFunc&&e.setToSJISFunction(P.toSJISFunc)),C(E,I,T,A)},Xl}var yd={},bd={},m1;function v1(){return m1||(m1=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const i=parseInt(r.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const i=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:i,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,i){return i.width&&i.width>=r+i.margin*2?i.width/(r+i.margin*2):i.scale},e.getImageWidth=function(r,i){const o=e.getScale(r,i);return Math.floor((r+i.margin*2)*o)},e.qrToImageData=function(r,i,o){const s=i.modules.size,a=i.modules.data,c=e.getScale(s,o),u=Math.floor((s+o.margin*2)*c),l=o.margin*c,d=[o.color.light,o.color.dark];for(let f=0;f<u;f++)for(let h=0;h<u;h++){let p=(f*u+h)*4,g=o.color.light;if(f>=l&&h>=l&&f<u-l&&h<u-l){const m=Math.floor((f-l)/c),v=Math.floor((h-l)/c);g=d[a[m*s+v]?1:0]}r[p++]=g.r,r[p++]=g.g,r[p++]=g.b,r[p]=g.a}}})(bd)),bd}var y1;function Rk(){return y1||(y1=1,(function(e){const t=v1();function n(i,o,s){i.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(o,s,a){let c=a,u=s;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),s||(u=r()),c=t.getOptions(c);const l=t.getImageWidth(o.modules.size,c),d=u.getContext("2d"),f=d.createImageData(l,l);return t.qrToImageData(f.data,o,c),n(d,u,l),d.putImageData(f,0,0),u},e.renderToDataURL=function(o,s,a){let c=a;typeof c>"u"&&(!s||!s.getContext)&&(c=s,s=void 0),c||(c={});const u=e.render(o,s,c),l=c.type||"image/png",d=c.rendererOpts||{};return u.toDataURL(l,d.quality)}})(yd)),yd}var wd={},b1;function Pk(){if(b1)return wd;b1=1;const e=v1();function t(i,o){const s=i.a/255,a=o+'="'+i.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(i,o,s){let a=i+o;return typeof s<"u"&&(a+=" "+s),a}function r(i,o,s){let a="",c=0,u=!1,l=0;for(let d=0;d<i.length;d++){const f=Math.floor(d%o),h=Math.floor(d/o);!f&&!u&&(u=!0),i[d]?(l++,d>0&&f>0&&i[d-1]||(a+=u?n("M",f+s,.5+h+s):n("m",c,0),c=0,u=!1),f+1<o&&i[d+1]||(a+=n("h",l),l=0)):c++}return a}return wd.render=function(o,s,a){const c=e.getOptions(s),u=o.modules.size,l=o.modules.data,d=u+c.margin*2,f=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",h="<path "+t(c.color.dark,"stroke")+' d="'+r(l,u,c.margin)+'"/>',p='viewBox="0 0 '+d+" "+d+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+p+' shape-rendering="crispEdges">'+f+h+`</svg>
|
|
781
|
+
`;return typeof a=="function"&&a(null,m),m},wd}var w1;function Ok(){if(w1)return Yr;w1=1;const e=fk(),t=kk(),n=Rk(),r=Pk();function i(o,s,a,c,u){const l=[].slice.call(arguments,1),d=l.length,f=typeof l[d-1]=="function";if(!f&&!e())throw new Error("Callback required as last argument");if(f){if(d<2)throw new Error("Too few arguments provided");d===2?(u=a,a=s,s=c=void 0):d===3&&(s.getContext&&typeof u>"u"?(u=c,c=void 0):(u=c,c=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=c=void 0):d===2&&!s.getContext&&(c=a,a=s,s=void 0),new Promise(function(h,p){try{const g=t.create(a,c);h(o(g,s,c))}catch(g){p(g)}})}try{const h=t.create(a,c);u(null,o(h,s,c))}catch(h){u(h)}}return Yr.create=t.create,Yr.toCanvas=i.bind(null,n.render),Yr.toDataURL=i.bind(null,n.renderToDataURL),Yr.toString=i.bind(null,function(o,s,a){return r.render(o,a)}),Yr}var Lk=Ok();const Nk=dk(Lk),Mk=e=>ne`
|
|
717
782
|
display: flex;
|
|
718
783
|
justify-content: center;
|
|
719
784
|
align-items: center;
|
|
@@ -723,7 +788,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
723
788
|
|
|
724
789
|
border: ${e.qrCode.borderWidth}px ${e.qrCode.borderStyle} ${e.qrCode.borderColor};
|
|
725
790
|
border-radius: ${e.qrCode.borderRadius}px;
|
|
726
|
-
`;class
|
|
791
|
+
`;class E1 extends we{constructor({value:t,width:n=130,altText:r="QR Code"}){super({tag:"div",styles:i=>Mk(i)}),Nk.toDataURL(t,{width:n,margin:0}).then(i=>{const o=document.createElement("img");o.src=i,o.alt=r,o.width=n,this.element.append(o)}).catch(i=>{console.error("Failed to generate QR code:",i)})}}const Dk=e=>`${Ze.getRuntimeConfig().RESOURCES_BUCKET}/img/flags/${e}.webp`,Fk=()=>ne`
|
|
727
792
|
display: flex;
|
|
728
793
|
flex-direction: column;
|
|
729
794
|
gap: 12px;
|
|
@@ -735,7 +800,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
735
800
|
|
|
736
801
|
width: 100%;
|
|
737
802
|
}
|
|
738
|
-
`;class
|
|
803
|
+
`;class Uk extends we{constructor({availableCountries:n,onSubmit:r}){super({tag:"form",styles:()=>Fk()});S(this,"inputDialCode");S(this,"inputPhoneNumber");S(this,"btnContinue");S(this,"inputsWrapper");S(this,"onSubmit");this.onSubmit=r;const i=n.map(o=>({name:o.name,value:o.callingCode,icon:Dk(o.iso)}));this.inputsWrapper=document.createElement("div"),this.inputsWrapper.classList.add("inputs-wrapper"),this.inputDialCode=new yf({name:"country",options:i,emptyMessage:W.translate("enter_country_code"),maxWidth:"180px",showValue:!0}),this.inputPhoneNumber=new wf({name:"phone",placeholder:W.translate("enter_your_phone"),type:"tel"}),this.inputsWrapper.append(this.inputDialCode.element,this.inputPhoneNumber.element),this.btnContinue=new yn({text:W.translate("continue"),iconRight:"arrow_right_line",isFullWidth:!0,size:"large",isDisabled:!0,isApTheme:!0,onClick:o=>{o.preventDefault(),this.handleSubmit()}}),this.element.append(this.inputsWrapper,this.btnContinue.element),this.inputDialCode.element.addEventListener("change",()=>this.validateForm()),this.inputPhoneNumber.element.addEventListener("input",()=>this.validateForm()),this.validateForm()}validateForm(){const n=this.inputDialCode.getValue(),r=this.inputPhoneNumber.getValue(),i=r&&r.toString().length>=5,o=!!n;this.btnContinue.setDisabled(!i||!o)}handleSubmit(){const n=new FormData(this.element),r=n.get("country"),i=n.get("phone"),o=`${r}${i}`;We.trackEvent("ap_cl_identify_user_init",{phoneNumber:o}),this.btnContinue.setLoading(!1),this.onSubmit({phoneNumber:o})}setLoading(n){this.btnContinue.setLoading(n)}setDisable(n){this.btnContinue.setDisabled(n)}}class Bk{static generate(t,n={}){return Ab(Ze.getRuntimeConfig().CHECKOUT_URL,t,n).toString()}}const $k=()=>ne`
|
|
739
804
|
display: flex;
|
|
740
805
|
flex-direction: column;
|
|
741
806
|
gap: 10px;
|
|
@@ -770,34 +835,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
770
835
|
opacity: 1;
|
|
771
836
|
}
|
|
772
837
|
}
|
|
773
|
-
`;class
|
|
774
|
-
background-color: ${e.backgroundColor};
|
|
775
|
-
|
|
776
|
-
display: flex;
|
|
777
|
-
flex-direction: column;
|
|
778
|
-
gap: 12px;
|
|
779
|
-
|
|
780
|
-
max-width: ${typeof e.width=="number"?`${e.width}px`:e.width};
|
|
781
|
-
padding: ${typeof e.paddingWrapper=="number"?`${e.paddingWrapper}px`:e.paddingWrapper};
|
|
782
|
-
border-radius: ${typeof e.borderRadiusWrapper=="number"?`${e.borderRadiusWrapper}px`:e.borderRadiusWrapper};
|
|
783
|
-
|
|
784
|
-
.loading-wrapper {
|
|
785
|
-
display: flex;
|
|
786
|
-
flex-direction: column;
|
|
787
|
-
justify-content: center;
|
|
788
|
-
align-items: center;
|
|
789
|
-
width: 100%;
|
|
790
|
-
gap: 8px;
|
|
791
|
-
min-height: 250px;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.payment-success-content {
|
|
795
|
-
display: flex;
|
|
796
|
-
flex-direction: column;
|
|
797
|
-
align-items: center;
|
|
798
|
-
gap: 8px;
|
|
799
|
-
}
|
|
800
|
-
`,Bv=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Uv=e=>j`
|
|
838
|
+
`;class S1 extends we{constructor(n){super({tag:"div",styles:()=>$k()});S(this,"componentProps");S(this,"btnAstroPay",null);S(this,"formCountryPhone");S(this,"pushFeedbackWrapper");S(this,"pollingService",null);S(this,"updatedInitialState");S(this,"renderAPComponent",()=>{var n;if(this.updatedInitialState){if(this.element.innerHTML="",this.btnAstroPay=new yn({text:((n=this.componentProps)==null?void 0:n.actionLabel)??"AstroPay",onClick:this.handleAstroPayClick.bind(this),isFullWidth:!0,iconRight:"arrow_right_line",isApTheme:!0}),this.element.append(this.btnAstroPay.element),this.componentProps.benefits){const r=new Zl({items:this.componentProps.benefits.batch,variant:"highlight",isFullWidth:!0,align:"center"}).element;this.element.append(r)}this.updatedInitialState=!1}});this.componentProps=n,this.updatedInitialState=!0,fn.astroPayPaymentStarted(this.componentProps.paymentExternalId),this.renderAPComponent()}handleAstroPayClick(){var n,r;if(fn.astroPayPaymentClicked(this.componentProps.paymentExternalId),(r=(n=this.componentProps).onClickCallback)==null||r.call(n),this.updatedInitialState=!0,Ib()){this.handleMobileFlow();return}if(this.componentProps.user.hasAccount){this.handleAccountFlow();return}this.renderPhoneInput()}async fetchIdentifyUser(n,r){var i,o,s;try{const a={phoneNumber:ny(n)};if((await Ge.postIdentifyUser(this.componentProps.paymentExternalId,a)).user.hasAccount){fn.astroPayPaymentUserIdentified(this.componentProps.paymentExternalId),(i=this.formCountryPhone)==null||i.setDisable(!0),this.handleAccountFlow();return}r==null||r()}catch(a){const c=a;(s=(o=this.componentProps)==null?void 0:o.onError)==null||s.call(o);const u=new X({text:c.message,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;this.element.append(u)}}async handlePhoneNumberSubmit(n){try{this.formCountryPhone&&this.formCountryPhone.setLoading(!0),await this.fetchIdentifyUser(n.phoneNumber,()=>this.handleNoAccountFlow())}finally{this.formCountryPhone&&this.formCountryPhone.setLoading(!1)}}renderPhoneInput(){var n;this.element.innerHTML="",this.formCountryPhone=new Uk({availableCountries:((n=this.componentProps)==null?void 0:n.countries)??[],onSubmit:r=>{fn.astroPayPaymentPhoneNumberEntered(this.componentProps.paymentExternalId),this.handlePhoneNumberSubmit(r)}}),this.element.append(this.formCountryPhone.element)}generateRedirectUrl(){return Bk.generate(`checkout-payment/${this.componentProps.paymentExternalId}`,{data:kd(this.componentProps.paymentAmount)})}handleMobileFlow(){const n=this.generateRedirectUrl(),r=window.open(n,"_blank");(!r||r.closed||typeof r.closed>"u")&&(window.location.href=n)}handleAccountFlow(){this.renderAlreadySent(),this.checkPaymentStatus()}handleNoAccountFlow(){const n=this.generateRedirectUrl(),r=window.open(n,"_blank");(!r||r.closed||typeof r.closed>"u")&&(window.location.href=n)}renderAlreadySent(){var c;this.pushFeedbackWrapper&&this.pushFeedbackWrapper.remove(),(c=this.btnAstroPay)==null||c.setDisabled(!0),this.pushFeedbackWrapper=document.createElement("div"),this.pushFeedbackWrapper.classList.add("sent-message-wrapper");const n=new Zl({items:[{title:W.translate("push_notification_sent"),icon:"notification_fill"}],variant:"highlight",isFullWidth:!0,align:"center"}).element,r=document.createElement("div");r.classList.add("sent-message-content");const i=new X({text:W.translate("didnt_receive"),size:"medium",weight:600}).element,o=new X({text:W.translate("scan_qr_copy_link"),size:"small",weight:400}).element;r.append(i,o);const s=new E1({width:100,value:this.generateRedirectUrl(),altText:W.translate("qr_code")}).element,a=new yn({text:W.translate("copy_payment_link"),variant:"copy-to-clipboard",size:"small",iconRight:"copy_2_line",onClick:()=>{fn.astroPayPaymentLinkCopied(this.componentProps.paymentExternalId),Xs(this.generateRedirectUrl())}}).element;this.pushFeedbackWrapper.append(n,r,s,a),this.element.append(this.pushFeedbackWrapper)}async checkPaymentStatus(){try{const n=await Ge.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Nn.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Nn.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message)}}initializePollingService(n){this.pollingService=new Yl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePaymentSuccess(n){var o,s;const r=[],i=new ga({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showWaitingInfo(n){if(!this.pushFeedbackWrapper)return;let r=this.pushFeedbackWrapper.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.pushFeedbackWrapper.append(r)),r.innerHTML="";const i=new an({size:12,color:j.getStyles().textPrimaryColor}).element,o=new X({text:n,size:"xSmall"}).element;r.append(i,o)}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i)}showErrorMessage(n){if(!this.pushFeedbackWrapper)return;const r=new X({text:n,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor,align:"center"}).element;this.pushFeedbackWrapper.append(r)}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null),this.element.querySelectorAll(".loading-pooling").forEach(r=>r.remove())}removePollingContent(){this.stopPolling(),this.renderAPComponent()}destroy(){this.stopPolling(),this.element.remove()}}const Vk=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},zk=e=>ne`
|
|
801
839
|
display: flex;
|
|
802
840
|
flex-wrap: nowrap;
|
|
803
841
|
align-items: center;
|
|
@@ -812,7 +850,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
812
850
|
|
|
813
851
|
min-width: min-content;
|
|
814
852
|
white-space: nowrap;
|
|
815
|
-
`;class
|
|
853
|
+
`;class Hk extends we{constructor(n){super({tag:"div",styles:r=>zk(r)});S(this,"compProps");S(this,"intervalId",null);S(this,"isTimeOver",!1);this.compProps={timeoutText:W.translate("time_up"),...n},this.startTimer(),this.renderTime()}startTimer(){this.intervalId=window.setInterval(()=>{var n,r;this.compProps.time-=1,this.renderTime(),this.compProps.time<=0&&(this.isTimeOver=!0,this.stopTimer(),(r=(n=this.compProps).onTimeOut)==null||r.call(n),this.renderTime())},1e3)}renderTime(){const n=Vk(this.compProps.time);if(this.element.innerHTML="",this.compProps.iconLeft){const r=new vt({name:this.compProps.iconLeft,color:j.getStyles().timer.textColor}).element;this.element.append(r)}if(this.compProps.text){const r=this.isTimeOver?this.compProps.timeoutText:this.compProps.text,i=this.isTimeOver?"":n,o=new X({variant:"div",text:r,size:"small",weight:400,lineHeight:21,color:j.getStyles().timer.textColor,align:"center"}).element,s=new X({variant:"div",text:i,size:"small",weight:600,lineHeight:21,color:j.getStyles().timer.textColor,align:"center"}).element;if(s.style.fontFamily="monospace",this.element.append(o,s),this.compProps.iconRight){const a=new vt({name:this.compProps.iconRight,color:j.getStyles().timer.textColor}).element;this.element.append(a)}}}stopTimer(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}destroy(){this.stopTimer(),super.destroy()}}const jk=e=>ne`
|
|
816
854
|
display: flex;
|
|
817
855
|
flex-direction: column;
|
|
818
856
|
gap: 10px;
|
|
@@ -833,7 +871,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
833
871
|
padding: 16px;
|
|
834
872
|
border: 1px solid ${e.primaryColor};
|
|
835
873
|
border-radius: 16px;
|
|
836
|
-
background-color: ${
|
|
874
|
+
background-color: ${k.neutral_lightest};
|
|
837
875
|
}
|
|
838
876
|
|
|
839
877
|
.timeout-container {
|
|
@@ -848,7 +886,7 @@ Minimum version required to store current data is: `+k+`.
|
|
|
848
886
|
align-items: center;
|
|
849
887
|
gap: 8px;
|
|
850
888
|
}
|
|
851
|
-
`;class zv extends se{constructor(n){super({tag:"div",styles:r=>Vv(r)});S(this,"componentProps");S(this,"loadingWrapper");S(this,"timerElement",null);S(this,"timerInstance",null);S(this,"pollingService",null);this.componentProps=n,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const n=document.createElement("div");n.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element,s=new H({text:V.translate("waiting_confirmation"),size:20,lineHeight:30,weight:600}).element;s.style.marginTop="8px";const i=new H({text:V.translate("do_not_close_window"),size:16,lineHeight:24}).element;return n.append(r,s,i),n}async fetchPaymentMethodData(){var n,r;try{const s={methodCode:this.componentProps.paymentMethod.code},i=await Ie.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,s);this.renderSections(i.sections)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n),this.showErrorMessage(i.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const n=await Ie.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Gt.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Gt.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopTimer(),this.stopPolling()}}initializePollingService(n){this.pollingService=new _c(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePollingError(n){var s,i;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(i=(s=this.componentProps)==null?void 0:s.onError)==null||i.call(s)}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentSuccess(n){var i,o;const r=[],s=new Oi({type:"success",title:(i=n.data.successSection)==null?void 0:i.title,description:(o=n.data.successSection)==null?void 0:o.description}).element;r.push(s),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showErrorMessage(n){this.element.innerHTML="";const r=document.createElement("div");r.classList.add("timeout-container");const s=new H({text:n,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;r.append(s,this.renderRetryButton()),this.element.append(r)}showWaitingInfo(n){let r=this.element.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.element.append(r)),r.innerHTML="";const s=new It({size:12,color:z.getStyles().textPrimaryColor}).element,i=new H({text:n}).element;r.append(s,i)}async renderSections(n){n.filter(r=>!!r).sort((r,s)=>r.order-s.order).forEach(r=>{const{componentType:s,metadata:i}=r;switch(s){case Xt.AMOUNT_DISPLAY:this.renderAmountDisplay(i);break;case Xt.COPY:this.renderCopy(i);break;case Xt.DESCRIPTION:this.renderDescription(i);break;case Xt.EXPIRATION_TIMER:this.renderTimer(i);break;case Xt.QR_CODE:this.renderQRCode(i);break;case Xt.SHARE:this.renderShare(i);break;default:console.warn("Unknown component type:",s)}}),await this.checkPaymentStatus()}renderCopy(n){const r=new Dt({text:n.label,variant:"copy-to-clipboard",size:"medium",iconLeft:n.iconLeft,iconRight:n.iconRight??"copy_2_line",onClick:()=>{hi(n.value)}}).element;this.element.append(r)}renderShare(n){const r=new Dt({text:n.label,variant:"text",size:"medium",iconRight:n.iconRight,iconLeft:n.iconLeft,onClick:()=>{var s,i,o;tm(((s=n==null?void 0:n.richTextInfo)==null?void 0:s.title)??"Share",((i=n==null?void 0:n.richTextInfo)==null?void 0:i.description)??n.value,(o=n==null?void 0:n.richTextInfo)==null?void 0:o.url)}}).element;this.element.append(r)}renderDescription(n){const r=new H({text:`${n.text} ${Pi(n.amount,n.currency,Le.getCurrencyMode())}`,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderQRCode(n){const r=new Th({value:n.value,altText:V.translate("qr_code")}).element;this.element.append(r)}renderAmountDisplay(n){const r=new H({text:n.value,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderTimer(n){this.timerInstance=new $v({time:n.time,text:n.label,iconLeft:n.iconLeft,iconRight:n.iconRight,timeoutText:n.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(n)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(n){this.stopPolling(),this.stopTimer();const r=document.createElement("div");r.classList.add("timeout-container"),this.timerElement&&r.append(this.timerElement),n.timeoutInfo.description&&r.append(this.renderExpiredBadge(n.timeoutInfo.description)),n.timeoutInfo.retry&&r.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(r)}renderRetryButton(){return new Dt({text:V.translate("try_again"),variant:"primary",size:"medium",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.timerElement=null,this.timerInstance=null,this.stopPolling(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}}).element}renderExpiredBadge(n){return new Cc({items:[{title:n,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.stopPolling(),this.element.remove()}}const Hv={IX:"system_pix",[st.CREDIT_CARD]:"bank_card_line",[st.DEBIT_CARD]:"bank_card_line",[st.CW]:"bank_card_line",[st.DC]:"bank_card_line",[st.CC]:"bank_card_line"},jv={[st.CREDIT_CARD]:["payment_visa","payment_master"],[st.DEBIT_CARD]:["payment_visa","payment_master"],[st.CW]:["payment_visa","payment_master"],[st.DC]:["payment_visa","payment_master"],[st.CC]:["payment_visa","payment_master"]},Wv=e=>!!e.enabled,qv=({paymentMethods:e,paymentExternalId:t,amount:n,currency:r,country:s,cardConfig:i,onSuccess:o,onError:a})=>e!=null&&e.length?e.filter(Wv).map(c=>{let l=null;const u=()=>(l==null||l.destroy(),Kf.includes(c.code)?l=new Gf({paymentExternalId:t,amount:n,currency:r,country:s,paymentMethod:c,showPaymentSummary:i==null?void 0:i.showPaymentSummary,expirationDateFormat:i==null?void 0:i.expirationDateFormat,onSuccess:o,onError:a}):l=new zv({paymentExternalId:t,paymentMethod:c,onSuccess:o,onError:a}),l.element),d=()=>{l==null||l.destroy(),l=null};return{icon:c.logo||Hv[c.code]||"pay_line",title:c.label,content:u,onClose:d,auxImage:jv[c.code]}}):[];class Gv extends se{constructor(n){super({tag:"div",elementId:"payment-component",styles:s=>Fv(s)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"accPaymentMethods");this.componentProps={...n,showTitle:n.showTitle??!0,showDescription:n.showDescription??!0,country:n.country.trim(),currency:n.currency.trim()},ct.registerComponent(this),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),xe.trackEvent("ap_cl_full_checkout_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,user:a,order:c,paymentExternalId:l}=this.componentProps;let u;if(l)u=await Ie.getPaymentDetails(l,"full_checkout");else{const d={country:o,currency:i,amount:s,user:a,order:c};u=await Ie.postCreatePayment(d,"full_checkout")}this.renderPaymentMethods(u)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const o=new H({text:i.message,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.appendChild(o)}finally{this.loadingWrapper.remove()}}renderPaymentMethods(n){var p,h;const{paymentExternalId:r,user:s,paymentMethods:i,countries:o,paymentComponentDescription:a,benefits:c}=n;if(this.element.innerHTML="",this.componentProps.showTitle){const f=new H({text:V.translate("astro_express_checkout"),variant:"div",size:16,weight:600}).element;this.element.append(f)}if(this.componentProps.showDescription&&a){const f=new H({text:a}).element;this.element.append(f)}const l={amount:this.componentProps.amount,currency:this.componentProps.currency},u=new Ah({paymentExternalId:r,user:s,countries:o,benefits:c,paymentAmount:l,onSuccess:f=>this.showSuccessContent(f),onError:this.componentProps.onError,onClickCallback:()=>{var f;return(f=this.accPaymentMethods)==null?void 0:f.closeAllItems()}});this.element.append(u.element);const d=qv({paymentMethods:i,paymentExternalId:r,amount:this.componentProps.amount,currency:this.componentProps.currency,country:this.componentProps.country,onSuccess:f=>this.showSuccessContent(f),onError:(p=this.componentProps)==null?void 0:p.onError,cardConfig:(h=this.componentProps)==null?void 0:h.cardConfig});if(d.length>0){const f=new ki({}).element;this.accPaymentMethods=new sv({items:d,onChangeContent:()=>u.removePollingContent()}),this.element.append(f,this.accPaymentMethods.element)}}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(s=>r.append(s)),this.element.append(r),xe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const s=new Ii({onSuccess:this.componentProps.onSuccess}).element;this.element.append(s)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}const Kv=e=>j`
|
|
889
|
+
`;class qk extends we{constructor(n){super({tag:"div",styles:r=>jk(r)});S(this,"componentProps");S(this,"loadingWrapper");S(this,"timerElement",null);S(this,"timerInstance",null);S(this,"pollingService",null);this.componentProps=n,this.loadingWrapper=this.createLoadingWrapper(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}createLoadingWrapper(){const n=document.createElement("div");n.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:j.getStyles().primaryColor}).element,i=new X({text:W.translate("waiting_confirmation"),size:"base",lineHeight:30,weight:600}).element;i.style.marginTop="8px";const o=new X({text:W.translate("do_not_close_window"),size:"medium",lineHeight:24}).element;return n.append(r,i,o),n}async fetchPaymentMethodData(){var n,r,i;try{if((n=this.componentProps.paymentMethod)!=null&&n.uri){const o={methodCode:this.componentProps.paymentMethod.code},s=await Ge.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,o);this.renderSections(s.sections)}else throw new Error(W.translate("generic_error"))}catch(o){const s=o;(i=(r=this.componentProps)==null?void 0:r.onError)==null||i.call(r),this.showErrorMessage(s.message)}finally{this.loadingWrapper.remove()}}async checkPaymentStatus(){try{const n=await Ge.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===Nn.ACCEPTED?this.initializePollingService(n):n.pollingStatus===Nn.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopTimer(),this.stopPolling()}}initializePollingService(n){this.pollingService=new Yl(n,r=>this.showWaitingInfo(r),r=>this.handlePaymentSuccess(r),r=>this.handlePollingError(r)),this.pollingService.startPolling()}handlePollingError(n){var i,o;const r=n;this.showErrorMessage(r.message),this.stopPolling(),(o=(i=this.componentProps)==null?void 0:i.onError)==null||o.call(i)}stopTimer(){this.timerInstance&&(this.timerInstance.stopTimer(),this.timerInstance=null,this.timerElement=null)}handlePaymentSuccess(n){var o,s;const r=[],i=new ga({type:"success",title:(o=n.data.successSection)==null?void 0:o.title,description:(s=n.data.successSection)==null?void 0:s.description}).element;r.push(i),this.componentProps.onSuccess?this.componentProps.onSuccess(r):(this.element.innerHTML="",r.forEach(a=>this.element.append(a)))}showErrorMessage(n){this.element.innerHTML="";const r=document.createElement("div");r.classList.add("timeout-container");const i=new X({text:n,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;r.append(i,this.renderRetryButton()),this.element.append(r)}showWaitingInfo(n){let r=this.element.querySelector(".loading-pooling");r||(r=document.createElement("div"),r.classList.add("loading-pooling"),this.element.append(r)),r.innerHTML="";const i=new an({size:12,color:j.getStyles().textPrimaryColor}).element,o=new X({text:n,size:"xSmall"}).element;r.append(i,o)}async renderSections(n){n.filter(r=>!!r).sort((r,i)=>r.order-i.order).forEach(r=>{const{componentType:i,metadata:o}=r;switch(i){case Fn.AMOUNT_DISPLAY:this.renderAmountDisplay(o);break;case Fn.COPY:this.renderCopy(o);break;case Fn.DESCRIPTION:this.renderDescription(o);break;case Fn.EXPIRATION_TIMER:this.renderTimer(o);break;case Fn.QR_CODE:this.renderQRCode(o);break;case Fn.SHARE:this.renderShare(o);break;default:console.warn("Unknown component type:",i)}}),await this.checkPaymentStatus()}renderCopy(n){const r=new yn({text:n.label,variant:"copy-to-clipboard",size:"medium",iconLeft:n.iconLeft,iconRight:n.iconRight??"copy_2_line",onClick:()=>{Xs(n.value)}}).element;this.element.append(r)}renderShare(n){const r=new yn({text:n.label,variant:"text",size:"medium",iconRight:n.iconRight,iconLeft:n.iconLeft,onClick:()=>{var i,o,s;Z1(((i=n==null?void 0:n.richTextInfo)==null?void 0:i.title)??"Share",((o=n==null?void 0:n.richTextInfo)==null?void 0:o.description)??n.value,(s=n==null?void 0:n.richTextInfo)==null?void 0:s.url)}}).element;this.element.append(r)}renderDescription(n){const r=new X({text:`${n.text} ${ha(n.amount,n.currency,Ze.getCurrencyMode())}`,size:"medium",lineHeight:24,weight:600}).element;this.element.append(r)}renderQRCode(n){const r=new E1({value:n.value,altText:W.translate("qr_code")}).element;this.element.append(r)}renderAmountDisplay(n){const r=new X({text:n.value,size:"medium",lineHeight:24,weight:600}).element;this.element.append(r)}renderTimer(n){this.timerInstance=new Hk({time:n.time,text:n.label,iconLeft:n.iconLeft,iconRight:n.iconRight,timeoutText:n.timeoutInfo.description,onTimeOut:()=>this.handleTimeout(n)}),this.timerElement=this.timerInstance.element,this.element.append(this.timerElement)}handleTimeout(n){this.stopPolling(),this.stopTimer();const r=document.createElement("div");r.classList.add("timeout-container"),this.timerElement&&r.append(this.timerElement),n.timeoutInfo.description&&r.append(this.renderExpiredBadge(n.timeoutInfo.description)),n.timeoutInfo.retry&&r.append(this.renderRetryButton()),this.element.innerHTML="",this.element.append(r)}renderRetryButton(){return new yn({text:W.translate("try_again"),variant:"primary",size:"medium",iconRight:"refresh_2_fill",onClick:()=>{this.element.innerHTML="",this.timerElement=null,this.timerInstance=null,this.stopPolling(),this.element.append(this.loadingWrapper),this.fetchPaymentMethodData()}}).element}renderExpiredBadge(n){return new Zl({items:[{title:n,icon:"alert_line"}],variant:"default",align:"center"}).element}stopPolling(){this.pollingService&&(this.pollingService.stopPolling(),this.pollingService=null)}destroy(){this.stopPolling(),this.element.remove()}}const Wk={[Le.AP]:"astropay_payment_method",[Le.IX]:"system_pix",[Le.CREDIT_CARD]:"bank_card_line",[Le.DEBIT_CARD]:"bank_card_line",[Le.CW]:"bank_card_line",[Le.DC]:"bank_card_line",[Le.CC]:"bank_card_line"},Gk={[Le.CREDIT_CARD]:["payment_visa","payment_master"],[Le.DEBIT_CARD]:["payment_visa","payment_master"],[Le.CW]:["payment_visa","payment_master"],[Le.DC]:["payment_visa","payment_master"],[Le.CC]:["payment_visa","payment_master"]},Kk=(e,t)=>{switch(e){case Le.CREDIT_CARD:case Le.DEBIT_CARD:case Le.CW:case Le.DC:case Le.CC:fn.astroPayPaymentCardClicked(t);break}},Yk=e=>!!e.enabled,Zk=(e,t)=>{const{paymentExternalId:n,amount:r,currency:i,country:o,user:s,countries:a,benefits:c,cardConfig:u,actionLabel:l,onSuccess:d,onError:f}=t;switch(e.code){case Le.AP:return new S1({paymentExternalId:n,user:s,countries:a,benefits:c,paymentAmount:{amount:r,currency:i},actionLabel:l,onSuccess:d,onError:f});default:return z0.includes(e.code)?new V0({paymentExternalId:n,amount:r,currency:i,country:o,paymentMethod:e,showPaymentSummary:u==null?void 0:u.showPaymentSummary,expirationDateFormat:u==null?void 0:u.expirationDateFormat,onSuccess:d,onError:f}):new qk({paymentExternalId:n,paymentMethod:e,onSuccess:d,onError:f})}},Jk=({paymentMethods:e,paymentExternalId:t,...n})=>e!=null&&e.length?e.filter(Yk).map(r=>{let i=null;const o=()=>{i==null||i.destroy();const a={paymentExternalId:t,...n};return i=Zk(r,a),i.element},s=()=>{i==null||i.destroy(),i=null};return{icon:r.logo||Wk[r.code]||"pay_line",title:r.label,description:r==null?void 0:r.description,auxImage:Gk[r.code],content:o,onClose:s,onClickCallback:()=>Kk(r.code,t)}}):[];class Xk extends we{constructor(n){super({tag:"div",elementId:"payment-component",styles:i=>ck(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"accPaymentMethods");this.componentProps={...n,showTitle:n.showTitle??!0,showDescription:n.showDescription??!0,country:n.country.trim(),currency:n.currency.trim()},Ut.registerComponent(this),fn.astroPayPaymentImpression("AstroPayFullCheckout"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:j.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),We.trackEvent("ap_cl_full_checkout_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,user:a,order:c,paymentExternalId:u}=this.componentProps;let l;if(u)l=await Ge.getPaymentDetails(u,"full_checkout");else{const d={country:s,currency:o,amount:i,user:a,order:c};l=await Ge.postCreatePayment(d,"full_checkout")}this.renderPaymentMethods(l)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const s=new X({text:o.message,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;this.element.appendChild(s)}finally{this.loadingWrapper.remove()}}renderPaymentMethods(n){var f,h,p,g;const{paymentExternalId:r,user:i,paymentMethods:o,countries:s,paymentComponentDescription:a,benefits:c,metadata:u}=n;if(this.element.innerHTML="",this.componentProps.showTitle){const m=new X({text:W.translate("checkout_method"),variant:"div",size:"large",weight:600}).element;this.element.append(m)}if(this.componentProps.showDescription&&a){const m=new X({text:a,size:"small",color:j.getStyles().textSecondaryColor,weight:400}).element;this.element.append(m)}const l={code:Le.AP,label:((f=n==null?void 0:n.metadata)==null?void 0:f.title)||W.translate("astro_express_checkout"),description:(h=n==null?void 0:n.metadata)==null?void 0:h.description,enabled:!0},d=Jk({paymentMethods:[l,...o??[]],paymentExternalId:r,amount:this.componentProps.amount,currency:this.componentProps.currency,country:this.componentProps.country,user:i,countries:s,benefits:c,actionLabel:u==null?void 0:u.actionLabel,onSuccess:m=>this.showSuccessContent(m),onError:(p=this.componentProps)==null?void 0:p.onError,cardConfig:(g=this.componentProps)==null?void 0:g.cardConfig});d.length>0&&(this.accPaymentMethods=new ak({items:d,defaultActiveItem:0}),this.element.append(this.accPaymentMethods.element))}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),We.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new la({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ut.unregisterComponent(this)}}const Qk=e=>ne`
|
|
852
890
|
background-color: ${e.backgroundColor};
|
|
853
891
|
|
|
854
892
|
display: flex;
|
|
@@ -875,5 +913,5 @@ Minimum version required to store current data is: `+k+`.
|
|
|
875
913
|
align-items: center;
|
|
876
914
|
gap: 8px;
|
|
877
915
|
}
|
|
878
|
-
`;class Yv extends se{constructor(n){super({tag:"div",styles:s=>Kv(s)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="AP",ct.registerComponent(this),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new It({size:100,variant:"fetching",color:z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),xe.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:s,currency:i,country:o,user:a,order:c}=this.componentProps,l={country:o,currency:i,amount:s,user:a,order:c,methodCode:this.methodCode},u=await Ie.postCreatePayment(l,"astropay_payment");this.renderAstroPayMethod(u)}catch(s){const i=s;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const o=new H({text:i.message,size:z.getStyles().messages.error.textSize,color:z.getStyles().messages.error.textColor}).element;this.element.appendChild(o)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(n){const{paymentExternalId:r,user:s,countries:i,benefits:o}=n;this.element.innerHTML="";const a={amount:this.componentProps.amount,currency:this.componentProps.currency},c=new Ah({paymentExternalId:r,user:s,countries:i,benefits:o,paymentAmount:a,onSuccess:l=>this.showSuccessContent(l)}).element;this.element.append(c)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(s=>r.append(s)),this.element.append(r),xe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const s=new Ii({onSuccess:this.componentProps.onSuccess}).element;this.element.append(s)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),ct.unregisterComponent(this)}}Yh();const Kc=new WeakMap;function _t(e){return Kc.has(e)}function Zv(e){let t=e;for(;t;){if(!_t(t)&&!Xa(t))return!1;t=Gs(t)}return!0}function je(e){return Kc.get(e)}function Jv(e,t){Kc.set(e,t)}function Yc(e,t){const n=e.tagName,r=e.value;if(Ks(e,t)){const s=e.type;return n==="INPUT"&&(s==="button"||s==="submit"||s==="reset")?r:!r||n==="OPTION"?void 0:qt}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const Xv=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Qv=/^[A-Za-z]+:|^\/\//,eS=/^data:.*,/i;function tS(e,t){return e.replace(Xv,(n,r,s,i,o,a)=>{const c=s||o||a;if(!t||!c||Qv.test(c)||eS.test(c))return n;const l=r||i||"";return`url(${l}${nS(c,t)}${l})`})}function nS(e,t){try{return Fs(e,t).href}catch{return e}}const rS=/[^a-z1-6-_]/;function kh(e){const t=e.toLowerCase().trim();return rS.test(t)?"div":t}function Rh(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}const Ct={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},wn={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},ot={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},dt={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Ph={Play:0,Pause:1};function Oh(e){if(!(e===void 0||e.length===0))return e.map(t=>{const n=t.cssRules||t.rules;return{cssRules:Array.from(n,i=>i.cssText),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}})}function Lh(e,t,n,r){if(t===D.HIDDEN)return null;const s=e.getAttribute(n);if(t===D.MASK&&n!==Qa&&!mp.includes(n)&&n!==r.actionNameAttribute){const i=e.tagName;switch(n){case"title":case"alt":case"placeholder":return qt}if(i==="IMG"&&(n==="src"||n==="srcset")){const o=e;if(o.naturalWidth>0)return Rh(o.naturalWidth,o.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?Rh(a,c):ip}if(i==="SOURCE"&&(n==="src"||n==="srcset"))return ip;if(i==="A"&&n==="href"||s&&n.startsWith("data-")||i==="IFRAME"&&n==="srcdoc")return qt}return!s||typeof s!="string"?s:Zd(s)?Jd(s):s}function sS(e,t,n){if(t===D.HIDDEN)return{};const r={},s=kh(e.tagName),i=e.ownerDocument;for(let u=0;u<e.attributes.length;u+=1){const p=e.attributes.item(u).name,h=Lh(e,t,p,n.configuration);h!==null&&(r[p]=h)}if(e.value&&(s==="textarea"||s==="select"||s==="option"||s==="input")){const u=Yc(e,t);u!==void 0&&(r.value=u)}if(s==="option"&&t===D.ALLOW){const u=e;u.selected&&(r.selected=u.selected)}if(s==="link"){const u=Array.from(i.styleSheets).find(p=>p.href===e.href),d=Zc(u);d&&u&&(r._cssText=d)}if(s==="style"&&e.sheet){const u=Zc(e.sheet);u&&(r._cssText=u)}const o=e;if(s==="input"&&(o.type==="radio"||o.type==="checkbox")&&(t===D.ALLOW?r.checked=!!o.checked:Ks(o,t)&&delete r.checked),s==="audio"||s==="video"){const u=e;r.rr_mediaState=u.paused?"paused":"played"}let a,c;const l=n.serializationContext;switch(l.status){case 0:a=Math.round(e.scrollTop),c=Math.round(e.scrollLeft),(a||c)&&l.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:c});break;case 1:l.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:c}=l.elementsScrollPositions.get(e));break}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}function Zc(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,k1()?iS:Nh).join("");return tS(n,e.href)}function iS(e){if(aS(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return Nh(e)}function Nh(e){return oS(e)&&Zc(e.styleSheet)||e.cssText}function oS(e){return"styleSheet"in e}function aS(e){return"selectorText"in e}function Jc(e,t){const n=uS(e,t);if(!n)return null;const r=je(e)||lS(),s=n;return s.id=r,Jv(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),s}let cS=1;function lS(){return cS++}function Xc(e,t){const n=[];return sp(e,r=>{const s=Jc(r,t);s&&n.push(s)}),n}function uS(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return dS(e,t);case e.DOCUMENT_FRAGMENT_NODE:return pS(e,t);case e.DOCUMENT_TYPE_NODE:return fS(e);case e.ELEMENT_NODE:return hS(e,t);case e.TEXT_NODE:return gS(e,t);case e.CDATA_SECTION_NODE:return bS()}}function dS(e,t){return{type:wn.Document,childNodes:Xc(e,t),adoptedStyleSheets:Oh(e.adoptedStyleSheets)}}function pS(e,t){const n=Xa(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:wn.DocumentFragment,childNodes:Xc(e,t),isShadowRoot:n,adoptedStyleSheets:n?Oh(e.adoptedStyleSheets):void 0}}function fS(e){return{type:wn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function hS(e,t){const n=kh(e.tagName),r=mS(e)||void 0,s=op(ap(e),t.parentNodePrivacyLevel);if(s===D.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:wn.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[Qa]:by},childNodes:[],isSVG:r}}if(s===D.IGNORE)return;const i=sS(e,s,t);let o=[];if(gy(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===s&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:s,ignoreWhiteSpace:n==="head"},o=Xc(e,a)}return{type:wn.Element,tagName:n,attributes:i,childNodes:o,isSVG:r}}function mS(e){return e.tagName==="svg"||e instanceof SVGElement}function gS(e,t){const n=lp(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:wn.Text,textContent:n}}function bS(){return{type:wn.CDATA,textContent:""}}function yS(e,t,n){return Jc(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function Mh(e){return!!e.changedTouches}function Wr(e){return e.composed===!0&&qs(e.target)?e.composedPath()[0]:e.target}const Dh=25;function wS(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>Dh||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>Dh}const vS=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)wS(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},Fh=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function pt(e,t){return{data:{source:e,...t},type:Ct.IncrementalSnapshot,timestamp:ye()}}const SS=50;function _S(e,t){const{throttled:n,cancel:r}=zt(i=>{const o=Wr(i);if(_t(o)){const a=Bh(i);if(!a)return;const c={id:je(o),timeOffset:0,x:a.x,y:a.y};t(pt(Mh(i)?ot.TouchMove:ot.MouseMove,{positions:[c]}))}},SS,{trailing:!1}),{stop:s}=Ve(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{s(),r()}}}function Bh(e){let{clientX:t,clientY:n}=Mh(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:s}=vS(t,n);t=r,n=s}if(!Number.isFinite(t)||!Number.isFinite(n)){e.isTrusted&&Rt("mouse/touch event without x/y");return}return{x:t,y:n}}const Uh={pointerup:dt.MouseUp,mousedown:dt.MouseDown,click:dt.Click,contextmenu:dt.ContextMenu,dblclick:dt.DblClick,focus:dt.Focus,blur:dt.Blur,touchstart:dt.TouchStart,touchend:dt.TouchEnd};function CS(e,t,n){const r=s=>{const i=Wr(s);if(wt(i,e.defaultPrivacyLevel)===D.HIDDEN||!_t(i))return;const o=je(i),a=Uh[s.type];let c;if(a!==dt.Blur&&a!==dt.Focus){const u=Bh(s);if(!u)return;c={id:o,type:a,x:u.x,y:u.y}}else c={id:o,type:a};const l={id:n.getIdForEvent(s),...pt(ot.MouseInteraction,c)};t(l)};return Ve(e,document,Object.keys(Uh),r,{capture:!0,passive:!0})}const ES=100;function $h(e,t,n,r=document){const{throttled:s,cancel:i}=zt(a=>{const c=Wr(a);if(!c||wt(c,e.defaultPrivacyLevel)===D.HIDDEN||!_t(c))return;const l=je(c),u=c===document?{scrollTop:rc(),scrollLeft:$p()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,u),t(pt(ot.Scroll,{id:l,x:u.scrollLeft,y:u.scrollTop}))},ES),{stop:o}=oe(e,r,"scroll",s,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}const xS=200;function IS(e,t){const n=Vp(e).subscribe(r=>{t(pt(ot.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function TS(e,t){const n=window.visualViewport;if(!n)return{stop:q};const{throttled:r,cancel:s}=zt(()=>{t({data:Fh(n),type:Ct.VisualViewport,timestamp:ye()})},xS,{trailing:!1}),{stop:i}=Ve(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{i(),s()}}}function AS(e,t){return Ve(e,document,["play","pause"],n=>{const r=Wr(n);!r||wt(r,e.defaultPrivacyLevel)===D.HIDDEN||!_t(r)||t(pt(ot.MediaInteraction,{id:je(r),type:n.type==="play"?Ph.Play:Ph.Pause}))},{capture:!0,passive:!0})}function kS(e){function t(s,i){s&&_t(s.ownerNode)&&i(je(s.ownerNode))}const n=[$e(CSSStyleSheet.prototype,"insertRule",({target:s,parameters:[i,o]})=>{t(s,a=>e(pt(ot.StyleSheetRule,{id:a,adds:[{rule:i,index:o}]})))}),$e(CSSStyleSheet.prototype,"deleteRule",({target:s,parameters:[i]})=>{t(s,o=>e(pt(ot.StyleSheetRule,{id:o,removes:[{index:i}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(s){n.push($e(s.prototype,"insertRule",({target:i,parameters:[o,a]})=>{t(i.parentStyleSheet,c=>{const l=Vh(i);l&&(l.push(a||0),e(pt(ot.StyleSheetRule,{id:c,adds:[{rule:o,index:l}]})))})}),$e(s.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i.parentStyleSheet,a=>{const c=Vh(i);c&&(c.push(o),e(pt(ot.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(s=>s.stop())}}}function Vh(e){const t=[];let n=e;for(;n.parentRule;){const o=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(o),n=n.parentRule}if(!n.parentStyleSheet)return;const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(s),t}function RS(e,t){return Ve(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:Ct.Focus,timestamp:ye()})})}function PS(e,t,n){const r=e.subscribe(12,s=>{var i,o;s.rawRumEvent.type==="action"&&s.rawRumEvent.action.type==="click"&&(!((o=(i=s.rawRumEvent.action.frustration)===null||i===void 0?void 0:i.type)===null||o===void 0)&&o.length)&&"events"in s.domainContext&&s.domainContext.events&&s.domainContext.events.length&&t({timestamp:s.rawRumEvent.date,type:Ct.FrustrationRecord,data:{frustrationTypes:s.rawRumEvent.action.frustration.type,recordIds:s.domainContext.events.map(a=>n.getIdForEvent(a))}})});return{stop:()=>{r.unsubscribe()}}}function OS(e,t){const n=e.subscribe(5,()=>{t({timestamp:ye(),type:Ct.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function zh(e,t,n=document){const r=e.defaultPrivacyLevel,s=new WeakMap,i=n!==document,{stop:o}=Ve(e,n,i?["change"]:["input","change"],u=>{const d=Wr(u);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(i)a=q;else{const u=[Rr(HTMLInputElement.prototype,"value",c),Rr(HTMLInputElement.prototype,"checked",c),Rr(HTMLSelectElement.prototype,"value",c),Rr(HTMLTextAreaElement.prototype,"value",c),Rr(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{u.forEach(d=>d.stop())}}return{stop:()=>{a(),o()}};function c(u){const d=wt(u,r);if(d===D.HIDDEN)return;const p=u.type;let h;if(p==="radio"||p==="checkbox"){if(Ks(u,d))return;h={isChecked:u.checked}}else{const m=Yc(u,d);if(m===void 0)return;h={text:m}}l(u,h);const f=u.name;p==="radio"&&f&&u.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(f)}"]`).forEach(m=>{m!==u&&l(m,{isChecked:!1})})}function l(u,d){if(!_t(u))return;const p=s.get(u);(!p||p.text!==d.text||p.isChecked!==d.isChecked)&&(s.set(u,d),t(pt(ot.Input,{id:je(u),...d})))}}const LS=100,NS=16;function MS(e){let t=q,n=[];function r(){t(),e(n),n=[]}const{throttled:s,cancel:i}=zt(r,NS,{leading:!1});return{addMutations:o=>{n.length===0&&(t=Td(s,{timeout:LS})),n.push(...o)},flush:r,stop:()=>{t(),i()}}}function Hh(e,t,n,r){const s=Vd();if(!s)return{stop:q,flush:q};const i=MS(a=>{DS(a.concat(o.takeRecords()),e,t,n)}),o=new s($(i.addMutations));return o.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),i.stop()},flush:()=>{i.flush()}}}function DS(e,t,n,r){const s=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(p=>{jh(p,r.removeShadowRoot)})});const i=e.filter(d=>d.target.isConnected&&Zv(d.target)&&wt(d.target,n.defaultPrivacyLevel,s)!==D.HIDDEN),{adds:o,removes:a,hasBeenSerialized:c}=FS(i.filter(d=>d.type==="childList"),n,r,s),l=BS(i.filter(d=>d.type==="characterData"&&!c(d.target)),n,s),u=US(i.filter(d=>d.type==="attributes"&&!c(d.target)),n,s);!l.length&&!u.length&&!a.length&&!o.length||t(pt(ot.Mutation,{adds:o,removes:a,texts:l,attributes:u}))}function FS(e,t,n,r){const s=new Set,i=new Map;for(const p of e)p.addedNodes.forEach(h=>{s.add(h)}),p.removedNodes.forEach(h=>{s.has(h)||i.set(h,p.target),s.delete(h)});const o=Array.from(s);$S(o);const a=new Set,c=[];for(const p of o){if(u(p))continue;const h=wt(p.parentNode,t.defaultPrivacyLevel,r);if(h===D.HIDDEN||h===D.IGNORE)continue;const f=Jc(p,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!f)continue;const m=Gs(p);c.push({nextId:d(p),parentId:je(m),node:f})}const l=[];return i.forEach((p,h)=>{_t(h)&&l.push({parentId:je(p),id:je(h)})}),{adds:c,removes:l,hasBeenSerialized:u};function u(p){return _t(p)&&a.has(je(p))}function d(p){let h=p.nextSibling;for(;h;){if(_t(h))return je(h);h=h.nextSibling}return null}}function BS(e,t,n){var r;const s=[],i=new Set,o=e.filter(a=>i.has(a.target)?!1:(i.add(a.target),!0));for(const a of o){if(a.target.textContent===a.oldValue)continue;const l=wt(Gs(a.target),t.defaultPrivacyLevel,n);l===D.HIDDEN||l===D.IGNORE||s.push({id:je(a.target),value:(r=lp(a.target,!1,l))!==null&&r!==void 0?r:null})}return s}function US(e,t,n){const r=[],s=new Map,i=e.filter(a=>{const c=s.get(a.target);return c&&c.has(a.attributeName)?!1:(c?c.add(a.attributeName):s.set(a.target,new Set([a.attributeName])),!0)}),o=new Map;for(const a of i){if(a.target.getAttribute(a.attributeName)===a.oldValue)continue;const l=wt(a.target,t.defaultPrivacyLevel,n),u=Lh(a.target,l,a.attributeName,t);let d;if(a.attributeName==="value"){const h=Yc(a.target,l);if(h===void 0)continue;d=h}else typeof u=="string"?d=u:d=null;let p=o.get(a.target);p||(p={id:je(a.target),attributes:{}},r.push(p),o.set(a.target,p)),p.attributes[a.attributeName]=d}return r}function $S(e){e.sort((t,n)=>{const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_CONTAINS||r&Node.DOCUMENT_POSITION_FOLLOWING?1:r&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function jh(e,t){qs(e)&&t(e.shadowRoot),sp(e,n=>jh(n,t))}function VS(){const e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}const zS=(e,t,n)=>{const r=new Map,s={addShadowRoot:i=>{if(r.has(i))return;const o=Hh(t,e,s,i),a=zh(e,t,i),c=$h(e,t,n,i);r.set(i,{flush:()=>o.flush(),stop:()=>{o.stop(),a.stop(),c.stop()}})},removeShadowRoot:i=>{const o=r.get(i);o&&(o.stop(),r.delete(i))},stop:()=>{r.forEach(({stop:i})=>i())},flush:()=>{r.forEach(({flush:i})=>i())}};return s};function HS(e,t,n,r,s,i){const o=(c=ye(),l={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:u,height:d}=Qs(),p=[{data:{height:d,href:window.location.href,width:u},type:Ct.Meta,timestamp:c},{data:{has_focus:document.hasFocus()},type:Ct.Focus,timestamp:c},{data:{node:yS(document,r,l),initialOffset:{left:$p(),top:rc()}},type:Ct.FullSnapshot,timestamp:c}];return window.visualViewport&&p.push({data:Fh(window.visualViewport),type:Ct.VisualViewport,timestamp:c}),p};i(o());const{unsubscribe:a}=n.subscribe(2,c=>{s(),i(o(c.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))});return{stop:a}}function jS(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function WS(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const s=p=>{t(p),Ma("record",{record:p});const h=e.viewHistory.findView();Q5(h.id)},i=VS(),o=zS(n,s,i),{stop:a}=HS(i,o,r,n,c,p=>p.forEach(h=>s(h)));function c(){o.flush(),u.flush()}const l=jS(),u=Hh(s,n,o,document),d=[u,_S(n,s),CS(n,s,l),$h(n,s,i,document),IS(n,s),zh(n,s),AS(n,s),kS(s),RS(n,s),TS(n,s),PS(r,s,l),OS(r,p=>{c(),s(p)})];return{stop:()=>{o.stop(),d.forEach(p=>p.stop()),a()},flushMutations:c,shadowRootsController:o}}function qS(e,t,n){const r=new FormData;r.append("segment",new Blob([e],{type:"application/octet-stream"}),`${t.session.id}-${t.start}`);const s={raw_segment_size:n,compressed_segment_size:e.byteLength,...t},i=JSON.stringify(s);return r.append("event",new Blob([i],{type:"application/json"})),{data:r,bytesCount:e.byteLength}}function GS({context:e,creationReason:t,encoder:n}){let r=0;const s=e.view.id,i={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:J5(s),source:"browser",...e};X5(s);function o(c,l){i.start=Math.min(i.start,c.timestamp),i.end=Math.max(i.end,c.timestamp),i.records_count+=1,i.has_full_snapshot||(i.has_full_snapshot=c.type===Ct.FullSnapshot);const u=n.isEmpty?'{"records":[':",";n.write(u+JSON.stringify(c),d=>{r+=d,l(r)})}function a(c){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(i).slice(1)}
|
|
879
|
-
`),n.finish(
|
|
916
|
+
`;class eR extends we{constructor(n){super({tag:"div",styles:i=>Qk(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="AP",Ut.registerComponent(this),fn.astroPayPaymentImpression("AstroPayPayment"),this.loadingWrapper=document.createElement("div"),this.loadingWrapper.classList.add("loading-wrapper");const r=new an({size:100,variant:"fetching",color:j.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),We.trackEvent("ap_cl_astropay_payment_init"),this.createPayment()}async createPayment(){var n,r;try{const{amount:i,currency:o,country:s,user:a,order:c}=this.componentProps,u={country:s,currency:o,amount:i,user:a,order:c,methodCode:this.methodCode},l=await Ge.postCreatePayment(u,"astropay_payment");this.renderAstroPayMethod(l)}catch(i){const o=i;(r=(n=this.componentProps)==null?void 0:n.onError)==null||r.call(n);const s=new X({text:o.message,size:j.getFontScale().xSmall,color:j.getStyles().messages.error.textColor}).element;this.element.appendChild(s)}finally{this.loadingWrapper.remove()}}renderAstroPayMethod(n){const{paymentExternalId:r,user:i,countries:o,benefits:s,metadata:a}=n;this.element.innerHTML="";const c={amount:this.componentProps.amount,currency:this.componentProps.currency},u=new S1({paymentExternalId:r,user:i,countries:o,benefits:s,paymentAmount:c,actionLabel:a==null?void 0:a.actionLabel,onSuccess:l=>this.showSuccessContent(l)}).element;this.element.append(u)}showSuccessContent(n){this.element.innerHTML="";const r=document.createElement("div");if(r.classList.add("payment-success-content"),n.forEach(i=>r.append(i)),this.element.append(r),We.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new la({onSuccess:this.componentProps.onSuccess}).element;this.element.append(i)}}render(n){if(!n)throw new Error("Container element not found");n.appendChild(this.element)}destroy(){this.element.remove(),Ut.unregisterComponent(this)}}H1();const Ed=new WeakMap;function nn(e){return Ed.has(e)}function tR(e){let t=e;for(;t;){if(!nn(t)&&!Tl(t))return!1;t=Ps(t)}return!0}function gt(e){return Ed.get(e)}function nR(e,t){Ed.set(e,t)}function Sd(e,t){const n=e.tagName,r=e.value;if(Os(e,t)){const i=e.type;return n==="INPUT"&&(i==="button"||i==="submit"||i==="reset")?r:!r||n==="OPTION"?void 0:Ln}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const rR=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,iR=/^[A-Za-z]+:|^\/\//,oR=/^data:.*,/i;function sR(e,t){return e.replace(rR,(n,r,i,o,s,a)=>{const c=i||s||a;if(!t||!c||iR.test(c)||oR.test(c))return n;const u=r||o||"";return`url(${u}${aR(c,t)}${u})`})}function aR(e,t){try{return Es(e,t).href}catch{return e}}const cR=/[^a-z1-6-_]/;function _1(e){const t=e.toLowerCase().trim();return cR.test(t)?"div":t}function C1(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}const rn={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},ir={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Nt={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Vt={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},T1={Play:0,Pause:1};function I1(e){if(!(e===void 0||e.length===0))return e.map(t=>{const n=t.cssRules||t.rules;return{cssRules:Array.from(n,o=>o.cssText),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}})}function x1(e,t,n,r){if(t===H.HIDDEN)return null;const i=e.getAttribute(n);if(t===H.MASK&&n!==Il&&!lv.includes(n)&&n!==r.actionNameAttribute){const o=e.tagName;switch(n){case"title":case"alt":case"placeholder":return Ln}if(o==="IMG"&&(n==="src"||n==="srcset")){const s=e;if(s.naturalWidth>0)return C1(s.naturalWidth,s.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?C1(a,c):ev}if(o==="SOURCE"&&(n==="src"||n==="srcset"))return ev;if(o==="A"&&n==="href"||i&&n.startsWith("data-")||o==="IFRAME"&&n==="srcdoc")return Ln}return!i||typeof i!="string"?i:qm(i)?Wm(i):i}function uR(e,t,n){if(t===H.HIDDEN)return{};const r={},i=_1(e.tagName),o=e.ownerDocument;for(let l=0;l<e.attributes.length;l+=1){const f=e.attributes.item(l).name,h=x1(e,t,f,n.configuration);h!==null&&(r[f]=h)}if(e.value&&(i==="textarea"||i==="select"||i==="option"||i==="input")){const l=Sd(e,t);l!==void 0&&(r.value=l)}if(i==="option"&&t===H.ALLOW){const l=e;l.selected&&(r.selected=l.selected)}if(i==="link"){const l=Array.from(o.styleSheets).find(f=>f.href===e.href),d=_d(l);d&&l&&(r._cssText=d)}if(i==="style"&&e.sheet){const l=_d(e.sheet);l&&(r._cssText=l)}const s=e;if(i==="input"&&(s.type==="radio"||s.type==="checkbox")&&(t===H.ALLOW?r.checked=!!s.checked:Os(s,t)&&delete r.checked),i==="audio"||i==="video"){const l=e;r.rr_mediaState=l.paused?"paused":"played"}let a,c;const u=n.serializationContext;switch(u.status){case 0:a=Math.round(e.scrollTop),c=Math.round(e.scrollLeft),(a||c)&&u.elementsScrollPositions.set(e,{scrollTop:a,scrollLeft:c});break;case 1:u.elementsScrollPositions.has(e)&&({scrollTop:a,scrollLeft:c}=u.elementsScrollPositions.get(e));break}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}function _d(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,kC()?lR:A1).join("");return sR(n,e.href)}function lR(e){if(fR(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return A1(e)}function A1(e){return dR(e)&&_d(e.styleSheet)||e.cssText}function dR(e){return"styleSheet"in e}function fR(e){return"selectorText"in e}function Cd(e,t){const n=gR(e,t);if(!n)return null;const r=gt(e)||hR(),i=n;return i.id=r,nR(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}let pR=1;function hR(){return pR++}function Td(e,t){const n=[];return Qm(e,r=>{const i=Cd(r,t);i&&n.push(i)}),n}function gR(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return mR(e,t);case e.DOCUMENT_FRAGMENT_NODE:return vR(e,t);case e.DOCUMENT_TYPE_NODE:return yR(e);case e.ELEMENT_NODE:return bR(e,t);case e.TEXT_NODE:return ER(e,t);case e.CDATA_SECTION_NODE:return SR()}}function mR(e,t){return{type:ir.Document,childNodes:Td(e,t),adoptedStyleSheets:I1(e.adoptedStyleSheets)}}function vR(e,t){const n=Tl(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:ir.DocumentFragment,childNodes:Td(e,t),isShadowRoot:n,adoptedStyleSheets:n?I1(e.adoptedStyleSheets):void 0}}function yR(e){return{type:ir.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function bR(e,t){const n=_1(e.tagName),r=wR(e)||void 0,i=tv(nv(e),t.parentNodePrivacyLevel);if(i===H.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:ir.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[Il]:v5},childNodes:[],isSVG:r}}if(i===H.IGNORE)return;const o=uR(e,i,t);let s=[];if(m5(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===i&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:i,ignoreWhiteSpace:n==="head"},s=Td(e,a)}return{type:ir.Element,tagName:n,attributes:o,childNodes:s,isSVG:r}}function wR(e){return e.tagName==="svg"||e instanceof SVGElement}function ER(e,t){const n=iv(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:ir.Text,textContent:n}}function SR(){return{type:ir.CDATA,textContent:""}}function _R(e,t,n){return Cd(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function k1(e){return!!e.changedTouches}function ro(e){return e.composed===!0&&Rs(e.target)?e.composedPath()[0]:e.target}const R1=25;function CR(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>R1||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>R1}const TR=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)CR(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},P1=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function zt(e,t){return{data:{source:e,...t},type:rn.IncrementalSnapshot,timestamp:Ue()}}const IR=50;function xR(e,t){const{throttled:n,cancel:r}=kn(o=>{const s=ro(o);if(nn(s)){const a=O1(o);if(!a)return;const c={id:gt(s),timeOffset:0,x:a.x,y:a.y};t(zt(k1(o)?Nt.TouchMove:Nt.MouseMove,{positions:[c]}))}},IR,{trailing:!1}),{stop:i}=ft(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function O1(e){let{clientX:t,clientY:n}=k1(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:i}=TR(t,n);t=r,n=i}if(!Number.isFinite(t)||!Number.isFinite(n)){e.isTrusted&&dn("mouse/touch event without x/y");return}return{x:t,y:n}}const L1={pointerup:Vt.MouseUp,mousedown:Vt.MouseDown,click:Vt.Click,contextmenu:Vt.ContextMenu,dblclick:Vt.DblClick,focus:Vt.Focus,blur:Vt.Blur,touchstart:Vt.TouchStart,touchend:Vt.TouchEnd};function AR(e,t,n){const r=i=>{const o=ro(i);if(Qt(o,e.defaultPrivacyLevel)===H.HIDDEN||!nn(o))return;const s=gt(o),a=L1[i.type];let c;if(a!==Vt.Blur&&a!==Vt.Focus){const l=O1(i);if(!l)return;c={id:s,type:a,x:l.x,y:l.y}}else c={id:s,type:a};const u={id:n.getIdForEvent(i),...zt(Nt.MouseInteraction,c)};t(u)};return ft(e,document,Object.keys(L1),r,{capture:!0,passive:!0})}const kR=100;function N1(e,t,n,r=document){const{throttled:i,cancel:o}=kn(a=>{const c=ro(a);if(!c||Qt(c,e.defaultPrivacyLevel)===H.HIDDEN||!nn(c))return;const u=gt(c),l=c===document?{scrollTop:Rl(),scrollLeft:Mv()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,l),t(zt(Nt.Scroll,{id:u,x:l.scrollLeft,y:l.scrollTop}))},kR),{stop:s}=_e(e,r,"scroll",i,{capture:!0,passive:!0});return{stop:()=>{s(),o()}}}const RR=200;function PR(e,t){const n=Dv(e).subscribe(r=>{t(zt(Nt.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function OR(e,t){const n=window.visualViewport;if(!n)return{stop:ce};const{throttled:r,cancel:i}=kn(()=>{t({data:P1(n),type:rn.VisualViewport,timestamp:Ue()})},RR,{trailing:!1}),{stop:o}=ft(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}function LR(e,t){return ft(e,document,["play","pause"],n=>{const r=ro(n);!r||Qt(r,e.defaultPrivacyLevel)===H.HIDDEN||!nn(r)||t(zt(Nt.MediaInteraction,{id:gt(r),type:n.type==="play"?T1.Play:T1.Pause}))},{capture:!0,passive:!0})}function NR(e){function t(i,o){i&&nn(i.ownerNode)&&o(gt(i.ownerNode))}const n=[dt(CSSStyleSheet.prototype,"insertRule",({target:i,parameters:[o,s]})=>{t(i,a=>e(zt(Nt.StyleSheetRule,{id:a,adds:[{rule:o,index:s}]})))}),dt(CSSStyleSheet.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i,s=>e(zt(Nt.StyleSheetRule,{id:s,removes:[{index:o}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(i){n.push(dt(i.prototype,"insertRule",({target:o,parameters:[s,a]})=>{t(o.parentStyleSheet,c=>{const u=M1(o);u&&(u.push(a||0),e(zt(Nt.StyleSheetRule,{id:c,adds:[{rule:s,index:u}]})))})}),dt(i.prototype,"deleteRule",({target:o,parameters:[s]})=>{t(o.parentStyleSheet,a=>{const c=M1(o);c&&(c.push(s),e(zt(Nt.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(i=>i.stop())}}}function M1(e){const t=[];let n=e;for(;n.parentRule;){const s=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(s),n=n.parentRule}if(!n.parentStyleSheet)return;const i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(i),t}function MR(e,t){return ft(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:rn.Focus,timestamp:Ue()})})}function DR(e,t,n){const r=e.subscribe(12,i=>{var o,s;i.rawRumEvent.type==="action"&&i.rawRumEvent.action.type==="click"&&(!((s=(o=i.rawRumEvent.action.frustration)===null||o===void 0?void 0:o.type)===null||s===void 0)&&s.length)&&"events"in i.domainContext&&i.domainContext.events&&i.domainContext.events.length&&t({timestamp:i.rawRumEvent.date,type:rn.FrustrationRecord,data:{frustrationTypes:i.rawRumEvent.action.frustration.type,recordIds:i.domainContext.events.map(a=>n.getIdForEvent(a))}})});return{stop:()=>{r.unsubscribe()}}}function FR(e,t){const n=e.subscribe(5,()=>{t({timestamp:Ue(),type:rn.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function D1(e,t,n=document){const r=e.defaultPrivacyLevel,i=new WeakMap,o=n!==document,{stop:s}=ft(e,n,o?["change"]:["input","change"],l=>{const d=ro(l);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(o)a=ce;else{const l=[zi(HTMLInputElement.prototype,"value",c),zi(HTMLInputElement.prototype,"checked",c),zi(HTMLSelectElement.prototype,"value",c),zi(HTMLTextAreaElement.prototype,"value",c),zi(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{l.forEach(d=>d.stop())}}return{stop:()=>{a(),s()}};function c(l){const d=Qt(l,r);if(d===H.HIDDEN)return;const f=l.type;let h;if(f==="radio"||f==="checkbox"){if(Os(l,d))return;h={isChecked:l.checked}}else{const g=Sd(l,d);if(g===void 0)return;h={text:g}}u(l,h);const p=l.name;f==="radio"&&p&&l.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(p)}"]`).forEach(g=>{g!==l&&u(g,{isChecked:!1})})}function u(l,d){if(!nn(l))return;const f=i.get(l);(!f||f.text!==d.text||f.isChecked!==d.isChecked)&&(i.set(l,d),t(zt(Nt.Input,{id:gt(l),...d})))}}const UR=100,BR=16;function $R(e){let t=ce,n=[];function r(){t(),e(n),n=[]}const{throttled:i,cancel:o}=kn(r,BR,{leading:!1});return{addMutations:s=>{n.length===0&&(t=Sm(i,{timeout:UR})),n.push(...s)},flush:r,stop:()=>{t(),o()}}}function F1(e,t,n,r){const i=Dm();if(!i)return{stop:ce,flush:ce};const o=$R(a=>{VR(a.concat(s.takeRecords()),e,t,n)}),s=new i(Z(o.addMutations));return s.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{s.disconnect(),o.stop()},flush:()=>{o.flush()}}}function VR(e,t,n,r){const i=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(f=>{U1(f,r.removeShadowRoot)})});const o=e.filter(d=>d.target.isConnected&&tR(d.target)&&Qt(d.target,n.defaultPrivacyLevel,i)!==H.HIDDEN),{adds:s,removes:a,hasBeenSerialized:c}=zR(o.filter(d=>d.type==="childList"),n,r,i),u=HR(o.filter(d=>d.type==="characterData"&&!c(d.target)),n,i),l=jR(o.filter(d=>d.type==="attributes"&&!c(d.target)),n,i);!u.length&&!l.length&&!a.length&&!s.length||t(zt(Nt.Mutation,{adds:s,removes:a,texts:u,attributes:l}))}function zR(e,t,n,r){const i=new Set,o=new Map;for(const f of e)f.addedNodes.forEach(h=>{i.add(h)}),f.removedNodes.forEach(h=>{i.has(h)||o.set(h,f.target),i.delete(h)});const s=Array.from(i);qR(s);const a=new Set,c=[];for(const f of s){if(l(f))continue;const h=Qt(f.parentNode,t.defaultPrivacyLevel,r);if(h===H.HIDDEN||h===H.IGNORE)continue;const p=Cd(f,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!p)continue;const g=Ps(f);c.push({nextId:d(f),parentId:gt(g),node:p})}const u=[];return o.forEach((f,h)=>{nn(h)&&u.push({parentId:gt(f),id:gt(h)})}),{adds:c,removes:u,hasBeenSerialized:l};function l(f){return nn(f)&&a.has(gt(f))}function d(f){let h=f.nextSibling;for(;h;){if(nn(h))return gt(h);h=h.nextSibling}return null}}function HR(e,t,n){var r;const i=[],o=new Set,s=e.filter(a=>o.has(a.target)?!1:(o.add(a.target),!0));for(const a of s){if(a.target.textContent===a.oldValue)continue;const u=Qt(Ps(a.target),t.defaultPrivacyLevel,n);u===H.HIDDEN||u===H.IGNORE||i.push({id:gt(a.target),value:(r=iv(a.target,!1,u))!==null&&r!==void 0?r:null})}return i}function jR(e,t,n){const r=[],i=new Map,o=e.filter(a=>{const c=i.get(a.target);return c&&c.has(a.attributeName)?!1:(c?c.add(a.attributeName):i.set(a.target,new Set([a.attributeName])),!0)}),s=new Map;for(const a of o){if(a.target.getAttribute(a.attributeName)===a.oldValue)continue;const u=Qt(a.target,t.defaultPrivacyLevel,n),l=x1(a.target,u,a.attributeName,t);let d;if(a.attributeName==="value"){const h=Sd(a.target,u);if(h===void 0)continue;d=h}else typeof l=="string"?d=l:d=null;let f=s.get(a.target);f||(f={id:gt(a.target),attributes:{}},r.push(f),s.set(a.target,f)),f.attributes[a.attributeName]=d}return r}function qR(e){e.sort((t,n)=>{const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_CONTAINS||r&Node.DOCUMENT_POSITION_FOLLOWING?1:r&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function U1(e,t){Rs(e)&&t(e.shadowRoot),Qm(e,n=>U1(n,t))}function WR(){const e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}const GR=(e,t,n)=>{const r=new Map,i={addShadowRoot:o=>{if(r.has(o))return;const s=F1(t,e,i,o),a=D1(e,t,o),c=N1(e,t,n,o);r.set(o,{flush:()=>s.flush(),stop:()=>{s.stop(),a.stop(),c.stop()}})},removeShadowRoot:o=>{const s=r.get(o);s&&(s.stop(),r.delete(o))},stop:()=>{r.forEach(({stop:o})=>o())},flush:()=>{r.forEach(({flush:o})=>o())}};return i};function KR(e,t,n,r,i,o){const s=(c=Ue(),u={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:l,height:d}=Fs(),f=[{data:{height:d,href:window.location.href,width:l},type:rn.Meta,timestamp:c},{data:{has_focus:document.hasFocus()},type:rn.Focus,timestamp:c},{data:{node:_R(document,r,u),initialOffset:{left:Mv(),top:Rl()}},type:rn.FullSnapshot,timestamp:c}];return window.visualViewport&&f.push({data:P1(window.visualViewport),type:rn.VisualViewport,timestamp:c}),f};o(s());const{unsubscribe:a}=n.subscribe(2,c=>{i(),o(s(c.startClocks.timeStamp,{shadowRootsController:t,status:1,elementsScrollPositions:e}))});return{stop:a}}function YR(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function ZR(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const i=f=>{t(f),cl("record",{record:f});const h=e.viewHistory.findView();Qx(h.id)},o=WR(),s=GR(n,i,o),{stop:a}=KR(o,s,r,n,c,f=>f.forEach(h=>i(h)));function c(){s.flush(),l.flush()}const u=YR(),l=F1(i,n,s,document),d=[l,xR(n,i),AR(n,i,u),N1(n,i,o,document),PR(n,i),D1(n,i),LR(n,i),NR(i),MR(n,i),OR(n,i),DR(r,i,u),FR(r,f=>{c(),i(f)})];return{stop:()=>{s.stop(),d.forEach(f=>f.stop()),a()},flushMutations:c,shadowRootsController:s}}function JR(e,t,n){const r=new FormData;r.append("segment",new Blob([e],{type:"application/octet-stream"}),`${t.session.id}-${t.start}`);const i={raw_segment_size:n,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(i);return r.append("event",new Blob([o],{type:"application/json"})),{data:r,bytesCount:e.byteLength}}function XR({context:e,creationReason:t,encoder:n}){let r=0;const i=e.view.id,o={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:Jx(i),source:"browser",...e};Xx(i);function s(c,u){o.start=Math.min(o.start,c.timestamp),o.end=Math.max(o.end,c.timestamp),o.records_count+=1,o.has_full_snapshot||(o.has_full_snapshot=c.type===rn.FullSnapshot);const l=n.isEmpty?'{"records":[':",";n.write(l+JSON.stringify(c),d=>{r+=d,u(r)})}function a(c){if(n.isEmpty)throw new Error("Empty segment flushed");n.write(`],${JSON.stringify(o).slice(1)}
|
|
917
|
+
`),n.finish(u=>{eA(o.view.id,u.rawBytesCount),c(o,u)})}return{addRecord:s,flush:a}}const QR=5*et;let B1=6e4;function e8(e,t,n,r,i,o){return t8(e,()=>n8(t.applicationId,n,r),i,o)}function t8(e,t,n,r){let i={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:o}=e.subscribe(2,()=>{a("view_change")}),{unsubscribe:s}=e.subscribe(11,c=>{a(c.reason)});function a(c){i.status===1&&(i.segment.flush((u,l)=>{const d=JR(l.output,u,l.rawBytesCount);bm(c)?n.sendOnExit(d):n.send(d)}),lt(i.expirationTimeoutId)),c!=="stop"?i={status:0,nextSegmentCreationReason:c}:i={status:2}}return{addRecord:c=>{if(i.status!==2){if(i.status===0){const u=t();if(!u)return;i={status:1,segment:XR({encoder:r,context:u,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:Be(()=>{a("segment_duration_limit")},QR)}}i.segment.addRecord(c,u=>{u>B1&&a("segment_bytes_limit")})}},stop:()=>{a("stop"),o(),s()}}}function n8(e,t,n){const r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function r8(e){const t=Dr();return{addRecord:n=>{const r=e.findView();t.send("record",n,r.id)}}}function i8(e,t,n,r,i,o){const s=[],a=d=>{e.notify(14,{error:d}),dn("Error reported to customer",{"error.message":d.message})},c=o||mm(t.sessionReplayEndpointBuilder,B1,a);let u;if(Zn())({addRecord:u}=r8(r));else{const d=e8(e,t,n,r,c,i);u=d.addRecord,s.push(d.stop)}const{stop:l}=ZR({emit:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(l),{stop:()=>{s.forEach(d=>d())}}}const o8=Object.freeze(Object.defineProperty({__proto__:null,startRecording:i8},Symbol.toStringTag,{value:"Module"}));function s8(e){let t=0;for(const n of e)n.stackId!==void 0&&t++;return t}const io=new Map;let Zr=!1;function a8(){Zr=performance.now()}function c8(){Zr=!1,io.clear()}function u8(e,t){io.set(t,e)}function $1(e){if(!(Zr===!1||e.startTime<Zr))return io.get(e.startTime)}function l8(e){if(!(Zr===!1||e<Zr))for(const t of io.keys())t<e&&io.delete(t)}function d8({rawRumEvent:e,startTime:t}){if(e.type!=="long_task")return;const n=e.long_task.id;u8(n,t)}const f8=(e,t,n,r)=>{const i=p8(e,t,n,r),o=g8(e,i),s=t.build("fetch",o);return dn("Sending profile to public profiling intake",{profilingIntakeURL:s,applicationId:n,sessionId:r}),fetch(s,{body:o.data,method:"POST"})};function p8(e,t,n,r){const i=t.tags,o=m8(e,n,r),s=h8(i),a=new Date(e.timeOrigin+e.startTime),c=new Date(e.timeOrigin+e.endTime);return{...o,attachments:["wall-time.json"],start:a.toISOString(),end:c.toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:s.join(",")}}function h8(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function g8(e,t){const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=new FormData;return r.append("event",new Blob([JSON.stringify(t)],{type:"application/json"}),"event.json"),r.append("wall-time.json",n,"wall-time.json"),{data:r,bytesCount:0}}function m8(e,t,n){const r={application:{id:t}};n&&(r.session={id:n});const i=Array.from(new Set(e.views.map(s=>s.viewId)));i.length&&(r.view={id:i});const o=e.longTasks.map(s=>$1(s)).filter(s=>s!==void 0);return o.length&&(r.long_task={id:o}),r}const v8={sendProfile:f8},V1={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function y8(e,t,n,r=V1){const i=Xn(pe.LONG_ANIMATION_FRAME);let o;const s=[];let a={state:"stopped"};function c(T){a.state!=="running"&&(o=T?{startTime:T.startClocks.relative,viewId:T.id,viewName:T.name}:void 0,s.push(_e(e,window,"visibilitychange",b).stop,_e(e,window,"beforeunload",w).stop),d())}async function u(){await h("stopped"),c8(),s.forEach(T=>T())}function l(T){if(T.state==="running")return{cleanupTasks:T.cleanupTasks,observer:T.observer};const I=[];let A;if(e.trackLongTasks){A=new PerformanceObserver(v),A.observe({entryTypes:[C()]});const D=t.subscribe(12,F=>{d8(F)});a8(),I.push(()=>A==null?void 0:A.disconnect()),I.push(D.unsubscribe)}const O=t.subscribe(2,D=>{p({viewId:D.id,viewName:D.name,startTime:D.startClocks.relative})});return I.push(O.unsubscribe),{cleanupTasks:I,observer:A}}function d(){const T=Jt().Profiler;if(!T)throw new Error("RUM Profiler is not supported in this browser.");f(a).catch(ln);const{cleanupTasks:I,observer:A}=l(a);let O;try{O=new T({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(D){ae.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",D);return}a={state:"running",startTime:performance.now(),profiler:O,timeoutId:Be(d,r.collectIntervalMs),longTasks:[],views:[],cleanupTasks:I,observer:A},p(o),O.addEventListener("samplebufferfull",m)}async function f(T){var I,A;if(T.state!=="running")return;y((A=(I=T.observer)===null||I===void 0?void 0:I.takeRecords())!==null&&A!==void 0?A:[]),lt(T.timeoutId),T.profiler.removeEventListener("samplebufferfull",m);const{startTime:O,longTasks:D,views:F}=T,V=performance.now();await T.profiler.stop().then(z=>{const be=performance.now(),oe=D.length>0,J=be-O<r.minProfileDurationMs,re=s8(z.samples)<r.minNumberOfSamples;!oe&&(J||re)||(g(Object.assign(z,{startTime:O,endTime:be,timeOrigin:performance.timeOrigin,longTasks:D,views:F,sampleInterval:r.sampleIntervalMs})),l8(V))}).catch(ln)}async function h(T){a.state==="running"&&(a.cleanupTasks.forEach(I=>I()),await f(a),a={state:T})}function p(T){a.state!=="running"||!T||a.views.push(T)}function g(T){var I;const A=(I=n.findTrackedSession())===null||I===void 0?void 0:I.id;v8.sendProfile(T,e.profilingEndpointBuilder,e.applicationId,A).catch(ln)}function m(){d()}function v(T){y(T.getEntries())}function y(T){if(a.state==="running")for(const I of T)I.duration<r.sampleIntervalMs||a.longTasks.push({id:$1(I),duration:I.duration,entryType:I.entryType,startTime:I.startTime})}function b(){document.visibilityState==="hidden"&&a.state==="running"?h("paused").catch(ln):document.visibilityState==="visible"&&a.state==="paused"&&d()}function w(){d()}function C(){return i?"long-animation-frame":"longtask"}function _(){return a.state==="stopped"}function E(){return a.state==="running"}function P(){return a.state==="paused"}return{start:c,stop:u,isStopped:_,isRunning:E,isPaused:P}}const b8=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:V1,createRumProfiler:y8},Symbol.toStringTag,{value:"Module"}));Ke.AstroPayCardPayment=tk,Ke.AstroPayCore=Ut,Ke.AstroPayFullCheckout=Xk,Ke.AstroPayPayment=eR,Ke.Core=Ut,Object.defineProperty(Ke,Symbol.toStringTag,{value:"Module"})}));
|