@astropay/payments-lib 2.0.1 → 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.
@@ -1,10 +1,10 @@
1
- (function(Ge,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(Ge=typeof globalThis<"u"?globalThis:Ge||self,A(Ge.AstroPay={}))})(this,(function(Ge){"use strict";var g8=Object.defineProperty;var m8=(Ge,A,on)=>A in Ge?g8(Ge,A,{enumerable:!0,configurable:!0,writable:!0,value:on}):Ge[A]=on;var S=(Ge,A,on)=>m8(Ge,typeof A!="symbol"?A+"":A,on);const A={transparent:"transparent",surface_dark:"#041311",surface_light:"#FFFFFF",neutral_lightest:"#FFFFFF",neutral_light:"#F3F6F6",neutral_lighter:"#E2E9E8",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"},on={poppins:"Poppins"},V1=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)}},z1={backgroundColor:A.surface_dark,fontFamily:on.poppins,textColor:A.neutral_light,primaryColor:A.primary_base,secondaryColor:A.primary_darkest,textPrimaryColor:A.neutral_lightest,textSecondaryColor:A.neutral_base,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:A.success_base,textSize:12},error:{textColor:A.error_lighter,textSize:12}},input:{normal:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_dark,borderColor:A.transparent,borderRadius:8,borderWidth:3},focus:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_darker,borderColor:A.primary_base,borderRadius:8,borderWidth:3},disabled:{textColor:A.neutral_darker,backgroundColor:A.neutral_dark,hintTextColor:A.neutral_darker,placeholderTextColor:A.neutral_base,borderColor:A.neutral_dark,borderRadius:8,borderWidth:3},error:{textColor:A.neutral_lightest,backgroundColor:A.neutral_darkest,hintTextColor:A.error_base,placeholderTextColor:A.neutral_darker,borderColor:A.error_base,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:A.neutral_lightest,backgroundColor:A.primary_base,borderColor:A.transparent,borderWidth:0},secondary:{textColor:A.primary_lightest,backgroundColor:A.primary_darkest,borderColor:A.transparent,borderWidth:0},text:{textColor:A.primary_base,backgroundColor:"unset",borderColor:A.primary_base,borderWidth:1},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,borderColor:A.transparent,borderWidth:0}},divider:{color:A.neutral_darker,variant:"dashed",size:1},card:{padding:12,backgroundColor:A.neutral_darkest,borderWidth:0,borderStyle:"none",borderColor:A.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:A.neutral_darkest,borderWidth:1,borderStyle:"solid",borderColor:A.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:A.neutral_light,backgroundColor:A.neutral_dark,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:A.primary_light,backgroundColor:A.primary_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:A.error_light,backgroundColor:A.error_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:A.success_light,backgroundColor:A.success_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:A.warning_light,backgroundColor:A.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:A.error_lightest,backgroundColor:A.warning_darkest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:on.poppins,apPrimaryColor:A.primary_base,apButtonPrimaryBgColor:A.primary_base,apButtonPrimaryTxtColor:A.neutral_darkest,apButtonSecondaryBgColor:A.primary_darkest,apButtonSecondaryTxtColor:A.primary_base,apButtonTextTxtColor:A.primary_base,apButtonDisableBgColor:A.neutral_base,apButtonDisableTextColor:A.neutral_dark},Id={backgroundColor:A.surface_light,fontFamily:on.poppins,textColor:A.neutral_darkest,primaryColor:A.primary_base,secondaryColor:A.primary_lightest,textPrimaryColor:A.neutral_darkest,textSecondaryColor:A.neutral_dark,width:"100%",paddingWrapper:"12px",borderRadiusWrapper:"4px",messages:{success:{textColor:A.success_darker,textSize:12},error:{textColor:A.error_dark,textSize:12}},input:{normal:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_dark,borderColor:A.transparent,borderRadius:8,borderWidth:3},focus:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_dark,borderColor:A.primary_darker,borderRadius:8,borderWidth:3},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,hintTextColor:A.neutral_dark,placeholderTextColor:A.neutral_darker,borderColor:A.neutral_base,borderRadius:8,borderWidth:3},error:{textColor:A.neutral_darkest,backgroundColor:A.neutral_lighter,hintTextColor:A.error_dark,placeholderTextColor:A.neutral_dark,borderColor:A.error_dark,borderRadius:8,borderWidth:3}},button:{small:{borderRadius:4},medium:{borderRadius:8},large:{borderRadius:8},primary:{textColor:A.neutral_darkest,backgroundColor:A.primary_base,borderColor:A.transparent,borderWidth:0},secondary:{textColor:A.primary_darker,backgroundColor:A.primary_lightest,borderColor:A.transparent,borderWidth:0},text:{textColor:A.primary_base,backgroundColor:"unset",borderColor:A.primary_base,borderWidth:1},disabled:{textColor:A.neutral_dark,backgroundColor:A.neutral_base,borderColor:A.transparent,borderWidth:0}},divider:{color:A.neutral_lighter,variant:"dashed",size:1},card:{padding:12,backgroundColor:A.neutral_light,borderWidth:0,borderStyle:"none",borderColor:A.transparent,borderRadius:16},qrCode:{padding:16,backgroundColor:A.neutral_lightest,borderWidth:1,borderStyle:"solid",borderColor:A.primary_base,borderRadius:16},badge:{default:{padding:"2px 6px",textColor:A.neutral_dark,backgroundColor:A.neutral_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},highlight:{padding:"2px 6px",textColor:A.primary_dark,backgroundColor:A.primary_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},error:{padding:"2px 6px",textColor:A.error_dark,backgroundColor:A.error_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},success:{padding:"2px 6px",textColor:A.success_dark,backgroundColor:A.success_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4},warning:{padding:"2px 6px",textColor:A.warning_darker,backgroundColor:A.warning_lightest,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:4}},timer:{padding:"4px 8px",textColor:A.error_dark,backgroundColor:A.warning_light,borderWidth:0,borderStyle:"none",borderColor:"unset",borderRadius:12},apFontFamily:on.poppins,apPrimaryColor:A.primary_base,apButtonPrimaryBgColor:A.primary_base,apButtonPrimaryTxtColor:A.neutral_darkest,apButtonSecondaryBgColor:A.primary_lightest,apButtonSecondaryTxtColor:A.primary_dark,apButtonTextTxtColor:A.primary_dark,apButtonDisableBgColor:A.neutral_base,apButtonDisableTextColor:A.neutral_dark},H1=["production","sandbox"],j1=["light","dark"],q1=["en","pt","es"],W1=["iso","symbol"],Js=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)}}),G1=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}
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=>e.toLowerCase().replace(/(?:^|[^a-zA-Z0-9]+)([a-zA-Z0-9])/g,(t,n,r)=>r===0?n.toLowerCase():n.toUpperCase()),Y1=e=>e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[^a-zA-Z0-9]+/g,"_").toLowerCase(),xd=e=>{const t=JSON.stringify(e);return btoa(t)},J1=(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},Z1=(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},X1=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3||8).toString(16)}),Q1=e=>e?e.startsWith("+")?e:`+${e}`:"",sr=Array.isArray,sn=e=>e!==null&&typeof e=="object"&&!sr(e),oo=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[K1(n)]:sn(r)?oo(r):sr(r)?r.map(i=>sn(i)?oo(i):i):r}),{}),ey=e=>{if(sr(e))return e.map(t=>sn(t)?oo(t):t);throw new Error("Input is not an array")},so=e=>Object.entries(e).reduce((t,[n,r])=>({...t,[Y1(n)]:sn(r)?so(r):sr(r)?r.map(i=>sn(i)?so(i):i):r}),{}),ty=e=>{if(sr(e))return e.map(t=>sn(t)?so(t):t);throw new Error("Input is not an array")},Zs=(e,t)=>sr(e)?t==="snake_case-to-camelCase"?ey(e):ty(e):sn(e)?t==="snake_case-to-camelCase"?oo(e):so(e):e,Ad=(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]=Ad(o,i):i!==void 0&&(n[r]=i)}return n},ny={light:Id,dark:z1},Nn=class Nn{static init(t){const n=io(t==null?void 0:t.theme,j1,"light");Nn.currentTheme=n,Nn.styles=Ad(ny[n],t==null?void 0:t.styles)}static getStyles(){return Nn.styles}static getTheme(){return Nn.currentTheme}};S(Nn,"currentTheme","light"),S(Nn,"styles",Id);let Z=Nn;class be{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=Z.getStyles(),o=r(i);this.element.className=o}}addStyleClass(t){this.element.classList.add(t)}render(t){t instanceof be?t.element.appendChild(this.element):t.appendChild(this.element)}destroy(){this.element.parentElement&&this.element.parentElement.removeChild(this.element)}}function ry(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 iy(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 oy=(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(iy(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ry(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})(),Ke="-ms-",ao="-moz-",ue="-webkit-",kd="comm",Xs="rule",Qs="decl",sy="@import",Rd="@keyframes",ay="@layer",cy=Math.abs,co=String.fromCharCode,uy=Object.assign;function ly(e,t){return Ve(e,0)^45?(((t<<2^Ve(e,0))<<2^Ve(e,1))<<2^Ve(e,2))<<2^Ve(e,3):0}function Pd(e){return e.trim()}function dy(e,t){return(e=t.exec(e))?e[0]:e}function le(e,t,n){return e.replace(t,n)}function ea(e,t){return e.indexOf(t)}function Ve(e,t){return e.charCodeAt(t)|0}function Zr(e,t,n){return e.slice(t,n)}function zt(e){return e.length}function ta(e){return e.length}function uo(e,t){return t.push(e),e}function fy(e,t){return e.map(t).join("")}var lo=1,ar=1,Od=0,st=0,Le=0,cr="";function fo(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:lo,column:ar,length:s,return:""}}function Xr(e,t){return uy(fo("",null,null,"",null,null,0),e,{length:-e.length},t)}function py(){return Le}function hy(){return Le=st>0?Ve(cr,--st):0,ar--,Le===10&&(ar=1,lo--),Le}function gt(){return Le=st<Od?Ve(cr,st++):0,ar++,Le===10&&(ar=1,lo++),Le}function Ht(){return Ve(cr,st)}function po(){return st}function Qr(e,t){return Zr(cr,e,t)}function ei(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 Ld(e){return lo=ar=1,Od=zt(cr=e),st=0,[]}function Nd(e){return cr="",e}function ho(e){return Pd(Qr(st-1,na(e===91?e+2:e===40?e+1:e)))}function gy(e){for(;(Le=Ht())&&Le<33;)gt();return ei(e)>2||ei(Le)>3?"":" "}function my(e,t){for(;--t&&gt()&&!(Le<48||Le>102||Le>57&&Le<65||Le>70&&Le<97););return Qr(e,po()+(t<6&&Ht()==32&&gt()==32))}function na(e){for(;gt();)switch(Le){case e:return st;case 34:case 39:e!==34&&e!==39&&na(Le);break;case 40:e===41&&na(e);break;case 92:gt();break}return st}function vy(e,t){for(;gt()&&e+Le!==57;)if(e+Le===84&&Ht()===47)break;return"/*"+Qr(t,st-1)+"*"+co(e===47?e:gt())}function yy(e){for(;!ei(Ht());)gt();return Qr(e,st)}function by(e){return Nd(go("",null,null,null,[""],e=Ld(e),0,[0],e))}function go(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=gt()){case 40:if(p!=108&&Ve(E,d-1)==58){ea(E+=le(ho(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:E+=ho(y);break;case 9:case 10:case 13:case 32:E+=gy(p);break;case 92:E+=my(po()-1,7);continue;case 47:switch(Ht()){case 42:case 47:uo(wy(vy(gt(),po()),t,n),c);break;default:E+="/"}break;case 123*g:a[u++]=zt(E)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+l:v==-1&&(E=le(E,/\f/g,"")),h>0&&zt(E)-d&&uo(h>32?Dd(E+";",r,n,d-1):Dd(le(E," ","")+";",r,n,d-2),c);break;case 59:E+=";";default:if(uo(_=Md(E,t,n,u,l,i,a,b,w=[],C=[],d),o),y===123)if(l===0)go(E,t,_,_,w,o,d,a,C);else switch(f===99&&Ve(E,3)===110?100:f){case 100:case 108:case 109:case 115:go(e,_,_,r&&uo(Md(e,_,_,0,0,i,a,b,i,w=[],d),C),i,C,d,a,r?w:C);break;default:go(E,_,_,_,[""],C,0,a,C)}}u=l=h=0,g=v=1,b=E="",d=s;break;case 58:d=1+zt(E),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&hy()==125)continue}switch(E+=co(y),y*g){case 38:v=l>0?1:(E+="\f",-1);break;case 44:a[u++]=(zt(E)-1)*v,v=1;break;case 64:Ht()===45&&(E+=ho(gt())),f=Ht(),l=d=zt(b=E+=yy(po())),y++;break;case 45:p===45&&zt(E)==2&&(g=0)}}return o}function Md(e,t,n,r,i,o,s,a,c,u,l){for(var d=i-1,f=i===0?o:[""],h=ta(f),p=0,g=0,m=0;p<r;++p)for(var v=0,y=Zr(e,d+1,d=cy(g=s[p])),b=e;v<h;++v)(b=Pd(g>0?f[v]+" "+y:le(y,/&\f/g,f[v])))&&(c[m++]=b);return fo(e,t,n,i===0?Xs:a,c,u,l)}function wy(e,t,n){return fo(e,t,n,kd,co(py()),Zr(e,2,-2),0)}function Dd(e,t,n,r){return fo(e,t,n,Qs,Zr(e,0,r),Zr(e,r+1,-1),r)}function ur(e,t){for(var n="",r=ta(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Ey(e,t,n,r){switch(e.type){case ay:if(e.children.length)break;case sy:case Qs:return e.return=e.return||e.value;case kd:return"";case Rd:return e.return=e.value+"{"+ur(e.children,r)+"}";case Xs:e.value=e.props.join(",")}return zt(n=ur(e.children,r))?e.return=e.value+"{"+n+"}":""}function Sy(e){var t=ta(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 _y(e){return function(t){t.root||(t=t.return)&&e(t)}}function Cy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Ty=function(t,n,r){for(var i=0,o=0;i=o,o=Ht(),i===38&&o===12&&(n[r]=1),!ei(o);)gt();return Qr(t,st)},Iy=function(t,n){var r=-1,i=44;do switch(ei(i)){case 0:i===38&&Ht()===12&&(n[r]=1),t[r]+=Ty(st-1,n,r);break;case 2:t[r]+=ho(i);break;case 4:if(i===44){t[++r]=Ht()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=co(i)}while(i=gt());return t},xy=function(t,n){return Nd(Iy(Ld(t),n))},Fd=new WeakMap,Ay=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&&!Fd.get(r))&&!i){Fd.set(t,!0);for(var o=[],s=xy(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]}}},ky=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ud(e,t){switch(ly(e,t)){case 5103:return ue+"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 ue+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ue+e+ao+e+Ke+e+e;case 6828:case 4268:return ue+e+Ke+e+e;case 6165:return ue+e+Ke+"flex-"+e+e;case 5187:return ue+e+le(e,/(\w+).+(:[^]+)/,ue+"box-$1$2"+Ke+"flex-$1$2")+e;case 5443:return ue+e+Ke+"flex-item-"+le(e,/flex-|-self/,"")+e;case 4675:return ue+e+Ke+"flex-line-pack"+le(e,/align-content|flex-|-self/,"")+e;case 5548:return ue+e+Ke+le(e,"shrink","negative")+e;case 5292:return ue+e+Ke+le(e,"basis","preferred-size")+e;case 6060:return ue+"box-"+le(e,"-grow","")+ue+e+Ke+le(e,"grow","positive")+e;case 4554:return ue+le(e,/([^-])(transform)/g,"$1"+ue+"$2")+e;case 6187:return le(le(le(e,/(zoom-|grab)/,ue+"$1"),/(image-set)/,ue+"$1"),e,"")+e;case 5495:case 3959:return le(e,/(image-set\([^]*)/,ue+"$1$`$1");case 4968:return le(le(e,/(.+:)(flex-)?(.*)/,ue+"box-pack:$3"+Ke+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ue+e+e;case 4095:case 3583:case 4068:case 2532:return le(e,/(.+)-inline(.+)/,ue+"$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(zt(e)-1-t>6)switch(Ve(e,t+1)){case 109:if(Ve(e,t+4)!==45)break;case 102:return le(e,/(.+:)(.+)-([^]+)/,"$1"+ue+"$2-$3$1"+ao+(Ve(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ea(e,"stretch")?Ud(le(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ve(e,t+1)!==115)break;case 6444:switch(Ve(e,zt(e)-3-(~ea(e,"!important")&&10))){case 107:return le(e,":",":"+ue)+e;case 101:return le(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(Ve(e,14)===45?"inline-":"")+"box$3$1"+ue+"$2$3$1"+Ke+"$2box$3")+e}break;case 5936:switch(Ve(e,t+11)){case 114:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+Ke+le(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+Ke+e+e}return e}var Ry=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Qs:t.return=Ud(t.value,t.length);break;case Rd:return ur([Xr(t,{value:le(t.value,"@","@"+ue)})],i);case Xs:if(t.length)return fy(t.props,function(o){switch(dy(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ur([Xr(t,{props:[le(o,/:(read-\w+)/,":"+ao+"$1")]})],i);case"::placeholder":return ur([Xr(t,{props:[le(o,/:(plac\w+)/,":"+ue+"input-$1")]}),Xr(t,{props:[le(o,/:(plac\w+)/,":"+ao+"$1")]}),Xr(t,{props:[le(o,/:(plac\w+)/,Ke+"input-$1")]})],i)}return""})}},Py=[Ry],Oy=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||Py,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=[Ay,ky];{var l,d=[Ey,_y(function(g){l.insert(g)})],f=Sy(u.concat(i,d)),h=function(m){return ur(by(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 oy({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 Ly(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 Ny={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},My=/[A-Z]|^ms/g,Dy=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Bd=function(t){return t.charCodeAt(1)===45},$d=function(t){return t!=null&&typeof t!="boolean"},ra=Cy(function(e){return Bd(e)?e:e.replace(My,"-$&").toLowerCase()}),Vd=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Dy,function(r,i,o){return hn={name:i,styles:o,next:hn},i})}return Ny[t]!==1&&!Bd(t)&&typeof n=="number"&&n!==0?n+"px":n};function mo(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 hn={name:i.name,styles:i.styles,next:hn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)hn={name:s.name,styles:s.styles,next:hn},s=s.next;var a=o.styles+";";return a}return Fy(e,t,n)}}var c=n;if(t==null)return c;var u=t[c];return u!==void 0?u:c}function Fy(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=mo(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]+"}":$d(a)&&(r+=ra(o)+":"+Vd(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++)$d(s[c])&&(r+=ra(o)+":"+Vd(o,s[c])+";");else{var u=mo(e,t,s);switch(o){case"animation":case"animationName":{r+=ra(o)+":"+u+";";break}default:r+=o+"{"+u+"}"}}}return r}var zd=/label:\s*([^\s;{]+)\s*(;|$)/g,hn;function ia(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="";hn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=mo(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=mo(n,t,e[a]),r){var c=o;i+=c[a]}zd.lastIndex=0;for(var u="",l;(l=zd.exec(i))!==null;)u+="-"+l[1];var d=Ly(i)+u;return{name:d,styles:i,next:hn}}function Hd(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Uy=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},By=function(t,n,r){Uy(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 jd(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function qd(e,t,n){var r=[],i=Hd(e,r,n);return r.length<2?n:i+t(r)}var $y=function(t){var n=Oy(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=ia(u,n.registered,void 0);return By(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=ia(u,n.registered),f="animation-"+d.name;return jd(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=ia(u,n.registered);jd(n,d)},s=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];return qd(n.registered,r,Vy(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:Hd.bind(null,n.registered),merge:qd.bind(null,n.registered,r)}},Vy=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},oa=$y({key:"css"}),zy=oa.cx,ti=oa.keyframes,ne=oa.css;const Hy=ti`
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
- `,jy=ti`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
20
20
  100% {
21
21
  clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0);
22
22
  }
23
- `,qy=ti`
23
+ `,Ky=ni`
24
24
  100% {
25
25
  transform: rotate(1turn);
26
26
  }
27
- `,Wy=(e,t)=>ne`
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: ${Hy} 1s linear infinite;
32
+ animation: ${Wy} 1s linear infinite;
33
33
 
34
34
  &::before {
35
35
  content: '';
@@ -38,9 +38,9 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
38
38
  inset: 0px;
39
39
  border-radius: 50%;
40
40
  border: 2.5px solid ${t};
41
- animation: ${jy} 2s linear infinite;
41
+ animation: ${Gy} 2s linear infinite;
42
42
  }
43
- `,Gy=(e,t)=>ne`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=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: ${qy} 1s infinite linear;
52
- `;class an extends be{constructor({size:t=24,color:n="currentColor",variant:r="inline"}){super({tag:r==="inline"?"span":"div",styles:()=>r==="inline"?Wy(t,n):Gy(t,n)})}}const Ky=(e,t)=>ne`
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: ${t.size}px;
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 X extends be{constructor({text:t,variant:n="span",weight:r=500,size:i=12,lineHeight:o=18,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=>Ky(l,u)}),this.element.textContent=t}}const j=e=>typeof e=="string",ni=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Wd=e=>e==null?"":""+e,Yy=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},Jy=/###/g,Gd=e=>e&&e.indexOf("###")>-1?e.replace(Jy,"."):e,Kd=e=>!e||j(e),ri=(e,t,n)=>{const r=j(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Kd(e))return{};const o=Gd(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Kd(e)?{}:{obj:e,k:Gd(r[i])}},Yd=(e,t,n)=>{const{obj:r,k:i}=ri(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=ri(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=ri(e,s,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},Zy=(e,t,n,r)=>{const{obj:i,k:o}=ri(e,t,Object);i[o]=i[o]||[],i[o].push(n)},vo=(e,t)=>{const{obj:n,k:r}=ri(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Xy=(e,t,n)=>{const r=vo(e,n);return r!==void 0?r:vo(t,n)},Jd=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?j(e[r])||e[r]instanceof String||j(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Jd(e[r],t[r],n):e[r]=t[r]);return e},lr=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const eb=e=>j(e)?e.replace(/[&<>"'\/]/g,t=>Qy[t]):e;class tb{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 nb=[" ",",","?","!",";"],rb=new tb(20),ib=(e,t,n)=>{t=t||"",n=n||"";const r=nb.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=rb.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},sa=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},yo=e=>e==null?void 0:e.replace("_","-"),ob={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 sb=class Td{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||ob,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:(j(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Td(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Td(this.logger,t)}};var jt=new sb;class bo{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 Zd extends bo{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):j(r)&&o?a.push(...r.split(o)):a.push(r)));const c=vo(this.data,a);return!c&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),c||!s||!j(r)?c:sa((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),Yd(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)(j(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=vo(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Jd(c,r,o):c={...c,...r},Yd(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 Xd={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 Qd={},ef=e=>!j(e)&&typeof e!="boolean"&&typeof e!="number";class wo extends bo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Yy(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=jt.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&&!ib(t,r,i);if(s&&!a){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:j(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:j(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 k=n.nsSeparator||this.options.nsSeparator;return i?{res:`${c}${k}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${k}${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&&!j(n.count),b=wo.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=ef(P),I=Object.prototype.toString.apply(P);if(v&&P&&T&&g.indexOf(I)<0&&!(j(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 k=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=k,d.usedParams=this.getUsedParamsDetails(n),d):k}if(o){const k=Array.isArray(P),O=k?[]:{},D=k?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:ef(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&&j(m)&&Array.isArray(f))f=f.join(m),f&&(f=this.extendTranslation(f,t,n,r));else{let k=!1,O=!1;!this.isValidLookup(f)&&b&&(k=!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||k||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 ye=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ye&&ye[0])for(let J=0;J<ye.length;J++)z.push(ye[J]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(n.lng||this.language):z.push(n.lng||this.language);const oe=(J,re,W)=>{var te;const ce=b&&W!==f?W:F;this.options.missingKeyHandler?this.options.missingKeyHandler(J,c,re,ce,V,n):(te=this.backendConnector)!=null&&te.saveMissing&&this.backendConnector.saveMissing(J,c,re,ce,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(W=>{oe([J],s+W,n[`defaultValue${W}`]||E)})}):oe(z,s,E))}f=this.extendTranslation(f,t,n,d,r),O&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${c}:${s}`),(O||k)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${s}`:s,k?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=j(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&&!j(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=j(a)?[a]:a;return t!=null&&(c!=null&&c.length)&&r.applyPostProcessor!==!1&&(t=Xd.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 j(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&&!j(n.count),h=f&&!n.ordinal&&n.count===0,p=n.context!==void 0&&(j(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,!Qd[`${g[0]}-${m}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(Qd[`${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&&!j(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 tf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}getScriptPartFromCode(t){if(t=yo(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=yo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(j(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)),j(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 j(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))):j(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ab{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=jt.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=yo(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!"),rf;if(!t.match(/-|_/))return rf;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)=>nf[i]-nf[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 of=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=Xy(e,t,n);return!o&&i&&j(n)&&(o=sa(e,n,r),o===void 0&&(o=sa(t,n,r))),o},aa=e=>e.replace(/\$/g,"$$$$");class cb{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.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:eb,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?lr(o):s||"{{",this.suffix=a?lr(a):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?lr(f):h||lr("$t("),this.nestingSuffix=p?lr(p):g||lr(")"),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=of(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(of(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=>aa(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?aa(this.escape(p)):aa(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=j(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!j(s)&&!this.useRawValueToEscape&&(s=Wd(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&&!j(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&&!j(o))return o;j(o)||(o=Wd(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 ub=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}},dr=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(yo(r),i),t[s]=a),a(n)}};class lb{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("formatter"),this.options=t,this.formats={number:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:dr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:dr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:dr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:dr((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()]=dr(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}=ub(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 db=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class fb extends bo{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=jt.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=>{Zy(c.loaded,[o],s),db(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();j(t)&&(t=this.languageUtils.toResolveHierarchy(t)),j(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 sf=()=>({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]),j(e[1])&&(t.defaultValue=e[1]),j(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}}),af=e=>{var t,n;return j(e.ns)&&(e.ns=[e.ns]),j(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),j(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},Eo=()=>{},pb=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class ii extends bo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(t),this.services={},this.logger=jt,this.modules={external:[]},pb(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&&(j(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=sf();this.options={...i,...this.options,...af(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?jt.init(o(this.modules.logger),this.options):jt.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=lb;const d=new tf(this.options);this.store=new Zd(this.options.resources,this.options);const f=this.services;f.logger=jt,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new ab(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 cb(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fb(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 wo(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=Eo),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=ni(),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]:Eo;const i=j(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=ni();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=Eo),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"&&Xd.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=ni();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=j(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 j(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=ni();return this.options.ns?(j(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=ni();j(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 tf(sf());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 ii(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Eo;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new ii(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 Zd(a,i),o.services.resourceStore=o.store}return o.translator=new wo(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 De=ii.createInstance();De.createInstance=ii.createInstance,De.createInstance,De.dir,De.init,De.loadResources,De.reloadResources,De.use,De.changeLanguage,De.getFixedT,De.t,De.exists,De.setDefaultNamespace,De.hasLoadedNamespace,De.loadNamespaces,De.loadLanguages;const hb={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 q{static init(t){const n=io(t==null?void 0:t.language,q1,"en");return De.init({lng:n,fallbackLng:"en",resources:hb,interpolation:{escapeValue:!1}})}static getCurrent(){return De.language}static translate(t,n){return De.t(t,n??{})}}const gb=()=>ne`
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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};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 ca extends be{constructor({text:t,delay:n,onSuccess:r}){super({tag:"div",styles:()=>gb()});const i=new an({size:12,color:Z.getStyles().textPrimaryColor}).element,o=new X({text:t??q.translate("almost_done"),size:12}).element;this.element.append(i,o),setTimeout(()=>{r(),this.element.remove()},n??5e3)}}const mb={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>'}},vb={"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"},cf={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"},Ce={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},tt={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"},gn={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 vb[t]}static getBrowserTypeByAlias(t){return cf[t]||""}}const me=/version\/(\d+(\.?_?\d+)+)/i,yb=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=L.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(me,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(me,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=L.getFirstMatch(me,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(me,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(me,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(me,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(me,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(me,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=L.getFirstMatch(me,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(me,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(me,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=L.getFirstMatch(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,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(me,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=L.getFirstMatch(me,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=L.getFirstMatch(me,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)}}}],bb=[{test:[/Roku\/DVP/],describe(e){const t=L.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:tt.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=L.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:tt.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:tt.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:tt.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:tt.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:tt.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:tt.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:tt.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:tt.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=L.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:tt.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=L.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:tt.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:tt.Linux}}},{test:[/CrOS/],describe(){return{name:tt.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=L.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:tt.PlayStation4,version:t}}}],wb=[{test:[/googlebot/i],describe(){return{type:Ce.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=L.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ce.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ce.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ce.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ce.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ce.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ce.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ce.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:Ce.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ce.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=L.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:Ce.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:Ce.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ce.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ce.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ce.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ce.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ce.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ce.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ce.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ce.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ce.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ce.tv}}}],Eb=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:gn.Blink};const n=L.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:gn.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:gn.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:gn.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:gn.Gecko},n=L.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:gn.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:gn.WebKit},n=L.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class uf{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(yb,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(bb,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(wb,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(Eb,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
+ `;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 lf{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new uf(t,n)}static parse(t){return new uf(t).getResult()}static get BROWSER_MAP(){return cf}static get ENGINE_MAP(){return gn}static get OS_MAP(){return tt}static get PLATFORMS_MAP(){return Ce}}var oi=(e=>(e.IOS="IOS",e.ANDROID="ANDROID",e.DESKTOP="DESKTOP",e))(oi||{}),df=(e=>(e.FIREFOX="Firefox",e.CHROME="Chrome",e.SAFARI="Safari",e.EDGE="Edge",e.OPERA="Opera",e))(df||{});const ff=()=>{const t=lf.getParser(window.navigator.userAgent).getOSName().toUpperCase();return t&&Object.values(oi).includes(t)?t:oi.DESKTOP},Sb=()=>{const e=ff();return e===oi.ANDROID||e===oi.IOS},_b=e=>{const t=lf.getParser(window.navigator.userAgent).getBrowserName();return Array.isArray(e)?e.includes(t):t===e},si=(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},Cb=(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},Tb=e=>{try{return new URL(e).pathname.toLowerCase().endsWith(".svg")}catch{return!1}},Ib=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},ua=(e,t)=>{if(/^#/.test(e)){const n=Ib(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},pf=e=>["#ffffff","#fff","white","#000000","#000","black","#808080","gray","grey"].includes(e.toLowerCase()),xb=(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)},Ab=e=>{if(!e||e==="currentColor"||pf(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 xb(o,s,a)},kb=e=>!e||e==="currentColor"?"none":pf(e)?e.toLowerCase().includes("fff")||e==="white"?"brightness(0) invert(100%)":"brightness(0)":`brightness(0) saturate(100%) invert(16%) sepia(99%) saturate(4299%)
73
- hue-rotate(${Ab(e)}deg) brightness(97%) contrast(113%)`,Rb=e=>ne`
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: ${kb(e)};
80
- `,Pb=e=>ne`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
88
89
  mask-repeat: no-repeat;
89
90
  mask-size: contain;
90
91
  mask-position: center;
91
- `,Ob=({size:e,color:t,isSvgResource:n,isAlternativeStyles:r})=>ne`
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;
@@ -115,64 +116,64 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
115
116
  width: ${e}px;
116
117
  height: ${e}px;
117
118
 
118
- ${r?Rb(t):Pb(t)}
119
+ ${r?Nb(t):Mb(t)}
119
120
  `}
120
- `;class mt extends be{constructor({name:t,color:n="currentColor",size:r=16,alt:i}){const o=Tb(t),s=_b(df.FIREFOX);super({tag:"span",styles:()=>Ob({size:r,color:n,isSvgResource:o,isAlternativeStyles:s})});const a=mb[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 ai={small:"32px",medium:"40px",large:"48px"},Lb=(e="medium")=>`calc(${ai[e]} + 8px * 2 )`,Nb=ti`
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
- `,Mb=(e="medium")=>{const t=ai[e],n=`calc(${t} * -1)`,r=`calc(${t} * -2)`;return ti`
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
- `},Db=(e,t="medium")=>{switch(t){case"small":return ne`
135
+ `},$b=(e,t="medium")=>{switch(t){case"small":return ne`
135
136
  padding: 8px;
136
- height: ${ai[t]};
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
142
  `;case"medium":return ne`
142
143
  padding: 8px 16px;
143
- height: ${ai[t]};
144
+ height: ${ci[t]};
144
145
  line-height: 24px;
145
146
  border-radius: ${e.button.medium.borderRadius}px;
146
147
  font-size: 14px;
147
148
  `;case"large":default:return ne`
148
149
  padding: 8px 16px;
149
- height: ${ai[t]};
150
+ height: ${ci[t]};
150
151
  line-height: 32px;
151
152
  border-radius: ${e.button.large.borderRadius}px;
152
153
  font-size: 16px;
153
- `}},la=(e,t)=>ne`
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
- `,Fb=(e,t,n)=>{switch(e){case"primary":return ne`
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: ${ua(n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor,.7)};
163
+ background-color: ${da(n.isApTheme?t.apButtonPrimaryBgColor:t.button.primary.backgroundColor,.7)};
163
164
  }
164
165
  &:disabled {
165
- ${la(t,n.isApTheme)}
166
+ ${fa(t,n.isApTheme)}
166
167
  }
167
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: ${ua(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
173
+ background-color: ${da(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
173
174
  }
174
175
  &:disabled {
175
- ${la(t,n.isApTheme)}
176
+ ${fa(t,n.isApTheme)}
176
177
  }
177
178
  `;case"text":return ne`
178
179
  background-color: ${n.isApTheme?"unset":t.button.text.backgroundColor};
@@ -190,18 +191,18 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
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: ${ua(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
194
+ background-color: ${da(n.isApTheme?t.apButtonSecondaryBgColor:t.button.secondary.backgroundColor,.7)};
194
195
  }
195
196
  &:disabled {
196
- ${la(t,n.isApTheme)}
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: ${Nb} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
203
+ animation: ${Ub} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
203
204
  }
204
- `;default:return ne``}},Ub=(e,t)=>{const{size:n,variant:r,isFullWidth:i}=t,o=ne`
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;
@@ -243,7 +244,7 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
243
244
  opacity 0.3s ease,
244
245
  visibility 0.3s ease;
245
246
 
246
- margin-top: ${Lb(n)};
247
+ margin-top: ${Fb(n)};
247
248
  }
248
249
 
249
250
  &:focus-visible {
@@ -252,7 +253,7 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
252
253
 
253
254
  &[data-is-copied='true'] {
254
255
  .content-wrapper {
255
- animation: ${Mb(n)} 3s cubic-bezier(1, -0.5, 0, 1.5) forwards;
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
260
261
  opacity: 1;
261
262
  }
262
263
  }
263
- `;return zy(o,Db(e,n),Fb(r,e,t))};class mn extends be{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=q.translate("copied"),isApTheme:f=!1}){const h={size:r,variant:i,isFullWidth:u,isApTheme:f};super({tag:"button",styles:p=>Ub(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 mt({name:r}),s.append(this.iconLeft.element)),n&&s.appendChild(document.createTextNode(n)),i&&(this.iconRight=new mt({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 he=(e,t,n)=>{const r=Z.getStyles();return t?r.input.disabled:e?r.input.error:r.input.normal},Mn=(e,t,n)=>({label:{size:12,lineHeight:16,weight:500,color:he(e,t).textColor},helperText:{size:12,lineHeight:16,weight:400,color:he(e,t).hintTextColor}}),Bb=e=>ne`
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 hf extends be{constructor({text:t}){super({tag:"div",styles:r=>Bb(r)});const n=document.createElement("hr");if(n.classList.add("divider-line"),this.element.appendChild(n),t){const r=new X({text:t,size:16,weight:600,lineHeight:24}),i=document.createElement("hr");i.classList.add("divider-line"),r.render(this.element),this.element.appendChild(i)}}}const gf=(e,{error:t,disabled:n,maxWidth:r})=>ne`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
289
276
  display: flex;
290
277
  align-items: center;
291
278
 
292
- background-color: ${he(t,n).backgroundColor};
293
- color: ${he(t,n).textColor};
279
+ background-color: ${se(t,n).backgroundColor};
280
+ color: ${se(t,n).textColor};
294
281
 
295
- border: ${he(t,n).borderWidth}px solid
296
- ${he(t,n).borderColor};
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: ${he(t,n).borderRadius}px;
289
+ border-radius: ${se(t,n).borderRadius}px;
303
290
 
304
291
  :hover,
305
292
  :focus-within {
@@ -338,16 +325,16 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
338
325
 
339
326
  &::placeholder {
340
327
  font-size: 16px;
341
- color: ${he(t,n).placeholderTextColor};
328
+ color: ${se(t,n).placeholderTextColor};
342
329
  opacity: 1;
343
330
  }
344
331
  &:-ms-input-placeholder {
345
332
  font-size: 16px;
346
- color: ${he(t,n).placeholderTextColor};
333
+ color: ${se(t,n).placeholderTextColor};
347
334
  }
348
335
  &::-ms-input-placeholder {
349
336
  font-size: 16px;
350
- color: ${he(t,n).placeholderTextColor};
337
+ color: ${se(t,n).placeholderTextColor};
351
338
  }
352
339
 
353
340
  &::-webkit-contacts-auto-fill-button {
@@ -381,14 +368,14 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
381
368
  overflow-y: auto;
382
369
  border: 1px solid ${e.input.focus.borderColor};
383
370
  border-radius: 8px;
384
- background-color: ${he(t,n).backgroundColor};
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} ${he().backgroundColor};
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
396
383
  }
397
384
 
398
385
  &::-webkit-scrollbar-track {
399
- background: ${he().backgroundColor};
386
+ background: ${se().backgroundColor};
400
387
  border-radius: 8px;
401
388
  }
402
389
 
@@ -416,7 +403,7 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
416
403
  padding: 8px;
417
404
  cursor: pointer;
418
405
  transition: background-color 0.2s ease;
419
- color: ${he(t,n).textColor};
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
437
424
  .select-icon {
438
425
  margin-left: 8px;
439
426
  }
440
- `;class mf extends be{constructor({name:n,label:r,options:i,helperText:o,placeholder:s=q.translate("select"),emptyMessage:a=q.translate("select_item"),error:c=!1,disabled:u=!1,maxWidth:l="100%",showValue:d=!1,validateOn:f,onChange:h}){super({tag:"div",styles:g=>gf(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 mt({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=Mn(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,lineHeight:n.label.lineHeight,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=Mn(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,lineHeight:r.helperText.lineHeight,weight:r.helperText.weight,color:r.helperText.color}).element,this.element.append(this.helperTextElement))}updateComponentStyles(){const n=r=>gf(r,{error:this.currentErrorState,disabled:this.currentDisabledState,maxWidth:this.maxWidth});this.element.className=n(Z.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 mt({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 mt({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()?q.translate("invalid_field"):q.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 vf=(e,{error:t,disabled:n})=>ne`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
457
444
  line-height: normal;
458
445
  height: 40px;
459
446
  padding: 8px;
460
- border-radius: ${he(t,n).borderRadius}px;
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: ${he(t,n).backgroundColor};
467
- color: ${he(t,n).textColor};
468
- border: ${he(t,n).borderWidth}px solid
469
- ${he(t,n).borderColor};
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
493
480
  }
494
481
  &::placeholder {
495
482
  font-size: 16px;
496
- color: ${he(t,n).placeholderTextColor};
483
+ color: ${se(t,n).placeholderTextColor};
497
484
  opacity: 1;
498
485
  }
499
486
  &:-ms-input-placeholder {
500
487
  font-size: 16px;
501
- color: ${he(t,n).placeholderTextColor};
488
+ color: ${se(t,n).placeholderTextColor};
502
489
  }
503
490
  &::-ms-input-placeholder {
504
491
  font-size: 16px;
505
- color: ${he(t,n).placeholderTextColor};
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 yf extends be{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=>vf(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=J1(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=Mn(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,lineHeight:n.label.lineHeight,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=Mn(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,lineHeight:r.helperText.lineHeight,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});this.element.className=n(Z.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=Z1(this.inputElement.value,this.mask),i=this.validationRegex.test(r);if(this.setErrorState(!i),this.renderLabel(),!i){const o=n||(this.getValue().trim()?q.translate("invalid_field"):q.translate("required_field"));this.renderHelperText(o)}return i}}var Dn=(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))(Dn||{}),da=(e=>(e.TEXT="TEXT",e.SELECT="SELECT",e))(da||{});const $b=e=>{if(e)try{return new RegExp(e)}catch{console.warn("Invalid regex from backend:",e);return}},Vb=e=>e.map(t=>({name:t.value,value:t.key}));var bf=(e=>(e.MOBILE="480px",e.TABLET="768px",e.LAPTOP="1024px",e.DESKTOP="1280px",e))(bf||{});const zb=()=>ne`
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 Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=e=
519
506
  gap: 12px;
520
507
  flex-direction: row;
521
508
 
522
- @media (max-width: ${bf.MOBILE}) {
509
+ @media (max-width: ${Ef.MOBILE}) {
523
510
  flex-direction: column;
524
511
  }
525
512
  }
526
- `;class Hb extends be{constructor(n){super({tag:"div",styles:()=>zb()});S(this,"componentProps");S(this,"dynamicInputs",{});S(this,"onValidationChange",()=>{});if(this.componentProps=n,n.title){const r=new hf({text:n.title}).element;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===da.SELECT?this.createSelectInput({name:n.field,label:n.label,placeholder:n.placeholder,options:Vb(n.values),validateOn:"onChange"}):this.createTextInput({name:n.field,label:n.label,placeholder:n.placeholder,type:"text",validationRegex:$b(n.regex),validateOn:"onChange"})}createSelectInput(n){return new mf(n)}createTextInput(n){return new yf(n)}addInputEventListeners(n,r){const i=r===da.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 jb={test:{NAME:"@astropay/payments-lib",VERSION:"2.0.1",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.1",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.1",MODE:"production",API_BASE_URL:"https://partners-api.astropay.com/api",RESOURCES_BUCKET:"https://rs.astropay.com",CHECKOUT_URL:"https://checkout.astropay.com"}};var ci=(e=>(e.SESSION_ID="session_id",e))(ci||{});const pn=class pn{static init(t){const n=io(t==null?void 0:t.environment,[...H1,"test"],"production"),r=io(t==null?void 0:t.currencyMode,W1,"iso");pn.environment=n,pn.currencyMode=r}static getRuntimeConfig(){const t=pn.environment||"production";return jb[t]}static getEnvironment(){return pn.environment}static getCurrencyMode(){return pn.currencyMode}};S(pn,"environment"),S(pn,"currencyMode");let Ye=pn;const qb={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"},Wb=(e,t)=>{const n=qb[t]||"en-US";return new Intl.NumberFormat(n,{style:"decimal",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)},Gb={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:"$"},Kb=e=>e===void 0?"":Gb[e.trim()]||e,fa=(e,t,n)=>{const r=Wb(e,t);return n==="symbol"?`${Kb(t)} ${r}`:`${r} ${t}`},Yb=e=>ne`
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,35 +519,35 @@ ${n}`:""}`;await Js(r)}};function io(e,t,n){return t.includes(e)?e:n}const K1=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 Jb extends be{constructor(t){super({tag:"div",styles:i=>Yb(i)});const n=new X({text:q.translate("payment_amount"),size:16,lineHeight:24,weight:600}).element,r=new X({text:fa(t.amount,t.currency,Ye.getCurrencyMode()),size:26,lineHeight:24,weight:600}).element;this.element.append(n,r)}}const Zb=()=>ne`
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
- `;let pa=class extends be{constructor(t){super({tag:"div",styles:()=>Zb()});const n=t.type==="success",r=n?Z.getStyles().messages.success.textColor:Z.getStyles().messages.error.textColor,i=new mt({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:20,lineHeight:30,weight:600,align:"center"}).element;this.element.append(o)}if(t.description){const o=new X({text:t.description,size:16,lineHeight:24,align:"center"}).element;this.element.append(o)}}};var R=yt;function ha(){var e=yt;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(ha=function(){return t})()}(function(){for(var e=yt,t=ma();;)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 ga=va;function ma(){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(ma=function(){return e})()}function va(e,t){const n=ha();return(va=function(r,i){return n[r-=160]})(e,t)}(function(){var e=yt;const t=va,n=ha();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)]())}})(),ga(165),ga(177),ga(166);var Tt,vn,vt,wf,It,qt,Ef,Sf,ya,ba,_f,So;function wa(){var e=yt,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(wa=function(){return t})()}function _o(e,t){var n=wa();return(_o=function(r,i){return n[r-=191]})(e,t)}function Ea(e,t){var n=Sa();return(Ea=function(r,i){return n[r-=203]})(e,t)}function Sa(){var e=yt,t=[e(718),e(707),"41710840nWONlY",e(731),e(659),e(799),"7OXGKyG",e(198),e(766),e(243),e(490),e(263)];return(Sa=function(){return t})()}function _a(e,t){var n=Ca();return(_a=function(r,i){return n[r-=166]})(e,t)}function Ca(){var e=yt,t=[e(622),e(657),e(242),e(732),"production",e(499),"83274xOmQWJ","4mtYUAV",e(451),e(543),e(594),"65587catFQe",e(415)];return(Ca=function(){return t})()}function Cf(e,t){var n=Ta();return(Cf=function(r,i){return n[r-=472]})(e,t)}function Ta(){var e=yt,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(Ta=function(){return t})()}(function(){for(var e=yt,t=_o,n=wa();;)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())}})(),(vn=Tt||(Tt={}))[(vt=_o)(210)]=vt(210),vn[vt(194)]=vt(194),vn[vt(211)]=vt(211),vn[R(773)]=vt(206),vn[vt(207)]=vt(207),vn[vt(197)]=vt(197),vn[vt(205)]=R(143),vn.UNHANDLED=vt(213),qt=_o,(It=wf||(wf={}))[It.OK=200]="OK",It[It[qt(199)]=400]=qt(199),It[It[qt(202)]=404]=qt(202),It[It[qt(208)]=500]=R(378),It[It[qt(201)]=408]=qt(201),It[It[qt(195)]=401]=qt(195),(function(){for(var e=R,t=Ea,n=Sa();;)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)]())}})(),ya=Ea,(Sf=Ef||(Ef={}))[R(577)]=ya(205),Sf[ya(213)]=R(205),(function(){for(var e=R,t=_a,n=Ca();;)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())}})(),(_f=ba||(ba={}))[(So=_a)(166)]=So(173),_f[So(169)]=So(177),(function(){for(var e=R,t=Cf,n=Ta();;)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 fr=To;(function(){var e=R;const t=To,n=Ia();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 ui={isRequired:e=>e+fr(475),isUndefined:e=>e+fr(492),isInvalid:e=>e+fr(490),unableToFind:e=>fr(466)+e+".",notLoaded:e=>fr(473)+e+"."};let Co=class extends Error{constructor(t,n,r=!1){var i=R;const o=fr;let s=n;switch(t){case Tt[o(491)]:s=ui[o(470)](n);break;case Tt[o(479)]:s=ui.isInvalid(n);break;case Tt[o(486)]:s=ui[o(476)](n);break;case Tt[i(563)]:s=ui[o(495)](n);break;case Tt[o(481)]:s=ui[o(493)](n);break;case Tt[i(454)]:s=o(478)+n;break;case Tt[o(471)]:s=o(496)+n;break;case Tt[o(477)]:default:s=o(474)+n}var a,c,u;super(s),a=this,u=void 0,(c=o(482))in a?Object[To(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 To(e,t){const n=Ia();return(To=function(r,i){return n[r-=466]})(e,t)}function Ia(){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(Ia=function(){return t})()}function Tf(e,t){var n=xa();return(Tf=function(r,i){return n[r-=363]})(e,t)}function xa(){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(xa=function(){return t})()}(function(){for(var e=R,t=Tf,n=xa();;)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 li=ka;function Aa(){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(Aa=function(){return t})()}function ka(e,t){const n=Aa();return(ka=function(r,i){return n[r-=127]})(e,t)}(function(){var e=R;const t=ka,n=Aa();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 Xb=class{static[li(135)](t){const n=li,r=new URLSearchParams(t),i={};return r[n(136)](((o,s)=>{var a=yt;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[li(135)](t)}static[li(131)](t){const n=li,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 Io=Ra;function Ra(e,t){const n=Pa();return(Ra=function(r,i){return n[r-=358]})(e,t)}(function(){var e=R;const t=Ra,n=Pa();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 pr={endpoints:{tokenizer:R(427),reveal:Io(365)},domians:{cdn:{production:Io(369),sandbox:"https://tokenizer-web-tst.cc.astropay.com"},api:{production:Io(359),sandbox:Io(360)}}};function Pa(){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(Pa=function(){return t})()}const Qb=Oa;function Oa(e,t){const n=La();return(Oa=function(r,i){return n[r-=466]})(e,t)}(function(){var e=R;const t=Oa,n=La();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 e2={environment:ba[Qb(468)],version:R(611)};function La(){var e=R;const t=["50qDamSZ",e(568),"44535lKGnAe",e(622),"1198616psasvq","544302QFKtCW","162808fuaUJw","234726FeLlSb",e(798),e(662),e(469),e(623)];return(La=function(){return t})()}function Na(){var e=R;const t=["946575WsgUvq",e(268),e(533),"12681sdIGeC",e(635),"4355436uZDbJG","24iPqPHQ",e(592),e(351),e(418),e(166)];return(Na=function(){return t})()}function If(e,t){const n=Na();return(If=function(r,i){return n[r-=155]})(e,t)}(function(){var e=R;const t=If,n=Na();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 Ma=e2;const Fn=()=>Ma,t2=Da;function Da(e,t){const n=Fa();return(Da=function(r,i){return n[r-=379]})(e,t)}(function(){var e=R;const t=Da,n=Fa();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 xf=(e,t)=>e[t2(380)](new RegExp(t+"$"),"");function Fa(){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(Fa=function(){return t})()}const di=Ba;function Ua(){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(Ua=function(){return t})()}function Ba(e,t){const n=Ua();return(Ba=function(r,i){return n[r-=110]})(e,t)}(function(){var e=R;const t=Ba,n=Ua();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 xo{static get[di(113)](){const t=di;return xf(pr[t(121)][t(123)][Fn()[t(126)]],"/")}static get[di(116)](){const t=di;return xf(pr[t(121)][t(122)][Fn()[t(126)]],"/")}static[R(241)](t,n,r){var i=R;const o=di,s=Xb[i(406)](r??{}),a=Fn(),c=s?n[i(636)]("?")?"&":"?":"";return xo[o(113)]+"/"+t+"/"+a[o(115)]+"/"+n+c+s}}var $a=za;function Va(){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(Va=function(){return t})()}function za(e,t){var n=Va();return(za=function(r,i){return n[r-=115]})(e,t)}(function(){for(var e=R,t=za,n=Va();;)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)]())}})(),$a(146),$a(164),$a(166);var Ao=Ha;function Ha(e,t){var n=ja();return(Ha=function(r,i){return n[r-=291]})(e,t)}(function(){for(var e=R,t=Ha,n=ja();;)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),Ao(294),R(779),Ao(305),Ao(296),Ao(315);function ja(){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(ja=function(){return t})()}function qa(){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(qa=function(){return t})()}function Wa(e,t){const n=qa();return(Wa=function(r,i){return n[r-=254]})(e,t)}(function(){var e=R;const t=Wa,n=qa();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 Af=function(e){var t=R;const n=Wa,r=document[t(414)]||document[n(259)];if(!r)throw new Co(Tt[t(563)],n(255),!0);return r[n(265)](e),e};(function(){var e=R;const t=Ga,n=Ka();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 ko=function(e,t){const n=Ga,r=document.createElement(n(126));r[n(129)]=e,r[n(130)]=t,Af(r)};function Ga(e,t){const n=Ka();return(Ga=function(r,i){return n[r-=125]})(e,t)}function Ka(){var e=R;const t=["2178600xJfnAD",e(771),e(259),e(225),e(610),e(646),e(691),e(556),e(588),"18738601iJYruu"];return(Ka=function(){return t})()}function Ya(){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(Ya=function(){return t})()}function Un(e,t){var n=Ya();return(Un=function(r,i){return n[r-=379]})(e,t)}(function(){for(var e=R,t=Un,n=Ya();;)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=Un;function n(i){var o=yt,s=Un,a=this;this[o(203)]=function(c){var u,l=o,d=Un;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=Un,(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=Un;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 xt=Ja;function Ja(e,t){var n=Za();return(Ja=function(r,i){return n[r-=110]})(e,t)}function Za(){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(Za=function(){return t})()}(function(){for(var e=R,t=Ja,n=Za();;)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),xt(121),R(700),R(600),xt(113),xt(126),xt(116),xt(118),xt(110),xt(111),xt(120),xt(128),xt(125),xt(127),xt(130);var Xa=Qa;function Qa(e,t){var n=ec();return(Qa=function(r,i){return n[r-=258]})(e,t)}function ec(){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(ec=function(){return t})()}function tc(){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(tc=function(){return t})()}function kf(e,t){var n=tc();return(kf=function(r,i){return n[r-=123]})(e,t)}function Rf(e,t){var n=nc();return(Rf=function(r,i){return n[r-=435]})(e,t)}function nc(){var e=R,t=["680775fQHTmS",e(364),e(493),e(528),e(206),e(669),"3255819aCtDxV",e(447),e(187)];return(nc=function(){return t})()}function rc(){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(rc=function(){return t})()}function Pf(e,t){var n=rc();return(Pf=function(r,i){return n[r-=147]})(e,t)}function Of(e,t){var n=ic();return(Of=function(r,i){return n[r-=398]})(e,t)}function ic(){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(ic=function(){return t})()}function oc(){var e=R,t=[e(271),e(209),e(453),e(734),e(545),"has","476346BHUYta","478714FKDyOG",e(760),e(253)];return(oc=function(){return t})()}function Lf(e,t){var n=oc();return(Lf=function(r,i){return n[r-=484]})(e,t)}function sc(e,t){var n=ac();return(sc=function(r,i){return n[r-=236]})(e,t)}function ac(){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(ac=function(){return t})()}(function(){for(var e=R,t=Qa,n=ec();;)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[Xa(275)],String[Xa(272)],Object[Xa(273)],(function(){for(var e=R,t=kf,n=tc();;)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=Rf,n=nc();;)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=Pf,n=rc();;)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=Of,n=ic();;)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=Lf,n=oc();;)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=sc,n=ac();;)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 n2=cc;function cc(e,t){var n=uc();return(cc=function(r,i){return n[r-=373]})(e,t)}function uc(){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(uc=function(){return t})()}function lc(){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(lc=function(){return t})()}function Nf(e,t){var n=lc();return(Nf=function(r,i){return n[r-=484]})(e,t)}function Mf(e,t){var n=dc();return(Mf=function(r,i){return n[r-=106]})(e,t)}function dc(){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(dc=function(){return t})()}(function(){for(var e=R,t=cc,n=uc();;)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)]())}})(),n2(387),(function(){for(var e=R,t=Nf,n=lc();;)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=Mf,n=dc();;)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 Df=pc;function fc(){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(fc=function(){return t})()}(function(){for(var e=R,t=pc,n=fc();;)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 pc(e,t){var n=fc();return(pc=function(r,i){return n[r-=236]})(e,t)}function Ff(e,t){var n=hc();return(Ff=function(r,i){return n[r-=142]})(e,t)}function hc(){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(hc=function(){return t})()}function gc(){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(gc=function(){return t})()}function Uf(e,t){var n=gc();return(Uf=function(r,i){return n[r-=250]})(e,t)}Object[sc(245)](null),Df(246),R(408),Df(244),(function(){for(var e=R,t=Ff,n=hc();;)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=Uf,n=gc();;)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 de=yc;function mc(){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(mc=function(){return t})()}function Bf(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=yc,n=mc();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 vc{static[de(241)](t,n=!1){const r=de;return n?this[r(239)](t)[r(253)](" ")[r(241)]():t[r(241)]()}static[R(429)](t,n=!1){var r=R;const i=de;return n?this[i(244)](t)[i(233)](/ /g," "):t[r(429)]()}static[R(741)](t){const n=de;return this[n(249)](n(241))(t)}static[de(234)](t){const n=de;return this[n(249)](n(220))(t)}static[de(225)](t){var n=R;const r=de;return this[r(239)](t)[n(527)](((i,o)=>o===0?i[n(429)]():this[r(222)](i[r(220)]())))[r(253)]("")}static[de(229)](t){var n=R;const r=de;return this._startCase(this[r(225)](t))[n(288)](/ /g,"")}static[de(243)](t){const n=de;return this[n(239)](t)[n(253)]("-")}static[R(761)](t){const n=de;return this[R(410)](t)[n(253)]("_")}static[de(245)](t){return this[de(244)](t).replace(/ /g,".")}static[de(221)](t){const n=de;return this[n(222)](this[n(244)](t))}static toSlugCase(t){const n=de;return this[n(244)](t)[n(233)](/ /g,"-")}static[de(237)](t){return this[de(239)](t)}static[de(239)](t){const n=de;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=de;return this[r(239)](t)[n(527)]((i=>i[r(220)]()))[r(253)](" ")}static[de(222)](t){const n=de;return t[n(248)](0)[n(241)]()+t[n(246)](1)[n(220)]()}static _startCase(t){const n=de;return this[R(410)](t)[n(250)]((r=>this[n(222)](r)))[n(253)](" ")}}function yc(e,t){const n=mc();return(yc=function(r,i){return n[r-=220]})(e,t)}Bf(vc,R(748),((e,t=!1,{splitChar:n=" ",joinChar:r=" ",to:i=de(223)}={splitChar:" ",joinChar:" ",to:de(223)})=>{const o=de,s=e!==void 0?e[o(226)]():"";return s?t?vc[o(235)](s):s[o(251)](n).map((a=>{var c=yt;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):""})),Bf(vc,de(249),(e=>t=>{var n=R;const r=de;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 r2=bc;function bc(e,t){const n=wc();return(bc=function(r,i){return n[r-=328]})(e,t)}function yt(e,t){var n=ma();return(yt=function(r,i){return n[r-=141]})(e,t)}function wc(){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(wc=function(){return t})()}(function(){var e=R;const t=bc,n=wc();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),r2(332);function Ec(){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(Ec=function(){return t})()}function $f(e,t){const n=Ec();return($f=function(r,i){return n[r-=199]})(e,t)}function Vf(e,t){const n=Sc();return(Vf=function(r,i){return n[r-=310]})(e,t)}function Sc(){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(Sc=function(){return t})()}function zf(e,t){const n=_c();return(zf=function(r,i){return n[r-=245]})(e,t)}function _c(){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(_c=function(){return t})()}function Cc(){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(Cc=function(){return t})()}function Hf(e,t){const n=Cc();return(Hf=function(r,i){return n[r-=199]})(e,t)}function Tc(){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(Tc=function(){return t})()}function jf(e,t){const n=Tc();return(jf=function(r,i){return n[r-=482]})(e,t)}function Ic(e,t){const n=xc();return(Ic=function(r,i){return n[r-=252]})(e,t)}function xc(){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(xc=function(){return t})()}(function(){var e=R;const t=$f,n=Ec();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=Vf,n=Sc();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=zf,n=_c();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=Hf,n=Cc();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=jf,n=Tc();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=Ic,n=xc();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=Ac,n=kc();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 Ac(e,t){const n=kc();return(Ac=function(r,i){return n[r-=382]})(e,t)}function kc(){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(kc=function(){return t})()}function Rc(e,t){const n=Pc();return(Rc=function(r,i){return n[r-=188]})(e,t)}function Pc(){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(Pc=function(){return t})()}(function(){var e=R;const t=Rc,n=Pc();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 Ro=Oc;function Oc(e,t){const n=Lc();return(Oc=function(r,i){return n[r-=135]})(e,t)}(function(){var e=R;const t=Oc,n=Lc();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 i2={environment:e=>typeof e===Ro(146)&&/^(sandbox|production)$/[R(690)](e),version:e=>e===Ro(144)||typeof e===Ro(146)&&/^v\d{1,2}(\.\d{0,3}){0,3}$/[Ro(135)](e)},o2=e=>{var t;((n,r)=>{var i=R;const o=Rc;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 Co(Tt[o(201)],a,!0)));if(s[o(198)]){const[a]=s;throw a}}})(i2,e),(t=e)&&(Ma=Object.assign({},Ma,t))};function Lc(){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(Lc=function(){return t})()}function Nc(){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(Nc=function(){return t})()}(function(){var e=R;const t=Mc,n=Nc();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 Mc(e,t){const n=Nc();return(Mc=function(r,i){return n[r-=266]})(e,t)}function Dc(){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(Dc=function(){return t})()}function qf(e,t){const n=Dc();return(qf=function(r,i){return n[r-=169]})(e,t)}function Wf(e,t){var n=Fc();return(Wf=function(r,i){return n[r-=337]})(e,t)}function Fc(){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(Fc=function(){return t})()}function Uc(){var e=R,t=["16oYUCaR",e(495),e(643),e(220),"944418PqxCQU","808467xfwLHr",e(283),"10QxKTBX",e(153),e(459)];return(Uc=function(){return t})()}function Gf(e,t){var n=Uc();return(Gf=function(r,i){return n[r-=171]})(e,t)}function Bc(){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(Bc=function(){return e})()}var Po,yn,At,Kf,bt,bn,Yf,Jf,Oo,Zf,$c,Lo;function No(e,t){var n=Bc();return(No=function(r,i){return n[r-=335]})(e,t)}function Vc(e,t){var n=zc();return(Vc=function(r,i){return n[r-=341]})(e,t)}function zc(){var e=["CopyButton","copy-button","reveal","2917173skLMeQ","1820964OqZzNt","510315wlwfez","441522swQxzn","3761920KVvMuv","8178336dFaxYN","Reveal","5qbCaQQ","4044603UhdGqT"];return(zc=function(){return e})()}function Hc(e,t){var n=jc();return(Hc=function(r,i){return n[r-=235]})(e,t)}function jc(){var e=["production","33vyRaSe","238515PNqZTX","2664777SEHPlq","200dnfHzp","4RQDQWC","14080653FGOkOA","sandbox","1893258distuZ","SANDBOX","1705123ZWIxjP","171829ajvFNO","7942010cWpsFH","84YuXwGF"];return(jc=function(){return e})()}function qc(){var e=["270103qoQgEd","12itkIzk","14nsIwws","9iCTJgp","74736ETbfqk","44358azBwEp","10oyDFLF","4394507nLBhNm","2eigAEs","2127030LnauBX","11vgTOSS","164277JtqPnT","10312LfzXXQ"];return(qc=function(){return e})()}function Xf(e,t){var n=qc();return(Xf=function(r,i){return n[r-=366]})(e,t)}function Mo(e,t){const n=Wc();return(Mo=function(r,i){return n[r-=152]})(e,t)}(function(){var e=R;const t=qf,n=Dc();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=Wf,n=Fc();;)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=Gf,n=Uc();;)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=No,t=Bc();;)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())}})(),(yn=Po||(Po={}))[(At=No)(354)]="REQUIRED",yn[At(341)]=At(341),yn[At(337)]="UNABLE_TO_FIND",yn.NOT_LOADED=At(338),yn[At(342)]=At(342),yn.HTTP=At(344),yn[At(348)]=At(348),yn[At(343)]=At(343),bt=Kf||(Kf={}),bn=No,bt[bt.OK=200]="OK",bt[bt[bn(355)]=400]=bn(355),bt[bt[bn(335)]=404]=bn(335),bt[bt.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",bt[bt[bn(353)]=408]=bn(353),bt[bt.UNAUTHORIZED=401]=bn(345),(function(){for(var e=Vc,t=zc();;)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())}})(),(Jf=Yf||(Yf={}))[(Oo=Vc)(349)]=Oo(342),Jf[Oo(352)]=Oo(341),(function(){for(var e=Hc,t=jc();;)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())}})(),$c=Zf||(Zf={}),Lo=Hc,$c.PRODUCTION=Lo(240),$c[Lo(235)]=Lo(247),(function(){for(var e=Xf,t=qc();;)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=Mo,t=Wc();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 s2=()=>new Promise(((e,t)=>{const n=Mo;if(((r=xo[R(172)])=>{const i=Mc;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=Mo,o=document.createElement(i(161));return o.src=xo.getFullCdn(i(156),i(163)),Af(o),o})();return r.onload=()=>{const i=n;window[i(153)]?e(window.APTokenizer):t(new Co(Po[i(167)],i(160),!0))},void(r[n(162)]=()=>t(new Co(Po[n(169)],"SCRIPT",!0)))}}));function Wc(){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(Wc=function(){return e})()}var Gc=cn;function Qf(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=Kc();;)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[Gc(308)]()[Gc(303)]((()=>{var e=Gc;typeof window!==e(299)&&!window[e(291)]&&((()=>{const t=Ac;ko(t(385),pr[t(395)][t(390)][Fn()[t(387)]]),ko(t(385),pr[t(395)][t(396)][Fn()[t(387)]])})(),(()=>{var t=R;const n=Ic;ko(n(263),pr[n(255)][n(259)][Fn()[n(264)]]),ko(n(263),pr[n(255)][t(363)][Fn()[n(264)]])})())}));const a2=(ep=function*(e){o2(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):s2()[i(303)]((()=>{n(t)}))[i(296)]((o=>{r(o)})):r(i(290))}))},tp=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=ep[cn(309)](e,t);function o(a){Qf(i,n,r,o,s,"next",a)}function s(a){Qf(i,n,r,o,s,"throw",a)}o(void 0)}))},function(e){return tp[cn(309)](this,arguments)});var ep,tp;function cn(e,t){var n=Kc();return(cn=function(r,i){return n[r-=289]})(e,t)}function Kc(){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(Kc=function(){return e})()}var Yc=function(e,t){return Yc=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])},Yc(e,t)};function nt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Yc(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 Do(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 hr(e){return this instanceof hr?(this.v=e,this):new hr(e)}function c2(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 hr?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 u2(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 wn;(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"})(wn||(wn={}));var Nt;(function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"})(Nt||(Nt={}));var np="-",Fo="AMP",l2="".concat(Fo,"_unsent"),rp="$default_instance",ip="https://api2.amplitude.com/2/httpapi",d2="https://api.eu.amplitude.com/2/httpapi",f2="https://api2.amplitude.com/batch",p2="https://api.eu.amplitude.com/batch",h2="utm_campaign",g2="utm_content",m2="utm_id",v2="utm_medium",y2="utm_source",b2="utm_term",op="dclid",sp="fbclid",ap="gbraid",cp="gclid",up="ko_click_id",lp="li_fat_id",dp="msclkid",fp="rdt_cid",pp="ttclid",hp="twclid",gp="wbraid",Uo={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},Bo=["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"],w2=["authorization","cookie","set-cookie"],E2=1e3,Jc=function(e){if(Object.keys(e).length>E2)return!1;for(var t in e){var n=e[t];if(!mp(t,n))return!1}return!0},mp=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&&Jc(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 Jc(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},fi=(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(we.SET,t,n),this},e.prototype.setOnce=function(t,n){return this._safeSet(we.SET_ONCE,t,n),this},e.prototype.append=function(t,n){return this._safeSet(we.APPEND,t,n),this},e.prototype.prepend=function(t,n){return this._safeSet(we.PREPEND,t,n),this},e.prototype.postInsert=function(t,n){return this._safeSet(we.POSTINSERT,t,n),this},e.prototype.preInsert=function(t,n){return this._safeSet(we.PREINSERT,t,n),this},e.prototype.remove=function(t,n){return this._safeSet(we.REMOVE,t,n),this},e.prototype.add=function(t,n){return this._safeSet(we.ADD,t,n),this},e.prototype.unset=function(t){return this._safeSet(we.UNSET,t,np),this},e.prototype.clearAll=function(){return this._properties={},this._properties[we.CLEAR_ALL]=np,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[we.CLEAR_ALL]!==void 0||this._propertySet.has(n)?!1:t===we.ADD?typeof r=="number":t!==we.UNSET&&t!==we.REMOVE?mp(n,r):!0},e})(),we;(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"})(we||(we={}));var S2=[we.CLEAR_ALL,we.UNSET,we.SET,we.SET_ONCE,we.ADD,we.APPEND,we.PREPEND,we.PREINSERT,we.POSTINSERT,we.REMOVE],_2="Event tracked successfully",C2="Unexpected error occurred",T2="Event rejected due to exceeded retry count",I2="Event skipped due to optOut config",x2="Event rejected due to missing API key",A2="Invalid API key",k2="Client not initialized",Ne;(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"})(Ne||(Ne={}));var gr=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Ne.Unknown),{event:e,code:t,message:n}},Ae=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},R2=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,En)},vp=ee([],$(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),En=function(e){var t,n=Ae();if(!(!((t=n==null?void 0:n.crypto)===null||t===void 0)&&t.getRandomValues))return R2(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(vp[a]):vp[a]}).join("")},P2=(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=En(),this.loggerProvider.warn(`Plugin name is undefined.
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.
541
528
  Generating a random UUID for plugin name: `.concat(t.name,`.
542
- 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 gr(P,0,String(T))})}),Promise.all(v).then(function(E){var P=$(E,1),T=P[0],I=T||gr(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})(),O2=function(e,t,n){var r=typeof e=="string"?{event_type:e}:e;return U(U(U({},r),n),t&&{event_properties:t})},yp=function(e,t){var n=U(U({},t),{event_type:Nt.IDENTIFY,user_properties:e.getUserProperties()});return n},L2=function(e,t,n,r){var i,o=U(U({},r),{event_type:Nt.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(i={},i[e]=t,i)});return o},N2=function(e,t,n){var r,i=new fi;i.set(e,t);var o=U(U({},n),{event_type:Nt.IDENTIFY,user_properties:i.getUserProperties(),groups:(r={},r[e]=t,r)});return o},M2=function(e,t){return U(U({},t),{event_type:Nt.REVENUE,event_properties:e.getEventProperties()})},at=function(e){return{promise:e||Promise.resolve()}},D2=(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 P2(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=O2(t,n,r);return at(this.dispatch(i))},e.prototype.identify=function(t,n){var r=yp(t,n);return at(this.dispatch(r))},e.prototype.groupIdentify=function(t,n,r,i){var o=L2(t,n,r,i);return at(this.dispatch(o))},e.prototype.setGroup=function(t,n,r){var i=N2(t,n,r);return at(this.dispatch(i))},e.prototype.revenue=function(t,n){var r=M2(t,n);return at(this.dispatch(r))},e.prototype.add=function(t){return this.isReady?this._addPlugin(t):(this.q.push(this._addPlugin.bind(this,t)),at())},e.prototype._addPlugin=function(t){return at(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)),at())},e.prototype._removePlugin=function(t){return at(this.timeline.deregister(t,this.config))},e.prototype.dispatchWithCallback=function(t,n){if(!this.isReady)return n(gr(t,0,k2));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(wn).includes(i)||(r[i]=t[i])}),S2.forEach(function(i){if(Object.keys(t).includes(i)){var o=t[i];switch(i){case wn.CLEAR_ALL:Object.keys(n).forEach(function(s){delete n[s]});break;case wn.UNSET:Object.keys(o).forEach(function(s){delete n[s]});break;case wn.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,gr(t,0,I2)]:(t.event_type===Nt.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=gr(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 at(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})(),F2=(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 Jc(t)&&(this.properties=t),this},e.prototype.getEventProperties=function(){var t=this.properties?U({},this.properties):{};return t[Wt.REVENUE_PRODUCT_ID]=this.productId,t[Wt.REVENUE_QUANTITY]=this.quantity,t[Wt.REVENUE_PRICE]=this.price,t[Wt.REVENUE_TYPE]=this.revenueType,t[Wt.REVENUE_CURRENCY]=this.currency,t[Wt.REVENUE]=this.revenue,t[Wt.RECEIPT]=this.receipt,t[Wt.RECEIPT_SIG]=this.receiptSig,t},e})(),Wt;(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"})(Wt||(Wt={}));var U2=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},[])},wt;(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"})(wt||(wt={}));var $o="Amplitude Logger ",bp=(function(){function e(){this.logLevel=wt.None}return e.prototype.disable=function(){this.logLevel=wt.None},e.prototype.enable=function(t){t===void 0&&(t=wt.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Verbose||console.log("".concat($o,"[Log]: ").concat(t.join(" ")))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Warn||console.warn("".concat($o,"[Warn]: ").concat(t.join(" ")))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Error||console.error("".concat($o,"[Error]: ").concat(t.join(" ")))},e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.logLevel<wt.Debug||console.log("".concat($o,"[Debug]: ").concat(t.join(" ")))},e})(),Vo=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:rp,logLevel:wt.Warn,loggerProvider:new bp,offline:!1,optOut:!1,serverUrl:ip,serverZone:"US",useBatch:!1}},B2=(function(){function e(t){var n,r,i,o;this._optOut=!1;var s=Vo();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=wp(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})(),$2=function(e,t){return e==="EU"?t?p2:d2:t?f2:ip},wp=function(e,t,n){if(e===void 0&&(e=""),t===void 0&&(t=Vo().serverZone),n===void 0&&(n=Vo().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Vo().serverZone;return{serverZone:r,serverUrl:$2(r,n)}},V2=(function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(t,n){this.sdk.metrics.histogram[t]=n},e})();function Ep(e){return e>=200&&e<300}var Sp=function(e){e===void 0&&(e=0);var t=new Error().stack||"";return t.split(`
543
- `).slice(2+e).map(function(n){return n.trim()})},Te=function(e){return function(){var t=U({},e.config),n=t.loggerProvider,r=t.logLevel;return{logger:n,logLevel:r}}},z2=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},Ie=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]=z2(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}},xe=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<wt.Debug||!u||!c)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:Sp(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 H2(e){return e instanceof Error?e.message:String(e)}function zo(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch{}return t}var j2=(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(l2,"_").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=En()),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,T2),!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=U2(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,x2)];r={api_key:this.config.apiKey,events:t.map(function(u){var l=u.event;l.extra;var d=Do(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 V2,c.label=1;case 1:return c.trys.push([1,3,,4]),i=wp(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,C2),[2]):n?(this.handleResponse(o,t),[3,4]):("body"in o?this.fulfillRequest(t,o.statusCode,"".concat(o.status,": ").concat(zo(o))):this.fulfillRequest(t,o.statusCode,o.status),[2]);case 3:return s=c.sent(),a=H2(s),this.config.loggerProvider.error(a),this.handleResponse({status:Ne.Failed,statusCode:0},t),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,n){var r=t.status;switch(r){case Ne.Success:{this.handleSuccessResponse(t,n);break}case Ne.Invalid:{this.handleInvalidResponse(t,n);break}case Ne.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,n);break}case Ne.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,_2)},e.prototype.handleInvalidResponse=function(t,n){var r=this;if(t.body.missingField||t.body.error.startsWith(A2)){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(zo(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(zo(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(zo(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;Ep(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:Sp()})),this.removeEvents(t),t.forEach(function(a){return a.callback(gr(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})(),q2=(function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:W2(),platform:"Web",os:void 0,deviceModel:void 0}},e})(),W2=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},G2=(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})(),Sn=function(){return Sn=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},Sn.apply(this,arguments)};function Ho(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 _p(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 jo=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=Ho(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(!jo(e[f],t[f]))return!1}else{var h=Object.keys(e).sort(),p=Object.keys(t).sort();if(!jo(h,p))return!1;var g=!0;return Object.keys(e).forEach(function(m){jo(e[m],t[m])||(g=!1)}),g}return!0},K2="$set",Y2="$unset",J2="$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 Z2=(function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var t=this,n=Sn({},this.identity.userProperties),r=Sn(Sn({},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=Ho(Object.entries(i)),h=f.next();!h.done;h=f.next()){var p=_p(h.value,2),g=p[0],m=p[1];switch(g){case K2:try{for(var v=(a=void 0,Ho(Object.entries(m))),y=v.next();!y.done;y=v.next()){var b=_p(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 Y2:try{for(var _=(u=void 0,Ho(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 J2: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 Sn({},this.identity)},e.prototype.setIdentity=function(t){var n=Sn({},this.identity);this.identity=Sn({},t),jo(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})(),pi=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,X2=(function(){function e(){this.identityStore=new Z2,this.eventBridge=new G2,this.applicationContextProvider=new q2}return e.getInstance=function(t){return pi.analyticsConnectorInstances||(pi.analyticsConnectorInstances={}),pi.analyticsConnectorInstances[t]||(pi.analyticsConnectorInstances[t]=new e),pi.analyticsConnectorInstances[t]},e})(),hi=function(e){return e===void 0&&(e=rp),X2.getInstance(e)},Q2=function(e,t){hi(t).identityStore.editIdentity().setUserId(e).commit()},ew=function(e,t){hi(t).identityStore.editIdentity().setDeviceId(e).commit()},tw=(function(){function e(){this.name="identity",this.type="before",this.identityStore=hi().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=hi(t.instanceName).identityStore),[2]})})},e})(),Cp=function(e,t){t===void 0&&(t=Date.now());var n=Date.now(),r=n-t;return r>e},Tp=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Fo,t,e.substring(0,n)].filter(Boolean).join("_")},nw=function(e){return"".concat(Fo.toLowerCase(),"_").concat(e.substring(0,6))},rw=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:""},qo=function(){var e,t=Ae();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=Ip(s[0]),c=Ip(s[1]);return c&&(i[a]=c),i},{});return r},Ip=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}},Zc=function(e,t){return!t||!t.length?!0:t.some(function(n){return typeof n=="string"?e===n:e.match(n)})},gi=function(e,t){var n=e;try{n=decodeURI(e)}catch(r){t==null||t.error("Malformed URI sequence: ",r)}return n},iw=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},xp=function(e,t){var n=iw(e.toString()),r=Math.abs(n),i=r*31,o=i%1e5;return o/1e5<t},Xc=(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})(),Qc=(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(!Ae())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=ow(r))!==null&&n!==void 0?n:sw(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=Ae(),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=Ae(),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})(),ow=function(e){try{return decodeURIComponent(atob(e))}catch{return}},sw=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch{return}},Ap=function(e,t,n){return t===void 0&&(t=""),n===void 0&&(n=10),[Fo,t,e.substring(0,n)].filter(Boolean).join("_")},eu=(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})(),aw=10,cw=1,ie={TAGS:"tags",COUNTERS:"counters",HISTOGRAMS:"histograms",EVENTS:"events",INTERNAL:"internal"},kp={LAST_FLUSH_TIMESTAMP:"last_flush_timestamp"},Rp=(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=Ae())===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,cw);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,aw-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(kp.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(kp.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})(),uw=1e3,Wo=300*1e3,lw="https://diagnostics.prod.us-west-2.amplitude.com/v1/capture",dw="https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",tu=1e4,fw=10,pw=(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"?lw:dw,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=xp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,Rp.isSupported()?this.storage=new Rp(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>=tu){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>=tu){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>=tu){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>=fw){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})},uw)),this.flushTimer||(this.flushTimer=setTimeout(function(){t._flush().catch(function(n){t.logger.debug("DiagnosticsClient: Failed to flush",n)}).finally(function(){t.flushTimer=null})},Wo))},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]),!Ae())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(Wo),[2]):(r=t-n,r>=Wo?(this._flush(),[2]):(this._setFlushTimer(Wo-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=xp(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e})(),nu=(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 Ne.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 Ne.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 Ne.PayloadTooLarge:return{status:T,statusCode:P,body:{error:(m=t.error)!==null&&m!==void 0?m:""}};case Ne.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 Ne.Timeout:default:return{status:T,statusCode:P}}},e.prototype.buildStatus=function(t){return Ep(t)?Ne.Success:t===429?Ne.RateLimit:t===413?Ne.PayloadTooLarge:t===408?Ne.Timeout:t>=400&&t<500?Ne.Invalid:t>=500?Ne.Failed:Ne.Unknown},e})(),hw=(function(e){nt(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})(nu),gw=(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})(),mw="https://sr-client-cfg.amplitude.com/config",vw="https://sr-client-cfg.eu.amplitude.com/config",yw=3,bw=1e3,ww=(function(){function e(t,n,r,i){r===void 0&&(r="US"),this.callbackInfos=[],this.apiKey=t,this.serverUrl=i||(r==="US"?mw:vw),this.logger=n,this.storage=new gw(t,n)}return e.prototype.subscribe=function(t,n,r){var i=En(),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=yw),n===void 0&&(n=bw),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})(),Ew=null,Sw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],Pp="data-amp-track-",_w=["div","span","h1","h2","h3","h4","h5","h6"],Cw=["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]'],Tw=ee(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],$(Cw),!1),Iw=["*"],xw=1e3,Aw=4,kw=50;function Rw(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function Op(e,t,n){if(e){var r=t.map(Np),i=n.map(Np);Lp({json:e,allowlist:r,excludelist:i,ancestors:[]})}}function Lp(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);Rw(i[h])?(!Mp(p,o)||Mp(p,s))&&delete i[h]:Lp({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 Np(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function ru(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(ru(e,t,o,r+1))return!0;return!1}else return i==="*"||i===e[n]?ru(e,t,n+1,r+1):!1}function Mp(e,t){return t.some(function(n){return ru(e,n)})}var Pw=500,Dp=100,Ow=(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 Go(o,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if(typeof this._bodySize=="number")return this._bodySize;var t=Ae();if(t!=null&&t.TextEncoder){var n=this.request.body;return this._bodySize=Fp(n,Dp),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,iu(r,t,n)])})})},e})(),Lw=(function(){function e(t,n){this.bodyRaw=t,this.requestHeaders=n}return e.prototype.headers=function(t){return t===void 0&&(t=[]),Go(this.requestHeaders,{allow:t})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Fp(this.bodyRaw,Dp)},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,iu(r,t,n)])})})},e})();function Fp(e,t){var n,r,i,o=Ae(),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 Nw=(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}),Go(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)},Pw)}),[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,iu(r,t,n)]}})})},e})(),Mw=(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
544
- `);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 Go(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?(Op(r,t,n),[2,r]):[2,null])})})},e})();function iu(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Op(r,t,n),r}catch{return null}}var mi;(function(e){e.REDACT="redact",e.REMOVE="remove"})(mi||(mi={}));var Up="[REDACTED]",Go=function(e,t){var n,r,i=t.allow,o=i===void 0?[]:i,s=t.strategy,a=s===void 0?mi.REMOVE:s,c=ee([],$(w2),!1),u={},l=function(p){var g=p.toLowerCase();c.find(function(m){return m.toLowerCase()===g})?a===mi.REDACT&&(u[p]=Up):o.find(function(m){return m.toLowerCase()===g})?u[p]=e[p]:a===mi.REDACT&&(u[p]=Up)};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},Dw=(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([],$(Bo),!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([],$(Bo),!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 Fw(e){return typeof e=="object"&&e!==null&&"url"in e&&"method"in e}var Uw=(function(){function e(t,n){n===void 0&&(n=En()),this.callback=t,this.id=n}return e})(),Bw=(function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=Ae();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var t=Ae();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(Fw(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 Dw(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 Ow(i):void 0,s?new Nw(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 Mw(u.status,p,g?parseInt(g,10):void 0,l),v=u.$$AmplitudeAnalyticsEvent.headers,y=new Lw(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})(),Bp=new Bw,$p=(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({},Uo),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=qo(),n=t[h2],r=t[g2],i=t[m2],o=t[v2],s=t[y2],a=t[b2];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=qo();return t={},t[op]=n[op],t[sp]=n[sp],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},e})(),vi="data-amp-mask",_n="*****",$w=/\b(?:\d[ -]*?){13,16}\b/,Vw=/(\d{3}-?\d{2}-?\d{4})/g,zw=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,ou=function(e,t){var n,r;if(t===void 0&&(t=[]),typeof e!="string")return"";var i=e;i=i.replace($w,_n),i=i.replace(Vw,_n),i=i.replace(zw,_n);try{for(var o=Q(t),s=o.next();!s.done;s=o.next()){var a=s.value;try{i=i.replace(a,_n)}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},su=function(e){if(typeof document>"u"||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(vi)?_n:e?e(document.title):document.title},mr=function(e,t){return typeof e=="boolean"?e:(e==null?void 0:e[t])!==!1},Vp=function(e){return mr(e,"attribution")},Hw=function(e){return mr(e,"fileDownloads")},jw=function(e){return mr(e,"formInteractions")},zp=function(e){return mr(e,"pageViews")},Hp=function(e){return mr(e,"sessions")},qw=function(e){return mr(e,"pageUrlEnrichment")},jp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.networkTracking===!0||typeof e.networkTracking=="object")},qp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.elementInteractions===!0||typeof e.elementInteractions=="object")},Ww=function(e){return typeof e=="boolean"?e:typeof e=="object"&&e.webVitals===!0},Wp=function(e){return typeof e=="boolean"?e:typeof e=="object"&&(e.frustrationInteractions===!0||typeof e.frustrationInteractions=="object")},Gw=function(e){if(qp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.elementInteractions=="object")return e.autocapture.elementInteractions},Kw=function(e){if(Wp(e.autocapture)&&typeof e.autocapture=="object"&&typeof e.autocapture.frustrationInteractions=="object")return e.autocapture.frustrationInteractions},Yw=function(e){var t;if(jp(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})})}},Jw=function(e){var t=function(){return!1},n=void 0,r,i=e.pageCounter,o=zp(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}},Zw=function(e){return Vp(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?U({},e.defaultTracking.attribution):{}},au=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},cu=function(e){var t=e;return t&&t._q!==void 0},uu="2.30.0",Gp="amplitude-ts",Xw="Web",Qw="$remote",eE=(function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(Gp,"/").concat(uu),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:Xw}),this.config.trackingOptions.language&&{language:rw()}),this.config.trackingOptions.ipAddress&&{ip:Qw}),{insert_id:En(),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})(),Ko=1e3,Kp=(function(e){nt(t,e);function t(n){var r=this,i,o,s;try{s=(i=Ae())===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>Ko?(o=r.length-Ko,[4,e.prototype.set.call(this,n,r.slice(0,Ko))]):[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(Ko,".")),[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})(eu),tE=(function(e){nt(t,e);function t(){var n;return e.call(this,(n=Ae())===null||n===void 0?void 0:n.sessionStorage)||this}return t})(eu),nE=(function(e){nt(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})(nu),rE=(function(e){nt(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=Ae();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})(nu),iE=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=nw(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:oE(a),sessionId:lu(u),lastEventId:lu(d),lastEventTime:lu(l),optOut:!!c}]}})})},lu=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},oE=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Mt="[Amplitude]",Yp="".concat(Mt," Form Started"),sE="".concat(Mt," Form Submitted"),aE="".concat(Mt," File Downloaded"),Jp="session_start",Zp="session_end",cE="".concat(Mt," File Extension"),uE="".concat(Mt," File Name"),lE="".concat(Mt," Link ID"),dE="".concat(Mt," Link Text"),fE="".concat(Mt," Link URL"),du="".concat(Mt," Form ID"),fu="".concat(Mt," Form Name"),pu="".concat(Mt," Form Destination"),Yo="cookie",pE="US",hE=(function(e){nt(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,k,O,D,F,V,z,ye,oe,J,re,W,ce,te,_e,pe){i===void 0&&(i=new Xc),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=Yo),v===void 0&&(v=new bp),y===void 0&&(y=wt.Warn),w===void 0&&(w=!1),C===void 0&&(C=!1),P===void 0&&(P=""),T===void 0&&(T=pE),k===void 0&&(k=1800*1e3),O===void 0&&(O=new Kp({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),ce===void 0&&(ce=!0),te===void 0&&(te=0);var B=e.call(this,{apiKey:n,storageProvider:O,transportProvider:Xp(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=k,B.storageProvider=O,B.trackingOptions=D,B.transport=F,B.useBatch=V,B.fetchRemoteConfig=z,B.networkTrackingOptions=re,B.identify=W,B.enableDiagnostics=ce,B.diagnosticsSampleRate=te,B.diagnosticsClient=_e,B.remoteConfig=pe,B.version=uu,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=ye,B.debugLogsEnabled=J,B.loggerProvider.enable(J?wt.Debug:B.logLevel),B.networkTrackingOptions=re,B.identify=W,B.enableDiagnostics=ce,B.diagnosticsSampleRate=te,B.diagnosticsClient=_e,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(Tp(this.apiKey),n)},t})(B2),gE=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,k,O,D,F,V,z,ye,oe,J,re,W,ce,te,_e,pe,B,_t,Ct,rn,ir,Cd;return N(this,function(or){switch(or.label){case 0:return r=t.identityStorage||Yo,E={},r===Yo?[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,vE()];case 3:s=or.sent(),or.label=4;case 4:o=s,or.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=mE(t.identityStorage,i),[4,iE(e,a,(k=(I=t.cookieOptions)===null||I===void 0?void 0:I.upgrade)!==null&&k!==void 0?k:!0)];case 6:return c=or.sent(),[4,a.get(Tp(e))];case 7:return u=or.sent(),l=qo(),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:En(),p=(ye=u==null?void 0:u.lastEventId)!==null&&ye!==void 0?ye: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=(W=u==null?void 0:u.sessionId)!==null&&W!==void 0?W:c.sessionId,y=(te=(ce=t.userId)!==null&&ce!==void 0?ce:u==null?void 0:u.userId)!==null&&te!==void 0?te:c.userId,n.previousSessionDeviceId=(_e=u==null?void 0:u.deviceId)!==null&&_e!==void 0?_e:c.deviceId,n.previousSessionUserId=(pe=u==null?void 0:u.userId)!==null&&pe!==void 0?pe:c.userId,b={ipAddress:(_t=(B=t.trackingOptions)===null||B===void 0?void 0:B.ipAddress)!==null&&_t!==void 0?_t:!0,language:(rn=(Ct=t.trackingOptions)===null||Ct===void 0?void 0:Ct.language)!==null&&rn!==void 0?rn:!0,platform:(Cd=(ir=t.trackingOptions)===null||ir===void 0?void 0:ir.platform)!==null&&Cd!==void 0?Cd:!0},w=u==null?void 0:u.pageCounter,C=u==null?void 0:u.debugLogsEnabled,t.autocapture!==void 0&&(t.defaultTracking=t.autocapture),_=new hE(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 or.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new Xc),[2,_]}})})},mE=function(e,t){switch(e===void 0&&(e=Yo),t===void 0&&(t={}),e){case"localStorage":return new Kp;case"sessionStorage":return new tE;case"none":return new Xc;case"cookie":default:return new Qc(U(U({},t),{expirationDays:t.expiration}))}},Xp=function(e){return e==="xhr"?new nE:e==="beacon"?new rE:new hw},vE=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 Qc().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 Qc(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,""]}})})},yE=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},bE="[Amplitude] Page Viewed",wE=function(e){e===void 0&&(e={});var t,n=Ae(),r=void 0,i=!1,o,s=e.trackOn,a=e.trackHistoryChanges,c=e.eventType,u=c===void 0?bE: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,EE()];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":su(ou),"[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=_E(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],k=T[1],O=T[2];_.apply(E,[I,k,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"&&SE(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},EE=function(){return M(void 0,void 0,void 0,function(){var e;return N(this,function(t){switch(t.label){case 0:return e=yE,[4,new $p().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},SE=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,n=t[wn.SET]||{},r=t[wn.UNSET]||{},i=ee(ee([],$(Object.keys(n)),!1),$(Object.keys(r)),!1);return Object.keys(Uo).every(function(o){return i.includes(o)})}return!1},_E=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}},CE=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=Qp(m);v||l.track(Yp,(y={},y[du]=vr(m.id),y[fu]=vr(m.name),y[pu]=b,y)),v=!0}),n(m,"submit",function(){var y,b,w=Qp(m);v||l.track(Yp,(y={},y[du]=vr(m.id),y[fu]=vr(m.name),y[pu]=w,y)),l.track(sE,(b={},b[du]=vr(m.id),b[fu]=vr(m.name),b[pu]=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=Ae(),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}},vr=function(e){if(typeof e=="string")return e},Qp=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(t??""),window.location.href).href}catch{}return t},TE=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(aE,(C={},C[cE]=w,C[uE]=y.pathname,C[lE]=v.id,C[dE]=v.text,C[fE]=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=Ae(),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}},eh=!1,IE=function(e){if(!(eh||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:
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:
545
532
 
546
533
  amplitude.init(<YOUR_API_KEY>, {
547
534
  defaultTracking: true,
548
535
  });
549
536
 
550
- Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`;e.loggerProvider.warn(t),eh=!0}},xE=function(){var e="@amplitude/plugin-network-checker-browser",t="before",n=Ae(),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 th(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),th(m)}catch{}}}catch(k){t={error:k}}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?Bo:[]),!1),$(T??[]),!1)}}}catch(k){o={error:k}}finally{try{C&&!C.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}}}catch(k){r={error:k}}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 nh(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 AE(e,t){var n,r,i,o,s,a,c;if(e){th(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=nh(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=nh((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 kE="@amplitude/plugin-autocapture-browser",RE="@amplitude/plugin-frustration-browser",hu="[Amplitude] Element Clicked",PE="[Amplitude] Dead Click",rh="[Amplitude] Rage Click",OE="[Amplitude] Element Changed",LE="[Amplitude] Element ID",NE="[Amplitude] Element Class",ih="[Amplitude] Element Tag",oh="[Amplitude] Element Text",ME="[Amplitude] Element Hierarchy",DE="[Amplitude] Element Href",FE="[Amplitude] Element Position Left",UE="[Amplitude] Element Position Top",BE="[Amplitude] Element Aria Label",$E="[Amplitude] Element Attributes",VE="[Amplitude] Element Parent Label",sh="[Amplitude] Page URL",zE="[Amplitude] Page Title",HE="[Amplitude] Viewport Height",jE="[Amplitude] Viewport Width",Jo="https://app.amplitude.com",qE="https://app.eu.amplitude.com",WE="https://apps.stag2.amplitude.com",GE={US:Jo,EU:qE,STAGING:WE},KE="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",YE="amp-visual-tagging-selector-highlight",ah="data-amp-mask-attributes",JE=25;function Ee(e){return typeof e=="function"}function gu(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 mu=gu(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
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:
551
538
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
552
- `):"",this.name="UnsubscriptionError",this.errors=n}});function Zo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var yi=(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(Ee(l))try{l()}catch(g){o=g instanceof mu?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{lh(p)}catch(g){o=o??[],g instanceof mu?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 mu(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)lh(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)&&Zo(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Zo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),ch=yi.EMPTY;function uh(e){return e instanceof yi||e&&"closed"in e&&Ee(e.remove)&&Ee(e.add)&&Ee(e.unsubscribe)}function lh(e){Ee(e)?e():e.unsubscribe()}var ZE={Promise:void 0},XE={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 dh(e){XE.setTimeout(function(){throw e})}function vu(){}function Xo(e){e()}var yu=(function(e){nt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,uh(n)&&n.add(r)):r.destination=tS,r}return t.create=function(n,r,i){return new bi(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})(yi),QE=(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){Qo(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){Qo(r)}else Qo(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){Qo(n)}},e})(),bi=(function(e){nt(t,e);function t(n,r,i){var o=e.call(this)||this,s;return Ee(n)||!n?s={next:n??void 0,error:r??void 0,complete:i??void 0}:s=n,o.destination=new QE(s),o}return t})(yu);function Qo(e){dh(e)}function eS(e){throw e}var tS={closed:!0,next:vu,error:eS,complete:vu},bu=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function fh(e){return e}function nS(e){return e.length===0?fh:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var Me=(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=iS(t)?t:new bi(t,n,r);return Xo(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=ph(n),new n(function(i,o){var s=new bi({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[bu]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return nS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ph(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 ph(e){var t;return(t=e??ZE.Promise)!==null&&t!==void 0?t:Promise}function rS(e){return e&&Ee(e.next)&&Ee(e.error)&&Ee(e.complete)}function iS(e){return e&&e instanceof yu||rS(e)&&uh(e)}function oS(e){return Ee(e==null?void 0:e.lift)}function Et(e){return function(t){if(oS(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 sS(e,t,n,r,i)}var sS=(function(e){nt(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})(yu),aS=gu(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),hh=(function(e){nt(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 gh(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new aS},t.prototype.next=function(n){var r=this;Xo(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;Xo(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;Xo(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?ch:(this.currentObservers=null,a.push(n),new yi(function(){r.currentObservers=null,Zo(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 Me;return n.source=this,n},t.create=function(n,r){return new gh(n,r)},t})(Me),gh=(function(e){nt(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:ch},t})(hh),cS={now:function(){return Date.now()}},uS=(function(e){nt(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t})(yi),mh={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},lS=(function(e){nt(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),mh.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&&mh.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,Zo(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})(uS),vh=(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=cS.now,e})(),dS=(function(e){nt(t,e);function t(n,r){r===void 0&&(r=vh.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})(vh),wi=new dS(lS),fS=wi,wu=new Me(function(e){return e.complete()});function yh(e){return e&&Ee(e.schedule)}function bh(e){return e[e.length-1]}function pS(e){return yh(bh(e))?e.pop():void 0}function hS(e,t){return typeof bh(e)=="number"?e.pop():t}var Eu=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function wh(e){return Ee(e==null?void 0:e.then)}function Eh(e){return Ee(e[bu])}function Sh(e){return Symbol.asyncIterator&&Ee(e==null?void 0:e[Symbol.asyncIterator])}function _h(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 gS(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Ch=gS();function Th(e){return Ee(e==null?void 0:e[Ch])}function Ih(e){return c2(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,hr(n.read())];case 3:return r=s.sent(),i=r.value,o=r.done,o?[4,hr(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,hr(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 xh(e){return Ee(e==null?void 0:e.getReader)}function Ze(e){if(e instanceof Me)return e;if(e!=null){if(Eh(e))return mS(e);if(Eu(e))return vS(e);if(wh(e))return yS(e);if(Sh(e))return Ah(e);if(Th(e))return bS(e);if(xh(e))return wS(e)}throw _h(e)}function mS(e){return new Me(function(t){var n=e[bu]();if(Ee(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function vS(e){return new Me(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function yS(e){return new Me(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,dh)})}function bS(e){return new Me(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 Ah(e){return new Me(function(t){ES(e,t).catch(function(n){return t.error(n)})})}function wS(e){return Ah(Ih(e))}function ES(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=u2(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 Cn(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 kh(e,t){return t===void 0&&(t=0),Et(function(n,r){n.subscribe(Je(r,function(i){return Cn(r,e,function(){return r.next(i)},t)},function(){return Cn(r,e,function(){return r.complete()},t)},function(i){return Cn(r,e,function(){return r.error(i)},t)}))})}function Rh(e,t){return t===void 0&&(t=0),Et(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function SS(e,t){return Ze(e).pipe(Rh(t),kh(t))}function _S(e,t){return Ze(e).pipe(Rh(t),kh(t))}function CS(e,t){return new Me(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function TS(e,t){return new Me(function(n){var r;return Cn(n,t,function(){r=e[Ch](),Cn(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 Ee(r==null?void 0:r.return)&&r.return()}})}function Ph(e,t){if(!e)throw new Error("Iterable cannot be null");return new Me(function(n){Cn(n,t,function(){var r=e[Symbol.asyncIterator]();Cn(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function IS(e,t){return Ph(Ih(e),t)}function xS(e,t){if(e!=null){if(Eh(e))return SS(e,t);if(Eu(e))return CS(e,t);if(wh(e))return _S(e,t);if(Sh(e))return Ph(e,t);if(Th(e))return TS(e,t);if(xh(e))return IS(e,t)}throw _h(e)}function AS(e,t){return t?xS(e,t):Ze(e)}function Oh(e){return e instanceof Date&&!isNaN(e)}var kS=gu(function(e){return function(n){n===void 0&&(n=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}});function RS(e,t){var n=Oh(e)?{first:e}:typeof e=="number"?{each:e}:e,r=n.first,i=n.each,o=n.with,s=o===void 0?PS:o,a=n.scheduler,c=a===void 0?wi:a,u=n.meta,l=u===void 0?null:u;if(r==null&&i==null)throw new TypeError("No timeout provided.");return Et(function(d,f){var h,p,g=null,m=0,v=function(y){p=Cn(f,c,function(){try{h.unsubscribe(),Ze(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 PS(e){throw new kS(e)}function ze(e,t){return Et(function(n,r){var i=0;n.subscribe(Je(r,function(o){r.next(e.call(t,o,i++))}))})}var OS=Array.isArray;function LS(e,t){return OS(t)?e.apply(void 0,ee([],$(t))):e(t)}function NS(e){return ze(function(t){return LS(e,t)})}function MS(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;Ze(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 Ei(e,t,n){return n===void 0&&(n=1/0),Ee(t)?Ei(function(r,i){return ze(function(o,s){return t(r,o,i,s)})(Ze(e(r,i)))},n):(typeof t=="number"&&(n=t),Et(function(r,i){return MS(r,i,e,n)}))}function DS(e){return e===void 0&&(e=1/0),Ei(fh,e)}var FS=["addListener","removeListener"],US=["addEventListener","removeEventListener"],BS=["on","off"];function yr(e,t,n,r){if(Ee(n)&&(r=n,n=void 0),r)return yr(e,t,n).pipe(NS(r));var i=$(zS(e)?US.map(function(a){return function(c){return e[a](t,c,n)}}):$S(e)?FS.map(Lh(e,t)):VS(e)?BS.map(Lh(e,t)):[],2),o=i[0],s=i[1];if(!o&&Eu(e))return Ei(function(a){return yr(a,t,n)})(Ze(e));if(!o)throw new TypeError("Invalid event target");return new Me(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 Lh(e,t){return function(n){return function(r){return e[n](t,r)}}}function $S(e){return Ee(e.addListener)&&Ee(e.removeListener)}function VS(e){return Ee(e.on)&&Ee(e.off)}function zS(e){return Ee(e.addEventListener)&&Ee(e.removeEventListener)}function Nh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=fS);var r=-1;return t!=null&&(yh(t)?n=t:r=t),new Me(function(i){var o=Oh(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 Su(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=pS(e),r=hS(e,1/0),i=e;return i.length?i.length===1?Ze(i[0]):DS(r)(AS(i,n)):wu}var HS=Array.isArray;function jS(e){return e.length===1&&HS(e[0])?e[0]:e}function Xe(e,t){return Et(function(n,r){var i=0;n.subscribe(Je(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function qS(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e=jS(e),e.length===1?Ze(e[0]):new Me(WS(e))}function WS(e){return function(t){for(var n=[],r=function(o){n.push(Ze(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 GS(e){return Et(function(t,n){var r=[];return t.subscribe(Je(n,function(i){return r.push(i)},function(){n.next(r),n.complete()})),Ze(e).subscribe(Je(n,function(){var i=r;r=[],n.next(i)},vu)),function(){r=null}})}function KS(e,t){return t===void 0&&(t=wi),Et(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 _u(e){return e<=0?function(){return wu}:Et(function(t,n){var r=0;t.subscribe(Je(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function YS(e){return ze(function(){return e})}function JS(e,t){return Ei(function(n,r){return Ze(e(n,r)).pipe(_u(1),YS(n))})}function ZS(e,t){t===void 0&&(t=wi);var n=Nh(e,t);return JS(function(){return n})}function XS(){return Et(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 Bn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new hh}: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 Et(function(b,w){h++,!g&&!p&&m();var C=f=f??n();w.add(function(){h--,h===0&&!g&&!p&&(d=Cu(y,c))}),C.subscribe(w),!l&&h>0&&(l=new bi({next:function(_){return C.next(_)},error:function(_){g=!0,m(),d=Cu(v,i,_),C.error(_)},complete:function(){p=!0,m(),d=Cu(v,s),C.complete()}}),Ze(b).subscribe(l))})(u)}}function Cu(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 bi({next:function(){i.unsubscribe(),e()}});return Ze(t.apply(void 0,ee([],$(n)))).subscribe(i)}}function QS(e,t){return Et(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++;Ze(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 e_(e,t){return Et(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=Ze(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 t_(e,t,n){t===void 0&&(t=wi);var r=Nh(e,t);return e_(function(){return r},n)}var n_=["input","select","textarea"],Mh=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"},Si=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(!Zc(window.location.href,a)||c&&c.length>0&&Zc(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=Mh(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"}}},r_=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!n_.includes(i)&&!o},i_=function(e){return e?e.split(",").map(function(t){return t.trim()}).filter(function(t){return t.length>0&&t!=="id"&&t!=="class"}):[]},o_=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},{})},s_=function(e){return e==null||typeof e=="object"&&Object.keys(e).length===0||typeof e=="string"&&e.trim().length===0},Dh=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return s_(r)||(t[n]=r),t},{})},Tu=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:Tu(e==null?void 0:e.parentElement,t):null},a_=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 c_(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}var _i=function(e){return!(e.event.target===null||!e.closestTrackedAncestor)};function u_(e){return e.type==="click"||e.type==="change"}var Fh="1.17.0",l_=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",ah,vi]),d_=["type"],f_=["svg","path","g"],p_=["password","hidden"],h_=128;function g_(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!l_.has(C.name)}),v=!r_(e);if(!p_.includes(String(e.getAttribute("type")))&&!f_.includes(c))try{for(var y=Q(m),b=y.next();!b.done;b=y.next()){var w=b.value;if(!(v&&!d_.includes(w.name))){if(t.has(w.name)){p[w.name]=_n;continue}p[w.name]=String(w.value).substring(0,h_)}}}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 m_(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 v_=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}},y_=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}})},Iu=(function(){function e(t,n){var r,i,o=this,s;this.replaceSensitiveString=function(f){return ou(f,o.additionalMaskTextPatterns)},this.getHierarchy=function(f){var h,p,g,m,v=performance.now(),y=[];if(!f)return[];for(var b=m_(f),w=new Map,C=b.length-1;C>=0;C--){var _=b[C];if(_){var E=i_(_.getAttribute(ah)),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 g_(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 ye=$(z,2),oe=ye[0],J=ye[1];V.attrs&&(V.attrs[oe]=o.replaceSensitiveString(J))})};try{for(var k=Q(y),O=k.next();!O.done;O=k.next()){var D=O.value;I(D)}}catch(V){h={error:V}}finally{try{O&&!O.done&&(p=k.return)&&p.call(k)}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=o_(_??{},p),T=(g={},g[ME]=C,g[ih]=b,g[oh]=o.getText(h),g[FE]=w.left==null?null:Math.round(w.left),g[UE]=w.top==null?null:Math.round(w.top),g[$E]=P,g[VE]=E,g[sh]=gi(window.location.href.split("?")[0]),g[zE]=su(o.replaceSensitiveString),g[HE]=window.innerHeight,g[jE]=window.innerWidth,g);return T[LE]=h.getAttribute("id")||"",T[NE]=h.getAttribute("class"),T[BE]=_==null?void 0:_["aria-label"],b==="a"&&f==="click"&&h instanceof HTMLAnchorElement&&(T[DE]=o.replaceSensitiveString(h.href)),Dh(T)},this.addAdditionalEventProperties=function(f,h,p,g,m){m===void 0&&(m=!1);var v={event:f,timestamp:Date.now(),type:h};if(u_(v)&&v.event.target!==null){if(m){var y=Mh(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=Tu(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=v_(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(vi,"]"))!==null;if(h)return _n;var p="";if(!f.querySelector("[".concat(vi,"], [contenteditable]")))p=f.innerText||"";else{var g=f.cloneNode(!0);g.querySelectorAll("[".concat(vi,"], [contenteditable]")).forEach(function(m){m.innerText=_n}),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[ih]=m,h[oh]=o.getText(f),h[sh]=window.location.href.split("?")[0],h);return Dh(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>=JE)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})(),b_=(function(){function e(t){var n=t===void 0?{}:t,r=n.origin,i=r===void 0?Jo:r,o=this;this.endpoint=Jo,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=c_(),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 Iu({})}: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===Jo&&(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;a_(KE).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:YE,messenger:n,cssSelectorAllowlist:a,actionClickAllowlist:c,extractDataFromDataSource:u.extractDataFromDataSource,dataExtractor:u,diagnostics:{autocapture:{version:Fh}}}),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})(),w_=5;function E_(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.clickObservable,a=s.pipe(XS(),Xe(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(KS(r.debounceTime),ze(function(){return"timeout"})),u=Su(a,c),l=s.pipe(ZS(0),Xe(_i),Xe(function(d){return i("click",d.closestTrackedAncestor)}),ze(function(d){return o(d)}),GS(u));return l.subscribe(function(d){var f,h,p=(d.length>=w_,hu);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 S_(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers,s=n.changeObservable,a=s.pipe(Xe(_i),Xe(function(c){return i("change",c.closestTrackedAncestor)}),ze(function(c){return o(c)}));return a.subscribe(function(c){t==null||t.track(OE,r("change",c.closestTrackedAncestor))})}function __(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(Xe(function(p){return!o("click",p.closestTrackedAncestor)}),ze(function(p){var g=Tu(p.event.target,r.actionClickAllowlist);return p.closestTrackedAncestor=g,p.closestTrackedAncestor!==null&&(p.targetElementProperties=i(p.type,p.closestTrackedAncestor)),p}),Xe(_i),Xe(function(p){return s("click",p.closestTrackedAncestor)})),d=[c];u&&d.push(u);var f=Su.apply(void 0,ee([],$(d),!1)),h=l.pipe(QS(function(p){return f.pipe(_u(1),RS({first:500,with:function(){return wu}}),ze(function(){return p}))}));return h.subscribe(function(p){t==null||t.track(hu,i("click",p.closestTrackedAncestor))})}var Uh=function(){return new Me(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()}})},Bh=function(e){return e===void 0&&(e="click"),yr(document,e,{capture:!0})},C_=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},xu={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},$h=function(e){var t,n,r,i,o=Object.values(xu).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=xu[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},Vh=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},T_=function(e,t){return t.filter(function(n){return n.definition.some(function(r){return xu[r.event_type]===e.type&&r.filters.every(function(i){return C_(e,i)})})})},I_=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)},x_=(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=T_(t,Array.from(this.groupedLabeledEvents[t.type]).map(function(l){return i.labeledEvents[l]})),s=I_(o,this.labeledEventToTriggerMap);try{for(var a=Q(s),c=a.next();!c.done;c=a.next()){var u=c.value;y_(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})(),A_=function(e,t,n,r){return new x_(e,t,n,r)},Gt;(function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable"})(Gt||(Gt={}));var k_=function(e,t){var n,r,i,o,s,a,c,u;e===void 0&&(e={}),t==null||t.diagnosticsClient.setTag("plugin.autocapture.version",Fh);var l=e.dataAttributePrefix,d=l===void 0?Pp:l,f=e.visualTaggingOptions,h=f===void 0?{enabled:!0,messenger:new b_}:f;e.cssSelectorAllowlist=(n=e.cssSelectorAllowlist)!==null&&n!==void 0?n:Sw,e.actionClickAllowlist=(r=e.actionClickAllowlist)!==null&&r!==void 0?r:_w,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,k){if(typeof k=="string"&&I.push(k),k instanceof RegExp&&I.push(k),typeof k=="object"&&k!==null&&"pattern"in k)try{I.push(new RegExp(k.pattern))}catch(O){return console.warn("Invalid regex pattern: ".concat(k.pattern),O),I}return I},[]);var p=kE,g="enrichment",m=[],v=new Iu(e,t),y=function(){var I,k=Bh().pipe(ze(function(V){return v.addAdditionalEventProperties(V,"click",e.cssSelectorAllowlist,d)}),Bn()),O=yr(document,"change",{capture:!0}).pipe(ze(function(V){return v.addAdditionalEventProperties(V,"change",e.cssSelectorAllowlist,d)}),Bn()),D;window.navigation&&(D=yr(window.navigation,"navigate").pipe(ze(function(V){return v.addAdditionalEventProperties(V,"navigate",e.cssSelectorAllowlist,d)}),Bn()));var F=Uh().pipe(ze(function(V){return v.addAdditionalEventProperties(V,"mutation",e.cssSelectorAllowlist,d)}),Bn());return I={},I[Gt.ClickObservable]=k,I[Gt.ChangeObservable]=O,I[Gt.NavigateObservable]=D,I[Gt.MutationObservable]=F,I},b=$h(Object.values((a=(s=e.pageActions)===null||s===void 0?void 0:s.labeledEvents)!==null&&a!==void 0?a:{})),w=Vh((u=(c=e.pageActions)===null||c===void 0?void 0:c.triggers)!==null&&u!==void 0?u:[]),C=A_(b,w,v,e),_=function(I){var k,O;I&&(e.pageActions=U(U({},e.pageActions),I),b=$h(Object.values((k=e.pageActions.labeledEvents)!==null&&k!==void 0?k:{})),w=Vh((O=e.pageActions.triggers)!==null&&O!==void 0?O:[]),C.update(b,w,e))},E=function(I,k){return M(void 0,void 0,void 0,function(){var O,D,F,V,z,ye,oe,J,re,W;return N(this,function(ce){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=Si(e,e.cssSelectorAllowlist),D=Si(e,e.actionClickAllowlist),F=y(),V=E_({allObservables:F,options:e,amplitude:k,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(V),z=S_({allObservables:F,getEventProperties:function(){for(var te=[],_e=0;_e<arguments.length;_e++)te[_e]=arguments[_e];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:k,shouldTrackEvent:O,evaluateTriggers:C.evaluate.bind(C)}),m.push(z),ye=__({allObservables:F,options:e,getEventProperties:function(){for(var te=[],_e=0;_e<arguments.length;_e++)te[_e]=arguments[_e];return v.getEventProperties.apply(v,ee(ee([],$(te),!1),[d],!1))},amplitude:k,shouldTrackEvent:O,shouldTrackActionClick:D}),m.push(ye),(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,(W=h.messenger)===null||W===void 0||W.setup(U(U({dataExtractor:v,logger:I==null?void 0:I.loggerProvider},(I==null?void 0:I.serverZone)&&{endpoint:GE[I.serverZone]}),{isElementSelectable:Si(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(k){return[2,I]})})},T=function(){return M(void 0,void 0,void 0,function(){var I,k,O,D,F;return N(this,function(V){try{for(I=Q(m),k=I.next();!k.done;k=I.next())O=k.value,O.unsubscribe()}catch(z){D={error:z}}finally{try{k&&!k.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}},zh=3e3;function R_(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(Xe(_i),Xe(function(f){return i("click",f.closestTrackedAncestor)}),Xe(function(f){var h=f.event.target;return h.closest('a[target="_blank"]')===null})),u=[s];a&&u.push(a);var l=Su.apply(void 0,ee([],$(u),!1)),d=c.pipe(Ei(function(f){var h,p=new Me(function(g){return h=setTimeout(function(){return g.next(f)},zh),function(){clearTimeout(h)}});return qS(p,l.pipe(_u(1),ze(function(){return null}))).pipe(Xe(function(g){return g!==null}))}),t_(zh));return d.subscribe(function(f){var h={"[Amplitude] X":f.event.clientX,"[Amplitude] Y":f.event.clientY};t.track(PE,U(U({},r("click",f.closestTrackedAncestor)),h),{time:f.timestamp})})}var Au=Aw,Hh=xw,jh=kw;function qh(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>jh||e.xMax-e.xMin>jh}function Wh(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 P_(e,t){var n=Math.max(0,e.length-Au+1),r=e[n];return t.timestamp-r.timestamp>=Hh}function O_(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}function L_(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackRageClick,i=n.clickObservable,o=[],s={},a;function c(u){o=[],s={},u&&(qh(s,u),o.push(u))}return i.pipe(Xe(_i),Xe(function(u){return r("click",u.closestTrackedAncestor)}),ze(function(u){if(a&&clearTimeout(a),qh(s,u),o.length===0)return o.push(u),null;if(O_(o,u)||P_(o,u)||s.isOutOfBounds){var l=o.length>=Au?Wh(o):null;return c(u),l}return o.push(u),o.length>=Au&&(a=setTimeout(function(){var d=Wh(o),f=d.rageClickEvent,h=d.time;t.track(rh,f,{time:h}),c()},Hh)),null}),Xe(function(u){return u!==null})).subscribe(function(u){u!==null&&t.track(rh,u.rageClickEvent,{time:u.time})})}var N_=function(e){var t,n,r,i,o;e===void 0&&(e={});var s=RE,a="enrichment",c=[],u=(n=(t=e.rageClicks)===null||t===void 0?void 0:t.cssSelectorAllowlist)!==null&&n!==void 0?n:Iw,l=(i=(r=e.deadClicks)===null||r===void 0?void 0:r.cssSelectorAllowlist)!==null&&i!==void 0?i:Tw,d=(o=e.dataAttributePrefix)!==null&&o!==void 0?o:Pp,f=new Iu(e),h=ee([],$(new Set(ee(ee([],$(u),!1),$(l),!1))),!1),p=function(){var y,b=Bh("pointerdown").pipe(ze(function(_){return f.addAdditionalEventProperties(_,"click",h,d,!0)}),Bn()),w;window.navigation&&(w=yr(window.navigation,"navigate").pipe(ze(function(_){return f.addAdditionalEventProperties(_,"navigate",h,d)}),Bn()));var C=Uh().pipe(ze(function(_){return f.addAdditionalEventProperties(_,"mutation",h,d)}),Bn());return y={},y[Gt.ClickObservable]=b,y[Gt.ChangeObservable]=new Me,y[Gt.NavigateObservable]=w,y[Gt.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=Si(e,u),C=Si(e,l),_=p(),E=L_({allObservables:_,amplitude:b,shouldTrackRageClick:w}),c.push(E),P=R_({amplitude:b,allObservables:_,getEventProperties:function(k,O){return f.getEventProperties(k,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}},M_="@amplitude/plugin-network-capture-browser",Gh="[Amplitude] Network Request",Kh="500-599";function es(e,t){var n=t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&"),r="^"+n.replace(/\*/g,".*")+"$",i=new RegExp(r);return i.test(e)}function Yh(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 D_(e,t,n,r,i){if(!(e.hosts&&!e.hosts.find(function(s){return es(t,s)}))&&!(r&&e.urls&&!Zc(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||Kh;if(!Yh(n,o))return!1}return!0}}function Jh(e){var t;if(e)try{var n=(t=Ae())===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 F_(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===Gh}))return!0}catch{}return!1}function Zh(e){if(typeof e!="object"||e===null){if(e)return ee([],$(Bo),!1);if(e===void 0){var t=void 0;return t}return}if(e.length!==0)return e}function Xh(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 U_(e,t){var n;t===void 0&&(t={});var r=Jh(e.url);if(!r)return!1;var i=r.host;if(t.ignoreAmplitudeRequests!==!1&&(es(i,"*.amplitude.com")||es(i,"amplitude.com"))||!((n=t.ignoreHosts)===null||n===void 0)&&n.find(function(s){return es(i,s)})||!t.captureRules&&e.status!==void 0&&!Yh(e.status,Kh))return!1;if(t.captureRules){var o;if(ee([],$(t.captureRules),!1).reverse().find(function(s){if(o=D_(s,i,e.status,e.url,e.method),o){var a=Zh(s.responseHeaders);if(e.responseWrapper&&a){var c=e.responseWrapper.headers(a);c&&(e.responseHeaders=c)}var u=Zh(s.requestHeaders);if(e.requestWrapper&&u){var l=e.requestWrapper.headers(u);l&&(e.requestHeaders=l)}e.responseWrapper&&s.responseBody&&!Xh(s.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(s.responseBody.allowlist,s.responseBody.blocklist)),e.requestWrapper&&s.requestBody&&!Xh(s.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(s.requestBody.allowlist,s.requestBody.blocklist))}return o!==void 0}),!o)return!1}return!(e.requestWrapper&&F_(i,e.requestWrapper))}function B_(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(Gh,e),[2]}})})}function $_(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider,o=t.networkObservable,s=o.pipe(Xe(function(a){return U_(a.event,n)}));return s.subscribe(function(a){var c,u,l,d=a.event,f=Jh(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);B_(g,d,r,i)}})}var ku;(function(e){e.NetworkObservable="networkObservable"})(ku||(ku={}));var V_=function(e){e===void 0&&(e={});var t=M_,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 Me(function(f){var h=new Uw(function(p){var g=o(p,"network");f.next(g)});return Bp.subscribe(h,r),function(){Bp.unsubscribe(h)}});return l={},l[ku.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=$_({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}},z_="web-vitals-browser",H_="[Amplitude] Web Vitals";let Qh=-1;const br=e=>{addEventListener("pageshow",(t=>{t.persisted&&(Qh=t.timeStamp,e(t))}),!0)},Kt=(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)))}},Ru=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Pu=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ci=()=>{const e=Pu();return(e==null?void 0:e.activationStart)??0},Yt=(e,t=-1)=>{const n=Pu();let r="navigate";return Qh>=0?r="back-forward-cache":n&&(document.prerendering||Ci()>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}},Ou=new WeakMap;function Lu(e,t){return Ou.get(e)||Ou.set(e,new t),Ou.get(e)}class j_{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 Ti=(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{}},Nu=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let wr=-1;const eg=new Set,tg=()=>document.visibilityState!=="hidden"||document.prerendering?1/0:0,Mu=e=>{if(document.visibilityState==="hidden"){if(e.type==="visibilitychange")for(const t of eg)t();isFinite(wr)||(wr=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("prerenderingchange",Mu,!0))}},ts=()=>{var e;if(wr<0){const t=Ci();wr=(document.prerendering||(e=globalThis.performance.getEntriesByType("visibility-state").filter((r=>r.name==="hidden"&&r.startTime>t))[0])==null?void 0:e.startTime)??tg(),addEventListener("visibilitychange",Mu,!0),addEventListener("prerenderingchange",Mu,!0),br((()=>{setTimeout((()=>{wr=tg()}))}))}return{get firstHiddenTime(){return wr},onHidden(t){eg.add(t)}}},ns=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},ng=[1800,3e3],rg=(e,t={})=>{ns((()=>{const n=ts();let r,i=Yt("FCP");const o=Ti("paint",(s=>{for(const a of s)a.name==="first-contentful-paint"&&(o.disconnect(),a.startTime<n.firstHiddenTime&&(i.value=Math.max(a.startTime-Ci(),0),i.entries.push(a),r(!0)))}));o&&(r=Kt(e,i,ng,t.reportAllChanges),br((s=>{i=Yt("FCP"),r=Kt(e,i,ng,t.reportAllChanges),Ru((()=>{i.value=performance.now()-s.timeStamp,r(!0)}))})))}))},ig=[.1,.25],q_=(e,t={})=>{const n=ts();rg(Nu((()=>{let r,i=Yt("CLS",0);const o=Lu(t,j_),s=c=>{for(const u of c)o.h(u);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},a=Ti("layout-shift",s);a&&(r=Kt(e,i,ig,t.reportAllChanges),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),br((()=>{o.i=0,i=Yt("CLS",0),r=Kt(e,i,ig,t.reportAllChanges),Ru((()=>r()))})),setTimeout(r))})))};let og=0,Du=1/0,rs=0;const W_=e=>{for(const t of e)t.interactionId&&(Du=Math.min(Du,t.interactionId),rs=Math.max(rs,t.interactionId),og=rs?(rs-Du)/7+1:0)};let Fu;const sg=()=>Fu?og:performance.interactionCount??0,G_=()=>{"interactionCount"in performance||Fu||(Fu=Ti("event",W_,{type:"event",buffered:!0,durationThreshold:0}))};let ag=0;class K_{constructor(){S(this,"u",[]);S(this,"l",new Map);S(this,"m");S(this,"p")}v(){ag=sg(),this.u.length=0,this.l.clear()}L(){const t=Math.min(this.u.length-1,Math.floor((sg()-ag)/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 cg=e=>{const t=globalThis.requestIdleCallback||setTimeout;document.visibilityState==="hidden"?e():(e=Nu(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},ug=[200,500],Y_=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=ts();ns((()=>{G_();let r,i=Yt("INP");const o=Lu(t,K_),s=c=>{cg((()=>{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=Ti("event",s,{durationThreshold:t.durationThreshold??40});r=Kt(e,i,ug,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden((()=>{s(a.takeRecords()),r(!0)})),br((()=>{o.v(),i=Yt("INP"),r=Kt(e,i,ug,t.reportAllChanges)})))}))};class J_{constructor(){S(this,"m")}h(t){var n;(n=this.m)==null||n.call(this,t)}}const lg=[2500,4e3],Z_=(e,t={})=>{ns((()=>{const n=ts();let r,i=Yt("LCP");const o=Lu(t,J_),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-Ci(),0),i.entries=[u],r())},a=Ti("largest-contentful-paint",s);if(a){r=Kt(e,i,lg,t.reportAllChanges);const c=Nu((()=>{s(a.takeRecords()),a.disconnect(),r(!0)})),u=l=>{l.isTrusted&&(cg(c),removeEventListener(l.type,u,{capture:!0}))};for(const l of["keydown","click","visibilitychange"])addEventListener(l,u,{capture:!0});br((l=>{i=Yt("LCP"),r=Kt(e,i,lg,t.reportAllChanges),Ru((()=>{i.value=performance.now()-l.timeStamp,r(!0)}))}))}}))},dg=[800,1800],Uu=e=>{document.prerendering?ns((()=>Uu(e))):document.readyState!=="complete"?addEventListener("load",(()=>Uu(e)),!0):setTimeout(e)},X_=(e,t={})=>{let n=Yt("TTFB"),r=Kt(e,n,dg,t.reportAllChanges);Uu((()=>{const i=Pu();i&&(n.value=Math.max(i.responseStart-Ci(),0),n.entries=[i],r(!0),br((()=>{n=Yt("TTFB",0),r=Kt(e,n,dg,t.reportAllChanges),r(!0)})))}))};function Q_(e){var t,n=((t=e.entries[0])===null||t===void 0?void 0:t.startTime)||0;return performance.timeOrigin+n}function Ii(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(Q_(e)),navigationStart:Math.floor(performance.timeOrigin)}}var eC=function(){var e=null,t=Ae(),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]},Z_(function(h){d["[Amplitude] LCP"]=Ii(h)}),rg(function(h){d["[Amplitude] FCP"]=Ii(h)}),Y_(function(h){d["[Amplitude] INP"]=Ii(h)}),q_(function(h){d["[Amplitude] CLS"]=Ii(h)}),X_(function(h){d["[Amplitude] TTFB"]=Ii(h)}),e=function(){n.visibilityState==="hidden"&&e&&(c.track(H_,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:z_,type:"enrichment",setup:i,execute:o,teardown:s}},fg=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},tC=function(e){return Object.values(e).every(function(t){return!t})},nC=function(e,t,n,r,i){i===void 0&&(i=!0),e.referrer;var o=e.referring_domain,s=Do(e,["referrer","referring_domain"]),a=t||{};a.referrer;var c=a.referring_domain,u=Do(a,["referrer","referring_domain"]);if(rC(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&&tC(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=fg(o||"")!==fg(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},rC=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})},iC=function(e,t){var n=U(U({},Uo),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 fi);return yp(r)},oC=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},sC=(function(){function e(t,n){var r;this.shouldTrackNewCampaign=!1,this.options=U({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:oC((r=n.cookieOptions)===null||r===void 0?void 0:r.domain)},t),this.storage=n.cookieStorage,this.storageKey=Ap(n.apiKey,"MKTG"),this.webExpStorageKey=Ap(n.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=Uo,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?Cp(this.sessionTimeout,this.lastEventTime):!0,nC(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 $p().parse(),this.storage.get(this.storageKey)])];case 4:return[2,n.sent()]}})})},e.prototype.generateCampaignEvent=function(t){this.shouldTrackNewCampaign=!1;var n=iC(this.currentCampaign,this.options);return t&&(n.event_id=t),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e})(),is="AMP_CURRENT_PAGE",os="AMP_PREVIOUS_PAGE",Er="AMP_URL_INFO",xi;(function(e){e.Direct="direct",e.Internal="internal",e.External="external"})(xi||(xi={}));var aC=new Set([Nt.IDENTIFY,Nt.GROUP_IDENTIFY,Nt.REVENUE]),cC=function(){var e=Ae(),t=void 0,n=!1,r=void 0,i=!1,o=!1,s=function(d){var f;try{var h=gi(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 xi.Direct;case f:return xi.Internal;default:return xi.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(Er)]:[3,3];case 1:return d=m.sent(),f=gi(typeof location<"u"&&location.href||""),h=(d==null?void 0:d[is])||"",p=void 0,f===h?p=(d==null?void 0:d[os])||"":h?p=h:p=document.referrer||"",[4,t.set(Er,(g={},g[is]=f,g[os]=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 eu(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=gi(typeof location<"u"&&location.href||""),t&&n?[4,t.get(Er)]:[3,5];case 1:return h=v.sent(),h!=null&&h[is]?[3,3]:[4,t.set(Er,(m={},m[is]=f,m[os]=document.referrer||"",m))];case 2:v.sent(),v.label=3;case 3:return[4,t.get(Er)];case 4:if(p=v.sent(),g="",p&&(g=p[os]||""),aC.has(d.event_type))return[2,d];d.event_properties=U(U({},d.event_properties||{}),{"[Amplitude] Page Domain":Ai(d,"[Amplitude] Page Domain",typeof location<"u"&&location.hostname||""),"[Amplitude] Page Location":Ai(d,"[Amplitude] Page Location",f),"[Amplitude] Page Path":Ai(d,"[Amplitude] Page Path",typeof location<"u"&&gi(location.pathname)||""),"[Amplitude] Page Title":Ai(d,"[Amplitude] Page Title",su(ou)),"[Amplitude] Page URL":Ai(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(Er,{})]:[3,2];case 1:d.sent(),d.label=2;case 2:return[2]}})})}};return l};function Ai(e,t,n){return e.event_properties||(e.event_properties={}),e.event_properties[t]===void 0?n:e.event_properties[t]}var uC=(function(e){nt(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),at(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,gE(n.apiKey,n,this)]);case 1:return c=y.sent(),!((r=c.remoteConfig)===null||r===void 0)&&r.fetchRemoteConfig?(u=new ww(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&&AE(w,c),b()})})]):[3,3];case 2:y.sent(),y.label=3;case 3:return l=new pw(c.apiKey,c.loggerProvider,c.serverZone,{enabled:c.enableDiagnostics,sampleRate:c.diagnosticsSampleRate||this._diagnosticsSampleRate}),l.setTag("library","".concat(Gp,"/").concat(uu)),[4,e.prototype._init.call(this,c)];case 4:return y.sent(),this.logBrowserOptions(c),this.config.diagnosticsClient=l,this.config.remoteConfigClient=u,Vp(this.config.defaultTracking)?(d=Zw(this.config),this.webAttribution=new sC(d,this.config),[4,this.webAttribution.init()]):[3,6];case 5:y.sent(),y.label=6;case 6:return f=qo(),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=hi(n.instanceName),m.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),this.config.offline===Ew?[3,8]:[4,this.add(xE()).promise];case 7:y.sent(),y.label=8;case 8:return[4,this.add(new j2({diagnosticsClient:l})).promise];case 9:return y.sent(),[4,this.add(new eE).promise];case 10:return y.sent(),[4,this.add(new tw).promise];case 11:return y.sent(),IE(this.config),Hw(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(TE()).promise]):[3,13];case 12:y.sent(),y.label=13;case 13:return jw(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(CE()).promise]):[3,15];case 14:y.sent(),y.label=15;case 15:return zp(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(wE(Jw(this.config))).promise]):[3,17];case 16:y.sent(),y.label=17;case 17:return qp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(k_(Gw(this.config),{diagnosticsClient:l})).promise]):[3,19];case 18:y.sent(),y.label=19;case 19:return Wp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(N_(Kw(this.config))).promise]):[3,21];case 20:y.sent(),y.label=21;case 21:return jp(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(V_(Yw(this.config))).promise]):[3,23];case 22:y.sent(),y.label=23;case 23:return Ww(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(eC()).promise]):[3,25];case 24:y.sent(),y.label=25;case 25:return qw(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(cC()).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,_=Do(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}),Q2(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}),ew(n,this.config.instanceName))},t.prototype.reset=function(){this.setDeviceId(En()),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)),at(Promise.resolve());if(n===this.config.sessionId)return at(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,Hp(this.config.defaultTracking)&&(o&&s&&i.push(this.track(Zp,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 Hp(this.config.defaultTracking)&&i.push(this.track(Jp,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,at(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=Xp(n)},t.prototype.identify=function(n,r){if(cu(n)){var i=n._q;n._q=[],n=au(new fi,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(cu(i)){var s=i._q;i._q=[],i=au(new fi,s)}return e.prototype.groupIdentify.call(this,n,r,i,o)},t.prototype.revenue=function(n,r){if(cu(n)){var i=n._q;n._q=[],n=au(new F2,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=Cp(this.config.sessionTimeout,this.config.lastEventTime),o=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),n.event_type!==Jp&&n.event_type!==Zp&&(!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===Nt.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})(D2),pg=function(){var e=new uC;return{init:xe(e.init.bind(e),"init",Te(e),Ie(e,["config"])),add:xe(e.add.bind(e),"add",Te(e),Ie(e,["config.apiKey","timeline.plugins"])),remove:xe(e.remove.bind(e),"remove",Te(e),Ie(e,["config.apiKey","timeline.plugins"])),track:xe(e.track.bind(e),"track",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),logEvent:xe(e.logEvent.bind(e),"logEvent",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),identify:xe(e.identify.bind(e),"identify",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),groupIdentify:xe(e.groupIdentify.bind(e),"groupIdentify",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),setGroup:xe(e.setGroup.bind(e),"setGroup",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),revenue:xe(e.revenue.bind(e),"revenue",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),flush:xe(e.flush.bind(e),"flush",Te(e),Ie(e,["config.apiKey","timeline.queue.length"])),getUserId:xe(e.getUserId.bind(e),"getUserId",Te(e),Ie(e,["config","config.userId"])),setUserId:xe(e.setUserId.bind(e),"setUserId",Te(e),Ie(e,["config","config.userId"])),getDeviceId:xe(e.getDeviceId.bind(e),"getDeviceId",Te(e),Ie(e,["config","config.deviceId"])),setDeviceId:xe(e.setDeviceId.bind(e),"setDeviceId",Te(e),Ie(e,["config","config.deviceId"])),reset:xe(e.reset.bind(e),"reset",Te(e),Ie(e,["config","config.userId","config.deviceId"])),getSessionId:xe(e.getSessionId.bind(e),"getSessionId",Te(e),Ie(e,["config"])),setSessionId:xe(e.setSessionId.bind(e),"setSessionId",Te(e),Ie(e,["config"])),extendSession:xe(e.extendSession.bind(e),"extendSession",Te(e),Ie(e,["config"])),setOptOut:xe(e.setOptOut.bind(e),"setOptOut",Te(e),Ie(e,["config"])),setTransport:xe(e.setTransport.bind(e),"setTransport",Te(e),Ie(e,["config"])),getIdentity:xe(e.getIdentity.bind(e),"getIdentity",Te(e),Ie(e,["config"])),getOptOut:xe(e.getOptOut.bind(e),"getOptOut",Te(e),Ie(e,["config"])),_setDiagnosticsSampleRate:xe(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",Te(e),Ie(e,["config"]))}};pg();const Bu={production:"be237974d6ba66e5ed3bbf56ac4b6e48",development:"000e3bbcc2c10d22df926468ee9aef91"},lC={plan:{version:"168",branch:"main",source:"checkout-library",versionId:"6c9f59d1-26b3-4926-a2f0-d7d68292d669"},ingestionMetadata:{sourceName:"browser-typescript-ampli",sourceVersion:"2.0.0"}};class hg{constructor(t){S(this,"event_type","AstroPay Payment Card Clicked");this.event_properties=t,this.event_properties=t}}class gg{constructor(t){S(this,"event_type","AstroPay Payment Clicked");this.event_properties=t,this.event_properties=t}}class mg{constructor(t){S(this,"event_type","AstroPay Payment Impression");this.event_properties=t,this.event_properties=t}}class vg{constructor(t){S(this,"event_type","AstroPay Payment Link Copied");this.event_properties=t,this.event_properties=t}}class yg{constructor(t){S(this,"event_type","AstroPay Payment Phone Number Entered");this.event_properties=t,this.event_properties=t}}class bg{constructor(t){S(this,"event_type","AstroPay Payment Started");this.event_properties=t,this.event_properties=t}}class wg{constructor(t){S(this,"event_type","AstroPay Payment User Identified");this.event_properties=t,this.event_properties=t}}const ki=()=>({promise:Promise.resolve()});class dC{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."),ki();let n=null;if(t.client&&"apiKey"in t.client?n=t.client.apiKey:"environment"in t&&(n=Bu[t.environment]),t.client&&"instance"in t.client)this.amplitude=t.client.instance;else if(n){this.amplitude=pg();const r=t.client&&"configuration"in t.client?t.client.configuration:{};return this.amplitude.init(n,void 0,{...lC,...r})}else console.error("ERROR: ampli.load() requires 'environment', 'client.apiKey', or 'client.instance'");return ki()}identify(t,n,r){if(!this.isInitializedAndEnabled())return ki();t&&(r={...r,user_id:t});const i=new fi,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():ki()}track(t,n){return this.isInitializedAndEnabled()?this.amplitude.track(t,void 0,n):ki()}astroPayPaymentCardClicked(t,n){return this.track(new hg(t),n)}astroPayPaymentClicked(t,n){return this.track(new gg(t),n)}astroPayPaymentImpression(t,n){return this.track(new mg(t),n)}astroPayPaymentLinkCopied(t,n){return this.track(new vg(t),n)}astroPayPaymentPhoneNumberEntered(t,n){return this.track(new yg(t),n)}astroPayPaymentStarted(t,n){return this.track(new bg(t),n)}astroPayPaymentUserIdentified(t,n){return this.track(new wg(t),n)}}const ss=new dC;class Ri{}S(Ri,"init",()=>{const n=Ye.getEnvironment()==="production";ss.load({environment:n?"production":"development",client:{apiKey:n?Bu.production:Bu.development}})}),S(Ri,"trackEvent",(t,n,r)=>{typeof t=="string"?ss.client.track(t,n,r):ss.track(t)}),S(Ri,"cleanData",()=>{ss.client.reset()});const as={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},un=console,Sr={};Object.keys(as).forEach(e=>{Sr[e]=un[e]});const Pi="Datadog Browser SDK:",se={debug:Sr.debug.bind(un,Pi),log:Sr.log.bind(un,Pi),info:Sr.info.bind(un,Pi),warn:Sr.warn.bind(un,Pi),error:Sr.error.bind(un,Pi)},cs="https://docs.datadoghq.com",fC=`${cs}/real_user_monitoring/browser/troubleshooting`,$u="More details:";function Eg(e,t){return(...n)=>{try{return e(...n)}catch(r){se.error(t,r)}}}function Tn(e){return e!==0&&Math.random()*100<=e}function us(e,t){return+e.toFixed(t)}function pC(e){return Oi(e)&&e>=0&&e<=100}function Oi(e){return typeof e=="number"}const Qe=1e3,ct=60*Qe,Sg=60*ct,_g=365*(24*Sg);function ls(e){return{relative:e,timeStamp:gC(e)}}function hC(e){return{relative:Vu(e),timeStamp:e}}function gC(e){const t=kt()-performance.now();return t>Li()?Math.round(_r(t,e)):vC(e)}function mC(){return Math.round(kt()-_r(Li(),performance.now()))}function G(e){return Oi(e)?us(e*1e6,0):e}function kt(){return new Date().getTime()}function Fe(){return kt()}function Rt(){return performance.now()}function rt(){return{relative:Rt(),timeStamp:Fe()}}function Cg(){return{relative:0,timeStamp:Li()}}function He(e,t){return t-e}function _r(e,t){return e+t}function Vu(e){return e-Li()}function vC(e){return Math.round(_r(Li(),e))}function yC(e){return e<_g}let zu;function Li(){return zu===void 0&&(zu=performance.timing.navigationStart),zu}const Ni=1024,Tg=1024*Ni,bC=/[^\u0000-\u007F]/;function Ig(e){return bC.test(e)?window.TextEncoder!==void 0?new TextEncoder().encode(e).length:new Blob([e]).size:e.length}function wC(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 Mi(e){return{...e}}function ds(e,t){return Object.keys(e).some(n=>e[n]===t)}function $n(e){return Object.keys(e).length===0}function EC(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 In(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 Hu,xg=!1;function SC(e){Hu=e}function _C(e){xg=e}function Y(e){return function(){return Vn(e,this,arguments)}}function Vn(e,t,n){try{return e.apply(t,n)}catch(r){ln(r)}}function ln(e){if(ju(e),Hu)try{Hu(e)}catch(t){ju(t)}}function ju(...e){xg&&se.error("[MONITOR]",...e)}function Ue(e,t){return In(Jt(),"setTimeout")(Y(e),t)}function ut(e){In(Jt(),"clearTimeout")(e)}function Cr(e,t){return In(Jt(),"setInterval")(Y(e),t)}function fs(e){In(Jt(),"clearInterval")(e)}class ge{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 Ag(...e){return new ge(t=>{const n=e.map(r=>r.subscribe(i=>t.notify(i)));return()=>n.forEach(r=>r.unsubscribe())})}function xn(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=Ue(()=>{i&&s&&e(...s),o=!1,s=void 0},t)},cancel:()=>{ut(a),o=!1,s=void 0}}}function ae(){}function je(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-${1e11}`.replace(/[018]/g,je)}const ps=/([\w-]+)\s*=\s*([^;]+)/g;function Di(e,t){for(ps.lastIndex=0;;){const n=ps.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function CC(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 kg(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 TC(){return Rg()===0}function IC(){return Rg()===1}let hs;function Rg(){return hs??(hs=xC())}function xC(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 Fi(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 qu(e){return Di(document.cookie,e)}let Wu;function An(e){return Wu||(Wu=CC(document.cookie)),Wu.get(e)}function Pg(e,t){Fi(e,"",0,t)}function AC(e){if(document.cookie===void 0||document.cookie===null)return!1;try{const t=`dd_cookie_test_${je()}`,n="test";Fi(t,n,ct,e);const r=qu(t)===n;return Pg(t,e),r}catch(t){return se.error(t),!1}}let Gu;function kC(){if(Gu===void 0){const e=`dd_site_test_${je()}`,t="test",n=window.location.hostname.split(".");let r=n.pop();for(;n.length&&!qu(e);)r=`${n.pop()}.${r}`,Fi(e,t,Qe,{domain:r});Pg(e,{domain:r}),Gu=r}return Gu}const Tr="_dd_s";function RC(e,t){for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(t(r,n,e))return r}}function Og(e){return Object.values(e)}function Ku(e){return Object.entries(e)}const zn=4*Sg,Lg=15*ct,PC=_g,Ui={COOKIE:"cookie",LOCAL_STORAGE:"local-storage"},Ng=/^([a-zA-Z]+)=([a-z0-9-]+)$/,Yu="&";function OC(e){return!!e&&(e.indexOf(Yu)!==-1||Ng.test(e))}const LC="1";function Hn(e,t){const n={isExpired:LC};return t.trackAnonymousUser&&(e!=null&&e.anonymousId?n.anonymousId=e==null?void 0:e.anonymousId:n.anonymousId=je()),n}function gs(e){return $n(e)}function Mg(e){return!gs(e)}function ms(e){return e.isExpired!==void 0||!NC(e)}function NC(e){return(e.created===void 0||kt()-Number(e.created)<zn)&&(e.expire===void 0||kt()<Number(e.expire))}function Dg(e){e.expire=String(kt()+Lg)}function Ju(e){return Ku(e).map(([t,n])=>t==="anonymousId"?`aid=${n}`:`${t}=${n}`).join(Yu)}function Fg(e){const t={};return OC(e)&&e.split(Yu).forEach(n=>{const r=Ng.exec(n);if(r!==null){const[,i,o]=r;i==="aid"?t.anonymousId=o:t[i]=o}}),t}const MC="_dd",DC="_dd_r",FC="_dd_l",UC="rum",BC="logs";function $C(e){if(!An(Tr)){const n=An(MC),r=An(DC),i=An(FC),o={};n&&(o.id=n),i&&/^[01]$/.test(i)&&(o[BC]=i),r&&/^[012]$/.test(r)&&(o[UC]=r),Mg(o)&&(Dg(o),e.persistSession(o))}}function Ug(e){const t=qC(e);return AC(t)?{type:Ui.COOKIE,cookieOptions:t}:void 0}function VC(e,t){const n={isLockEnabled:TC(),persistSession:zC(t),retrieveSession:jC,expireSession:r=>HC(t,r,e)};return $C(n),n}function zC(e){return t=>{Fi(Tr,Ju(t),Lg,e)}}function HC(e,t,n){const r=Hn(t,n);Fi(Tr,Ju(r),n.trackAnonymousUser?PC:zn,e)}function jC(){const e=qu(Tr);return Fg(e)}function qC(e){const t={};return t.secure=!!e.useSecureSessionCookie||!!e.usePartitionedCrossSiteSessionCookie,t.crossSite=!!e.usePartitionedCrossSiteSessionCookie,t.partitioned=!!e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains&&(t.domain=kC()),t}const WC="_dd_test_";function Bg(){try{const e=je(),t=`${WC}${e}`;localStorage.setItem(t,e);const n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Ui.LOCAL_STORAGE}:void 0}catch{return}}function GC(e){return{isLockEnabled:!1,persistSession:$g,retrieveSession:KC,expireSession:t=>YC(t,e)}}function $g(e){localStorage.setItem(Tr,Ju(e))}function KC(){const e=localStorage.getItem(Tr);return Fg(e)}function YC(e,t){$g(Hn(e,t))}const JC=10,ZC=100,Vg=[];let vs;function jn(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(vs||(vs=e),e!==vs){Vg.push(e);return}if(i&&n>=ZC){zg(t);return}let u,l=c();if(i){if(l.lock){ys(e,t,n);return}if(u=je(),a(l.session),l=c(),l.lock!==u){ys(e,t,n);return}}let d=e.process(l.session);if(i&&(l=c(),l.lock!==u)){ys(e,t,n);return}if(d&&(ms(d)?s(d):(Dg(d),i?a(d):o(d))),i&&!(d&&ms(d))){if(l=c(),l.lock!==u){ys(e,t,n);return}o(l.session),d=l.session}(r=e.after)===null||r===void 0||r.call(e,d||l.session),zg(t)}function ys(e,t,n){Ue(()=>{jn(e,t,n+1)},JC)}function zg(e){vs=void 0;const t=Vg.shift();t&&jn(t,e)}const Hg=Qe;function XC(e){switch(e.sessionPersistence){case Ui.COOKIE:return Ug(e);case Ui.LOCAL_STORAGE:return Bg();case void 0:{let t=Ug(e);return!t&&e.allowFallbackToLocalStorage&&(t=Bg()),t}default:se.error(`Invalid session persistence '${String(e.sessionPersistence)}'`)}}function QC(e,t,n,r){const i=new ge,o=new ge,s=new ge,a=e.type===Ui.COOKIE?VC(t,e.cookieOptions):GC(t),{expireSession:c}=a,u=Cr(p,Hg);let l;m();const{throttled:d,cancel:f}=xn(()=>{jn({process:E=>{if(gs(E))return;const P=g(E);return v(P),P},after:E=>{Mg(E)&&!y()&&C(E),l=E}},a)},Hg);function h(){jn({process:E=>y()?g(E):void 0},a)}function p(){jn({process:E=>ms(E)?Hn(E,t):void 0,after:g},a)}function g(E){return ms(E)&&(E=Hn(E,t)),y()&&(b(E)?w():(s.notify({previousState:l,newState:E}),l=E)),E}function m(){jn({process:E=>{if(gs(E))return Hn(E,t)},after:E=>{l=E}},a)}function v(E){if(gs(E))return!1;const{trackingType:P,isTracked:T}=r(E[n]);E[n]=P,delete E.isExpired,T&&!E.id&&(E.id=je(),E.created=String(kt()))}function y(){return l[n]!==void 0}function b(E){return l.id!==E.id||l[n]!==E[n]}function w(){l=Hn(l,t),o.notify()}function C(E){l=E,i.notify()}function _(E){jn({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(Hn(l,t))},stop:()=>{fs(u)},updateSessionState:_}}const Zu={GRANTED:"granted",NOT_GRANTED:"not-granted"};function eT(e){const t=new ge;return{tryToInit(n){e||(e=n)},update(n){e=n,t.notify()},isGranted(){return e===Zu.GRANTED},observable:t}}function Ir(e,t,n){if(typeof e!="object"||e===null)return JSON.stringify(e);const r=xr(Object.prototype),i=xr(Array.prototype),o=xr(Object.getPrototypeOf(e)),s=xr(e);try{return JSON.stringify(e,t,n)}catch{return"<error: unable to serialize object>"}finally{r(),i(),o(),s()}}function xr(e){const t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):ae}function Xu(e){return bs(e,location.href).href}function tT(e){try{return!!bs(e)}catch{return!1}}function nT(e){const t=bs(e).pathname;return t[0]==="/"?t:`/${t}`}function bs(e,t){const n=rT();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)} ${Ir({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 jg=URL;let ws;function rT(){if(ws===void 0)try{ws=new jg("http://test/path").href==="http://test/path"}catch{ws=!1}return ws?jg:void 0}const qg="datad0g.com",iT="dd0g-gov.com",qn="datadoghq.com",oT="datadoghq.eu",sT="ddog-gov.com",aT="pci.browser-intake-datadoghq.com",cT=["ddsource","ddtags"];function Ar(e,t,n){const r=uT(e,t);return{build(i,o){const s=lT(e,t,n,i,o);return r(s)},tags:n,urlPrefix:r(""),trackType:t}}function uT(e,t){const n=`/api/v2/${t}`,r=e.proxy;if(typeof r=="string"){const o=Xu(r);return s=>`${o}?ddforward=${encodeURIComponent(`${n}?${s}`)}`}if(typeof r=="function")return o=>r({path:n,parameters:o});const i=Wg(t,e);return o=>`https://${i}${n}?${o}`}function Wg(e,t){const{site:n=qn,internalAnalyticsSubdomain:r}=t;if(e==="logs"&&t.usePciIntake&&n===qn)return aT;if(r&&n===qn)return`${r}.${qn}`;if(n===iT)return`http-intake.logs.${n}`;const i=n.split("."),o=i.pop();return`browser-intake-${i.join("-")}.${o}`}function lT({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=${je()}`];return s&&c.push(`dd-evp-encoding=${s}`),n==="rum"&&c.push(`batch_time=${Fe()}`),t&&c.reverse(),c.join("&")}const dT=200;function fT(e){const{env:t,service:n,version:r,datacenter:i}=e,o=[];return t&&o.push(Es("env",t)),n&&o.push(Es("service",n)),r&&o.push(Es("version",r)),i&&o.push(Es("datacenter",i)),o}function Es(e,t){const n=dT-e.length-1;(t.length>n||pT(t))&&se.warn(`${e} value doesn't meet tag requirements and will be sanitized. ${$u} ${cs}/getting_started/tagging/#defining-tags`);const r=t.replace(/,/g,"_");return`${e}:${r}`}function pT(e){return hT()?new RegExp("[^\\p{Ll}\\p{Lo}0-9_:./-]","u").test(e):!1}function hT(){try{return new RegExp("[\\p{Ll}]","u"),!0}catch{return!1}}function gT(e){const t=e.site||qn,n=fT(e),r=mT(e,n);return{replica:vT(e,n),site:t,...r}}function mT(e,t){return{logsEndpointBuilder:Ar(e,"logs",t),rumEndpointBuilder:Ar(e,"rum",t),profilingEndpointBuilder:Ar(e,"profile",t),sessionReplayEndpointBuilder:Ar(e,"replay",t)}}function vT(e,t){if(!e.replica)return;const n={...e,site:qn,clientToken:e.replica.clientToken},r={logsEndpointBuilder:Ar(n,"logs",t),rumEndpointBuilder:Ar(n,"rum",t)};return{applicationId:e.replica.applicationId,...r}}function yT(e){return cT.every(t=>e.includes(t))}const Bi={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"},Qu={ALL:"all",SAMPLED:"sampled"};function el(e,t){return e!=null&&typeof e!="string"?(se.error(`${t} must be defined as a string`),!1):!0}function bT(e){return e&&typeof e=="string"&&!/(datadog|ddog|datad0g|dd0g)/.test(e)?(se.error(`Site should be a valid Datadog site. ${$u} ${cs}/getting_started/site/.`),!1):!0}function kr(e,t){return e!==void 0&&!pC(e)?(se.error(`${t} Sample Rate should be a number between 0 and 100`),!1):!0}function wT(e){var t,n,r,i,o,s;if(!e||!e.clientToken){se.error("Client Token is not configured, we will not send any data.");return}if(!(!bT(e.site)||!kr(e.sessionSampleRate,"Session")||!kr(e.telemetrySampleRate,"Telemetry")||!kr(e.telemetryConfigurationSampleRate,"Telemetry Configuration")||!kr(e.telemetryUsageSampleRate,"Telemetry Usage")||!el(e.version,"Version")||!el(e.env,"Env")||!el(e.service,"Service"))){if(e.trackingConsent!==void 0&&!ds(Zu,e.trackingConsent)){se.error('Tracking Consent should be either "granted" or "not-granted"');return}return{beforeSend:e.beforeSend&&Eg(e.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:XC(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:Zu.GRANTED,trackAnonymousUser:(s=e.trackAnonymousUser)!==null&&s!==void 0?s:!0,storeContextsAcrossPages:!!e.storeContextsAcrossPages,batchBytesLimit:16*Ni,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*Qe,batchMessagesLimit:50,messageBytesLimit:256*Ni,...gT(e)}}}function ET(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 Wn;(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"})(Wn||(Wn={}));const tl=new Set;function ST(e){Array.isArray(e)&&_T(e.filter(t=>ds(Wn,t)))}function _T(e){e.forEach(t=>{tl.add(t)})}function Ss(e){return tl.has(e)}function CT(){return tl}const $i="?";function kn(e){const t=[];let n=nl(e,"stack");const r=String(e);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
553
- `).forEach(i=>{const o=xT(i)||kT(i)||PT(i)||NT(i);o&&(!o.func&&o.line&&(o.func=$i),t.push(o))}),{message:nl(e,"message"),name:nl(e,"name"),stack:t}}const Gg="((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Rr="(?::(\\d+))",TT=new RegExp(`^\\s*at (.*?) ?\\(${Gg}${Rr}?${Rr}?\\)?\\s*$`,"i"),IT=new RegExp(`\\((\\S*)${Rr}${Rr}\\)`);function xT(e){const t=TT.exec(e);if(!t)return;const n=t[2]&&t[2].indexOf("native")===0,r=t[2]&&t[2].indexOf("eval")===0,i=IT.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]||$i,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}const AT=new RegExp(`^\\s*at ?${Gg}${Rr}?${Rr}??\\s*$`,"i");function kT(e){const t=AT.exec(e);if(t)return{args:[],column:t[3]?+t[3]:void 0,func:$i,line:t[2]?+t[2]:void 0,url:t[1]}}const RT=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function PT(e){const t=RT.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||$i,line:+t[3],url:t[2]}}const OT=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,LT=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function NT(e){const t=OT.exec(e);if(!t)return;const n=t[3]&&t[3].indexOf(" > eval")>-1,r=LT.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]||$i,line:t[4]?+t[4]:void 0,url:t[3]}}function nl(e,t){if(typeof e!="object"||!e||!(t in e))return;const n=e[t];return typeof n=="string"?n:void 0}function MT(e,t,n,r){const i=[{url:t,column:r,line:n}],{name:o,message:s}=FT(e);return{name:o,message:s,stack:i}}const DT=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function FT(e){let t,n;return{}.toString.call(e)==="[object String]"&&([,t,n]=DT.exec(e)),{name:t,message:n}}function _s(e){const n=new Error(e);n.name="HandlingStack";let r;return Vn(()=>{const i=kn(n);i.stack=i.stack.slice(2),r=Pr(i)}),r}function Pr(e){let t=Kg(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+=`
554
- at ${r}${i} @ ${n.url}${o}${s}`}),t}function Kg(e){return`${e.name||"Error"}: ${e.message}`}function lt(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!="function")if(t in e&&t.startsWith("on"))i=ae;else return{stop:ae};let o=!1;const s=function(){if(o)return i.apply(this,arguments);const a=Array.from(arguments);let c;Vn(n,null,[{target:this,parameters:a,onPostCall:l=>{c=l},handlingStack:r?_s("instrumented method"):void 0}]);const u=i.apply(this,a);return c&&Vn(c,null,[u]),u};return e[t]=s,{stop:()=>{o=!0,e[t]===s&&(e[t]=i)}}}function Vi(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.set||!r.configurable)return{stop:ae};const i=ae;let o=(a,c)=>{Ue(()=>{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 UT=220*Ni,BT="$",$T=3;function ke(e,t=UT){const n=xr(Object.prototype),r=xr(Array.prototype),i=[],o=new WeakMap,s=rl(e,BT,void 0,i,o),a=JSON.stringify(s);let c=a?a.length:0;if(c>t){ol(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=rl(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){ol(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=rl(u.source[d],u.path,d,i,o);if(f!==void 0&&(c+=JSON.stringify(f).length+l+d.length+$T,l=1),c>t){ol(t,"truncated",e);break}u.target[d]=f}}return n(),r(),s}function rl(e,t,n,r,i){const o=HT(e);if(!o||typeof o!="object")return VT(o);const s=il(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 VT(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 il(e){try{if(e instanceof Event)return zT(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 zT(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?il(e.currentTarget):null,target:e.target?il(e.target):null}}function HT(e){const t=e;if(t&&typeof t.toJSON=="function")try{return t.toJSON()}catch{}return e}function ol(e,t,n){se.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}const Yg="No stack, consider using an instance of Error";function Jg({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:o,source:s,handling:a}){const c=Rn(t),u=jT(e,c,o,t),l=qT(c,e)?Pr(e):Yg,d=c?Qg(t,s):void 0,f=e?e.name:void 0,h=Zg(t),p=Xg(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 jT(e,t,n,r){return e!=null&&e.message&&(e!=null&&e.name)?e.message:t?"Empty message":`${n} ${Ir(ke(r))}`}function qT(e,t){return t===void 0?!1:e?!0:t.stack.length>0&&(t.stack.length>1||t.stack[0].url!==void 0)}function Zg(e){return Rn(e)&&"dd_fingerprint"in e?String(e.dd_fingerprint):void 0}function Xg(e){if(e!==null&&typeof e=="object"&&"dd_context"in e)return e.dd_context}function Rn(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}function Qg(e,t){let n=e;const r=[];for(;Rn(n==null?void 0:n.cause)&&r.length<10;){const i=kn(n.cause);r.push({message:n.cause.message,source:t,type:i==null?void 0:i.name,stack:i&&Pr(i)}),n=n.cause}return r.length?r:void 0}const Or={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function WT(e){const t=(i,o)=>{const s=Jg({stackTrace:i,originalError:o,startClocks:rt(),nonErrorPrefix:"Uncaught",source:Or.SOURCE,handling:"unhandled"});e.notify(s)},{stop:n}=GT(t),{stop:r}=KT(t);return{stop:()=>{n(),r()}}}function GT(e){return lt(window,"onerror",({parameters:[t,n,r,i,o]})=>{let s;Rn(o)?s=kn(o):s=MT(t,n,r,i),e(s,o??t)})}function KT(e){return lt(window,"onunhandledrejection",({parameters:[t]})=>{const n=t.reason||"Empty reason",r=kn(n);e(r,n)})}function YT(e){const t={version:"6.6.3",onReady(n){n()},...e};return Object.defineProperty(t,"_setDebug",{get(){return _C},enumerable:!1}),t}function JT(e,t,n){const r=e[t];r&&!r.q&&r.version&&se.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=>Eg(i,"onReady callback threw an error:")())}function em(e,t){t.silentMultipleInit||se.error(`${e} is already initialized.`)}function Se(e,t,n,r,i){return dt(e,t,[n],r,i)}function dt(e,t,n,r,{once:i,capture:o,passive:s}={}){const a=Y(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=In(u,"addEventListener");n.forEach(f=>l.call(t,f,a,c));function d(){const f=In(u,"removeEventListener");n.forEach(h=>f.call(t,h,a,c))}return{stop:d}}const zi={intervention:"intervention",cspViolation:"csp_violation"};function ZT(e,t){const n=[];t.includes(zi.cspViolation)&&n.push(QT(e));const r=t.filter(i=>i!==zi.cspViolation);return r.length&&n.push(XT(r)),Ag(...n)}function XT(e){return new ge(t=>{if(!window.ReportingObserver)return;const n=Y((i,o)=>i.forEach(s=>t.notify(eI(s)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function QT(e){return new ge(t=>{const{stop:n}=Se(e,document,"securitypolicyviolation",r=>{t.notify(tI(r))});return n})}function eI(e){const{type:t,body:n}=e;return tm({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:nm(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}function tI(e){const t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return tm({type:e.effectiveDirective,message:`${zi.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:nm(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${kg(e.originalPolicy,100,"...")}"`:"no policy",e.sourceFile,e.lineNumber,e.columnNumber)})}function tm(e){return{startClocks:rt(),source:Or.REPORT,handling:"unhandled",...e}}function nm(e,t,n,r,i){return n?Pr({name:e,message:t,stack:[{func:"?",url:n,line:r??void 0,column:i??void 0}]}):void 0}function sl(e,t){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}function Gn(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function Cs(e,t,n=nI()){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]=Cs(i[o],t[o],n);return i}const r=Gn(e)==="object"?e:{};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Cs(r[i],t[i],n));return r}function al(e){return Cs(void 0,e)}function Dt(...e){let t;for(const n of e)n!=null&&(t=Cs(t,n));return t}function nI(){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 rm(){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 im(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}const rI=500;function om(){const e=[];return{add:i=>{e.push(i)>rI&&e.splice(0,1)},remove:i=>{im(e,i)},drain:i=>{e.forEach(o=>o(i)),e.length=0}}}const Kn={log:"log",configuration:"configuration",usage:"usage"},iI=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],oI=[sT];let sm=om(),Lr=e=>{sm.add(()=>Lr(e))};function sI(e,t){let n;const r=new ge,i=new Set,o=!oI.includes(t.site)&&Tn(t.telemetrySampleRate),s={[Kn.log]:o,[Kn.configuration]:o&&Tn(t.telemetryConfigurationSampleRate),[Kn.usage]:o&&Tn(t.telemetryUsageSampleRate)},a=aI();Lr=u=>{const l=Ir(u);if(s[u.type]&&i.size<t.maxTelemetryEventsPerPage&&!i.has(l)){const d=c(e,u,a);r.notify(d),sl("telemetry",d),i.add(l)}},SC(cl);function c(u,l,d){return Dt({type:"telemetry",date:Fe(),service:u,version:"6.6.3",source:"browser",_dd:{format_version:2},telemetry:Dt(l,{runtime_env:d,connectivity:rm(),sdk_setup:"npm"}),experimental_features:Array.from(CT())},n!==void 0?n():{})}return{setContextProvider:u=>{n=u},observable:r,enabled:o}}function aI(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function cI(){sm.drain()}function uI(e){return e.site===qg}function dn(e,t){ju(as.debug,e,t),Lr({type:Kn.log,message:e,status:"debug",...t})}function cl(e,t){Lr({type:Kn.log,status:"error",...dI(e),...t})}function lI(e){Lr({type:Kn.configuration,configuration:e})}function it(e){Lr({type:Kn.usage,usage:e})}function dI(e){if(Rn(e)){const t=kn(e);return{error:{kind:t.name,stack:Pr(fI(t))},message:t.message}}return{error:{stack:Yg},message:`Uncaught ${Ir(e)}`}}function fI(e){return e.stack=e.stack.filter(t=>!t.url||iI.some(n=>t.url.startsWith(n))),e}const Hi=1/0,pI=ct;let ji=null;const Ts=new Set;function hI(){Ts.forEach(e=>e())}function Nr({expireDelay:e,maxEntries:t}){let n=[];const r=[];ji||(ji=Cr(()=>hI(),pI));const i=()=>{const h=Rt()-e;for(;n.length>0&&n[n.length-1].endTime<h;){const p=n.pop();p&&r.push(p.startTime)}};Ts.add(i);function o(h,p){const g={value:h,startTime:p,endTime:Hi,remove:()=>{im(n,g)},close:m=>{g.endTime=m}};return t&&n.length>=t&&n.pop(),n.unshift(g),g}function s(h=Hi,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===Hi&&p.close(h)}function c(h=Hi,p=0){const g=_r(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===Hi?"Infinity":p,value:g}))}function l(){return r}function d(){n=[]}function f(){Ts.delete(i),Ts.size===0&&ji&&(fs(ji),ji=null)}return{add:o,find:s,closeActive:a,findAll:c,reset:d,stop:f,getAllEntries:u,getDeletedEntries:l}}const gI=ct,mI=zn;function vI(e,t,n,r){const i=new ge,o=new ge,s=QC(e.sessionStoreStrategyType,e,t,n),a=Nr({expireDelay:mI});s.renewObservable.subscribe(()=>{a.add(c(),Rt()),i.notify()}),s.expireObservable.subscribe(()=>{o.notify(),a.closeActive(Rt())}),s.expandOrRenewSession(),a.add(c(),Cg().relative),r.observable.subscribe(()=>{r.isGranted()?s.expandOrRenewSession():s.expire()}),yI(e,()=>{r.isGranted()&&s.expandOrRenewSession()}),bI(e,()=>s.expandSession()),wI(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 yI(e,t){const{stop:n}=dt(e,window,["click","touchstart","keydown","scroll"],t,{capture:!0,passive:!0})}function bI(e,t){const n=()=>{document.visibilityState==="visible"&&t()},{stop:r}=Se(e,document,"visibilitychange",n);Cr(n,gI)}function wI(e,t){const{stop:n}=Se(e,window,"resume",t,{capture:!0})}function EI(e){return e>=500}function SI(e){try{return e.clone()}catch{return}}const _I=80*Ni,CI=32,am=3*Tg,TI=ct,cm=Qe;function um(e,t,n,r,i){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?dm(e,t,n,{onSuccess:()=>fm(0,t,n,r,i),onFailure:()=>{t.queuedPayloads.enqueue(e),lm(t,n,r,i)}}):t.queuedPayloads.enqueue(e)}function lm(e,t,n,r){e.transportStatus===2&&Ue(()=>{const i=e.queuedPayloads.first();dm(i,e,t,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=cm,fm(1,e,t,n,r)},onFailure:()=>{e.currentBackoffTime=Math.min(TI,e.currentBackoffTime*2),lm(e,t,n,r)}})},e.currentBackoffTime)}function dm(e,t,n,{onSuccess:r,onFailure:i}){t.bandwidthMonitor.add(e),n(e,o=>{t.bandwidthMonitor.remove(e),II(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 fm(e,t,n,r,i){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i({message:`Reached max ${r} events size queued for upload: ${am/Tg}MiB`,source:Or.AGENT,startClocks:rt()}),t.queueFullReported=!0);const o=t.queuedPayloads;for(t.queuedPayloads=pm();o.size()>0;)um(o.dequeue(),t,n,r,i)}function II(e){return e.type!=="opaque"&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||EI(e.status))}function xI(){return{transportStatus:0,currentBackoffTime:cm,bandwidthMonitor:AI(),queuedPayloads:pm(),queueFullReported:!1}}function pm(){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>=am}}}function AI(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=_I&&this.ongoingRequestCount<CI},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){this.ongoingRequestCount-=1,this.ongoingByteCount-=e.bytesCount}}}function hm(e,t,n){const r=xI(),i=(o,s)=>PI(e,t,o,s);return{send:o=>{um(o,r,i,e.trackType,n)},sendOnExit:o=>{kI(e,t,o)}}}function kI(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){RI(i)}ul(e,n)}let gm=!1;function RI(e){gm||(gm=!0,ln(e))}function PI(e,t,n,r){if(OI()&&n.bytesCount<t){const o=e.build("fetch-keepalive",n);fetch(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(Y(s=>r==null?void 0:r({status:s.status,type:s.type}))).catch(Y(()=>ul(e,n,r)))}else ul(e,n,r)}function ul(e,t,n){const r=e.build("fetch",t);fetch(r,{method:"POST",body:t.data,mode:"cors"}).then(Y(i=>n==null?void 0:n({status:i.status,type:i.type}))).catch(Y(()=>n==null?void 0:n({status:0})))}function OI(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function Mr(){const e=LI();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 mm(e){const t=Mr();return!!t&&t.getCapabilities().includes(e)}function Yn(e){var t;e===void 0&&(e=(t=Jt().location)===null||t===void 0?void 0:t.hostname);const n=Mr();return!!n&&n.getAllowedWebViewHosts().some(r=>e===r||e.endsWith(`.${r}`))}function LI(){return Jt().DatadogEventBridge}const Dr={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function NI(e){return new ge(t=>{const{stop:n}=dt(e,window,["visibilitychange","freeze"],i=>{i.type==="visibilitychange"&&document.visibilityState==="hidden"?t.notify({reason:Dr.HIDDEN}):i.type==="freeze"&&t.notify({reason:Dr.FROZEN})},{capture:!0}),r=Se(e,window,"beforeunload",()=>{t.notify({reason:Dr.UNLOADING})}).stop;return()=>{n(),r()}})}function vm(e){return Og(Dr).includes(e)}function MI({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:`
555
- ${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=Ir(d),p=e.estimateEncodedBytesCount(h);if(p>=r){se.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${$u} ${fC}/#technical-limitations`);return}a(f)&&c(f),s(h,p,f)}function l(d){const f=Og(i).join(`
556
- `);i={};const h=vm(d.reason),p=h?t.sendOnExit:t.send;if(h&&e.isAsync){const g=e.finishSync();g.outputBytesCount&&p(ym(g));const m=[g.pendingData,f].filter(Boolean).join(`
557
- `);m&&p({data:m,bytesCount:Ig(m)})}else f&&e.write(e.isEmpty?f:`
558
- ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.unsubscribe}}function ym(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 DI({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 ge(()=>()=>{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=Ue(()=>{l("duration_limit")},n))}function h(){ut(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 FI(e,t,n,r,i,o,s=MI){const a=u(e,t),c=n&&u(e,n);function u(l,{endpoint:d,encoder:f}){return s({encoder:f,request:hm(d,l.batchBytesLimit,r),flushController:DI({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 UI(){let e="",t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){const i=Ig(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 BI{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 ll(e,t,n){let r=0,i=!1;return{isLimitReached(){if(r===0&&Ue(()=>{r=0},ct),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:Or.AGENT,startClocks:rt()})}finally{i=!1}}return!0}}}function dl(e,t,n){return document.readyState===t||document.readyState==="complete"?(n(),{stop:ae}):Se(e,window,t==="complete"?"load":"DOMContentLoaded",n,{once:!0})}function $I(e,t){return new Promise(n=>{dl(e,t,n)})}let fl;const pl=new WeakMap;function VI(e){return fl||(fl=zI(e)),fl}function zI(e){return new ge(t=>{const{stop:n}=lt(XMLHttpRequest.prototype,"open",HI),{stop:r}=lt(XMLHttpRequest.prototype,"send",o=>{jI(o,e,t)},{computeHandlingStack:!0}),{stop:i}=lt(XMLHttpRequest.prototype,"abort",qI);return()=>{n(),r(),i()}})}function HI({target:e,parameters:[t,n]}){pl.set(e,{state:"open",method:String(t).toUpperCase(),url:Xu(String(n))})}function jI({target:e,handlingStack:t},n,r){const i=pl.get(e);if(!i)return;const o=i;o.state="start",o.startClocks=rt(),o.isAborted=!1,o.xhr=e,o.handlingStack=t;let s=!1;const{stop:a}=lt(e,"onreadystatechange",()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(u(),a(),s)return;s=!0;const l=i;l.state="complete",l.duration=He(o.startClocks.timeStamp,Fe()),l.status=e.status,r.notify(Mi(l))},{stop:u}=Se(n,e,"loadend",c);r.notify(o)}function qI({target:e}){const t=pl.get(e);t&&(t.isAborted=!0)}let hl;function bm(){return hl||(hl=WI()),hl}function WI(){return new ge(e=>{if(!window.fetch)return;const{stop:t}=lt(window,"fetch",n=>GI(n,e),{computeHandlingStack:!0});return t})}function GI({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:Xu(String(i)),u=rt(),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=>KI(r,d,l))}function KI(e,t,n){const r=n;function i(o){r.state="resolve",Object.assign(r,o),e.notify(r)}t.then(Y(o=>{i({response:o,responseType:o.type,status:o.status,isAborted:!1})}),Y(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 wm(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(Y(e),t);return()=>window.cancelIdleCallback(n)}return JI(e)}const YI=50;function JI(e){const t=kt(),n=Ue(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,YI-(kt()-t))})},0);return()=>ut(n)}const ZI=Qe,XI=30;function QI(){const e=[];function t(r){let i;if(r.didTimeout){const o=performance.now();i=()=>XI-(performance.now()-o)}else i=r.timeRemaining.bind(r);for(;i()>0&&e.length;)e.shift()();e.length&&n()}function n(){wm(t,{timeout:ZI})}return{push(r){e.push(r)===1&&n()}}}let gl={};function e3(e){const t=e.map(n=>(gl[n]||(gl[n]=t3(n)),gl[n]));return Ag(...t)}function t3(e){return new ge(t=>{const n=un[e];return un[e]=(...r)=>{n.apply(console,r);const i=_s("console error");Vn(()=>{t.notify(n3(r,e,i))})},()=>{un[e]=n}})}function n3(e,t,n){const r=e.map(o=>r3(o)).join(" ");let i;if(t===as.error){const o=e.find(Rn);i={stack:o?Pr(kn(o)):void 0,fingerprint:Zg(o),causes:o?Qg(o,"console"):void 0,startClocks:rt(),message:r,source:Or.CONSOLE,handling:"handled",handlingStack:n,context:Xg(o),originalError:o}}return{api:t,message:r,error:i,handlingStack:n}}function r3(e){return typeof e=="string"?ke(e):Rn(e)?Kg(kn(e)):Ir(ke(e),void 0,2)}function i3(e){const t=Gn(e)==="object";return t||se.error("Unsupported context:",e),t}function ml(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)&&se.warn(`The property ${i} of ${n} is required; context will not be sent to the intake.`);return r}function Is(e="",{propertiesConfig:t={}}={}){let n={};const r=new ge,i={getContext:()=>al(n),setContext:o=>{i3(o)?n=ke(ml(o,t,e)):i.clearContext(),r.notify()},setContextProperty:(o,s)=>{n=ke(ml({...n,[o]:s},t,e)),r.notify()},removeContextProperty:o=>{delete n[o],ml(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}const o3="_dd_c",s3=[];function vl(e,t,n,r){const i=a3(n,r);s3.push(Se(e,window,"storage",({key:u})=>{i===u&&s()})),t.changeObservable.subscribe(a);const o=Dt(c(),t.getContext());$n(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 a3(e,t){return`${o3}_${e}_${t}`}const Be={userContext:"userContext",globalContext:"globalContext",accountContext:"accountContext"},ot={getContext:"getContext",setContext:"setContext",setContextProperty:"setContextProperty",removeContextProperty:"removeContextProperty",clearContext:"clearContext"};function c3(e,t,n){const r=e.getReader();let i=0;o();function o(){r.read().then(Y(a=>{if(a.done){s();return}i+=a.value.length,i>n.bytesLimit?s():o()}),Y(a=>t(a)))}function s(){r.cancel().catch(ae),t(void 0,void 0,void 0)}}const u3="datadog-synthetics-public-id",l3="datadog-synthetics-result-id",d3="datadog-synthetics-injects-rum";function Em(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||An(d3))}function f3(){const e=window._DATADOG_SYNTHETICS_PUBLIC_ID||An(u3);return typeof e=="string"?e:void 0}function p3(){const e=window._DATADOG_SYNTHETICS_RESULT_ID||An(l3);return typeof e=="string"?e:void 0}function yl(e){const t=Gn(e);return t==="string"||t==="function"||e instanceof RegExp}function Sm(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){se.error(i)}return!1})}function h3(){return{vitalsByName:new Map,vitalsByReference:new WeakMap}}function g3(e,t,n){function r(o){return!t.wasInPageStateDuringPeriod("frozen",o.startClocks.relative,o.duration)}function i(o){r(o)&&e.notify(12,v3(o))}return{addDurationVital:i,startDurationVital:(o,s={})=>_m(n,o,s),stopDurationVital:(o,s={})=>{Cm(i,n,o,s)}}}function _m({vitalsByName:e,vitalsByReference:t},n,r={}){const i={name:n,startClocks:rt(),context:r.context,description:r.description},o={__dd_vital_reference:!0};return e.set(n,i),t.set(o,i),o}function Cm(e,{vitalsByName:t,vitalsByReference:n},r,i={}){const o=typeof r=="string"?t.get(r):n.get(r);o&&(e(m3(o,o.startClocks,i,rt())),typeof r=="string"?t.delete(r):n.delete(r))}function m3(e,t,n,r){var i;return{name:e.name,type:"duration",startClocks:t,duration:He(t.timeStamp,r.timeStamp),context:Dt(e.context,n.context),description:(i=n.description)!==null&&i!==void 0?i:e.description}}function v3(e,t){const n={date:e.startClocks.timeStamp,vital:{id:je(),type:e.type,name:e.name,duration:G(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 Tm(e,t,n){if(e)for(const r of e){const i=r[t];i&&i(n)}}function y3(){return xm(64)}function Im(){return xm(63)}function xm(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 Fr(e){return e.toString(16).padStart(16,"0")}let xs;function b3(e,t){if(t===100)return!0;if(t===0)return!1;if(xs&&e===xs.sessionId)return xs.decision;let n;return window.BigInt?n=w3(BigInt(`0x${e.split("-")[4]}`),t):n=Tn(t),xs={sessionId:e,decision:n},n}function w3(e,t){const n=BigInt("1111111111111111111"),r=BigInt("0x10000000000000000"),i=e*n%r;return Number(i)<=t/100*Number(r)}function E3(e){const t=e;return Gn(t)==="object"&&yl(t.match)&&Array.isArray(t.propagatorTypes)}function S3(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function _3(e,t,n){return{clearTracingIfNeeded:S3,traceFetch:r=>Am(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=Mi(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(Ku(i))}}),traceXhr:(r,i)=>Am(e,r,t,n,o=>{Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])})})}}function Am(e,t,n,r,i){const o=n.findTrackedSession();if(!o)return;const s=e.allowedTracingUrls.find(u=>Sm([u.match],t.url,!0));if(!s)return;const a=b3(o.id,e.traceSampleRate);(a||e.traceContextInjection===Qu.ALL)&&(t.traceSampled=a,t.traceId=y3(),t.spanId=Im(),i(C3(t.traceId,t.spanId,t.traceSampled,s.propagatorTypes,r,e)))}function C3(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${Fr(e)}-${Fr(t)}-0${n?"1":"0"}`,tracestate:`dd=s:${n?"1":"0"};o:rum`});break}case"b3":{Object.assign(s,{b3:`${Fr(e)}-${Fr(t)}-${n?"1":"0"}`});break}case"b3multi":{Object.assign(s,{"X-B3-TraceId":Fr(e),"X-B3-SpanId":Fr(t),"X-B3-Sampled":n?"1":"0"});break}}}),Ss(Wn.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 km=["tracecontext","datadog"];function T3(e){var t,n,r,i,o,s,a;if(e.trackFeatureFlagsForEvents!==void 0&&!Array.isArray(e.trackFeatureFlagsForEvents)&&se.warn("trackFeatureFlagsForEvents should be an array"),!e.applicationId){se.error("Application ID is not configured, no RUM data will be collected.");return}if(!kr(e.sessionReplaySampleRate,"Session Replay")||!kr(e.traceSampleRate,"Trace"))return;if(e.excludedActivityUrls!==void 0&&!Array.isArray(e.excludedActivityUrls)){se.error("Excluded Activity Urls should be an array");return}const c=I3(e);if(!c)return;const u=wT(e);if(!u)return;const l=Ss(Wn.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:Oi(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:ds(Bi,e.defaultPrivacyLevel)?e.defaultPrivacyLevel:Bi.MASK,enablePrivacyForActionName:!!e.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:ds(Qu,e.traceContextInjection)?e.traceContextInjection:Qu.SAMPLED,plugins:e.plugins||[],trackFeatureFlagsForEvents:e.trackFeatureFlagsForEvents||[],profilingSampleRate:l&&(a=e.profilingSampleRate)!==null&&a!==void 0?a:0,propagateTraceBaggage:!!e.propagateTraceBaggage,...u}}function I3(e){if(e.allowedTracingUrls===void 0)return[];if(!Array.isArray(e.allowedTracingUrls)){se.error("Allowed Tracing URLs should be an array");return}if(e.allowedTracingUrls.length!==0&&e.service===void 0){se.error("Service needs to be configured when tracing is enabled");return}const t=[];return e.allowedTracingUrls.forEach(n=>{yl(n)?t.push({match:n,propagatorTypes:km}):E3(n)?t.push(n):se.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",n)}),t}function x3(e){const t=new Set;return Array.isArray(e.allowedTracingUrls)&&e.allowedTracingUrls.length>0&&e.allowedTracingUrls.forEach(n=>{yl(n)?km.forEach(r=>t.add(r)):Gn(n)==="object"&&Array.isArray(n.propagatorTypes)&&n.propagatorTypes.forEach(r=>t.add(r))}),Array.from(t)}function A3(e){var t;const n=ET(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:x3(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 k3="v1";function R3(e,t){O3(e,n=>{t(P3(e,n))})}function P3(e,t){return{...e,...t}}function O3(e,t){const n=new XMLHttpRequest;Se(e,n,"load",function(){if(n.status===200){const r=JSON.parse(n.responseText);t(r.rum)}else Rm()}),Se(e,n,"error",function(){Rm()}),n.open("GET",L3(e)),n.send()}function L3(e){return`https://sdk-configuration.${Wg("rum",e)}/${k3}/${encodeURIComponent(e.remoteConfigurationId)}.json`}function Rm(){se.error("Error fetching the remote configuration.")}function N3(e){const t=Pm();return e.storeContextsAcrossPages&&vl(e,t,"rum",2),t}function Pm(){return Is("global context")}function M3(e){const t=Om();return e.storeContextsAcrossPages&&vl(e,t,"rum",1),t}function Om(){return Is("user",{propertiesConfig:{id:{type:"string"},name:{type:"string"},email:{type:"string"}}})}function D3(e){const t=Lm();return e.storeContextsAcrossPages&&vl(e,t,"rum",4),t}function Lm(){return Is("account",{propertiesConfig:{id:{type:"string",required:!0},name:{type:"string"}}})}function F3({ignoreInitIfSyntheticsWillInjectRum:e,startDeflateWorker:t},n,r,i){const o=om(),s=Pm();bl(s,Be.globalContext,o);const a=Om();bl(a,Be.userContext,o);const c=Lm();bl(c,Be.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=Yn();if(w&&(b=U3(b)),d=b,lI(A3(b)),f){em("DD_RUM",b);return}const C=T3(b);if(C){if(!w&&!C.sessionStoreStrategyType){se.warn("No storage available for session. We will not send any data.");return}C.compressIntakeRequests&&!w&&t&&(l=t(C,"Datadog RUM",ae),!l)||(f=C,bm().subscribe(ae),n.tryToInit(C.trackingConsent),g())}}const v=b=>{o.add(w=>w.addDurationVital(b))};return{init(b,w){if(!b){se.error("Missing configuration");return}ST(b.enableExperimentalFeatures),d=b,!(e&&Em())&&(Tm(b.plugins,"onInit",{initConfiguration:b,publicApi:w}),b.remoteConfigurationId?R3(b,m):m(b))},get initConfiguration(){return d},getInternalContext:ae,stopSession:ae,addTiming(b,w=Fe()){o.add(C=>C.addTiming(b,w))},startView(b,w=rt()){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 _m(r,b,w)},stopDurationVital(b,w){Cm(v,r,b,w)},addDurationVital:v}}function U3(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=Mr())===null||n===void 0?void 0:n.getPrivacyLevel()}}function bl(e,t,n){e.changeObservable.subscribe(()=>{const r=e.getContext();n.add(i=>i[t].setContext(r))})}function B3(e,t,n,r={}){const i=eT(),o=h3();let s=F3(r,i,o,(l,d,f)=>{const h=e(l,t,n,f,d&&r.createDeflateEncoder?p=>r.createDeflateEncoder(l,d,p):UI,i,o);return t.onRumStart(h.lifeCycle,l,h.session,h.viewHistory,d),n.onRumStart(h.lifeCycle,l,h.session,h.viewHistory),s=$3(s,h),Tm(l.plugins,"onRumStart",{strategy:s}),h});const a=Y(l=>{const d=typeof l=="object"?l:{name:l};s.startView(d),it({feature:"start-view"})});function c(l,d,f){return Y((...h)=>(it({feature:f}),s[l][d](...h)))}const u=YT({init:Y(l=>{s.init(l,u)}),setTrackingConsent:Y(l=>{i.update(l),it({feature:"set-tracking-consent",tracking_consent:l})}),setViewName:Y(l=>{s.setViewName(l),it({feature:"set-view-name"})}),setViewContext:Y(l=>{s.setViewContext(l),it({feature:"set-view-context"})}),setViewContextProperty:Y((l,d)=>{s.setViewContextProperty(l,d),it({feature:"set-view-context-property"})}),getViewContext:Y(()=>(it({feature:"set-view-context-property"}),s.getViewContext())),getInternalContext:Y(l=>s.getInternalContext(l)),getInitConfiguration:Y(()=>al(s.initConfiguration)),addAction:(l,d)=>{const f=_s("action");Vn(()=>{s.addAction({name:ke(l),context:ke(d),startClocks:rt(),type:"custom",handlingStack:f}),it({feature:"add-action"})})},addError:(l,d)=>{const f=_s("error");Vn(()=>{s.addError({error:l,handlingStack:f,context:ke(d),startClocks:rt()}),it({feature:"add-error"})})},addTiming:Y((l,d)=>{s.addTiming(ke(l),d)}),setGlobalContext:c(Be.globalContext,ot.setContext,"set-global-context"),getGlobalContext:c(Be.globalContext,ot.getContext,"get-global-context"),setGlobalContextProperty:c(Be.globalContext,ot.setContextProperty,"set-global-context-property"),removeGlobalContextProperty:c(Be.globalContext,ot.removeContextProperty,"remove-global-context-property"),clearGlobalContext:c(Be.globalContext,ot.clearContext,"clear-global-context"),setUser:c(Be.userContext,ot.setContext,"set-user"),getUser:c(Be.userContext,ot.getContext,"get-user"),setUserProperty:c(Be.userContext,ot.setContextProperty,"set-user-property"),removeUserProperty:c(Be.userContext,ot.removeContextProperty,"remove-user-property"),clearUser:c(Be.userContext,ot.clearContext,"clear-user"),setAccount:c(Be.accountContext,ot.setContext,"set-account"),getAccount:c(Be.accountContext,ot.getContext,"get-account"),setAccountProperty:c(Be.accountContext,ot.setContextProperty,"set-account-property"),removeAccountProperty:c(Be.accountContext,ot.removeContextProperty,"remove-account-property"),clearAccount:c(Be.accountContext,ot.clearContext,"clear-account"),startView:a,stopSession:Y(()=>{s.stopSession(),it({feature:"stop-session"})}),addFeatureFlagEvaluation:Y((l,d)=>{s.addFeatureFlagEvaluation(ke(l),ke(d)),it({feature:"add-feature-flag-evaluation"})}),getSessionReplayLink:Y(()=>t.getSessionReplayLink()),startSessionReplayRecording:Y(l=>{t.start(l),it({feature:"start-session-replay-recording",force:l&&l.force})}),stopSessionReplayRecording:Y(()=>t.stop()),addDurationVital:Y((l,d)=>{it({feature:"add-duration-vital"}),s.addDurationVital({name:ke(l),type:"duration",startClocks:hC(d.startTime),duration:d.duration,context:ke(d&&d.context),description:ke(d&&d.description)})}),startDurationVital:Y((l,d)=>(it({feature:"start-duration-vital"}),s.startDurationVital(ke(l),{context:ke(d&&d.context),description:ke(d&&d.description)}))),stopDurationVital:Y((l,d)=>{it({feature:"stop-duration-vital"}),s.stopDurationVital(typeof l=="string"?ke(l):l,{context:ke(d&&d.context),description:ke(d&&d.description)})})});return u}function $3(e,t){return{init:n=>{em("DD_RUM",n)},initConfiguration:e.initConfiguration,...t}}function V3(){const e=Nm();return new ge(t=>{if(!e)return;const n=new e(Y(()=>t.notify()));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function Nm(){let e;const t=window;if(t.Zone&&(e=In(t,"MutationObserver"),t.MutationObserver&&e===t.MutationObserver)){const n=new t.MutationObserver(ae),r=In(n,"originalInstance");e=r&&r.constructor}return e||(e=t.MutationObserver),e}function z3(){const e=new ge,{stop:t}=lt(window,"open",()=>e.notify());return{observable:e,stop:t}}function H3(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 j3=BI,q3=zn;function W3(e){const t=Nr({expireDelay:q3});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 Mm="initial_document",G3=[["document",e=>Mm===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 K3(e){const t=e.name;if(!tT(t))return dn(`Failed to construct URL for "${e.name}"`),"other";const n=nT(t);for(const[r,i]of G3)if(i(e.initiatorType,n))return r;return"other"}function Dm(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Y3(e){return e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch"}function Fm(e){const{duration:t,startTime:n,responseEnd:r}=e;return t===0&&n<r?He(n,r):t}function J3(e){if(!Bm(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 Um(e){return e.duration>=0}function Bm(e){const t=Dm(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=Z3(e)?Dm(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart):!0;return t&&n}function Z3(e){return e.redirectEnd>e.startTime}function Jn(e,t,n){if(e<=t&&t<=n)return{duration:G(He(t,n)),start:G(He(e,t))}}function $m(e){return e.nextHopProtocol===""?void 0:e.nextHopProtocol}function Vm(e){return e.deliveryType===""?"other":e.deliveryType}function X3(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 wl(e){return e&&!yT(e)}const Q3=/data:(.+)?(;base64)?,/g,zm=24e3;function Hm(e){return e.length<=zm?!1:e.substring(0,5)==="data:"?(e=e.substring(0,zm),!0):!1}function jm(e){return`${e.match(Q3)[0]}[...]`}let qm=1;function e5(e,t,n,r){const i=_3(t,n,r);t5(e,t,i),n5(e,i)}function t5(e,t,n){const r=VI(t).subscribe(i=>{const o=i;if(wl(o.url))switch(o.state){case"start":n.traceXhr(o,o.xhr),o.requestIndex=Wm(),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 n5(e,t){const n=bm().subscribe(r=>{const i=r;if(wl(i.url))switch(i.state){case"start":t.traceFetch(i),i.requestIndex=Wm(),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":r5(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 Wm(){const e=qm;return qm+=1,e}function r5(e,t){const n=e.response&&SI(e.response);!n||!n.body?t(He(e.startClocks.timeStamp,Fe())):c3(n.body,()=>{t(He(e.startClocks.timeStamp,Fe()))},{bytesLimit:Number.POSITIVE_INFINITY})}function Gm(e){return Oi(e)&&e<0?void 0:e}function Km({lifeCycle:e,isChildEvent:t,onChange:n=ae}){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 i5(e,t){const n=kt();let r=!1;const{stop:i}=dt(e,window,["click","mousedown","keydown","touchstart","pointerdown"],a=>{if(!a.cancelable)return;const c={entryType:"first-input",processingStart:Rt(),processingEnd:Rt(),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){dt(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<kt()-n&&t(a)}}}var fe;(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"})(fe||(fe={}));function Zt(e,t){return new ge(n=>{if(!window.PerformanceObserver)return;const r=c=>{const u=a5(c);u.length>0&&n.notify(u)};let i,o=!0;const s=new PerformanceObserver(Y(c=>{o?i=Ue(()=>r(c.getEntries())):r(c.getEntries())}));try{s.observe(t)}catch{if([fe.RESOURCE,fe.NAVIGATION,fe.LONG_TASK,fe.PAINT].includes(t.type)){t.buffered&&(i=Ue(()=>r(performance.getEntriesByType(t.type))));try{s.observe({entryTypes:[t.type]})}catch{return}}}o=!1,o5(e);let a;return!Zn(fe.FIRST_INPUT)&&t.type===fe.FIRST_INPUT&&({stop:a}=i5(e,c=>{r([c])})),()=>{s.disconnect(),a&&a(),ut(i)}})}let qi;function o5(e){return!qi&&s5()&&"addEventListener"in performance&&(qi=Se(e,performance,"resourcetimingbufferfull",()=>{performance.clearResourceTimings()})),()=>{qi==null||qi.stop()}}function s5(){return window.performance!==void 0&&"getEntries"in performance}function Zn(e){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(e)}function a5(e){return e.filter(t=>!c5(t))}function c5(e){return e.entryType===fe.RESOURCE&&(!wl(e.name)||!Um(e))}const Ym=100,u5=100;function El(e,t,n,r,i,o){const s=d5(e,t,n,r);return l5(s,i,o)}function l5(e,t,n){let r,i=!1;const o=Ue(Y(()=>u({hadActivity:!1})),Ym),s=n!==void 0?Ue(Y(()=>u({hadActivity:!0,end:Fe()})),n):void 0,a=e.subscribe(({isBusy:l})=>{ut(o),ut(r);const d=Fe();l||(r=Ue(Y(()=>u({hadActivity:!0,end:d})),u5))}),c=()=>{i=!0,ut(o),ut(r),ut(s),a.unsubscribe()};function u(l){i||(c(),t(l))}return{stop:c}}function d5(e,t,n,r){return new ge(i=>{const o=[];let s,a=0;return o.push(t.subscribe(c),n.subscribe(c),Zt(r,{type:fe.RESOURCE}).subscribe(u=>{u.some(l=>!Sl(r,l.name))&&c()}),e.subscribe(7,u=>{Sl(r,u.url)||(s===void 0&&(s=u.requestIndex),a+=1,c())}),e.subscribe(8,u=>{Sl(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 Sl(e,t){return Sm(e.excludedActivityUrls,t)}function Jm(e){return e.nodeType===Node.TEXT_NODE}function f5(e){return e.nodeType===Node.COMMENT_NODE}function Ur(e){return e.nodeType===Node.ELEMENT_NODE}function As(e){return Ur(e)&&!!e.shadowRoot}function _l(e){const t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Ur(t.host)}function p5(e){return e.childNodes.length>0||As(e)}function Zm(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;As(e)&&t(e.shadowRoot)}function ks(e){return _l(e)?e.host:e.parentNode}const H={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Bi.ALLOW,MASK:Bi.MASK,MASK_USER_INPUT:Bi.MASK_USER_INPUT},Cl="data-dd-privacy",h5="hidden",g5="dd-privacy-",Pn="***",Xm="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",m5={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},v5="x";function Xt(e,t,n){if(n&&n.has(e))return n.get(e);const r=ks(e),i=r?Xt(r,t,n):t,o=ev(e),s=Qm(o,i);return n&&n.set(e,s),s}function Qm(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 ev(e){if(Ur(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(Br(H.HIDDEN)))return H.HIDDEN;if(e.matches(Br(H.MASK)))return H.MASK;if(e.matches(Br(H.MASK_USER_INPUT)))return H.MASK_USER_INPUT;if(e.matches(Br(H.ALLOW)))return H.ALLOW;if(b5(e))return H.IGNORE}}function Rs(e,t){switch(t){case H.MASK:case H.HIDDEN:case H.IGNORE:return!0;case H.MASK_USER_INPUT:return Jm(e)?tv(e.parentNode):tv(e);default:return!1}}function tv(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!!m5[t.tagName]}const y5=e=>e.replace(/\S/g,v5);function nv(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=Pn;else if(s===H.HIDDEN)o=Pn;else if(Rs(e,s))if(i==="DATALIST"||i==="SELECT"||i==="OPTGROUP"){if(!o.trim())return}else i==="OPTION"?o=Pn:o=y5(o);return o}function b5(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 Br(e){return`[${Cl}="${e}"], .${g5}${e}`}const Tl="data-dd-action-name",w5="Masked Element";function E5(e,{enablePrivacyForActionName:t,actionNameAttribute:n},r){const i=rv(e,Tl)||n&&rv(e,n);return i?{name:i,nameSource:"custom_attribute"}:r===H.MASK?{name:w5,nameSource:"mask_placeholder"}:iv(e,n,S5,t)||iv(e,n,_5,t)||{name:"",nameSource:"blank"}}function rv(e,t){const n=e.closest(`[${t}]`);if(!n)return;const r=n.getAttribute(t);return sv(ov(r.trim()))}const S5=[(e,t)=>{if("labels"in e&&e.labels&&e.labels.length>0)return Ps(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 Ps(e,t,n)},e=>Wi(e,"aria-label"),(e,t,n)=>{const r=e.getAttribute("aria-labelledby");if(r)return{name:r.split(/\s+/).map(i=>T5(e,i)).filter(i=>!!i).map(i=>av(i,t,n)).join(" "),nameSource:"text_content"}},e=>Wi(e,"alt"),e=>Wi(e,"name"),e=>Wi(e,"title"),e=>Wi(e,"placeholder"),(e,t)=>{if("options"in e&&e.options.length>0)return Ps(e.options[0],t)}],_5=[(e,t,n)=>Ps(e,t,n)],C5=10;function iv(e,t,n,r){let i=e,o=0;for(;o<=C5&&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:sv(ov(l)),nameSource:u}}}if(i.nodeName==="FORM")break;i=i.parentElement,o+=1}}function ov(e){return e.replace(/\s+/g," ")}function sv(e){return e.length>100?`${kg(e,100)} [...]`:e}function T5(e,t){return e.ownerDocument?e.ownerDocument.getElementById(t):null}function Wi(e,t){return{name:e.getAttribute(t)||"",nameSource:"standard_attribute"}}function Ps(e,t,n){return{name:av(e,t,n)||"",nameSource:"text_content"}}function av(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(`[${Tl}]`),t&&i(`[${t}]`),n&&i(`${Br(H.HIDDEN)}, ${Br(H.MASK)}`),r}return e.textContent}}const cv=[Tl,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],I5=[lv,A5],x5=[lv,k5,R5];function Gi(e,t){if(!e.isConnected)return;let n,r=e;for(;r&&r.nodeName!=="HTML";){const i=dv(r,I5,O5,t,n);if(i)return i;n=dv(r,x5,L5,t,n)||Os(P5(r),n),r=r.parentElement}return n}function uv(e){return/[0-9]/.test(e)}function A5(e){if(e.id&&!uv(e.id))return`#${CSS.escape(e.id)}`}function k5(e){if(e.tagName==="BODY")return;const t=e.classList;for(let n=0;n<t.length;n+=1){const r=t[n];if(!uv(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function R5(e){return CSS.escape(e.tagName)}function lv(e,t){if(t){const r=n(t);if(r)return r}for(const r of cv){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 P5(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 dv(e,t,n,r,i){for(const o of t){const s=o(e,r);if(s&&n(e,s,i))return Os(s,i)}}function O5(e,t,n){return e.ownerDocument.querySelectorAll(Os(t,n)).length===1}function L5(e,t,n){let r;if(n===void 0)r=s=>s.matches(t);else{const s=Os(`${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 Os(e,t){return t?`${e}>${t}`:e}const fv=Qe,N5=100;function M5(e,t){const n=[];let r=0,i;o(e);function o(c){c.stopObservable.subscribe(s),n.push(c),ut(i),i=Ue(a,fv)}function s(){r===1&&n.every(c=>c.isStopped())&&(r=2,t(n))}function a(){ut(i),r===0&&(r=1,s())}return{tryAppend:c=>r!==0?!1:n.length>0&&!D5(n[n.length-1].event,c.event)?(a(),!1):(o(c),!0),stop:()=>{a()}}}function D5(e,t){return e.target===t.target&&F5(e,t)<=N5&&e.timeStamp-t.timeStamp<=fv}function F5(e,t){return Math.sqrt(Math.pow(e.clientX-t.clientX,2)+Math.pow(e.clientY-t.clientY,2))}function U5(e,{onPointerDown:t,onPointerUp:n}){let r,i={selection:!1,input:!1,scroll:!1},o;const s=[Se(e,window,"pointerdown",a=>{hv(a)&&(r=pv(),i={selection:!1,input:!1,scroll:!1},o=t(a))},{capture:!0}),Se(e,window,"selectionchange",()=>{(!r||!pv())&&(i.selection=!0)},{capture:!0}),Se(e,window,"scroll",()=>{i.scroll=!0},{capture:!0,passive:!0}),Se(e,window,"pointerup",a=>{if(hv(a)&&o){const c=i;n(o,a,()=>c),o=void 0}},{capture:!0}),Se(e,window,"input",()=>{i.input=!0},{capture:!0})];return{stop:()=>{s.forEach(a=>a.stop())}}}function pv(){const e=window.getSelection();return!e||e.isCollapsed}function hv(e){return e.target instanceof Element&&e.isPrimary!==!1}const gv=3;function B5(e,t){if($5(e))return t.addFrustration("rage_click"),e.some(mv)&&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"),mv(r)&&!n&&r.addFrustration("dead_click")}),{isRage:!1}}function $5(e){if(e.some(t=>t.getUserActivity().selection||t.getUserActivity().scroll))return!1;for(let t=0;t<e.length-(gv-1);t+=1)if(e[t+gv-1].event.timeStamp-e[t].event.timeStamp<=Qe)return!0;return!1}const V5='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 mv(e){return e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll?!1:!e.event.target.matches(V5)}const vv=10*Qe,Ki=new Map;function z5(e){const t=Ki.get(e);return Ki.delete(e),t}function yv(e,t){Ki.set(e,t),Ki.forEach((n,r)=>{He(r,Rt())>vv&&Ki.delete(r)})}const H5=5*ct;function j5(e,t,n,r){const i=Nr({expireDelay:H5}),o=new ge;let s;e.subscribe(10,()=>{i.reset()}),e.subscribe(5,l),e.subscribe(11,d=>{d.reason===Dr.UNLOADING&&l()});const{stop:a}=U5(r,{onPointerDown:d=>q5(r,e,t,d,n),onPointerUp:({clickActionBase:d,hadActivityOnPointerDown:f},h,p)=>{W5(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=M5(d,h=>{K5(h,f)})}}function l(){s&&s.stop()}}function q5(e,t,n,r,i){const o=e.enablePrivacyForActionName?Xt(r.target,e.defaultPrivacyLevel):H.ALLOW;if(o===H.HIDDEN)return;const s=G5(r,o,e);let a=!1;return El(t,n,i,e,c=>{a=c.hadActivity},Ym),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}function W5(e,t,n,r,i,o,s,a,c,u,l){var d;const f=bv(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&&yv(c.timeStamp,h);const{stop:p}=El(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()},vv),g=t.subscribe(5,({endClocks:v})=>{f.stop(v.timeStamp)}),m=o.subscribe(()=>{f.stop()});f.stopObservable.subscribe(()=>{g.unsubscribe(),p(),m.unsubscribe()})}function G5(e,t,n){const r=e.target.getBoundingClientRect(),i=Gi(e.target,n.actionNameAttribute);i&&yv(e.timeStamp,i);const o=E5(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 bv(e,t,n,r,i){const o=je(),s=rt(),a=t.add(o,s.relative),c=Km({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 ge;function h(p){u===0&&(l=p,u=1,l?a.close(Vu(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:()=>bv(e,t,n,r,i),validate:p=>{if(h(),u!==1)return;const{resourceCount:g,errorCount:m,longTaskCount:v}=c.eventCounts,y={duration:l&&He(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 K5(e,t){const{isRage:n}=B5(e,t);n?(e.forEach(r=>r.discard()),t.stop(Fe()),t.validate(e.map(r=>r.event))):(t.discard(),e.forEach(r=>r.validate()))}function Y5(e,t,n,r,i){e.subscribe(0,a=>e.notify(12,wv(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:ae},s=ae;return i.trackUserInteractions&&({actionContexts:o,stop:s}=j5(e,n,r,i)),{addAction:a=>{e.notify(12,wv(a))},actionContexts:o,stop:s}}function wv(e){const t=Ls(e)?{action:{id:e.id,loading_time:Gm(G(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=Dt({action:{id:je(),target:{name:e.name},type:e.type},date:e.startClocks.timeStamp,type:"action"},t),r=Ls(e)?e.duration:void 0,i=Ls(e)?void 0:e.context,o=Ls(e)?{events:e.events}:{handlingStack:e.handlingStack};return{customerContext:i,rawRumEvent:n,duration:r,startTime:e.startClocks.relative,domainContext:o}}function Ls(e){return e.type!=="custom"}function J5(e){const t=e3([as.error]).subscribe(n=>e.notify(n.error));return{stop:()=>{t.unsubscribe()}}}function Z5(e,t){const n=ZT(e,[zi.cspViolation,zi.intervention]).subscribe(r=>t.notify(r));return{stop:()=>{n.unsubscribe()}}}function X5(e,t){const n=new ge;return J5(n),WT(n),Z5(t,n),n.subscribe(r=>e.notify(14,{error:r})),Q5(e)}function Q5(e){return e.subscribe(14,({error:t,customerContext:n})=>{n=Dt(t.context,n),e.notify(12,{customerContext:n,...e4(t)})}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:o})=>{const s=Rn(t)?kn(t):void 0,a=Jg({stackTrace:s,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:"Provided",source:Or.CUSTOM,handling:"handled"});e.notify(14,{customerContext:o,error:a})}}}function e4(e){const t={date:e.startClocks.timeStamp,error:{id:je(),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 Ev=new WeakSet;function t4(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=>!Ev.has(r)).filter(r=>Um(r)&&Bm(r)).filter(r=>n4(r,e.startClocks.relative,Sv({startTime:e.startClocks.relative,duration:e.duration})));if(n.length===1)return Ev.add(n[0]),n[0].toJSON()}function Sv(e){return _r(e.startTime,e.duration)}function n4(e,t,n){return e.startTime>=t-1&&Sv(e)<=_r(n,1)}const r4=2*ct;function i4(e){const t=o4(e)||s4(e);if(!(!t||t.traceTime<=kt()-r4))return t.traceId}function o4(e){const t=e.querySelector("meta[name=dd-trace-id]"),n=e.querySelector("meta[name=dd-trace-time]");return _v(t&&t.content,n&&n.content)}function s4(e){const t=a4(e);if(t)return _v(Di(t,"trace-id"),Di(t,"trace-time"))}function _v(e,t){const n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function a4(e){for(let t=0;t<e.childNodes.length;t+=1){const n=Cv(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=Cv(n);if(r)return r;if(!Jm(n))break}}function Cv(e){if(e&&f5(e)){const t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function Tv(){if(Zn(fe.NAVIGATION)){const n=performance.getEntriesByType(fe.NAVIGATION)[0];if(n)return n}const e=c4(),t={entryType:fe.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 c4(){const e={},t=performance.timing;for(const n in t)if(Oi(t[n])){const r=n,i=t[r];e[r]=i===0?0:Vu(i)}return e}function u4(e,t,n=Tv){dl(e,"interactive",()=>{const r=n(),i=Object.assign(r.toJSON(),{entryType:fe.RESOURCE,initiatorType:Mm,duration:r.responseEnd,traceId:i4(document),toJSON:()=>({...i,toJSON:void 0})});t(i)})}function l4(e,t,n,r=QI(),i=u4){e.subscribe(8,a=>{s(()=>d4(a,t,n))});const o=Zt(t,{type:fe.RESOURCE,buffered:!0}).subscribe(a=>{for(const c of a)Y3(c)||s(()=>Iv(c,t))});i(t,a=>{s(()=>Iv(a,t))});function s(a){r.push(()=>{const c=a();c&&e.notify(12,c)})}return{stop:()=>{o.unsubscribe()}}}function d4(e,t,n){const r=t4(e),i=r?ls(r.startTime):e.startClocks,o=f4(e,t);if(!t.trackResources&&!o)return;const s=e.type==="xhr"?"xhr":"fetch",a=r?xv(r):void 0,c=r?Fm(r):h4(n,i,e.duration),u=Dt({date:i.timeStamp,resource:{id:je(),type:s,duration:G(c),method:e.method,status_code:e.status,protocol:r&&$m(r),url:Hm(e.url)?jm(e.url):e.url,delivery_type:r&&Vm(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 Iv(e,t){const n=ls(e.startTime),r=p4(e,t);if(!t.trackResources&&!r)return;const i=K3(e),o=xv(e),s=Fm(e),a=Dt({date:n.timeStamp,resource:{id:je(),type:i,duration:G(s),url:e.name,status_code:g4(e.responseStatus),protocol:$m(e),delivery_type:Vm(e)},type:"resource",_dd:{discarded:!t.trackResources}},r,o);return{startTime:n.relative,duration:s,rawRumEvent:a,domainContext:{performanceEntry:e}}}function xv(e){const{renderBlockingStatus:t}=e;return{resource:{render_blocking_status:t,...X3(e),...J3(e)}}}function f4(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 p4(e,t){if(e.traceId)return{_dd:{trace_id:e.traceId,span_id:Im().toString(),rule_psr:t.rulePsr}}}function h4(e,t,n){return e.wasInPageStateDuringPeriod("frozen",t.relative,n)?void 0:n}function g4(e){return e===0?void 0:e}function m4(e,t,n){const{stop:r,eventCounts:i}=Km({lifeCycle:e,isChildEvent:o=>o.view.id===t,onChange:n});return{stop:r,eventCounts:i}}const v4=10*ct;function y4(e,t,n){return{stop:Zt(e,{type:fe.PAINT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.name==="first-contentful-paint"&&s.startTime<t.timeStamp&&s.startTime<v4);o&&n(o.startTime)}).unsubscribe}}function b4(e,t,n){const r=Zt(e,{type:fe.FIRST_INPUT,buffered:!0}).subscribe(i=>{const o=i.find(s=>s.startTime<t.timeStamp);if(o){const s=He(o.startTime,o.processingStart);let a;o.target&&Ur(o.target)&&(a=Gi(o.target,e.actionNameAttribute)),n({delay:s>=0?s:0,time:o.startTime,targetSelector:a})}});return{stop:()=>{r.unsubscribe()}}}function w4(e,t,n=Tv){return _4(e,()=>{const r=n();S4(r)||t(E4(r))})}function E4(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:e.responseStart>=0&&e.responseStart<=Rt()?e.responseStart:void 0}}function S4(e){return e.loadEventEnd<=0}function _4(e,t){let n;const{stop:r}=dl(e,"complete",()=>{n=Ue(()=>t())});return{stop:()=>{r(),ut(n)}}}const C4=10*ct;function T4(e,t,n,r){let i=1/0;const{stop:o}=dt(e,n,["pointerdown","keydown"],c=>{i=c.timeStamp},{capture:!0,once:!0});let s=0;const a=Zt(e,{type:fe.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe(c=>{const u=RC(c,l=>l.entryType===fe.LARGEST_CONTENTFUL_PAINT&&l.startTime<i&&l.startTime<t.timeStamp&&l.startTime<C4&&l.size>s);if(u){let l;u.element&&(l=Gi(u.element,e.actionNameAttribute)),r({value:u.startTime,targetSelector:l,resourceUrl:I4(u)}),s=u.size}});return{stop:()=>{o(),a.unsubscribe()}}}function I4(e){return e.url===""?void 0:e.url}function Av(e,t=window){if(document.visibilityState==="hidden")return{timeStamp:0,stop:ae};if(Zn(fe.VISIBILITY_STATE)){const i=performance.getEntriesByType(fe.VISIBILITY_STATE).find(o=>o.name==="hidden");if(i)return{timeStamp:i.startTime,stop:ae}}let n=1/0;const{stop:r}=dt(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 x4(e,t,n){const r={},{stop:i}=w4(e,l=>{t(l.loadEvent),r.navigationTimings=l,n()}),o=Av(e),{stop:s}=y4(e,o,l=>{r.firstContentfulPaint=l,n()}),{stop:a}=T4(e,o,window,l=>{r.largestContentfulPaint=l,n()}),{stop:c}=b4(e,o,l=>{r.firstInput=l,n()});function u(){i(),s(),a(),c(),o.stop()}return{stop:u,initialViewMetrics:r}}function A4(e,t,n){if(!L4())return{stop:ae};let r=0,i;n({value:0});const o=O4(),s=Zt(e,{type:fe.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=k4(u.sources);i={target:f!=null&&f.node?new WeakRef(f.node):void 0,time:He(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:us(r,4),targetSelector:f&&Gi(f,e.actionNameAttribute),time:i==null?void 0:i.time,previousRect:i!=null&&i.previousRect?kv(i.previousRect):void 0,currentRect:i!=null&&i.currentRect?kv(i.currentRect):void 0,devicePixelRatio:i==null?void 0:i.devicePixelRatio})}}});return{stop:()=>{s.unsubscribe()}}}function k4(e){return e.find(t=>!!t.node&&Ur(t.node))}function kv({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}const R4=5*Qe,P4=Qe;function O4(){let e=0,t,n,r=0;return{update:i=>{const o=t===void 0||i.startTime-n>=P4||i.startTime-t>=R4;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 L4(){return Zn(fe.LAYOUT_SHIFT)&&"WeakRef"in window}let Ns,Rv=0,Il=1/0,xl=0;function N4(){"interactionCount"in performance||Ns||(Ns=new window.PerformanceObserver(Y(e=>{e.getEntries().forEach(t=>{const n=t;n.interactionId&&(Il=Math.min(Il,n.interactionId),xl=Math.max(xl,n.interactionId),Rv=(xl-Il)/7+1)})})),Ns.observe({type:"event",buffered:!0,durationThreshold:0}))}const Pv=()=>Ns?Rv:window.performance.interactionCount||0,Ov=10,M4=1*ct;function D4(e,t,n){if(!B4())return{getInteractionToNextPaint:()=>{},setViewEnd:ae,stop:ae};const{getViewInteractionCount:r,stopViewInteractionCount:i}=U4(n);let o=1/0;const s=F4(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=He(t,p.startTime),c=z5(p.startTime),!c&&p.target&&Ur(p.target)&&(c=Gi(p.target,e.actionNameAttribute)))}const d=Zt(e,{type:fe.FIRST_INPUT,buffered:!0}).subscribe(l),f=Zt(e,{type:fe.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>{if(a>=0)return{value:Math.min(a,M4),targetSelector:c,time:u};if(r())return{value:0}},setViewEnd:h=>{o=h,i()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function F4(e){const t=[];function n(){t.sort((r,i)=>i.duration-r.duration).splice(Ov)}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<Ov||r.duration>o.duration)&&(t.push(r),n())},estimateP98Interaction(){const r=Math.min(t.length-1,Math.floor(e()/50));return t[r]}}}function U4(e){N4();const t=e==="initial_load"?0:Pv();let n={stopped:!1};function r(){return Pv()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function B4(){return Zn(fe.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function $4(e,t,n,r,i,o,s){let a=i==="initial_load",c=!0;const u=[],l=Av(r);function d(){if(!c&&!a&&u.length>0){const h=Math.max(...u);h<l.timeStamp&&s(h)}}const{stop:f}=El(e,t,n,r,h=>{c&&(c=!1,h.hadActivity&&u.push(He(o.timeStamp,h.end)),d())});return{stop:()=>{f(),l.stop()},setLoadEvent:h=>{a&&(a=!1,u.push(h),d())}}}function Lv(){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 Al(){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 kl;function Nv(e){return kl||(kl=V4(e)),kl}function V4(e){return new ge(t=>{const{throttled:n}=xn(()=>{t.notify(Ms())},200);return Se(e,window,"resize",n,{capture:!0,passive:!0}).stop})}function Ms(){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 z4=Qe;function H4(e,t,n,r=q4(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=Rt();s=He(t.relative,f),d=!0}d&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:u,maxScrollHeight:o,maxScrollHeightTime:s})});return{stop:()=>a.unsubscribe()}}function j4(){const e=Al(),{height:t}=Ms(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(t+e);return{scrollHeight:n,scrollDepth:r,scrollTop:e}}function q4(e,t=z4){return new ge(n=>{function r(){n.notify(j4())}if(window.ResizeObserver){const i=xn(r,t,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,s=new ResizeObserver(Y(i.throttled));o&&s.observe(o);const a=Se(e,window,"scroll",i.throttled,{passive:!0});return()=>{i.cancel(),s.disconnect(),a.stop()}}})}function W4(e,t,n,r,i,o,s){const a={},{stop:c,setLoadEvent:u}=$4(e,t,n,r,o,s,g=>{a.loadingTime=g,i()}),{stop:l}=H4(r,s,g=>{a.scroll=g}),{stop:d}=A4(r,s.relative,g=>{a.cumulativeLayoutShift=g,i()}),{stop:f,getInteractionToNextPaint:h,setViewEnd:p}=D4(r,s.relative,o);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:p,getCommonViewMetrics:()=>(a.interactionToNextPaint=h(),a)}}const G4=3e3,K4=5*ct,Y4=5*ct;function J4(e,t,n,r,i,o,s,a){const c=new Set;let u=d("initial_load",Cg(),a);f();let l;s&&(l=h(o));function d(p,g,m){const v=Z4(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})=>{Q4(g,m)&&(u.end(),u=d("route_change"))})}return{addTiming:(p,g=Fe())=>{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 Z4(e,t,n,r,i,o,s=rt(),a){const c=je(),u=new ge,l={};let d=0,f;const h=Mi(i),p=Is();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:_}=xn(re,G4,{leading:!1}),{setLoadEvent:E,setViewEnd:P,stop:T,stopINPTracking:I,getCommonViewMetrics:k}=W4(e,t,n,r,J,o,s),{stop:O,initialViewMetrics:D}=o==="initial_load"?x4(r,E,J):{stop:ae,initialViewMetrics:{}},{stop:F,eventCounts:V}=m4(e,c,J),z=Cr(re,K4),ye=e.subscribe(11,W=>{W.reason===Dr.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 W=f===void 0?Fe():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:k(),initialViewMetrics:D,duration:He(s.timeStamp,W),isActive:f===void 0,sessionIsActive:g,eventCounts:V})}return{get name(){return m},service:v,version:y,contextManager:p,stopObservable:u,end(W={}){var ce,te;f||(f=(ce=W.endClocks)!==null&&ce!==void 0?ce:rt(),g=(te=W.sessionIsActive)!==null&&te!==void 0?te:!0,e.notify(5,{endClocks:f}),e.notify(6,{endClocks:f}),fs(z),P(f.relative),T(),ye.unsubscribe(),re(),Ue(()=>{this.stop()},Y4))},stop(){O(),F(),I(),u.notify()},addTiming(W,ce){if(f)return;const te=yC(ce)?ce:He(s.timeStamp,ce);l[X4(W)]=te,J()},setViewName(W){m=W,re()}}}function X4(e){const t=e.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return t!==e&&se.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function Q4(e,t){return e.pathname!==t.pathname||!ex(t.hash)&&Mv(t.hash)!==Mv(e.hash)}function ex(e){const t=e.substring(1);return t!==""&&!!document.getElementById(t)}function Mv(e){const t=e.indexOf("?");return t<0?e:e.slice(0,t)}function tx(e,t,n,r,i,o,s,a,c,u){return e.subscribe(4,l=>e.notify(12,nx(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}}}),J4(r,e,i,o,n,s,!n.trackViewsManually,u)}function nx(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:G((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:G((c=e.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.firstByte),dom_complete:G((u=e.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:G((l=e.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domContentLoaded),dom_interactive:G((d=e.initialViewMetrics.navigationTimings)===null||d===void 0?void 0:d.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:G(e.initialViewMetrics.firstContentfulPaint),first_input_delay:G((f=e.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.delay),first_input_time:G((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:G((g=e.commonViewMetrics.interactionToNextPaint)===null||g===void 0?void 0:g.value),interaction_to_next_paint_time:G((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:G((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:G((w=e.initialViewMetrics.navigationTimings)===null||w===void 0?void 0:w.loadEvent),loading_time:Gm(G(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:rx(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:G(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:G(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 $n(e.customTimings)||(E.view.custom_timings=EC(e.customTimings,G)),{rawRumEvent:E,startTime:e.startClocks.relative,duration:e.duration,domainContext:{location:e.location}}}function rx({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,firstInput:r,largestContentfulPaint:i}){return{cls:e&&{score:e.value,timestamp:G(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:G(n)},fid:r&&{duration:G(r.delay),timestamp:G(r.time),target_selector:r.targetSelector},inp:t&&{duration:G(t.value),timestamp:G(t.time),target_selector:t.targetSelector},lcp:i&&{timestamp:G(i.value),target_selector:i.targetSelector,resource_url:i.resourceUrl}}}const ix="rum";function ox(e,t,n){const r=vI(e,ix,i=>ax(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||!Dv(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 sx(){const e={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplay:mm("records")?1:0};return{findTrackedSession:()=>e,expire:ae,expireObservable:new ge,setForcedReplay:ae}}function ax(e,t){let n;return cx(t)?n=t:Tn(e.sessionSampleRate)?Tn(e.sessionReplaySampleRate)?n="1":n="2":n="0",{trackingType:n,isTracked:Dv(n)}}function cx(e){return e==="0"||e==="1"||e==="2"}function Dv(e){return e==="2"||e==="1"}function ux(e,t,n,r,i,o,s){const a=e.replica,c=FI(e,{endpoint:e.rumEndpointBuilder,encoder:s(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:u=>Dt(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,uI(e))),c}function lx(e){const t=Mr();e.subscribe(13,n=>{t.send("rum",n)})}const dx=zn;function fx(e,t,n,r){const i=Nr({expireDelay:dx});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=Rt();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 px(e,t){let n=Mi(t);return new ge(r=>{const{stop:i}=hx(e,s),{stop:o}=gx(e,s);function s(){if(n.href===t.href)return;const a=Mi(t);r.notify({newLocation:a,oldLocation:n}),n=a}return()=>{i(),o()}})}function hx(e,t){const{stop:n}=lt(Fv("pushState"),"pushState",({onPostCall:o})=>{o(t)}),{stop:r}=lt(Fv("replaceState"),"replaceState",({onPostCall:o})=>{o(t)}),{stop:i}=Se(e,window,"popstate",t);return{stop:()=>{n(),r(),i()}}}function gx(e,t){return Se(e,window,"hashchange",t)}function Fv(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}const mx=zn;function vx(e,t,n){const r=Nr({expireDelay:mx});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||$n(a)))return{type:o,feature_flags:a}}),{addFeatureFlagEvaluation:(i,o)=>{const s=r.find();s&&(s[i]=o)}}}const yx=10*Qe;let $r,Rl;function bx(e,t,n,r){t.enabled&&Tn(e.customerDataTelemetrySampleRate)&&($v(),Rl=!1,n.subscribe(13,()=>{Rl=!0}),r.subscribe(({bytesCount:o,messagesCount:s})=>{Rl&&($r.batchCount+=1,Bv($r.batchBytesCount,o),Bv($r.batchMessagesCount,s))}),Cr(wx,yx))}function wx(){$r.batchCount!==0&&(dn("Customer data measures",$r),$v())}function Uv(){return{min:1/0,max:0,sum:0}}function Bv(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function $v(){$r={batchCount:0,batchBytesCount:Uv(),batchMessagesCount:Uv()}}const Ex=4e3,Sx=500,_x=zn;function Cx(e,t,n=Sx){const r=Nr({expireDelay:_x,maxEntries:Ex});let i;s(Vv(),Rt());const{stop:o}=dt(t,window,["pageshow","focus","blur","visibilitychange","resume","freeze","pagehide"],c=>{s(Ix(c),c.timeStamp)},{capture:!0});function s(c,u=Rt()){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:Tx(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 Tx(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:r,startTime:i})=>({state:r,start:G(He(t,i))}))}function Ix(e){return e.type==="freeze"?"frozen":e.type==="pagehide"?e.persisted?"frozen":"terminated":Vv()}function Vv(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function xx(e){let t;const n=requestAnimationFrame(Y(()=>{t=Ms()})),r=Nv(e).subscribe(i=>{t=i}).unsubscribe;return{get:()=>t?{viewport:t}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}const Ax=Qe;function kx(e){return new ge(t=>Rx(e,n=>t.notify(n)))}function Rx(e,t){const n=Di(document.cookie,e),r=Cr(()=>{const i=Di(document.cookie,e);i!==n&&t(i)},Ax);return()=>fs(r)}const zv="datadog-ci-visibility-test-execution-id";function Px(e,t=kx(zv)){var n;let r=An(zv)||((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 Ox(e,t){const n=Zt(t,{type:fe.LONG_ANIMATION_FRAME,buffered:!0}).subscribe(r=>{for(const i of r){const o=ls(i.startTime),s={date:o.timeStamp,long_task:{id:je(),entry_type:"long-animation-frame",duration:G(i.duration),blocking_duration:G(i.blockingDuration),first_ui_event_timestamp:G(i.firstUIEventTimestamp),render_start:G(i.renderStart),style_and_layout_start:G(i.styleAndLayoutStart),start_time:G(i.startTime),scripts:i.scripts.map(a=>({duration:G(a.duration),pause_duration:G(a.pauseDuration),forced_style_and_layout_duration:G(a.forcedStyleAndLayoutDuration),start_time:G(a.startTime),execution_start:G(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 Lx(e,t){const n=Zt(t,{type:fe.LONG_TASK,buffered:!0}).subscribe(r=>{for(const i of r){if(i.entryType!==fe.LONG_TASK||!t.trackLongTasks)break;const o=ls(i.startTime),s={date:o.timeStamp,long_task:{id:je(),entry_type:"long-task",duration:G(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 Nx(){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 Dt(...i)}}}function Mx(e){e.register(0,({eventType:t})=>{const n=f3(),r=p3();if(!(!n||!r))return{type:t,session:{type:"synthetics"},synthetics:{test_id:n,result_id:r,injected:Em()}}})}function Dx(e,t,n){const r=al(e),i=n(r);return Ku(t).forEach(([o,s])=>Pl(e,r,o.split(/\.|(?=\[\])/),s)),i}function Pl(e,t,n,r){const[i,...o]=n;if(i==="[]"){Array.isArray(e)&&Array.isArray(t)&&e.forEach((s,a)=>Pl(s,t[a],o,r));return}if(!(!Hv(e)||!Hv(t))){if(o.length>0)return Pl(e[i],t[i],o,r);Fx(e,i,t[i],r)}}function Fx(e,t,n,r){const i=Gn(n);i===r?e[t]=ke(n):r==="object"&&(i==="undefined"||i==="null")&&(e[t]={})}function Hv(e){return Gn(e)==="object"}const Vr={"view.name":"string","view.url":"string","view.referrer":"string"},zr={context:"object"},Ol={service:"string",version:"string"};let jv;function Ux(e,t,n,r,i,o,s,a,c){jv={view:{"view.performance.lcp.resource_url":"string",...zr,...Vr},error:{"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string",...zr,...Vr,...Ol},resource:{"resource.url":"string",...Ss(Wn.WRITABLE_RESOURCE_GRAPHQL)?{"resource.graphql":"object"}:{},...zr,...Vr,...Ol},action:{"action.target.name":"string",...zr,...Vr,...Ol},long_task:{"long_task.scripts[].source_url":"string","long_task.scripts[].invoker":"string",...zr,...Vr},vital:{...zr,...Vr}};const u={error:ll("error",e.eventRateLimiterThreshold,c),action:ll("action",e.eventRateLimiterThreshold,c),vital:ll("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&&Ss(Wn.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:mC(),configuration:{session_sample_rate:us(e.sessionSampleRate,3),session_replay_sample_rate:us(e.sessionReplaySampleRate,3)},browser_sdk_version:Yn()?"6.6.3":void 0},application:{id:e.applicationId},date:Fe(),source:"browser",session:{id:v.id,type:"user"},display:s.get(),connectivity:rm(),context:y.context},w=Dt(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),$n(y.user)||(w.usr=y.user),!$n(y.account)&&y.account.id&&(w.account=y.account),Bx(w,e.beforeSend,h,u)&&($n(w.context)&&delete w.context,t.notify(13,w))}})}function Bx(e,t,n,r){var i;if(t){const s=Dx(e,jv[e.type],a=>t(a,n));if(s===!1&&e.type!=="view")return!1;s===!1&&se.warn("Can't dismiss view events using beforeSend!")}return!((i=r[e.type])===null||i===void 0?void 0:i.isLimitReached())}function $x(e,t,n,r){return{context:e.getContext(),user:t.getContext(),account:n.getContext(),hasReplay:r.isRecording()?!0:void 0}}function Vx(e,t,n,r,i,o,s){const a=[],c=new j3,u=Nx();c.subscribe(13,pe=>sl("rum",pe));const l=zx(e);l.setContextProvider(()=>{var pe,B;return{application:{id:e.applicationId},session:{id:(pe=p.findTrackedSession())===null||pe===void 0?void 0:pe.id},view:{id:(B=y.findView())===null||B===void 0?void 0:B.id},action:{id:k.findActionId()}}});const d=pe=>{c.notify(14,{error:pe}),dn("Error reported to customer",{"error.message":pe.message})},f=NI(e),h=f.subscribe(pe=>{c.notify(11,pe)});a.push(()=>h.unsubscribe());const p=Yn()?sx():ox(e,c,o);if(Yn())lx(c);else{const pe=ux(e,c,l.observable,d,f,p.expireObservable,i);a.push(()=>pe.stop()),bx(e,l,c,pe.flushObservable)}const g=V3(),m=px(e,location),v=Cx(u,e),y=W3(c),b=fx(c,u,m,location),w=vx(c,u,e),{observable:C,stop:_}=z3();a.push(_);const E=N3(e),P=M3(e),T=D3(e),I=()=>$x(E,P,T,t),{actionContexts:k,addAction:O,stop:D}=Hx(c,u,e,p,v,g,C,b,y,I,d);a.push(D),cI();const{addTiming:F,startView:V,setViewName:z,setViewContext:ye,setViewContextProperty:oe,getViewContext:J,stop:re}=tx(c,u,e,location,g,C,m,t,y,r);a.push(re);const{stop:W}=l4(c,e,v);if(a.push(W),e.trackLongTasks)if(Zn(fe.LONG_ANIMATION_FRAME)){const{stop:pe}=Ox(c,e);a.push(pe)}else Lx(c,e);const{addError:ce}=X5(c,e);e5(c,e,p,I);const te=g3(c,v,s),_e=H3(e.applicationId,p,y,k,b);return a.push(()=>n.stop()),{addAction:O,addError:ce,addTiming:F,addFeatureFlagEvaluation:w.addFeatureFlagEvaluation,startView:V,setViewContext:ye,setViewContextProperty:oe,getViewContext:J,setViewName:z,lifeCycle:c,viewHistory:y,session:p,stopSession:()=>p.expire(),getInternalContext:_e.get,startDurationVital:te.startDurationVital,stopDurationVital:te.stopDurationVital,addDurationVital:te.addDurationVital,globalContext:E,userContext:P,accountContext:T,stop:()=>{a.forEach(pe=>pe())}}}function zx(e){const t=sI("browser-rum-sdk",e);if(Yn()){const n=Mr();t.observable.subscribe(r=>n.send("internal_telemetry",r))}return t}function Hx(e,t,n,r,i,o,s,a,c,u,l){const d=Y5(e,t,o,s,n),f=xx(n),h=Px(t);return Mx(t),Ux(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 jx(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=qx(e),a=`/rum/replay/sessions/${i}`;return`${s}${a}?${o.join("&")}`}function qx(e){const t=e.site,n=e.subdomain||Wx(e);return`https://${n?`${n}.`:""}${t}`}function Wx(e){switch(e.site){case qn:case oT:return"app";case qg:return"dd";default:return}}const Gx=1e3;let Pt;function Kx(e){return Ds(e).segments_count}function Yx(e){Ds(e).segments_count+=1}function Jx(e){Ds(e).records_count+=1}function Zx(e,t){Ds(e).segments_total_raw_size+=t}function Xx(e){return Pt==null?void 0:Pt.get(e)}function Ds(e){Pt||(Pt=new Map);let t;return Pt.has(e)?t=Pt.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},Pt.set(e,t),Pt.size>Gx&&Qx()),t}function Qx(){if(!Pt)return;const e=Pt.keys().next().value;e&&Pt.delete(e)}function qv(e,t,n){let r=0,i=[],o,s=0;const a=[],{stop:c}=Se(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):wC(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 Ll({configuredUrl:e,error:t,source:n,scriptType:r}){if(se.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&e6(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.",se.error(`${i} See documentation at ${cs}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r==="worker"&&cl(t)}function e6(e){return e.includes("Content Security Policy")||e.includes("requires 'TrustedScriptURL'")}const t6=30*Qe;function Wv(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 Re={status:0};function Gv(e,t,n,r=Wv){switch(Re.status===0&&n6(e,t,r),Re.status){case 1:return Re.initializationFailureCallbacks.push(n),Re.worker;case 3:return Re.worker}}function Kv(){return Re.status}function n6(e,t,n=Wv){try{const r=n(e),{stop:i}=Se(e,r,"error",a=>{Nl(e,t,a)}),{stop:o}=Se(e,r,"message",({data:a})=>{a.type==="errored"?Nl(e,t,a.error,a.streamId):a.type==="initialized"&&i6(a.version)});r.postMessage({action:"init"}),Ue(()=>r6(t),t6),Re={status:1,worker:r,stop:()=>{i(),o()},initializationFailureCallbacks:[]}}catch(r){Nl(e,t,r)}}function r6(e){Re.status===1&&(se.error(`${e} failed to start: a timeout occurred while initializing the Worker`),Re.initializationFailureCallbacks.forEach(t=>t()),Re={status:2})}function i6(e){Re.status===1&&(Re={status:3,worker:Re.worker,stop:Re.stop,version:e})}function Nl(e,t,n,r){Re.status===1||Re.status===0?(Ll({configuredUrl:e.workerUrl,error:n,source:t,scriptType:"worker"}),Re.status===1&&Re.initializationFailureCallbacks.forEach(i=>i()),Re={status:2}):cl(n,{worker_version:Re.status===3&&Re.version,stream_id:r})}function Yv(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function o6(e,t,n,r){const i=t.findTrackedSession(),o=s6(i,r),s=n.findView();return jx(e,{viewContext:s,errorType:o,session:i})}function s6(e,t){if(!Yv())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 a6(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(),$I(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(c6(f,d)){s=1;return}u6(s)||(s=2,c().catch(ln),l6(f,d)&&n.setForcedReplay())}function l(){s===3&&(a==null||a()),s=0}return{start:u,stop:l,getSessionReplayLink(){return o6(e,n,r,s!==0)},isRecording:()=>s===3}}function c6(e,t){return!e||e.sessionReplay===0&&(!t||!t.force)}function u6(e){return e===2||e===3}function l6(e,t){return t&&t.force&&e.sessionReplay===0}function d6(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:ae},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function f6(e,t){if(Yn()&&!mm("records")||!Yv())return{start:ae,stop:ae,getReplayStats:()=>{},onRumStart:ae,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=d6();return{start:o=>n.start(o),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:i,isRecording:()=>Kv()===3&&n.isRecording(),getReplayStats:o=>Kv()===3?Xx(o):void 0};function i(o,s,a,c,u){let l;function d(){return l||(u??(u=Gv(s,"Datadog Session Replay",()=>{n.stop()},t)),u&&(l=qv(s,u,1))),l}n=a6(s,o,a,c,e,d),r(s)&&n.start()}}async function p6(e=h6){try{return await e()}catch(t){Ll({error:t,source:"Recorder",scriptType:"module"})}}async function h6(){return(await Promise.resolve().then(()=>e8)).startRecording}function g6(){return Jt().Profiler!==void 0}async function m6(e=v6){try{return await e()}catch(t){Ll({error:t,source:"Profiler",scriptType:"module"})}}async function v6(){return(await Promise.resolve().then(()=>h8)).createRumProfiler}function y6(){let e;function t(n,r,i,o){!g6()||!Tn(r.profilingSampleRate)||m6().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 b6=f6(p6),w6=y6(),St=B3(Vx,b6,w6,{startDeflateWorker:Gv,createDeflateEncoder:qv});JT(Jt(),"DD_RUM",St);const Jr=class Jr{init(){if(Jr.isInitialized){console.info("Tracker [DD]: already initialized");return}St.init({applicationId:"3ea6bf90-69cc-42fe-9e69-d461f783221d",clientToken:"pub51a171e3f587fb85f6d3f0ed2bf8f531",site:"datadoghq.com",service:"astropay-payments-library",env:Ye.getRuntimeConfig().MODE,version:Ye.getRuntimeConfig().VERSION,sessionSampleRate:50,sessionReplaySampleRate:10,defaultPrivacyLevel:"mask-user-input",trackViewsManually:!0,trackResources:!1,trackUserInteractions:!1,beforeSend:t=>this.filterEvents(t)}),St.startView({name:"ap_cl_view_mounted"}),St.startSessionReplayRecording(),Jr.isInitialized=!0,console.info("Tracker [DD]: initialized")}track(t,n){St==null||St.addAction(t,n||{})}trackError(t,n){St==null||St.addError(t,{context:n})}destroy(){console.info("Tracker [DD]: destroying"),typeof St.stopSessionReplayRecording=="function"&&St.stopSessionReplayRecording(),St.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 Ml=Jr,Hr=[];class qe{static init(t){if(!t){console.info("Tracking disabled");return}Hr=[new Ml],Hr.forEach(n=>n.init())}static trackEvent(t,n){Hr.forEach(r=>r.track(t,n))}static trackError(t,n){Hr.forEach(r=>r.trackError(t,n))}static destroy(){Hr.forEach(t=>t.destroy()),Hr=[]}}const $e=class $e{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($e.isInitialized){console.warn("AstroPay Payments Library: Already initialized.");return}$e.token=t,qe.init((n==null?void 0:n.tracking)??!0),Ri.init(),Z.init({theme:(n==null?void 0:n.theme)??"light",styles:(n==null?void 0:n.styles)??{}}),q.init({language:(n==null?void 0:n.language)??"en"}),Ye.init({environment:(n==null?void 0:n.environment)??"production",currencyMode:(n==null?void 0:n.currencyMode)??"iso"}),Bt.init({appName:"ap-cl",baseURL:Ye.getRuntimeConfig().API_BASE_URL,timeout:5e3}),qe.trackEvent("ap_cl_init",{app_id:t,origin:window.location.origin}),$e.isInitialized=!0}static registerComponent(t){$e.components.add(t)}static unregisterComponent(t){$e.components.delete(t)}static getToken(){if(!$e.isInitialized){const t="AstroPay Payments Library: Not initialized.";throw console.error(t),new Error(t)}return $e.token}static destroy(){$e.isInitialized&&($e.components.forEach(t=>t.destroy()),$e.components.clear(),$e.isInitialized=!1,qe.destroy(),$e.token="")}static isLibInitialized(){return $e.isInitialized}};S($e,"isInitialized",!1),S($e,"token"),S($e,"components",new Set);let Ft=$e;function Jv(e,t){return function(){return e.apply(t,arguments)}}const{toString:E6}=Object.prototype,{getPrototypeOf:Dl}=Object,{iterator:Fs,toStringTag:Zv}=Symbol,Us=(e=>t=>{const n=E6.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ut=e=>(e=e.toLowerCase(),t=>Us(t)===e),Bs=e=>t=>typeof t===e,{isArray:jr}=Array,qr=Bs("undefined");function Yi(e){return e!==null&&!qr(e)&&e.constructor!==null&&!qr(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xv=Ut("ArrayBuffer");function S6(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xv(e.buffer),t}const _6=Bs("string"),ft=Bs("function"),Qv=Bs("number"),Ji=e=>e!==null&&typeof e=="object",C6=e=>e===!0||e===!1,$s=e=>{if(Us(e)!=="object")return!1;const t=Dl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Zv in e)&&!(Fs in e)},T6=e=>{if(!Ji(e)||Yi(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},I6=Ut("Date"),x6=Ut("File"),A6=Ut("Blob"),k6=Ut("FileList"),R6=e=>Ji(e)&&ft(e.pipe),P6=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=Us(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},O6=Ut("URLSearchParams"),[L6,N6,M6,D6]=["ReadableStream","Request","Response","Headers"].map(Ut),F6=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Yi(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 e0(e,t){if(Yi(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 Xn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,t0=e=>!qr(e)&&e!==Xn;function Fl(){const{caseless:e,skipUndefined:t}=t0(this)&&this||{},n={},r=(i,o)=>{const s=e&&e0(n,o)||o;$s(n[s])&&$s(i)?n[s]=Fl(n[s],i):$s(i)?n[s]=Fl({},i):jr(i)?n[s]=i.slice():(!t||!qr(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Zi(arguments[i],r);return n}const U6=(e,t,n,{allOwnKeys:r}={})=>(Zi(t,(i,o)=>{n&&ft(i)?e[o]=Jv(i,n):e[o]=i},{allOwnKeys:r}),e),B6=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$6=(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)},V6=(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&&Dl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},z6=(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},H6=e=>{if(!e)return null;if(jr(e))return e;let t=e.length;if(!Qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},j6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Dl(Uint8Array)),q6=(e,t)=>{const r=(e&&e[Fs]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},W6=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},G6=Ut("HTMLFormElement"),K6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),n0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Y6=Ut("RegExp"),r0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Zi(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},J6=e=>{r0(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ft(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+"'")})}})},Z6=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return jr(e)?r(e):r(String(e).split(t)),n},X6=()=>{},Q6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eA(e){return!!(e&&ft(e.append)&&e[Zv]==="FormData"&&e[Fs])}const tA=e=>{const t=new Array(10),n=(r,i)=>{if(Ji(r)){if(t.indexOf(r)>=0)return;if(Yi(r))return r;if(!("toJSON"in r)){t[i]=r;const o=jr(r)?[]:{};return Zi(r,(s,a)=>{const c=n(s,i+1);!qr(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},nA=Ut("AsyncFunction"),rA=e=>e&&(Ji(e)||ft(e))&&ft(e.then)&&ft(e.catch),i0=((e,t)=>e?setImmediate:t?((n,r)=>(Xn.addEventListener("message",({source:i,data:o})=>{i===Xn&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Xn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ft(Xn.postMessage)),iA=typeof queueMicrotask<"u"?queueMicrotask.bind(Xn):typeof process<"u"&&process.nextTick||i0,x={isArray:jr,isArrayBuffer:Xv,isBuffer:Yi,isFormData:P6,isArrayBufferView:S6,isString:_6,isNumber:Qv,isBoolean:C6,isObject:Ji,isPlainObject:$s,isEmptyObject:T6,isReadableStream:L6,isRequest:N6,isResponse:M6,isHeaders:D6,isUndefined:qr,isDate:I6,isFile:x6,isBlob:A6,isRegExp:Y6,isFunction:ft,isStream:R6,isURLSearchParams:O6,isTypedArray:j6,isFileList:k6,forEach:Zi,merge:Fl,extend:U6,trim:F6,stripBOM:B6,inherits:$6,toFlatObject:V6,kindOf:Us,kindOfTest:Ut,endsWith:z6,toArray:H6,forEachEntry:q6,matchAll:W6,isHTMLForm:G6,hasOwnProperty:n0,hasOwnProp:n0,reduceDescriptors:r0,freezeMethods:J6,toObjectSet:Z6,toCamelCase:K6,noop:X6,toFiniteNumber:Q6,findKey:e0,global:Xn,isContextDefined:t0,isSpecCompliantForm:eA,toJSONObject:tA,isAsyncFn:nA,isThenable:rA,setImmediate:i0,asap:iA,isIterable:e=>e!=null&&ft(e[Fs])};function K(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(K,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 o0=K.prototype,s0={};["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=>{s0[e]={value:e}}),Object.defineProperties(K,s0),Object.defineProperty(o0,"isAxiosError",{value:!0}),K.from=(e,t,n,r,i,o)=>{const s=Object.create(o0);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 K.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 oA=null;function Ul(e){return x.isPlainObject(e)||x.isArray(e)}function a0(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function c0(e,t,n){return e?e.concat(t).map(function(i,o){return i=a0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function sA(e){return x.isArray(e)&&!e.some(Ul)}const aA=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Vs(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 K("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)&&sA(p)||(x.isFileList(p)||x.endsWith(g,"[]"))&&(v=x.toArray(p)))return g=a0(g),v.forEach(function(b,w){!(x.isUndefined(b)||b===null)&&t.append(s===!0?c0([g],w,o):s===null?g:g+"[]",u(b))}),!1}return Ul(p)?!0:(t.append(c0(m,g,o),u(p)),!1)}const d=[],f=Object.assign(aA,{defaultVisitor:l,convertValue:u,isVisitable:Ul});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 u0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Bl(e,t){this._pairs=[],e&&Vs(e,this,t)}const l0=Bl.prototype;l0.append=function(t,n){this._pairs.push([t,n])},l0.toString=function(t){const n=t?function(r){return t.call(this,r,u0)}:u0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function cA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function d0(e,t,n){if(!t)return e;const r=n&&n.encode||cA;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 Bl(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class f0{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 p0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uA={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Bl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},$l=typeof window<"u"&&typeof document<"u",Vl=typeof navigator=="object"&&navigator||void 0,lA=$l&&(!Vl||["ReactNative","NativeScript","NS"].indexOf(Vl.product)<0),dA=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fA=$l&&window.location.href||"http://localhost",et={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$l,hasStandardBrowserEnv:lA,hasStandardBrowserWebWorkerEnv:dA,navigator:Vl,origin:fA},Symbol.toStringTag,{value:"Module"})),...uA};function pA(e,t){return Vs(e,new et.classes.URLSearchParams,{visitor:function(n,r,i,o){return et.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function hA(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function gA(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 h0(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]=gA(i[s])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,i)=>{t(hA(r),i,n,0)}),n}return null}function mA(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 Xi={transitional:p0,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(h0(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 pA(t,this.formSerializer).toString();if((a=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Vs(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),mA(t)):t}],transformResponse:[function(t){const n=this.transitional||Xi.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"?K.from(a,K.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:et.classes.FormData,Blob:et.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=>{Xi.headers[e]={}});const vA=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"]),yA=e=>{const t={};let n,r,i;return e&&e.split(`
559
- `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&vA[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},g0=Symbol("internals");function Qi(e){return e&&String(e).trim().toLowerCase()}function zs(e){return e===!1||e==null?e:x.isArray(e)?e.map(zs):String(e)}function bA(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 wA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zl(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 EA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function SA(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 pt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,u){const l=Qi(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]=zs(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())&&!wA(t))s(yA(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=Qi(t),t){const r=x.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bA(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=Qi(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Qi(s),s){const a=x.findKey(r,s);a&&(!n||zl(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||zl(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]=zs(i),delete n[o];return}const a=t?EA(o):String(o).trim();a!==o&&delete n[o],n[a]=zs(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(`
560
- `)}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[g0]=this[g0]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Qi(s);r[a]||(SA(i,s),r[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(pt);function Hl(e,t){const n=this||Xi,r=t||n,i=pt.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 m0(e){return!!(e&&e.__CANCEL__)}function Wr(e,t,n){K.call(this,e??"canceled",K.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(Wr,K,{__CANCEL__:!0});function v0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function _A(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function CA(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 TA(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 Hs=(e,t,n=3)=>{let r=0;const i=CA(50,250);return TA(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)},y0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},b0=e=>(...t)=>x.asap(()=>e(...t)),IA=et.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,et.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(et.origin),et.navigator&&/(msie|trident)/i.test(et.navigator.userAgent)):()=>!0,xA=et.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 AA(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function w0(e,t,n){let r=!AA(t);return e&&(r||n==!1)?kA(e,t):t}const E0=e=>e instanceof pt?{...e}:e;function Qn(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(E0(u),E0(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 S0=e=>{const t=Qn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=pt.from(s),t.url=d0(w0(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(et.hasStandardBrowserEnv||et.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(et.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&IA(t.url))){const c=i&&o&&xA.read(o);c&&s.set(i,c)}return t},RA=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=S0(e);let o=i.data;const s=pt.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=pt.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};v0(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 K("Request aborted",K.ECONNABORTED,e,m)),m=null)},m.onerror=function(w){const C=w&&w.message?w.message:"Network Error",_=new K(C,K.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||p0;i.timeoutErrorMessage&&(w=i.timeoutErrorMessage),r(new K(w,C.clarifyTimeoutError?K.ETIMEDOUT:K.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]=Hs(u,!0),m.addEventListener("progress",f)),c&&m.upload&&([d,h]=Hs(c),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(l=b=>{m&&(r(!b||b.type?new Wr(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=_A(i.url);if(y&&et.protocols.indexOf(y)===-1){r(new K("Unsupported protocol "+y+":",K.ERR_BAD_REQUEST,e));return}m.send(o||null)})},PA=(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 K?l:new Wr(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,o(new K(`timeout ${t} of ms exceeded`,K.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}},OA=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},LA=async function*(e,t){for await(const n of NA(e))yield*OA(n,t)},NA=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()}},_0=(e,t,n,r)=>{const i=LA(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})},C0=64*1024,{isFunction:js}=x,MA=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:T0,TextEncoder:I0}=x.global,x0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},DA=e=>{e=x.merge.call({skipUndefined:!0},MA,e);const{fetch:t,Request:n,Response:r}=e,i=t?js(t):typeof fetch=="function",o=js(n),s=js(r);if(!i)return!1;const a=i&&js(T0),c=i&&(typeof I0=="function"?(p=>g=>p.encode(g))(new I0):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&x0(()=>{let p=!1;const g=new n(et.origin,{body:new T0,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!g}),l=s&&a&&x0(()=>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 K(`Response type '${p}' is not supported`,K.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(et.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}=S0(p),k=t||fetch;E=E?(E+"").toLowerCase():"text";let O=PA([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 W=new n(g,{method:"POST",body:v,duplex:"half"}),ce;if(x.isFormData(v)&&(ce=W.headers.get("content-type"))&&P.setContentType(ce),W.body){const[te,_e]=y0(V,Hs(b0(_)));v=_0(W.body,C0,te,_e)}}x.isString(T)||(T=T?"include":"omit");const z=o&&"credentials"in n.prototype,ye={...I,signal:O,method:m.toUpperCase(),headers:P.normalize().toJSON(),body:v,duplex:"half",credentials:z?T:void 0};D=o&&new n(g,ye);let oe=await(o?k(D,I):k(g,ye));const J=l&&(E==="stream"||E==="response");if(l&&(C||J&&F)){const W={};["status","statusText","headers"].forEach(pe=>{W[pe]=oe[pe]});const ce=x.toFiniteNumber(oe.headers.get("content-length")),[te,_e]=C&&y0(ce,Hs(b0(C),!0))||[];oe=new r(_0(oe.body,C0,te,()=>{_e&&_e(),F&&F()}),W)}E=E||"text";let re=await d[x.findKey(d,E)||"text"](oe,p);return!J&&F&&F(),await new Promise((W,ce)=>{v0(W,ce,{data:re,headers:pt.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 K("Network Error",K.ERR_NETWORK,p,D),{cause:z.cause||z}):K.from(z,z&&z.code,p,D)}}},FA=new Map,A0=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=FA;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:DA(t)),l=u;return u};A0();const jl={http:oA,xhr:RA,fetch:{get:A0}};x.forEach(jl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const k0=e=>`- ${e}`,UA=e=>x.isFunction(e)||e===null||e===!1,R0={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,!UA(r)&&(i=jl[(a=String(r)).toLowerCase()],i===void 0))throw new K(`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 :
561
- `+s.map(k0).join(`
562
- `):" "+k0(s[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i},adapters:jl};function ql(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Wr(null,e)}function P0(e){return ql(e),e.headers=pt.from(e.headers),e.data=Hl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),R0.getAdapter(e.adapter||Xi.adapter,e)(e).then(function(r){return ql(e),r.data=Hl.call(e,e.transformResponse,r),r.headers=pt.from(r.headers),r},function(r){return m0(r)||(ql(e),r&&r.response&&(r.response.data=Hl.call(e,e.transformResponse,r.response),r.response.headers=pt.from(r.response.headers))),Promise.reject(r)})}const O0="1.12.2",qs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const L0={};qs.transitional=function(t,n,r){function i(o,s){return"[Axios v"+O0+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new K(i(s," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!L0[s]&&(L0[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}},qs.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function BA(e,t,n){if(typeof e!="object")throw new K("options must be an object",K.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 K("option "+o+" must be "+c,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+o,K.ERR_BAD_OPTION)}}const Ws={assertOptions:BA,validators:qs},Qt=Ws.validators;let er=class{constructor(t){this.defaults=t||{},this.interceptors={request:new f0,response:new f0}}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+=`
563
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Qn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ws.assertOptions(r,{silentJSONParsing:Qt.transitional(Qt.boolean),forcedJSONParsing:Qt.transitional(Qt.boolean),clarifyTimeoutError:Qt.transitional(Qt.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:Ws.assertOptions(i,{encode:Qt.function,serialize:Qt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ws.assertOptions(n,{baseUrl:Qt.spelling("baseURL"),withXsrfToken:Qt.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=pt.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=[P0.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=P0.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=Qn(this.defaults,t);const n=w0(t.baseURL,t.url,t.allowAbsoluteUrls);return d0(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){er.prototype[t]=function(n,r){return this.request(Qn(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(Qn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}er.prototype[t]=n(),er.prototype[t+"Form"]=n(!0)});let $A=class $1{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 Wr(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 $1(function(i){t=i}),cancel:t}}};function VA(e){return function(n){return e.apply(null,n)}}function zA(e){return x.isObject(e)&&e.isAxiosError===!0}const Wl={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(Wl).forEach(([e,t])=>{Wl[t]=e});function N0(e){const t=new er(e),n=Jv(er.prototype.request,t);return x.extend(n,er.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return N0(Qn(e,i))},n}const Pe=N0(Xi);Pe.Axios=er,Pe.CanceledError=Wr,Pe.CancelToken=$A,Pe.isCancel=m0,Pe.VERSION=O0,Pe.toFormData=Vs,Pe.AxiosError=K,Pe.Cancel=Pe.CanceledError,Pe.all=function(t){return Promise.all(t)},Pe.spread=VA,Pe.isAxiosError=zA,Pe.mergeConfig=Qn,Pe.AxiosHeaders=pt,Pe.formToJSON=e=>h0(x.isHTMLForm(e)?new FormData(e):e),Pe.getAdapter=R0.getAdapter,Pe.HttpStatusCode=Wl,Pe.default=Pe;const{Axios:R8,AxiosError:P8,CanceledError:O8,isCancel:L8,CancelToken:N8,VERSION:M8,all:D8,Cancel:F8,isAxiosError:U8,spread:B8,toFormData:$8,AxiosHeaders:V8,HttpStatusCode:z8,formToJSON:H8,getAdapter:j8,mergeConfig:q8}=Pe,eo=(e,t)=>{const n=Ye.getRuntimeConfig().MODE==="test";return t&&n?`http://localhost:3333${e.startsWith("/")?e:`/${e}`}`:e},ve=class ve{static getAxiosInstance(){if(!this.axiosInstance)throw new Error("AstroPay Payments Library: Not initialized.");return this.axiosInstance}};S(ve,"axiosInstance"),S(ve,"config"),S(ve,"init",t=>{ve.config=t,ve.axiosInstance=Pe.create({baseURL:t.baseURL,timeout:t.timeout??5e3,withCredentials:!0,headers:{"Accept-Language":q.getCurrent(),...t.headers}}),ve.setupInterceptors()}),S(ve,"GET",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i,...n}};return await ve.getAxiosInstance().get(o,s)}),S(ve,"POST",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ve.getAxiosInstance().post(o,n,s)}),S(ve,"PUT",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i}};return await ve.getAxiosInstance().put(o,n,s)}),S(ve,"PATCH",async({url:t,data:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i},headers:{"Content-Type":"text/plain"}};return await ve.getAxiosInstance().patch(o,n,s)}),S(ve,"DELETE",async({url:t,params:n={},mock:r=!1,useQueryParams:i=!0})=>{const o=eo(t,r),s={params:{useQueryParams:i,...n}};return await ve.getAxiosInstance().delete(o,s)}),S(ve,"setupInterceptors",()=>{ve.axiosInstance.interceptors.request.use(t=>{const{useQueryParams:n,...r}=t.params||{};return n?t.params={...r,data:ve.getEncodeParams()}:t.params=r,t.data&&(t.data=Zs(t.data,"camelCase-to-snake_case")),t}),ve.axiosInstance.interceptors.response.use(t=>ve.handleResponse(t),t=>ve.handleError(t))}),S(ve,"handleResponse",t=>{const n=t.status===202,r=Zs(t.data,"snake_case-to-camelCase");return n?{...r,statusCode:t.status}:r}),S(ve,"handleError",t=>{var i;const n=Zs((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)||q.translate("generic_error"),description:n==null?void 0:n.description};return Promise.reject(r)}),S(ve,"getEncodeParams",()=>{const t={app_name:ve.config.appName,app_id:Ft.getToken(),environment:Ye.getEnvironment(),platform:ff(),version:Ye.getRuntimeConfig().VERSION};return xd(t)});let Bt=ve;const Gr={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 M0{}S(M0,"getPciToken",async t=>{try{return await Bt.POST({url:Gr.pciToken,data:t})}catch(n){return qe.trackError(n),Promise.reject(n)}});const HA=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}`},jA="v1.1.3";class qA{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 a2({environment:this.getCardEnvironment(),version:jA});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 M0.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:HA(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(q.translate("card_tokenization_error")))})})}catch{r(new Error(q.translate("generic_error")))}}unmount(){var t;(t=this.form)==null||t.tearDown()}getCardEnvironment(){return Ye.getEnvironment()==="production"?"production":"sandbox"}}var D0=(e=>(e.PENDING="PENDING",e.REJECTED="REJECTED",e))(D0||{});class We{}S(We,"postCreatePayment",async(t,n)=>{try{const r=await Bt.POST({data:t,url:Gr.createPayment});return qe.trackEvent("ap_cl_payment_created",{...t,initializer:n}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"getPaymentDetails",async(t,n)=>{try{const r=await Bt.GET({url:si(Gr.paymentDetails,{paymentExternalId:t})});return qe.trackEvent("ap_cl_payment_details",{paymentExternalId:t,initializer:n}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"postIdentifyUser",async(t,n)=>{try{const r=await Bt.POST({data:n,url:si(Gr.identifyUser,{paymentExternalId:t})});return qe.trackEvent("ap_cl_user_identified",{hasAccount:r.user.hasAccount,user:r.user.otherUserData}),r}catch(r){return qe.trackError(r),Promise.reject(r)}}),S(We,"getPaymentStatus",async t=>{try{return await Bt.GET({url:si(Gr.paymentStatus,{paymentExternalId:t})})}catch(n){return Promise.reject(n)}}),S(We,"getPollingRequest",async t=>{try{const n=t.replace(/^\/?api\//,"");return await Bt.GET({url:n})}catch(n){return Promise.reject(n)}}),S(We,"postGenericPayment",async(t,n,r)=>{try{const i=t.replace(/^\/?api\//,"");return await Bt.POST({url:si(i,{paymentExternalId:n}),data:r})}catch(i){return Promise.reject(i)}});var On=(e=>(e.ACCEPTED="ACCEPTED",e.FINISHED="FINISHED",e))(On||{});class F0{}S(F0,"getPaymentMethodDetail",async t=>{try{return await Bt.GET({url:si(Gr.paymentMethodDetail,{paymentExternalId:t.paymentExternalId,methodCode:t.methodCode})})}catch(n){return Promise.reject(n)}});class Gl{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 We.getPollingRequest(this.pollingAcceptedData.pollingMetadata.pollingUrl);t.statusCode===202&&t.pollingStatus===On.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 Gs=(e,t)=>({fontSize:"16px",lineHeight:"24px",color:e,backgroundColor:t}),WA=(e,{error:t=!1,disabled:n=!1})=>ne`
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`
564
551
  display: flex;
565
552
  flex-direction: column;
566
553
  gap: 12px;
@@ -610,10 +597,10 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
610
597
 
611
598
  caret-color: ${e.textColor};
612
599
 
613
- color: ${he().textColor};
614
- border-radius: ${he().borderRadius}px;
615
- background-color: ${he().backgroundColor};
616
- border: ${he().borderWidth}px solid ${he().borderColor};
600
+ color: ${se().textColor};
601
+ border-radius: ${se().borderRadius}px;
602
+ background-color: ${se().backgroundColor};
603
+ border: ${se().borderWidth}px solid ${se().borderColor};
617
604
 
618
605
  :hover {
619
606
  background-color: ${t||n?void 0:e.input.focus.backgroundColor};
@@ -623,9 +610,15 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
623
610
  border-radius: ${t||n?void 0:e.input.focus.borderRadius}px;
624
611
  }
625
612
  }
626
- `,GA=()=>ne`
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`
627
620
  width: 100%;
628
- `;class Ks extends be{constructor({id:n,label:r,initialHelperText:i,isValid:o=!0}){super({tag:"div",styles:()=>GA()});S(this,"inputContainer");S(this,"labelTextElement",null);S(this,"helperTextElement",null);S(this,"id");this.id=n;const s=Mn(!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,lineHeight:s.label.lineHeight,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=Mn(!r);this.helperTextElement||(this.helperTextElement=new X({text:n,size:i.helperText.size,lineHeight:i.helperText.lineHeight,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=Mn(!n);this.labelTextElement.style.color=i.label.color}const r=this.element.querySelector(`#${this.id}`);r&&r.classList.toggle("error",!n)}resetValidation(){this.setValid(!0),this.setHelperText("",!0)}}const KA=(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:Gs(e,t)},{field:"#cc-number",type:"card-number",name:"card_number",placeholder:"4111 1111 1111 1111",autocomplete:"off",validations:["required","validCardNumber"],styles:Gs(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:Gs(e,t)},{field:"#cc-cvc",type:"card-security-code",name:"card_cvc",placeholder:"123",autocomplete:"off",validations:["required","/^\\d{3,4}$/"],styles:Gs(e,t)}],YA={card_holder:{isValid:!0,isTouched:!1},card_number:{isValid:!0,isTouched:!1},card_exp:{isValid:!0,isTouched:!1},card_cvc:{isValid:!0,isTouched:!1}},U0="MM/YY";class B0 extends be{constructor(n){super({tag:"div",styles:r=>WA(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",YA);S(this,"isFormTemplateValid",!1);S(this,"pollingService",null);this.componentProps={...n,showPaymentSummary:n.showPaymentSummary??!0,expirationDateFormat:n.expirationDateFormat??U0},this.loadingWrapper=this.createLoadingWrapper(q.translate("hold_on")),this.element.append(this.loadingWrapper),sessionStorage.getItem(ci.SESSION_ID)||sessionStorage.setItem(ci.SESSION_ID,X1()),this.fetchPaymentMethodDetail()}async fetchPaymentMethodDetail(){var n,r;try{const i=await F0.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 Jb({amount:r,currency:i}).element;this.element.append(c)}this.cardHolderInput=new Ks({id:"cc-holder",label:q.translate("card_holder_label")}),this.cardNumberInput=new Ks({id:"cc-number",label:q.translate("card_number")});const a=document.createElement("div");a.classList.add("row-container"),this.cardExpInput=new Ks({id:"cc-expiration-date",label:q.translate("card_exp_date")}),this.cardCvvInput=new Ks({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 qA(KA(he().textColor,he().backgroundColor,s??U0).map(c=>({...c,placeholder:q.translate(c.placeholder)})),this.handleFormStateChange.bind(this)),this.cardManager.init(),n&&n.length>0&&this.renderRequiredFields(n),this.btnPay=new mn({text:q.translate("pay_amount",{amount:fa(this.componentProps.amount,this.componentProps.currency,Ye.getCurrencyMode())}),onClick:()=>{this.handleSubmit()},isFullWidth:!0,iconLeft:"lock_line",isDisabled:!0}),this.element.append(this.btnPay.element)}renderRequiredFields(n){this.requiredFieldsForm=new Hb({title:q.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?"":q.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(ci.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 We.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,l);if(d===D0.PENDING)await this.checkPaymentStatus(),(o=this.btnPay)==null||o.setLoading(!1),(s=this.btnPay)==null||s.setDisabled(!0);else throw new Error(f||q.translate("generic_error"))}else throw new Error(q.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(ci.SESSION_ID)||""};this.cardManager.tokenizeCard(s,c=>n(c),c=>{r(c)})})}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.getStyles().messages.error.textColor}).element;this.element.append(r)}async checkPaymentStatus(){try{const n=await We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopPolling()}}initializePollingService(n){this.pollingService=new Gl(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 pa({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:Z.getStyles().primaryColor}).element,o=new X({text:n,size:20,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 mn({text:q.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 JA{constructor(){S(this,"tracker",Ri);S(this,"astroPayPaymentImpression",t=>{this.tracker.trackEvent(new mg({component_name:t}))});S(this,"astroPayPaymentStarted",t=>{this.tracker.trackEvent(new bg({payment_external_id:t}))});S(this,"astroPayPaymentClicked",t=>{this.tracker.trackEvent(new gg({payment_external_id:t}))});S(this,"astroPayPaymentPhoneNumberEntered",t=>{this.tracker.trackEvent(new yg({payment_external_id:t}))});S(this,"astroPayPaymentUserIdentified",t=>{this.tracker.trackEvent(new wg({payment_external_id:t}))});S(this,"astroPayPaymentLinkCopied",t=>{this.tracker.trackEvent(new vg({payment_external_id:t}))});S(this,"astroPayPaymentCardClicked",t=>{this.tracker.trackEvent(new hg({payment_external_id:t}))})}}const fn=new JA;var Oe=(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))(Oe||{});const $0=["EC","DR","CW","DC","CC"],ZA=e=>ne`
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`
629
622
  background-color: ${e.backgroundColor};
630
623
 
631
624
  display: flex;
@@ -653,7 +646,21 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
653
646
  align-items: center;
654
647
  gap: 8px;
655
648
  }
656
- `;class XA extends be{constructor(n){super({tag:"div",styles:i=>ZA(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode=Oe.DEBIT_CARD,Ft.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:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.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 We.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&&$0.includes(a.code));if(r){const a=new B0({...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(q.translate("generic_error"))}showErrorMessage(n){this.element.innerHTML="";const r=new X({text:n,size:Z.getStyles().messages.error.textSize,color:Z.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),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({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(),Ft.unregisterComponent(this)}}class QA extends be{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)}destroyContent(){super.destroy()}}const ek=()=>ne`
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`
657
664
  .accordion-header {
658
665
  display: flex;
659
666
  justify-content: flex-start;
@@ -684,7 +691,6 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
684
691
 
685
692
  .arrow-wrapper {
686
693
  transition: transform 0.3s ease-out;
687
-
688
694
  display: flex;
689
695
  align-items: center;
690
696
  justify-content: center;
@@ -695,10 +701,25 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
695
701
  }
696
702
 
697
703
  .accordion-content {
698
- height: auto;
699
- padding: 12px 0;
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
+ }
700
721
  }
701
- `;class tk extends be{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:()=>ek()});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 mt({name:n,size:16,color:Z.getStyles().textPrimaryColor}).element,f=document.createElement("div");f.classList.add("title-description-wrapper");const h=new X({variant:"div",size:16,weight:500,text:r}).element;if(f.append(h),i){const g=new X({variant:"div",text:i??"",size:12,weight:400,color:Z.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 mt({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 mt({name:"arrow_down_line",size:24,color:Z.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")),this.isOpen=!0)}destroyContent(){var n,r;this.isDisabled||(this.isOpen&&((n=this.onClose)==null||n.call(this),(r=this.accordionContent)==null||r.destroyContent(),this.accordionContent=null,this.arrowWrapper.classList.remove("rotated")),this.isOpen=!1)}renderContent(){this.accordionContent||(this.accordionContent=new QA({content:this.content}),this.element.append(this.accordionContent.element))}}class nk extends be{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 tk({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 hf({text:s===0?q.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 rk=e=>ne`
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`
702
723
  background-color: ${e.backgroundColor};
703
724
 
704
725
  display: flex;
@@ -725,7 +746,7 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
725
746
  align-items: center;
726
747
  gap: 8px;
727
748
  }
728
- `,Ot=({variant:e})=>{const t=Z.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}},ik=e=>{switch(e){case"end":return"flex-end";case"center":return"center";case"space-between":return"space-between";case"start":default:return"flex-start"}},ok=({variant:e="default",isFullWidth:t,align:n})=>ne`
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`
729
750
  box-sizing: border-box;
730
751
  display: flex;
731
752
  align-items: center;
@@ -733,31 +754,31 @@ ${f}`),e.finish(g=>{p(ym(g))})}return{flushController:n,add:u,upsert:u,stop:o.un
733
754
  flex-wrap: wrap;
734
755
 
735
756
  width: ${t?"100%":"fit-content"};
736
- padding: ${typeof Ot({variant:e}).padding=="number"?`${Ot({variant:e}).padding}px`:Ot({variant:e}).padding};
757
+ padding: ${typeof Lt({variant:e}).padding=="number"?`${Lt({variant:e}).padding}px`:Lt({variant:e}).padding};
737
758
 
738
- background-color: ${Ot({variant:e}).backgroundColor};
739
- border-radius: ${Ot({variant:e}).borderRadius}px;
759
+ background-color: ${Lt({variant:e}).backgroundColor};
760
+ border-radius: ${Lt({variant:e}).borderRadius}px;
740
761
 
741
- border: ${Ot({variant:e}).borderWidth}px
742
- ${Ot({variant:e}).borderStyle} ${Ot({variant:e}).borderColor};
762
+ border: ${Lt({variant:e}).borderWidth}px
763
+ ${Lt({variant:e}).borderStyle} ${Lt({variant:e}).borderColor};
743
764
 
744
- justify-content: ${ik(n)};
765
+ justify-content: ${uk(n)};
745
766
 
746
767
  .badge-content {
747
768
  display: flex;
748
769
  align-items: center;
749
770
  gap: 4px;
750
771
  flex-wrap: nowrap;
751
- color: ${Ot({variant:e}).textColor};
772
+ color: ${Lt({variant:e}).textColor};
752
773
  }
753
- `;class Kl extends be{constructor({items:t,variant:n="default",isFullWidth:r=!1,align:i="center"}){super({tag:"div",styles:()=>ok({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 mt({name:s||a,size:12,color:Ot({variant:n}).textColor}).element;u.append(d)}const l=new X({text:o,weight:500,color:Ot({variant:n}).textColor,align:"center"}).element;if(u.append(l),c){const d=new mt({name:c,size:12,color:Ot({variant:n}).textColor}).element;u.append(d)}this.element.append(u)})}}function sk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kr={},Yl,V0;function ak(){return V0||(V0=1,Yl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Yl}var Jl={},Ln={},z0;function tr(){if(z0)return Ln;z0=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 Ln.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},Ln.getSymbolTotalCodewords=function(r){return t[r]},Ln.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Ln.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},Ln.isKanjiModeEnabled=function(){return typeof e<"u"},Ln.toSJIS=function(r){return e(r)},Ln}var Zl={},H0;function Xl(){return H0||(H0=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}}})(Zl)),Zl}var Ql,j0;function ck(){if(j0)return Ql;j0=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++}},Ql=e,Ql}var ed,q0;function uk(){if(q0)return ed;q0=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]},ed=e,ed}var td={},W0;function lk(){return W0||(W0=1,(function(e){const t=tr().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}})(td)),td}var nd={},G0;function dk(){if(G0)return nd;G0=1;const e=tr().getSymbolSize,t=7;return nd.getPositions=function(r){const i=e(r);return[[0,0],[i-t,0],[0,i-t]]},nd}var rd={},K0;function fk(){return K0||(K0=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}})(rd)),rd}var Ys={},Y0;function J0(){if(Y0)return Ys;Y0=1;const e=Xl(),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 Ys.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}},Ys.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}},Ys}var id={},to={},Z0;function pk(){if(Z0)return to;Z0=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]})(),to.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},to.exp=function(r){return e[r]},to.mul=function(r,i){return r===0||i===0?0:e[t[r]+t[i]]},to}var X0;function hk(){return X0||(X0=1,(function(e){const t=pk();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}})(id)),id}var od,Q0;function gk(){if(Q0)return od;Q0=1;const e=hk();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},od=t,od}var sd={},ad={},cd={},e1;function t1(){return e1||(e1=1,cd.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),cd}var en={},n1;function r1(){if(n1)return en;n1=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
754
- ]))+`;en.KANJI=new RegExp(n,"g"),en.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),en.BYTE=new RegExp(r,"g"),en.NUMERIC=new RegExp(e,"g"),en.ALPHANUMERIC=new RegExp(t,"g");const i=new RegExp("^"+n+"$"),o=new RegExp("^"+e+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return en.testKanji=function(c){return i.test(c)},en.testNumeric=function(c){return o.test(c)},en.testAlphanumeric=function(c){return s.test(c)},en}var i1;function nr(){return i1||(i1=1,(function(e){const t=t1(),n=r1();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}}})(ad)),ad}var o1;function mk(){return o1||(o1=1,(function(e){const t=tr(),n=J0(),r=Xl(),i=nr(),o=t1(),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}})(sd)),sd}var ud={},s1;function vk(){if(s1)return ud;s1=1;const e=tr(),t=1335,n=21522,r=e.getBCHDigit(t);return ud.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},ud}var ld={},dd,a1;function yk(){if(a1)return dd;a1=1;const e=nr();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))},dd=t,dd}var fd,c1;function bk(){if(c1)return fd;c1=1;const e=nr(),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)},fd=n,fd}var pd,u1;function wk(){if(u1)return pd;u1=1;const e=nr();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)},pd=t,pd}var hd,l1;function Ek(){if(l1)return hd;l1=1;const e=nr(),t=tr();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]+`
755
- Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),r.put(o,13)}},hd=n,hd}var gd={exports:{}},d1;function Sk(){return d1||(d1=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})(gd)),gd.exports}var f1;function _k(){return f1||(f1=1,(function(e){const t=nr(),n=yk(),r=bk(),i=wk(),o=Ek(),s=r1(),a=tr(),c=Sk();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],k=""+_+T;P.push(k),b[k]={node:I,lastCount:0},w[k]={};for(let O=0;O<C.length;O++){const D=C[O];b[D]&&b[D].node.mode===I.mode?(w[D][k]=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][k]=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)+`.
756
- 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()))}})(ld)),ld}var p1;function Ck(){if(p1)return Jl;p1=1;const e=tr(),t=Xl(),n=ck(),r=uk(),i=lk(),o=dk(),s=fk(),a=J0(),c=gk(),u=mk(),l=vk(),d=nr(),f=_k();function h(_,E){const P=_.size,T=o.getPositions(E);for(let I=0;I<T.length;I++){const k=T[I][0],O=T[I][1];for(let D=-1;D<=7;D++)if(!(k+D<=-1||P<=k+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(k+D,O+F,!0,!0):_.set(k+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],k=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,k+D,!0,!0):_.set(I+O,k+D,!1,!0)}}function m(_,E){const P=_.size,T=u.getEncodedBits(E);let I,k,O;for(let D=0;D<18;D++)I=Math.floor(D/3),k=D%3+P-8-3,O=(T>>D&1)===1,_.set(I,k,O,!0),_.set(k,I,O,!0)}function v(_,E,P){const T=_.size,I=l.getEncodedBits(E,P);let k,O;for(k=0;k<15;k++)O=(I>>k&1)===1,k<6?_.set(k,8,O,!0):k<8?_.set(k+1,8,O,!0):_.set(T-15+k,8,O,!0),k<8?_.set(8,T-k-1,O,!0):k<9?_.set(8,15-k-1+1,O,!0):_.set(8,15-k-1,O,!0);_.set(T-8,8,1,!0)}function y(_,E){const P=_.size;let T=-1,I=P-1,k=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]>>>k&1)===1),_.set(I,D-F,V),k--,k===-1&&(O++,k=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(_),k=a.getTotalCodewordsCount(_,E),O=(I-k)*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),k=T-I,O=a.getBlocksCount(E,P),D=T%O,F=O-D,V=Math.floor(T/O),z=Math.floor(k/O),ye=z+1,oe=V-z,J=new c(oe);let re=0;const W=new Array(O),ce=new Array(O);let te=0;const _e=new Uint8Array(_.buffer);for(let rn=0;rn<O;rn++){const ir=rn<F?z:ye;W[rn]=_e.slice(re,re+ir),ce[rn]=J.encode(W[rn]),re+=ir,te=Math.max(te,ir)}const pe=new Uint8Array(T);let B=0,_t,Ct;for(_t=0;_t<te;_t++)for(Ct=0;Ct<O;Ct++)_t<W[Ct].length&&(pe[B++]=W[Ct][_t]);for(_t=0;_t<oe;_t++)for(Ct=0;Ct<O;Ct++)pe[B++]=ce[Ct][_t];return pe}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 k=u.getBestVersionForData(I,P);if(!k)throw new Error("The amount of data is too big to be stored in a QR Code");if(!E)E=k;else if(E<k)throw new Error(`
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(`
757
778
  The chosen QR Code version cannot contain this amount of data.
758
- Minimum version required to store current data is: `+k+`.
759
- `);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 Jl.create=function(E,P){if(typeof E>"u"||E==="")throw new Error("No input text");let T=t.M,I,k;return typeof P<"u"&&(T=t.from(P.errorCorrectionLevel,t.M),I=u.from(P.version),k=s.from(P.maskPattern),P.toSJISFunc&&e.setToSJISFunction(P.toSJISFunc)),C(E,I,T,k)},Jl}var md={},vd={},h1;function g1(){return h1||(h1=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}}})(vd)),vd}var m1;function Tk(){return m1||(m1=1,(function(e){const t=g1();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)}})(md)),md}var yd={},v1;function Ik(){if(v1)return yd;v1=1;const e=g1();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 yd.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>
760
- `;return typeof a=="function"&&a(null,m),m},yd}var y1;function xk(){if(y1)return Kr;y1=1;const e=ak(),t=Ck(),n=Tk(),r=Ik();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 Kr.create=t.create,Kr.toCanvas=i.bind(null,n.render),Kr.toDataURL=i.bind(null,n.renderToDataURL),Kr.toString=i.bind(null,function(o,s,a){return r.render(o,a)}),Kr}var Ak=xk();const kk=sk(Ak),Rk=e=>ne`
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`
761
782
  display: flex;
762
783
  justify-content: center;
763
784
  align-items: center;
@@ -767,7 +788,7 @@ Minimum version required to store current data is: `+k+`.
767
788
 
768
789
  border: ${e.qrCode.borderWidth}px ${e.qrCode.borderStyle} ${e.qrCode.borderColor};
769
790
  border-radius: ${e.qrCode.borderRadius}px;
770
- `;class b1 extends be{constructor({value:t,width:n=130,altText:r="QR Code"}){super({tag:"div",styles:i=>Rk(i)}),kk.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 Pk=e=>`${Ye.getRuntimeConfig().RESOURCES_BUCKET}/img/flags/${e}.webp`,Ok=()=>ne`
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`
771
792
  display: flex;
772
793
  flex-direction: column;
773
794
  gap: 12px;
@@ -779,7 +800,7 @@ Minimum version required to store current data is: `+k+`.
779
800
 
780
801
  width: 100%;
781
802
  }
782
- `;class Lk extends be{constructor({availableCountries:n,onSubmit:r}){super({tag:"form",styles:()=>Ok()});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:Pk(o.iso)}));this.inputsWrapper=document.createElement("div"),this.inputsWrapper.classList.add("inputs-wrapper"),this.inputDialCode=new mf({name:"country",options:i,emptyMessage:q.translate("enter_country_code"),maxWidth:"180px",showValue:!0}),this.inputPhoneNumber=new yf({name:"phone",placeholder:q.translate("enter_your_phone"),type:"tel"}),this.inputsWrapper.append(this.inputDialCode.element,this.inputPhoneNumber.element),this.btnContinue=new mn({text:q.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}`;qe.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 Nk{static generate(t,n={}){return Cb(Ye.getRuntimeConfig().CHECKOUT_URL,t,n).toString()}}const Mk=()=>ne`
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`
783
804
  display: flex;
784
805
  flex-direction: column;
785
806
  gap: 10px;
@@ -814,7 +835,7 @@ Minimum version required to store current data is: `+k+`.
814
835
  opacity: 1;
815
836
  }
816
837
  }
817
- `;class w1 extends be{constructor(n){super({tag:"div",styles:()=>Mk()});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 mn({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 Kl({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,Sb()){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:Q1(n)};if((await We.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:Z.getStyles().messages.error.textSize,color:Z.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 Lk({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 Nk.generate(`checkout-payment/${this.componentProps.paymentExternalId}`,{data:xd(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 Kl({items:[{title:q.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:q.translate("didnt_receive"),size:16,weight:600}).element,o=new X({text:q.translate("scan_qr_copy_link"),size:14,weight:400}).element;r.append(i,o);const s=new b1({width:100,value:this.generateRedirectUrl(),altText:q.translate("qr_code")}).element,a=new mn({text:q.translate("copy_payment_link"),variant:"copy-to-clipboard",size:"small",iconRight:"copy_2_line",onClick:()=>{fn.astroPayPaymentLinkCopied(this.componentProps.paymentExternalId),Js(this.generateRedirectUrl())}}).element;this.pushFeedbackWrapper.append(n,r,s,a),this.element.append(this.pushFeedbackWrapper)}async checkPaymentStatus(){try{const n=await We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message)}}initializePollingService(n){this.pollingService=new Gl(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 pa({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:Z.getStyles().textPrimaryColor}).element,o=new X({text:n,size:12}).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:Z.getStyles().messages.error.textSize,color:Z.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 Dk=e=>{const t=Math.floor(e/60),n=e%60;return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}`},Fk=e=>ne`
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`
818
839
  display: flex;
819
840
  flex-wrap: nowrap;
820
841
  align-items: center;
@@ -829,7 +850,7 @@ Minimum version required to store current data is: `+k+`.
829
850
 
830
851
  min-width: min-content;
831
852
  white-space: nowrap;
832
- `;class Uk extends be{constructor(n){super({tag:"div",styles:r=>Fk(r)});S(this,"compProps");S(this,"intervalId",null);S(this,"isTimeOver",!1);this.compProps={timeoutText:q.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=Dk(this.compProps.time);if(this.element.innerHTML="",this.compProps.iconLeft){const r=new mt({name:this.compProps.iconLeft,color:Z.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:14,weight:400,lineHeight:21,color:Z.getStyles().timer.textColor,align:"center"}).element,s=new X({variant:"div",text:i,size:14,weight:600,lineHeight:21,color:Z.getStyles().timer.textColor,align:"center"}).element;if(s.style.fontFamily="monospace",this.element.append(o,s),this.compProps.iconRight){const a=new mt({name:this.compProps.iconRight,color:Z.getStyles().timer.textColor}).element;this.element.append(a)}}}stopTimer(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}destroy(){this.stopTimer(),super.destroy()}}const Bk=e=>ne`
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`
833
854
  display: flex;
834
855
  flex-direction: column;
835
856
  gap: 10px;
@@ -850,7 +871,7 @@ Minimum version required to store current data is: `+k+`.
850
871
  padding: 16px;
851
872
  border: 1px solid ${e.primaryColor};
852
873
  border-radius: 16px;
853
- background-color: ${A.neutral_lightest};
874
+ background-color: ${k.neutral_lightest};
854
875
  }
855
876
 
856
877
  .timeout-container {
@@ -865,7 +886,7 @@ Minimum version required to store current data is: `+k+`.
865
886
  align-items: center;
866
887
  gap: 8px;
867
888
  }
868
- `;class $k extends be{constructor(n){super({tag:"div",styles:r=>Bk(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:Z.getStyles().primaryColor}).element,i=new X({text:q.translate("waiting_confirmation"),size:20,lineHeight:30,weight:600}).element;i.style.marginTop="8px";const o=new X({text:q.translate("do_not_close_window"),size:16,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 We.postGenericPayment(this.componentProps.paymentMethod.uri,this.componentProps.paymentExternalId,o);this.renderSections(s.sections)}else throw new Error(q.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 We.getPaymentStatus(this.componentProps.paymentExternalId);n.pollingStatus===On.ACCEPTED?this.initializePollingService(n):n.pollingStatus===On.FINISHED&&this.handlePaymentSuccess(n)}catch(n){const r=n;this.showErrorMessage(r.message),this.stopTimer(),this.stopPolling()}}initializePollingService(n){this.pollingService=new Gl(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 pa({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:Z.getStyles().messages.error.textSize,color:Z.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:Z.getStyles().textPrimaryColor}).element,o=new X({text:n}).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 Dn.AMOUNT_DISPLAY:this.renderAmountDisplay(o);break;case Dn.COPY:this.renderCopy(o);break;case Dn.DESCRIPTION:this.renderDescription(o);break;case Dn.EXPIRATION_TIMER:this.renderTimer(o);break;case Dn.QR_CODE:this.renderQRCode(o);break;case Dn.SHARE:this.renderShare(o);break;default:console.warn("Unknown component type:",i)}}),await this.checkPaymentStatus()}renderCopy(n){const r=new mn({text:n.label,variant:"copy-to-clipboard",size:"medium",iconLeft:n.iconLeft,iconRight:n.iconRight??"copy_2_line",onClick:()=>{Js(n.value)}}).element;this.element.append(r)}renderShare(n){const r=new mn({text:n.label,variant:"text",size:"medium",iconRight:n.iconRight,iconLeft:n.iconLeft,onClick:()=>{var i,o,s;G1(((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} ${fa(n.amount,n.currency,Ye.getCurrencyMode())}`,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderQRCode(n){const r=new b1({value:n.value,altText:q.translate("qr_code")}).element;this.element.append(r)}renderAmountDisplay(n){const r=new X({text:n.value,size:16,lineHeight:24,weight:600}).element;this.element.append(r)}renderTimer(n){this.timerInstance=new Uk({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 mn({text:q.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 Kl({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 Vk={[Oe.AP]:"astropay_payment_method",[Oe.IX]:"system_pix",[Oe.CREDIT_CARD]:"bank_card_line",[Oe.DEBIT_CARD]:"bank_card_line",[Oe.CW]:"bank_card_line",[Oe.DC]:"bank_card_line",[Oe.CC]:"bank_card_line"},zk={[Oe.CREDIT_CARD]:["payment_visa","payment_master"],[Oe.DEBIT_CARD]:["payment_visa","payment_master"],[Oe.CW]:["payment_visa","payment_master"],[Oe.DC]:["payment_visa","payment_master"],[Oe.CC]:["payment_visa","payment_master"]},Hk=(e,t)=>{switch(e){case Oe.CREDIT_CARD:case Oe.DEBIT_CARD:case Oe.CW:case Oe.DC:case Oe.CC:fn.astroPayPaymentCardClicked(t);break}},jk=e=>!!e.enabled,qk=(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 Oe.AP:return new w1({paymentExternalId:n,user:s,countries:a,benefits:c,paymentAmount:{amount:r,currency:i},actionLabel:l,onSuccess:d,onError:f});default:return $0.includes(e.code)?new B0({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 $k({paymentExternalId:n,paymentMethod:e,onSuccess:d,onError:f})}},Wk=({paymentMethods:e,paymentExternalId:t,...n})=>e!=null&&e.length?e.filter(jk).map(r=>{let i=null;const o=()=>{i==null||i.destroy();const a={paymentExternalId:t,...n};return i=qk(r,a),i.element},s=()=>{i==null||i.destroy(),i=null};return{icon:r.logo||Vk[r.code]||"pay_line",title:r.label,description:r==null?void 0:r.description,auxImage:zk[r.code],content:o,onClose:s,onClickCallback:()=>Hk(r.code,t)}}):[];class Gk extends be{constructor(n){super({tag:"div",elementId:"payment-component",styles:i=>rk(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()},Ft.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:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.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 We.getPaymentDetails(u,"full_checkout");else{const d={country:s,currency:o,amount:i,user:a,order:c};l=await We.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:Z.getStyles().messages.error.textSize,color:Z.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:q.translate("checkout_method"),variant:"div",size:26,lineHeight:36,weight:600}).element;this.element.append(m)}if(this.componentProps.showDescription&&a){const m=new X({text:a,size:14,color:Z.getStyles().textSecondaryColor,weight:400}).element;this.element.append(m)}const l={code:Oe.AP,label:((f=n==null?void 0:n.metadata)==null?void 0:f.title)||q.translate("astro_express_checkout"),description:(h=n==null?void 0:n.metadata)==null?void 0:h.description,enabled:!0},d=Wk({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 nk({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),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({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(),Ft.unregisterComponent(this)}}const Kk=e=>ne`
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`
869
890
  background-color: ${e.backgroundColor};
870
891
 
871
892
  display: flex;
@@ -892,5 +913,5 @@ Minimum version required to store current data is: `+k+`.
892
913
  align-items: center;
893
914
  gap: 8px;
894
915
  }
895
- `;class Yk extends be{constructor(n){super({tag:"div",styles:i=>Kk(i)});S(this,"loadingWrapper");S(this,"componentProps");S(this,"methodCode");this.componentProps={...n,country:n.country.trim(),currency:n.currency.trim()},this.methodCode="AP",Ft.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:Z.getStyles().primaryColor}).element;this.loadingWrapper.append(r),this.element.appendChild(this.loadingWrapper),qe.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 We.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:Z.getStyles().messages.error.textSize,color:Z.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 w1({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),qe.trackEvent("ap_cl_payment_success"),this.componentProps.onSuccess){const i=new ca({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(),Ft.unregisterComponent(this)}}V1();const bd=new WeakMap;function tn(e){return bd.has(e)}function Jk(e){let t=e;for(;t;){if(!tn(t)&&!_l(t))return!1;t=ks(t)}return!0}function ht(e){return bd.get(e)}function Zk(e,t){bd.set(e,t)}function wd(e,t){const n=e.tagName,r=e.value;if(Rs(e,t)){const i=e.type;return n==="INPUT"&&(i==="button"||i==="submit"||i==="reset")?r:!r||n==="OPTION"?void 0:Pn}if(n==="OPTION"||n==="SELECT")return e.value;if(!(n!=="INPUT"&&n!=="TEXTAREA"))return r}const Xk=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,Qk=/^[A-Za-z]+:|^\/\//,eR=/^data:.*,/i;function tR(e,t){return e.replace(Xk,(n,r,i,o,s,a)=>{const c=i||s||a;if(!t||!c||Qk.test(c)||eR.test(c))return n;const u=r||o||"";return`url(${u}${nR(c,t)}${u})`})}function nR(e,t){try{return bs(e,t).href}catch{return e}}const rR=/[^a-z1-6-_]/;function E1(e){const t=e.toLowerCase().trim();return rR.test(t)?"div":t}function S1(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 nn={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},rr={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Lt={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},$t={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},_1={Play:0,Pause:1};function C1(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 T1(e,t,n,r){if(t===H.HIDDEN)return null;const i=e.getAttribute(n);if(t===H.MASK&&n!==Cl&&!cv.includes(n)&&n!==r.actionNameAttribute){const o=e.tagName;switch(n){case"title":case"alt":case"placeholder":return Pn}if(o==="IMG"&&(n==="src"||n==="srcset")){const s=e;if(s.naturalWidth>0)return S1(s.naturalWidth,s.naturalHeight);const{width:a,height:c}=e.getBoundingClientRect();return a>0||c>0?S1(a,c):Xm}if(o==="SOURCE"&&(n==="src"||n==="srcset"))return Xm;if(o==="A"&&n==="href"||i&&n.startsWith("data-")||o==="IFRAME"&&n==="srcdoc")return Pn}return!i||typeof i!="string"?i:Hm(i)?jm(i):i}function iR(e,t,n){if(t===H.HIDDEN)return{};const r={},i=E1(e.tagName),o=e.ownerDocument;for(let l=0;l<e.attributes.length;l+=1){const f=e.attributes.item(l).name,h=T1(e,t,f,n.configuration);h!==null&&(r[f]=h)}if(e.value&&(i==="textarea"||i==="select"||i==="option"||i==="input")){const l=wd(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=Ed(l);d&&l&&(r._cssText=d)}if(i==="style"&&e.sheet){const l=Ed(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:Rs(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 Ed(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}if(!t)return null;const n=Array.from(t,IC()?oR:I1).join("");return tR(n,e.href)}function oR(e){if(aR(e)&&e.selectorText.includes(":")){const t=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return e.cssText.replace(t,"$1\\$2")}return I1(e)}function I1(e){return sR(e)&&Ed(e.styleSheet)||e.cssText}function sR(e){return"styleSheet"in e}function aR(e){return"selectorText"in e}function Sd(e,t){const n=lR(e,t);if(!n)return null;const r=ht(e)||uR(),i=n;return i.id=r,Zk(e,r),t.serializedNodeIds&&t.serializedNodeIds.add(r),i}let cR=1;function uR(){return cR++}function _d(e,t){const n=[];return Zm(e,r=>{const i=Sd(r,t);i&&n.push(i)}),n}function lR(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return dR(e,t);case e.DOCUMENT_FRAGMENT_NODE:return fR(e,t);case e.DOCUMENT_TYPE_NODE:return pR(e);case e.ELEMENT_NODE:return hR(e,t);case e.TEXT_NODE:return mR(e,t);case e.CDATA_SECTION_NODE:return vR()}}function dR(e,t){return{type:rr.Document,childNodes:_d(e,t),adoptedStyleSheets:C1(e.adoptedStyleSheets)}}function fR(e,t){const n=_l(e);return n&&t.serializationContext.shadowRootsController.addShadowRoot(e),{type:rr.DocumentFragment,childNodes:_d(e,t),isShadowRoot:n,adoptedStyleSheets:n?C1(e.adoptedStyleSheets):void 0}}function pR(e){return{type:rr.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId}}function hR(e,t){const n=E1(e.tagName),r=gR(e)||void 0,i=Qm(ev(e),t.parentNodePrivacyLevel);if(i===H.HIDDEN){const{width:a,height:c}=e.getBoundingClientRect();return{type:rr.Element,tagName:n,attributes:{rr_width:`${a}px`,rr_height:`${c}px`,[Cl]:h5},childNodes:[],isSVG:r}}if(i===H.IGNORE)return;const o=iR(e,i,t);let s=[];if(p5(e)&&n!=="style"){let a;t.parentNodePrivacyLevel===i&&t.ignoreWhiteSpace===(n==="head")?a=t:a={...t,parentNodePrivacyLevel:i,ignoreWhiteSpace:n==="head"},s=_d(e,a)}return{type:rr.Element,tagName:n,attributes:o,childNodes:s,isSVG:r}}function gR(e){return e.tagName==="svg"||e instanceof SVGElement}function mR(e,t){const n=nv(e,t.ignoreWhiteSpace||!1,t.parentNodePrivacyLevel);if(n!==void 0)return{type:rr.Text,textContent:n}}function vR(){return{type:rr.CDATA,textContent:""}}function yR(e,t,n){return Sd(e,{serializationContext:n,parentNodePrivacyLevel:t.defaultPrivacyLevel,configuration:t})}function x1(e){return!!e.changedTouches}function no(e){return e.composed===!0&&As(e.target)?e.composedPath()[0]:e.target}const A1=25;function bR(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>A1||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>A1}const wR=(e,t)=>{const n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)bR(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},k1=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function Vt(e,t){return{data:{source:e,...t},type:nn.IncrementalSnapshot,timestamp:Fe()}}const ER=50;function SR(e,t){const{throttled:n,cancel:r}=xn(o=>{const s=no(o);if(tn(s)){const a=R1(o);if(!a)return;const c={id:ht(s),timeOffset:0,x:a.x,y:a.y};t(Vt(x1(o)?Lt.TouchMove:Lt.MouseMove,{positions:[c]}))}},ER,{trailing:!1}),{stop:i}=dt(e,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function R1(e){let{clientX:t,clientY:n}=x1(e)?e.changedTouches[0]:e;if(window.visualViewport){const{visualViewportX:r,visualViewportY:i}=wR(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 P1={pointerup:$t.MouseUp,mousedown:$t.MouseDown,click:$t.Click,contextmenu:$t.ContextMenu,dblclick:$t.DblClick,focus:$t.Focus,blur:$t.Blur,touchstart:$t.TouchStart,touchend:$t.TouchEnd};function _R(e,t,n){const r=i=>{const o=no(i);if(Xt(o,e.defaultPrivacyLevel)===H.HIDDEN||!tn(o))return;const s=ht(o),a=P1[i.type];let c;if(a!==$t.Blur&&a!==$t.Focus){const l=R1(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),...Vt(Lt.MouseInteraction,c)};t(u)};return dt(e,document,Object.keys(P1),r,{capture:!0,passive:!0})}const CR=100;function O1(e,t,n,r=document){const{throttled:i,cancel:o}=xn(a=>{const c=no(a);if(!c||Xt(c,e.defaultPrivacyLevel)===H.HIDDEN||!tn(c))return;const u=ht(c),l=c===document?{scrollTop:Al(),scrollLeft:Lv()}:{scrollTop:Math.round(c.scrollTop),scrollLeft:Math.round(c.scrollLeft)};n.set(c,l),t(Vt(Lt.Scroll,{id:u,x:l.scrollLeft,y:l.scrollTop}))},CR),{stop:s}=Se(e,r,"scroll",i,{capture:!0,passive:!0});return{stop:()=>{s(),o()}}}const TR=200;function IR(e,t){const n=Nv(e).subscribe(r=>{t(Vt(Lt.ViewportResize,r))});return{stop:()=>{n.unsubscribe()}}}function xR(e,t){const n=window.visualViewport;if(!n)return{stop:ae};const{throttled:r,cancel:i}=xn(()=>{t({data:k1(n),type:nn.VisualViewport,timestamp:Fe()})},TR,{trailing:!1}),{stop:o}=dt(e,n,["resize","scroll"],r,{capture:!0,passive:!0});return{stop:()=>{o(),i()}}}function AR(e,t){return dt(e,document,["play","pause"],n=>{const r=no(n);!r||Xt(r,e.defaultPrivacyLevel)===H.HIDDEN||!tn(r)||t(Vt(Lt.MediaInteraction,{id:ht(r),type:n.type==="play"?_1.Play:_1.Pause}))},{capture:!0,passive:!0})}function kR(e){function t(i,o){i&&tn(i.ownerNode)&&o(ht(i.ownerNode))}const n=[lt(CSSStyleSheet.prototype,"insertRule",({target:i,parameters:[o,s]})=>{t(i,a=>e(Vt(Lt.StyleSheetRule,{id:a,adds:[{rule:o,index:s}]})))}),lt(CSSStyleSheet.prototype,"deleteRule",({target:i,parameters:[o]})=>{t(i,s=>e(Vt(Lt.StyleSheetRule,{id:s,removes:[{index:o}]})))})];typeof CSSGroupingRule<"u"?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule));function r(i){n.push(lt(i.prototype,"insertRule",({target:o,parameters:[s,a]})=>{t(o.parentStyleSheet,c=>{const u=L1(o);u&&(u.push(a||0),e(Vt(Lt.StyleSheetRule,{id:c,adds:[{rule:s,index:u}]})))})}),lt(i.prototype,"deleteRule",({target:o,parameters:[s]})=>{t(o.parentStyleSheet,a=>{const c=L1(o);c&&(c.push(s),e(Vt(Lt.StyleSheetRule,{id:a,removes:[{index:c}]})))})}))}return{stop:()=>{n.forEach(i=>i.stop())}}}function L1(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 RR(e,t){return dt(e,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:nn.Focus,timestamp:Fe()})})}function PR(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:nn.FrustrationRecord,data:{frustrationTypes:i.rawRumEvent.action.frustration.type,recordIds:i.domainContext.events.map(a=>n.getIdForEvent(a))}})});return{stop:()=>{r.unsubscribe()}}}function OR(e,t){const n=e.subscribe(5,()=>{t({timestamp:Fe(),type:nn.ViewEnd})});return{stop:()=>{n.unsubscribe()}}}function N1(e,t,n=document){const r=e.defaultPrivacyLevel,i=new WeakMap,o=n!==document,{stop:s}=dt(e,n,o?["change"]:["input","change"],l=>{const d=no(l);(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement||d instanceof HTMLSelectElement)&&c(d)},{capture:!0,passive:!0});let a;if(o)a=ae;else{const l=[Vi(HTMLInputElement.prototype,"value",c),Vi(HTMLInputElement.prototype,"checked",c),Vi(HTMLSelectElement.prototype,"value",c),Vi(HTMLTextAreaElement.prototype,"value",c),Vi(HTMLSelectElement.prototype,"selectedIndex",c)];a=()=>{l.forEach(d=>d.stop())}}return{stop:()=>{a(),s()}};function c(l){const d=Xt(l,r);if(d===H.HIDDEN)return;const f=l.type;let h;if(f==="radio"||f==="checkbox"){if(Rs(l,d))return;h={isChecked:l.checked}}else{const g=wd(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(!tn(l))return;const f=i.get(l);(!f||f.text!==d.text||f.isChecked!==d.isChecked)&&(i.set(l,d),t(Vt(Lt.Input,{id:ht(l),...d})))}}const LR=100,NR=16;function MR(e){let t=ae,n=[];function r(){t(),e(n),n=[]}const{throttled:i,cancel:o}=xn(r,NR,{leading:!1});return{addMutations:s=>{n.length===0&&(t=wm(i,{timeout:LR})),n.push(...s)},flush:r,stop:()=>{t(),o()}}}function M1(e,t,n,r){const i=Nm();if(!i)return{stop:ae,flush:ae};const o=MR(a=>{DR(a.concat(s.takeRecords()),e,t,n)}),s=new i(Y(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 DR(e,t,n,r){const i=new Map;e.filter(d=>d.type==="childList").forEach(d=>{d.removedNodes.forEach(f=>{D1(f,r.removeShadowRoot)})});const o=e.filter(d=>d.target.isConnected&&Jk(d.target)&&Xt(d.target,n.defaultPrivacyLevel,i)!==H.HIDDEN),{adds:s,removes:a,hasBeenSerialized:c}=FR(o.filter(d=>d.type==="childList"),n,r,i),u=UR(o.filter(d=>d.type==="characterData"&&!c(d.target)),n,i),l=BR(o.filter(d=>d.type==="attributes"&&!c(d.target)),n,i);!u.length&&!l.length&&!a.length&&!s.length||t(Vt(Lt.Mutation,{adds:s,removes:a,texts:u,attributes:l}))}function FR(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);$R(s);const a=new Set,c=[];for(const f of s){if(l(f))continue;const h=Xt(f.parentNode,t.defaultPrivacyLevel,r);if(h===H.HIDDEN||h===H.IGNORE)continue;const p=Sd(f,{serializedNodeIds:a,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:n},configuration:t});if(!p)continue;const g=ks(f);c.push({nextId:d(f),parentId:ht(g),node:p})}const u=[];return o.forEach((f,h)=>{tn(h)&&u.push({parentId:ht(f),id:ht(h)})}),{adds:c,removes:u,hasBeenSerialized:l};function l(f){return tn(f)&&a.has(ht(f))}function d(f){let h=f.nextSibling;for(;h;){if(tn(h))return ht(h);h=h.nextSibling}return null}}function UR(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=Xt(ks(a.target),t.defaultPrivacyLevel,n);u===H.HIDDEN||u===H.IGNORE||i.push({id:ht(a.target),value:(r=nv(a.target,!1,u))!==null&&r!==void 0?r:null})}return i}function BR(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=Xt(a.target,t.defaultPrivacyLevel,n),l=T1(a.target,u,a.attributeName,t);let d;if(a.attributeName==="value"){const h=wd(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:ht(a.target),attributes:{}},r.push(f),s.set(a.target,f)),f.attributes[a.attributeName]=d}return r}function $R(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 D1(e,t){As(e)&&t(e.shadowRoot),Zm(e,n=>D1(n,t))}function VR(){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 zR=(e,t,n)=>{const r=new Map,i={addShadowRoot:o=>{if(r.has(o))return;const s=M1(t,e,i,o),a=N1(e,t,o),c=O1(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 HR(e,t,n,r,i,o){const s=(c=Fe(),u={status:0,elementsScrollPositions:e,shadowRootsController:t})=>{const{width:l,height:d}=Ms(),f=[{data:{height:d,href:window.location.href,width:l},type:nn.Meta,timestamp:c},{data:{has_focus:document.hasFocus()},type:nn.Focus,timestamp:c},{data:{node:yR(document,r,u),initialOffset:{left:Lv(),top:Al()}},type:nn.FullSnapshot,timestamp:c}];return window.visualViewport&&f.push({data:k1(window.visualViewport),type:nn.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 jR(){const e=new WeakMap;let t=1;return{getIdForEvent(n){return e.has(n)||e.set(n,t++),e.get(n)}}}function qR(e){const{emit:t,configuration:n,lifeCycle:r}=e;if(!t)throw new Error("emit function is required");const i=f=>{t(f),sl("record",{record:f});const h=e.viewHistory.findView();Jx(h.id)},o=VR(),s=zR(n,i,o),{stop:a}=HR(o,s,r,n,c,f=>f.forEach(h=>i(h)));function c(){s.flush(),l.flush()}const u=jR(),l=M1(i,n,s,document),d=[l,SR(n,i),_R(n,i,u),O1(n,i,o,document),IR(n,i),N1(n,i),AR(n,i),kR(i),RR(n,i),xR(n,i),PR(r,i,u),OR(r,f=>{c(),i(f)})];return{stop:()=>{s.stop(),d.forEach(f=>f.stop()),a()},flushMutations:c,shadowRootsController:s}}function WR(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 GR({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:Kx(i),source:"browser",...e};Yx(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===nn.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)}
896
- `),n.finish(u=>{Zx(o.view.id,u.rawBytesCount),c(o,u)})}return{addRecord:s,flush:a}}const KR=5*Qe;let F1=6e4;function YR(e,t,n,r,i,o){return JR(e,()=>ZR(t.applicationId,n,r),i,o)}function JR(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=WR(l.output,u,l.rawBytesCount);vm(c)?n.sendOnExit(d):n.send(d)}),ut(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:GR({encoder:r,context:u,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:Ue(()=>{a("segment_duration_limit")},KR)}}i.segment.addRecord(c,u=>{u>F1&&a("segment_bytes_limit")})}},stop:()=>{a("stop"),o(),s()}}}function ZR(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 XR(e){const t=Mr();return{addRecord:n=>{const r=e.findView();t.send("record",n,r.id)}}}function QR(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||hm(t.sessionReplayEndpointBuilder,F1,a);let u;if(Yn())({addRecord:u}=XR(r));else{const d=YR(e,t,n,r,c,i);u=d.addRecord,s.push(d.stop)}const{stop:l}=qR({emit:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(l),{stop:()=>{s.forEach(d=>d())}}}const e8=Object.freeze(Object.defineProperty({__proto__:null,startRecording:QR},Symbol.toStringTag,{value:"Module"}));function t8(e){let t=0;for(const n of e)n.stackId!==void 0&&t++;return t}const ro=new Map;let Yr=!1;function n8(){Yr=performance.now()}function r8(){Yr=!1,ro.clear()}function i8(e,t){ro.set(t,e)}function U1(e){if(!(Yr===!1||e.startTime<Yr))return ro.get(e.startTime)}function o8(e){if(!(Yr===!1||e<Yr))for(const t of ro.keys())t<e&&ro.delete(t)}function s8({rawRumEvent:e,startTime:t}){if(e.type!=="long_task")return;const n=e.long_task.id;i8(n,t)}const a8=(e,t,n,r)=>{const i=c8(e,t,n,r),o=l8(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 c8(e,t,n,r){const i=t.tags,o=d8(e,n,r),s=u8(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 u8(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}function l8(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 d8(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=>U1(s)).filter(s=>s!==void 0);return o.length&&(r.long_task={id:o}),r}const f8={sendProfile:a8},B1={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function p8(e,t,n,r=B1){const i=Zn(fe.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(Se(e,window,"visibilitychange",b).stop,Se(e,window,"beforeunload",w).stop),d())}async function u(){await h("stopped"),r8(),s.forEach(T=>T())}function l(T){if(T.state==="running")return{cleanupTasks:T.cleanupTasks,observer:T.observer};const I=[];let k;if(e.trackLongTasks){k=new PerformanceObserver(v),k.observe({entryTypes:[C()]});const D=t.subscribe(12,F=>{s8(F)});n8(),I.push(()=>k==null?void 0:k.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:k}}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:k}=l(a);let O;try{O=new T({sampleInterval:r.sampleIntervalMs,maxBufferSize:Math.round(r.collectIntervalMs*1.5/r.sampleIntervalMs)})}catch(D){se.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:Ue(d,r.collectIntervalMs),longTasks:[],views:[],cleanupTasks:I,observer:k},p(o),O.addEventListener("samplebufferfull",m)}async function f(T){var I,k;if(T.state!=="running")return;y((k=(I=T.observer)===null||I===void 0?void 0:I.takeRecords())!==null&&k!==void 0?k:[]),ut(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 ye=performance.now(),oe=D.length>0,J=ye-O<r.minProfileDurationMs,re=t8(z.samples)<r.minNumberOfSamples;!oe&&(J||re)||(g(Object.assign(z,{startTime:O,endTime:ye,timeOrigin:performance.timeOrigin,longTasks:D,views:F,sampleInterval:r.sampleIntervalMs})),o8(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 k=(I=n.findTrackedSession())===null||I===void 0?void 0:I.id;f8.sendProfile(T,e.profilingEndpointBuilder,e.applicationId,k).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:U1(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 h8=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_RUM_PROFILER_CONFIGURATION:B1,createRumProfiler:p8},Symbol.toStringTag,{value:"Module"}));Ge.AstroPayCardPayment=XA,Ge.AstroPayCore=Ft,Ge.AstroPayFullCheckout=Gk,Ge.AstroPayPayment=Yk,Ge.Core=Ft,Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"})}));
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"})}));