vendor: 4,344 bytes, line 1
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{9293:function(e,t,r){var n;!function(i,o){"use strict";var s="function",a="undefined",u="object",c="string",l="model",d="name",f="type",h="vendor",p="version",v="architecture",g="console",y="mobile",m="tablet",b="smarttv",w="wearable",S="embedded",E="Amazon",I="Apple",_="ASUS",k="BlackBerry",x="Browser",T="Chrome",C="Firefox",O="Google",A="Huawei",R="Microsoft",M="Motorola",N="Opera",P="Samsung",L="Sharp",D="Sony",U="Xiaomi",j="Zebra",q="Facebook",F=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},B=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},V=function(e,t){return typeof e===c&&-1!==z(t).indexOf(z(e))},z=function(e){return e.toLowerCase()},H=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,350)},W=function(e,t){for(var r,n,i,a,c,l,d=0;d<t.length&&!c;){var f=t[d],h=t[d+1];for(r=n=0;r<f.length&&!c;)if(c=f[r++].exec(e))for(i=0;i<h.length;i++)l=c[++n],typeof(a=h[i])===u&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):void 0:this[a[0]]=l?a[1].call(this,l,a[2]):void 0:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):void 0):this[a]=l||o;d+=2}},K=function(e,t){for(var r in t)if(typeof t[r]===u&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(V(t[r][n],e))return"?"===r?o:r}else if(V(t[r],e))return"?"===r?o:r;return e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,N+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[d,N]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+x]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+x],p],[/\bfocus\/([\w\.]+)/i],[p,[d,C+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,N+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,N+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI "+x]],[/fxios\/([-\w\.]+)/i],[p,[d,C]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+x]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+x],p],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,q],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,T+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,T+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+x]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}
vendor: 4,519 bytes, line 1
1]],[/(webkit|khtml)\/([\w\.]+)/i],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,C+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,p],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[v,"amd64"]],[/(ia32(?=;))/i],[[v,z]],[/((?:i[346]|x)86)[;\)]/i],[[v,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[v,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[v,"armhf"]],[/windows (ce|mobile); ppc;/i],[[v,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[v,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[v,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[v,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[h,P],[f,m]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[h,P],[f,y]],[/((ipod|iphone)\d+,\d+)/i],[l,[h,I],[f,y]],[/(ipad\d+,\d+)/i],[l,[h,I],[f,m]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[h,I],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[h,I],[f,m]],[/(macintosh);/i],[l,[h,I]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[h,A],[f,m]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[h,A],[f,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[h,U],[f,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[h,U],[f,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[h,"OPPO"],[f,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[h,"Vivo"],[f,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[h,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[h,M],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[h,M],[f,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[h,"LG"],[f,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[h,"LG"],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[h,"Lenovo"],[f,m]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[h,"Nokia"],[f,y]],[/(pixel c)\b/i],[l,[h,O],[f,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[h,O],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[h,D],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[h,D],[f,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[h,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[h,E],[f,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[h,E],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[l,h,[f,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[h,k],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[h,_],[f,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[h,_],[f,y]],[/(nexus 9)/i],[l,[h,"HTC"],[f,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[l,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[h,"Acer"],[f,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[h,"Meizu"],[f,y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[h,L],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 4,381 bytes, line 1
1s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,l,[f,y]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,l,[f,m]],[/(surface duo)/i],[l,[h,R],[f,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[h,"Fairphone"],[f,y]],[/(u304aa)/i],[l,[h,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[l,[h,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[l,[h,"RCA"],[f,m]],[/\b(venue[\d ]{2,7}) b/i],[l,[h,"Dell"],[f,m]],[/\b(q(?:mv|ta)\w+) b/i],[l,[h,"Verizon"],[f,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[h,"Barnes & Noble"],[f,m]],[/\b(tm\d{3}\w+) b/i],[l,[h,"NuVision"],[f,m]],[/\b(k88) b/i],[l,[h,"ZTE"],[f,m]],[/\b(nx\d{3}j) b/i],[l,[h,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[l,[h,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[l,[h,"Swiss"],[f,m]],[/\b((zeki)?tb.*\b) b/i],[l,[h,"Zeki"],[f,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],l,[f,m]],[/\b(ns-?\w{0,9}) b/i],[l,[h,"Insignia"],[f,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[h,"NextBook"],[f,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],l,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],l,[f,y]],[/\b(ph-1) /i],[l,[h,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[h,"Envizen"],[f,m]],[/\b(trio[-\w\. ]+) b/i],[l,[h,"MachSpeed"],[f,m]],[/\btu_(1491) b/i],[l,[h,"Rotor"],[f,m]],[/(shield[\w ]+) b/i],[l,[h,"Nvidia"],[f,m]],[/(sprint) (\w+)/i],[h,l,[f,y]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[h,R],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[h,j],[f,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[h,j],[f,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,l,[f,g]],[/droid.+; (shield) bui/i],[l,[h,"Nvidia"],[f,g]],[/(playstation [345portablevi]+)/i],[l,[h,D],[f,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[h,R],[f,g]],[/smart-tv.+(samsung)/i],[h,[f,b]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[h,P],[f,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[f,b]],[/(apple) ?tv/i],[h,[l,I+" TV"],[f,b]],[/crkey/i],[[l,T+"cast"],[h,O],[f,b]],[/droid.+aft(\w)( bui|\))/i],[l,[h,E],[f,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[h,L],[f,b]],[/(bravia[\w ]+)( bui|\))/i],[l,[h,D],[f,b]],[/(mitv-\w{5}) bui/i],[l,[h,U],[f,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[h,H],[l,H],[f,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,b]],[/((pebble))app/i],[h,l,[f,w]],[/droid.+; (glass) \d/i],[l,[h,O],[f,w]],[/droid.+; (wt63?0{2,3})\)/i],[l,[h,j],[f,w]],[/(quest( 2)?)/i],[l,[h,q],[f,w]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[f,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[f,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[d,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[p,K,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[p,K,G]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,p],[/\(bb(10);/i],[p,[d,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+);
1 rv:.+ gecko\/([\w\.]+)/i],[p,[d,C+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[d,T+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[d,"Chromium OS"],p],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,p]]},Q=function(e,t){if(typeof e===u&&(t=e,e=o),!(this instanceof Q))return new Q(e,t).getResult();var r=e||(typeof i!==a&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=t?F($,t):$;return this.getBrowser=function(){var e,t={};return t[d]=o,t[p]=o,W.call(t,r,n.browser),t.major=typeof(e=t.version)===c?e.replace(/[^\d\.]/g,"").split(".")[0]:o,t},this.getCPU=function(){var e={};return e[v]=o,W.call(e,r,n.cpu),e},this.getDevice=function(){var e={};return e[h]=o,e[l]=o,e[f]=o,W.call(e,r,n.device),e},this.getEngine=function(){var e={};return e[d]=o,e[p]=o,W.call(e,r,n.engine),e},this.getOS=function(){var e={};return e[d]=o,e[p]=o,W.call(e,r,n.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===c&&e.length>350?H(e,350):e,this},this.setUA(r),this};Q.VERSION="0.7.33",Q.BROWSER=B([d,p,"major"]),Q.CPU=B([v]),Q.DEVICE=B([l,h,f,g,y,b,m,w,S]),Q.ENGINE=Q.OS=B([d,p]),typeof t!==a?(e.exports&&(t=e.exports=Q),t.UAParser=Q):r.amdO?o!==(n=(function(){return Q}).call(t,r,t,e))&&(e.exports=n):typeof i!==a&&(i.UAParser=Q);var J=typeof i!==a&&(i.jQuery||i.Zepto);if(J&&!J.ua){var X=new Q;J.ua=X.getResult(),J.ua.get=function(){return X.getUA()},J.ua.set=function(e){X.setUA(e);var t=X.getResult();for(var r in t)J.ua[r]=t[r]}}}("object"==typeof window?window:this)},3454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(7663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(4453)}])},9108:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return u.ReadonlyURLSearchParams},RedirectType:function(){return u.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return u.notFound},permanentRedirect:function(){return u.permanentRedirect},redirect:function(){return u.redirect},useParams:function(){return h},usePathname:function(){return d},useRouter:function(){return f},useSearchParams:function(){return l},useSelectedLayoutSegment:function(){return v},useSelectedLayoutSegments:function(){return p},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let n=r(7294),i=r(5716),o=r(7353),s=r(8575),a=r(4565),u=r(8670),c=r(4439);function l(){let e=(0,n.useContext)(o.SearchParamsContext);return(0,n.useMemo)(()=>e?new u.ReadonlyURLSearchParams(e):null,[e])}function d(){return(0,n.useContext)(o.PathnameContext)}function f(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function h(){return(0,n.useContext)(o.PathParamsContext)}function p(e){void 0===e&&(e="children");let t=(0,n.useContext)(i.LayoutRouterContext);return t?function e(t,r,n,i){let o;if(void 0===n&&(n=!0),void 0===i&&(i=[]),n)o=t[1][r];else{var u;let e=t[1];o=null!=(u=e.children)?u:Object.values(e)[0]}if(!o)return i;let c=o[0],l=(0,s.getSegmentValue)(c);return!l||l.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(l),e(o,r,!1,i))}(t.tree,e):null}function v(e){void 0===e&&(e="children");let t=p(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===a.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8670:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return s},RedirectType:function(){return n.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});let n=r(8384),i=r(5403);class o extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class s extends URLSearchParams{append(){throw new o}delete(){throw new o}set(){throw new o}sort(){throw new o}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5403:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isNotFoundError:function(){return i},notFound:function(){return n}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1109:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8384:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return v},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return h},isRedirectError:function(){return f},permanentRedirect:function(){return d},redirect:function(){return l}});let o=r(5714),s=r(1747),a=r(1109),u="NEXT_REDIRECT";function c(e,t,r){void 0===r&&(r=a.RedirectStatusCode.TemporaryRedirect);let n=Error(u);n.digest=u+";"+t+";"+e+";"+r+";";let i=o.requestAsyncStorage.getStore();return i&&(n.mutableCookies=i.mutableCookies),n}function l(e,t){void 0===t&&(t="replace");let r=s.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function d(e,t){void 0===t&&(t="replace");let r=s.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function f(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,i]=e.digest.split(";",4),o=Number(i);return t===u&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(o)&&o in a.RedirectStatusCode}function h(e){return f(e)?e.digest.split(";",3)[2]:null}function p(e){if(!f(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function v(e){if(!f(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=n||(n={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8575:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}
1Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4439:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return o}});let n=r(1757)._(r(7294)),i=n.default.createContext(null);function o(e){let t=(0,n.useContext)(i);t&&t(e)}},2762:function(e,t,r){"use strict";var n=r(3454);r(1479);var i=r(7294),o=i&&"object"==typeof i&&"default"in i?i:{default:i},s=void 0!==n&&n.env&&!0,a=function(e){return"[object String]"===Object.prototype.toString.call(e)},u=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,o=void 0===i?s:i;c(a(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof o,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=o,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var u=document.querySelector('meta[property="csp-nonce"]');this._nonce=u?u.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},t.isOptimizeForSpeed=function(){return this._optimizeForSpeed},t.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(s||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(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]},t.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},t.insertRule=function(e,t){if(c(a(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return s||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},t.replaceRule=function(e,t){if(this._optimizeForSpeed){var r=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){s||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},t.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},t.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEac
1h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},t.cssRules=function(){var e=this;return this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},t.makeStyleTag=function(e,t,r){t&&c(a(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var i=document.head||document.getElementsByTagName("head")[0];return r?i.insertBefore(n,r):i.appendChild(n),n},function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,[{key:"length",get:function(){return this._rulesCount}}]),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var l=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},d={};function f(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+l(e+"-"+r)),d[n]}function h(e,t){var r=e+t;return d[r]||(d[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,o=void 0!==i&&i;this._sheet=n||new u({name:"styled-jsx",optimizeForSpeed:o}),this._sheet.inject(),n&&"boolean"==typeof o&&(this._sheet.setOptimizeForSpeed(o),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var o=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=o,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return o.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=f(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return h(i,e)}):[h(i,t)]}}return{styleId:f(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),v=i.createContext(null);v.displayName="StyleSheetContext";var g=o.default.useInsertionEffect||o.default.useLayoutEffect,y=new p;function m(e){var t=y||i.useContext(v);return t&&g(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}m.dynamic=function(e){return e.map(function(e){return f(e[0],e[1])}).join(" ")},t.style=m},3591:function(e,t,r){"use strict";e.exports=r(2762).style},5202:function(e,t,r){"use strict";let n,i,o,s,a,u,c,l,d,f,h,p;r.d(t,{bO:function(){return cO},Ny:function(){return cM},W4:function(){return cA},rl:function(){return cR}});var v,g,y,m,b,w,S,E,I,_,k,x,T,C,O,A,R,M,N,P,L,D,U,j,q,F,B,V,z,H,W,K,G,$,Q,J,X,Y,Z,ee,et,er,en,ei,eo,es,ea,eu={};r.r(eu),r.d(eu,{DEFAULT_ACTION_CLICK_ALLOWLIST:function(){return rE},DEFAULT_CSS_SELECTOR_ALLOWLIST:function(){return rw},DEFAULT_DATA_ATTRIBUTE_PREFIX:function(){return rS},IdentifyOperation:function(){return K},LogLevel:function(){return H},OfflineDisabled:function(){return tA},RevenueProperty:function(){return G},ServerZone:function(){return Q},SpecialEventType:function(){return $},Status:function(){return W}});var ec={};r.r(ec),r.d(ec,{Identify:function(){return eH},Revenue:function(){return eW},Types:function(){return eu},add:function(){return io},createInstance:function(){return ir},extendSession:function(){return is},flush:function(){return ia},getDeviceId:function(){return iu},getSessionId:function(){return ic},getUserId:function(){return il},groupIdentify:function(){return id},identify:function(){return ih},init:function(){return ip},logEvent:function(){return iv},remove:function(){return ig},reset:function(){return iy},revenue:function(){return im},runQueuedFunctions:function(){return tR},setDeviceId:function(){return ib},setGroup:function(){return iw},setOptOut:function(){return iS},setSessionId:function(){return iE},setTransport:function(){return iI},setUserId:function(){return i_},track:function(){return ik}});var el={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let ed=new Uint8Array(16),ef=[];for(let e=0;e<256;++e)ef.push((e+256).toString(16).slice(1));var eh=function(e,t,r){if(el.randomUUID&&!t&&!e)return el.randomUUID();let i=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(ed)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return function(e,t=0){return ef[e[t+0]]+ef[e[t+1]]+ef[e[t+2]]+ef[e[t+3]]+"-"+ef[e[t+4]]+ef[e[t+5]]+"-"+ef[e[t+6]]+ef[e[t+7]]+"-"+ef[e[t+8]]+ef[e[t+9]]+"-"+ef[e[t+10]]+ef[e[t+11]]+ef[e[t+12]]+ef[e[t+13]]+ef[e[t+14]]+ef[e[t+15]]}(i)}
1,ep=function(e,t){return(ep=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function ev(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ep(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var eg=function(){return(eg=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function ey(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function em(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function eb(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function ew(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function eS(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function eE(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function eI(e){return this instanceof eI?(this.v=e,this):new eI(e)}"function"==typeof SuppressedError&&SuppressedError,(v=H||(H={}))[v.None=0]="None",v[v.Error=1]="Error",v[v.Warn=2]="Warn",v[v.Verbose=3]="Verbose",v[v.Debug=4]="Debug";var e_=function(e){return function(){var t=eg({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ek=function(e,t){var r,n;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=ew(t.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(!(s in e))return;e=e[s]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},ex=function(e,t){return function(){var r,n,i={};try{for(var o=ew(t),s=o.next();!s.done;s=o.next()){var a=s.value;i[a]=ek(e,a)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},eT=function(e,t,r,n,i){return void 0===i&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=r(),u=a.logger,c=a.logLevel;if(c&&c<H.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:(Error().stack||"").split("\n").slice(3).map(function(e){return e.trim()}),time:{start:new Date().toISOString()},states:{}};n&&l.states&&(l.states.before=n());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){n&&l.states&&(l.states.after=n()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))}):(n&&l.states&&(l.states.after=n()),l.time&&(l.time.end=new Date().toISOString()),u.debug(JSON.stringify(l,null,2))),d}},eC=function(e){return{promise:e||Promise.resolve()}};(g=W||(W={})).Unknown="unknown",g.Skipped="skipped",g.Success="success",g.RateLimit="rate_limit",g.PayloadTooLarge="payload_too_large",g.Invalid="invalid",g.Failed="failed",g.Timeout="Timeout",g.SystemError="SystemError";var eO="".concat("AMP","_unsent"),eA="https://api2.amplitude.com/2/httpapi",eR=function(e,t){var r=Math.max(t,1);return e.reduce(function(e,t,n){var i=Math.floor(n/r);return e[i]||(e[i]=[]),e[i].push(t),e},[])},eM=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=W.Unknown),{event:e,code:t,message:r}},eN="Amplitude Logger ",eP=function(){function e(){this.logLevel=H.None}return e.prototype.disable=function(){this.logLevel=H.None},e.prototype.enable=function(e){void 0===e&&(e=H.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<H.Verbose||console.log("".concat(eN,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<H.Warn||console.warn("".concat(eN,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<H.Error||console.error("".concat(eN,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<H.Debug||console.log("".concat(eN,"[Debug]: ").concat(e.join(" ")))},e}(),eL=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:H.Warn,loggerProvider:new eP,offline:!1,optOut:!1,serverUrl:eA,serverZone:"US",useBatch:!1}},eD=function(){function e(e){this._optOut=!1;var t,r,n,i,o=eL();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var s=eU(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=s.serverZone,this.serverUrl=s.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
1,enumerable:!1,configurable:!0}),e}(),eU=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=eL().serverZone),void 0===r&&(r=eL().useBatch),e)return{serverUrl:e,serverZone:void 0};var n,i=["US","EU"].includes(t)?t:eL().serverZone;return{serverZone:i,serverUrl:(n=r,"EU"===i?n?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":n?"https://api2.amplitude.com/batch":eA)}},ej=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}(),eq=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,eq)};function eF(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var eB=function(){function e(){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return e.prototype.setup=function(e){var t;return em(this,void 0,void 0,function(){var r,n=this;return eb(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(eO,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(r=i.sent())&&r.length>0&&Promise.all(r.map(function(e){return n.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=eq()),new Promise(function(r){t.addToQueue({event:e,attempts:0,callback:function(e){return r(e)},timeout:0})})},e.prototype.getTryableList=function(e){var t=this;return e.filter(function(e){return e.attempts<t.config.flushMaxRetries?(e.attempts+=1,!0):(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleTryable=function(e,t){var r=this;void 0===t&&(t=!1),e.forEach(function(e){if(t&&(r.queue=r.queue.concat(e)),0===e.timeout){r.schedule(r.config.flushIntervalMillis);return}setTimeout(function(){e.timeout=0,r.schedule(0)},e.timeout)})},e.prototype.addToQueue=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this.getTryableList(e);this.scheduleTryable(r,!0),this.saveEvents()},e.prototype.schedule=function(e){var t=this;this.scheduled||this.config.offline||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),em(this,void 0,void 0,function(){var t,r,n=this;return eb(this,function(i){switch(i.label){case 0:if(this.config.offline)return this.config.loggerProvider.debug("Skipping flush while offline."),[2];return t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(eR(t,this.config.flushQueueSize).map(function(t){return n.send(t,e)}))];case 1:return i.sent(),this.scheduleTryable(r),[2]}})})},e.prototype.send=function(e,t){return void 0===t&&(t=!0),em(this,void 0,void 0,function(){var r,n,i,o;return eb(this,function(s){switch(s.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,ey(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:new Date().toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ej,s.label=1;case 1:return s.trys.push([1,3,,4]),n=eU(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(n,r)];case 2:if(null===(i=s.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t)return"body"in i?this.fulfillRequest(e,i.statusCode,"".concat(i.status,": ").concat(eF(i))):this.fulfillRequest(e,i.statusCode,i.status),[2];return this.handleResponse(i,e),[3,4];case 3:var a;return o=(a=s.sent())instanceof Error?a.message:String(a),this.config.loggerProvider.error(o),this.handleResponse({status:W.Failed,statusCode:0},e),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(e,t){var r=e.status;switch(r){case W.Success:this.handleSuccessResponse(e,t);break;case W.Invalid:this.handleInvalidResponse(e,t);break;case W.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case W.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var r=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key")){this.fulfillRequest(t,e.statusCode,e.body.error);return}var n=new Set(eE(eE(eE(eE([],eS(Object.values(e.body.eventsWithInvalidFields)),!1),eS(Object.values(e.body.eventsWithMissingFields)),!1),eS(Object.values(e.body.eventsWithInvalidIdLengths)),!1),eS(e.body.silencedEvents),!1).flat()),i=t.filter(function(t,i){if(n.has(i)){r.fulfillRequest([t],e.statusCode,e.body.error);return}return!0});i.length>0&&this.config.loggerProvider.warn(eF(e));var o=this.getTryableList(i);this.scheduleTryable(o)},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1===t.length){this.fulfillRequest(t,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(eF(e)),this.config.flushQueueSize/=2;var r=this.getTryableList(t);this.scheduleTryable(r)},e.prototype.handleRateLimitResponse=function(e,t){var r=this,n=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(n),a=new Set(i),u=new Set(o),c=t.filter(function(t,n){if(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&a.has(t.event.device_id)){r.fulfillRequest([t],e.statusCode,e.body.error);return}return u.has(n)&&(t.timeout=r.throttleTimeout),!0});c.length>0&&this.config.loggerProvider.warn(eF(e));var l=this.getTryableList(c);this.scheduleTryable(l)},e.prototype.handleOtherResponse=function(e){var t=this,r=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),n=this.getTryableList(r);this.scheduleTryable(n)},e.prototype.fulfillRequest=function(e,t,r){this.removeEvents(e),e.forEach(function(e){return e.callback(eM(e.event,t,r))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.s
1ome(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}();(y=K||(K={})).SET="$set",y.SET_ONCE="$setOnce",y.ADD="$add",y.APPEND="$append",y.PREPEND="$prepend",y.REMOVE="$remove",y.PREINSERT="$preInsert",y.POSTINSERT="$postInsert",y.UNSET="$unset",y.CLEAR_ALL="$clearAll",(m=G||(G={})).REVENUE_PRODUCT_ID="$productId",m.REVENUE_QUANTITY="$quantity",m.REVENUE_PRICE="$price",m.REVENUE_TYPE="$revenueType",m.REVENUE="$revenue",(b=$||($={})).IDENTIFY="$identify",b.GROUP_IDENTIFY="$groupidentify",b.REVENUE="revenue_amount";var eV=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var r=e[t];if(!ez(t,r))return!1}return!0},ez=function(e,t){var r,n;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=ew(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(Array.isArray(a))return!1;if("object"==typeof a)i=i&&eV(a);else if(!["number","string"].includes(typeof a))return!1;if(!i)return!1}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else if(null==t)return!1;else if("object"==typeof t)return eV(t);else if(!["number","string","boolean"].includes(typeof t))return!1;return!0},eH=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return eg({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(K.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(K.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(K.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(K.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(K.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(K.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(K.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(K.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(K.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[K.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,r){if(this._validate(e,t,r)){var n=this._properties[e];return void 0===n&&(n={},this._properties[e]=n),n[t]=r,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,r){return!(void 0!==this._properties[K.CLEAR_ALL]||this._propertySet.has(t))&&(e===K.ADD?"number"==typeof r:e===K.UNSET||e===K.REMOVE||ez(t,r))},e}(),eW=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return eV(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?eg({},this.properties):{};return e[G.REVENUE_PRODUCT_ID]=this.productId,e[G.REVENUE_QUANTITY]=this.quantity,e[G.REVENUE_PRICE]=this.price,e[G.REVENUE_TYPE]=this.revenueType,e[G.REVENUE]=this.revenue,e},e}(),eK=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var r,n;return em(this,void 0,void 0,function(){return eb(this,function(i){switch(i.label){case 0:if(this.plugins.some(function(t){return t.name===e.name}))return t.loggerProvider.warn("Plugin with name ".concat(e.name," already exists, skipping registration")),[2];return void 0===e.name&&(e.name=eq(),t.loggerProvider.warn("Plugin name is undefined. \n Generating a random UUID for plugin name: ".concat(e.name,". \n Set a name for the plugin to prevent it from being added multiple times."))),e.type=null!==(r=e.type)&&void 0!==r?r:"enrichment",[4,null===(n=e.setup)||void 0===n?void 0:n.call(e,t,this.client)];case 1:return i.sent(),this.plugins.push(e),[2]}})})},e.prototype.deregister=function(e){var t;return em(this,void 0,void 0,function(){var r,n;return eb(this,function(i){switch(i.label){case 0:return r=this.plugins.findIndex(function(t){return t.name===e}),n=this.plugins[r],this.plugins.splice(r,1),[4,null===(t=n.teardown)||void 0===t?void 0:t.call(n)];case 1:return i.sent(),[2]}})})},e.prototype.reset=function(e){this.applying=!1,this.plugins.map(function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)}),this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(r){t.queue.push([e,r]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return em(this,void 0,void 0,function(){var t,r,n,i,o,s,a,u,c,l,d,f,h,p;return eb(this,function(v){switch(v.label){case 0:if(!e)return[2];t=eS(e,1)[0],r=eS(e,2)[1],n=this.plugins.filter(function(e){return"before"===e.type}),v.label=1;case 1:v.trys.push([1,6,7,8]),o=(i=ew(n)).next(),v.label=2;case 2:if(o.done)return[3,5];if(!(s=o.value).execute)return[3,4];return[4,s.execute(eg({},t))];case 3:if(null===(a=v.sent()))return r({event:t,code:0,message:""}),[2];t=a,v.label=4;case 4:return o=i.next(),[3,2];case 5:return[3,8];case 6:return d={error:v.sent()},[3,8];case 7:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(d)throw d.error}
1return[7];case 8:u=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),v.label=9;case 9:v.trys.push([9,14,15,16]),l=(c=ew(u)).next(),v.label=10;case 10:if(l.done)return[3,13];if(!(s=l.value).execute)return[3,12];return[4,s.execute(eg({},t))];case 11:if(null===(a=v.sent()))return r({event:t,code:0,message:""}),[2];t=a,v.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return h={error:v.sent()},[3,16];case 15:try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(h)throw h.error}return[7];case 16:return Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){var r=eg({},t);return e.execute(r).catch(function(e){return eM(r,0,String(e))})})).then(function(e){var n=eS(e,1)[0]||eM(t,100,"Event not tracked, no destination plugins on the instance");r(n)}),[2]}})})},e.prototype.flush=function(){return em(this,void 0,void 0,function(){var e,t=this;return eb(this,function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return t.apply(e)}))];case 1:return r.sent(),[4,Promise.all(this.plugins.filter(function(e){return"destination"===e.type}).map(function(e){return e.flush&&e.flush()}))];case 2:return r.sent(),[2]}})})},e}(),eG=function(e,t){return eg(eg({},t),{event_type:$.IDENTIFY,user_properties:e.getUserProperties()})},e$=function(e,t,r,n){var i;return eg(eg({},n),{event_type:$.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:((i={})[e]=t,i)})},eQ=function(e,t,r){var n,i=new eH;return i.set(e,t),eg(eg({},r),{event_type:$.IDENTIFY,user_properties:i.getUserProperties(),groups:((n={})[e]=t,n)})},eJ=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new eK(this),this.name=e}return e.prototype._init=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),this.isReady=!0,[2]}})})},e.prototype.runQueuedFunctions=function(e){return em(this,void 0,void 0,function(){var t,r,n,i,o,s;return eb(this,function(a){switch(a.label){case 0:t=this[e],this[e]=[],a.label=1;case 1:a.trys.push([1,8,9,10]),n=(r=ew(t)).next(),a.label=2;case 2:if(n.done)return[3,7];if(!((i=(0,n.value)())&&"promise"in i))return[3,4];return[4,i.promise];case 3:return a.sent(),[3,6];case 4:return[4,i];case 5:a.sent(),a.label=6;case 6:return n=r.next(),[3,2];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(o)throw o.error}return[7];case 10:if(!this[e].length)return[3,12];return[4,this.runQueuedFunctions(e)];case 11:a.sent(),a.label=12;case 12:return[2]}})})},e.prototype.track=function(e,t,r){var n=eg(eg(eg({},"string"==typeof e?{event_type:e}:e),r),t&&{event_properties:t});return eC(this.dispatch(n))},e.prototype.identify=function(e,t){var r=eG(e,t);return eC(this.dispatch(r))},e.prototype.groupIdentify=function(e,t,r,n){var i=e$(e,t,r,n);return eC(this.dispatch(i))},e.prototype.setGroup=function(e,t,r){var n=eQ(e,t,r);return eC(this.dispatch(n))},e.prototype.revenue=function(e,t){var r=eg(eg({},t),{event_type:$.REVENUE,event_properties:e.getEventProperties()});return eC(this.dispatch(r))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),eC())},e.prototype._addPlugin=function(e){return eC(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),eC())},e.prototype._removePlugin=function(e){return eC(this.timeline.deregister(e))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(eM(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return em(this,void 0,void 0,function(){var t=this;return eb(this,function(r){return this.isReady?[2,this.process(e)]:[2,new Promise(function(r){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,r))})]})})},e.prototype.process=function(e){return em(this,void 0,void 0,function(){var t,r;return eb(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),this.config.optOut)return[2,eM(e,0,"Event skipped due to optOut config")];return[4,this.timeline.push(e)];case 1:return 200===(t=n.sent()).code?this.config.loggerProvider.log(t.message):100===t.code?this.config.loggerProvider.warn(t.message):this.config.loggerProvider.error(t.message),[2,t];case 2:return r=String(n.sent()),this.config.loggerProvider.error(r),[2,t=eM(e,0,r)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){if(!this.isReady){this.q.push(this._setOptOut.bind(this,!!e));return}this._setOptOut(e)},e.prototype._setOptOut=function(e){this.config.optOut=!!e},e.prototype.flush=function(){return eC(this.timeline.flush())},e}(),eX=function(e,t){return"boolean"==typeof e?e:(null==e?void 0:e[t])!==!1},eY=function(e){return eX(e,"attribution")},eZ=function(e){return eX(e,"pageViews")},e0=function(e){return eX(e,"sessions")},e1=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},e2=function(e){if(e1(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},e3=function(e){var t,r=function(){return!1},n=void 0,i=e.pageCounter;return eZ(e.defaultTracking)&&(r=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:t,pageCounter:i}},e4="dclid",e6="fbclid",e5="gbraid",e8="gclid",e7="ko_click_id",e9="li_fat_id",te="msclkid",tt="rtd_cid",tr="ttclid",tn="twclid",ti="wbraid",to={utm_campaign:void 0,utm_c
1ontent: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,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},ts=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},ta=function(e,t,r,n){void 0===n&&(n=!0),e.referrer;var i=e.referring_domain,o=ey(e,["referrer","referring_domain"]),s=t||{},a=(s.referrer,s.referring_domain),u=ey(s,["referrer","referring_domain"]);if(tu(r.excludeReferrers,e.referring_domain)||!n&&Object.values(e).every(function(e){return!e})&&t)return!1;var c=JSON.stringify(o)!==JSON.stringify(u),l=ts(i||"")!==ts(a||"");return!t||c||l},tu=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},tc=function(e){var t=e;return t?(t.startsWith(".")&&(t=t.substring(1)),[new RegExp("".concat(t.replace(".","\\."),"$"))]):[]},tl=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0},td=function(){var e,t=tl();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var r=t.split("=",2),n=tf(r[0]),i=tf(r[1]);return i&&(e[n]=i),e},{}):{}},tf=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},th=function(){function e(){}return e.prototype.parse=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return[2,eg(eg(eg(eg({},to),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=td();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,r={referrer:void 0,referring_domain:void 0};try{r.referrer=document.referrer||void 0,r.referring_domain=null!==(t=null===(e=r.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return r},e.prototype.getClickIds=function(){var e,t=td();return(e={})[e4]=t[e4],e[e6]=t[e6],e[e5]=t[e5],e[e8]=t[e8],e[e7]=t[e7],e[e9]=t[e9],e[te]=t[te],e[tt]=t[tt],e[tr]=t[tr],e[tn]=t[tn],e[ti]=t[ti],e},e}(),tp=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},tv=function(){function e(e,t){var r,n,i;this.shouldTrackNewCampaign=!1,this.options=eg({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:tc(null===(r=t.cookieOptions)||void 0===r?void 0:r.domain)},e),this.storage=t.cookieStorage,this.storageKey=(n=t.apiKey,void 0===i&&(i=10),["AMP","MKTG",n.substring(0,i)].filter(Boolean).join("_")),this.currentCampaign=to,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return em(this,void 0,void 0,function(){var e,t;return eb(this,function(r){switch(r.label){case 0:return[4,this.fetchCampaign()];case 1:if(t=eS.apply(void 0,[r.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||tp(this.sessionTimeout,this.lastEventTime),!ta(this.currentCampaign,this.previousCampaign,this.options,e))return[3,3];return this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){switch(e.label){case 0:return[4,Promise.all([new th().parse(),this.storage.get(this.storageKey)])];case 1:return[2,e.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,r,n=(t=this.currentCampaign,r=this.options,eG(Object.entries(eg(eg({},to),t)).reduce(function(e,t){var n,i=eS(t,2),o=i[0],s=i[1];return(e.setOnce("initial_".concat(o),null!==(n=null!=s?s:r.initialEmptyValue)&&void 0!==n?n:"EMPTY"),s)?e.set(o,s):e.unset(o)},new eH)));return e&&(n.event_id=e),n},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),tg=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:ty(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),ty=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},tm=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),tb=function(){return(tb=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function tw(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tS(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}"function"==typeof SuppressedError&&SuppressedError;var tE=function(e,t){var r,n,i=typeof e;if(i!==typeof t)return!1;try{for(var o=tw(["string","number","boolean","undefined"]),s=o.next();!s.done;s=o.next())if(s.value===i)return e===t}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t||e.length!==t.length)return!1;var a=Array.isArray(e),u=Array.isArray(t);if(a!==u)return!1;if(a&&u){for(var c=0;c<e.length;c++)if(!tE(e[c],t[c]))return!1}else{if(!tE(Object.keys(e).sort(),Object.keys(t).sort()))return!1;var l=!0;return Object.keys(e).forEach(function(r){tE(e[r],t[r])||(l=!1)}),l}return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var tI=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=tb({},this.identity.userProperties),r=tb(tb({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,i,o,s,a,u=r.userProperties||{};try{for(var c=tw(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=tS(l.value,2),f=d[0],h=d[1];switch(f){case"$set":try{for(var p=(i=void 0,tw(Object.entries(h))),v=p.next();!v.done;v=p.next()){var g=tS(v.value,2),y=g[0],m=g[1];u[y]=m}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(s=void 0,tw(Object.keys(h))),w=b.next();!w.done;w=b.next()){var y=w.value;delete u[y]}}catch(e){s={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(s)throw s.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return r.userProperties=u,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return tb({},this.identity)},e.prototype.setIdentity=function(e){var t=tb({},this.identity);this.identity=tb({},e),tE(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),t_="undefined"!=typeof globalThis?globalThis:void 0!==r.g?r.g:self,tk=function(){function e(){this.identityStore=new tI,this.eventBridge=new tm,this.applicationContextProvider=new tg}return e.getInstance=function(t){return t_.analyticsConnectorInstances||(t_.analyticsConnectorInstances={}),t_.analyticsConnectorInstances[t]||(t_.analyticsConnectorInstances[t]=new e),t_.analyticsConnectorInstances[t]},e}(),tx=function(e){return void 0===e&&(e="$default_instance"),tk.getInstance(e)},tT=function(e,t){tx(t).identityStore.editIdentity().setUserId(e).commit()},tC=function(e,t){tx(t).identityStore.editIdentity().setDeviceId(e).commit()},tO=function(){function e(){this.name="identity",this.type="before",this.identityStore=tx().identityStore}return e.prototype.execute=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){return e.instanceName&&(this.identityStore=tx(e.instanceName).identityStore),[2]})})},e}(),tA=null,tR=function(e,t){tM(e,t)},tM=function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.name,o=n.args,s=n.resolve,a=e&&e[i];if("function"==typeof a){var u=a.apply(e,o);"function"==typeof s&&s(null==u?void 0:u.promise)}}return e},tN=function(e){return e&&void 0!==e._q},tP=function(){if("undefined"==typeof navigator)return"";var e,t,r,n,i=navigator.userLanguage;return null!==(n=null!==(r=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==r?r:i)&&void 0!==n?n:""},tL=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="amplitude-ts/".concat("2.11.7"),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,r;return em(this,void 0,void 0,function(){var n,i,o;return eb(this,function(s){return n=new Date().getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,o=null!==(r=e.event_id)&&void 0!==r?r:i+1,this.config.lastEventId=o,e.time||(this.config.lastEventTime=n),[2,eg(eg(eg(eg(eg(eg(eg(eg({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:n},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:tP()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:eq(),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}}),e),{event_id:o,library:this.library,user_agent:this.userAgent})]})})},e}(),tD=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:return[4,this.get(e)];case 1:return[2,(t=r.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return em(this,void 0,void 0,function(){return eb(this,function(r){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),tU=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r=10),["AMP",t,e.substring(0,r)].filter(
1Boolean).join("_")},tj=function(){function e(e){this.options=eg({},e)}return e.prototype.isEnabled=function(){return em(this,void 0,void 0,function(){var t,r;return eb(this,function(n){switch(n.label){case 0:if(!tl())return[2,!1];e.testValue=String(Date.now()),t=new e(this.options),r="AMP_TEST",n.label=1;case 1:return n.trys.push([1,4,5,7]),[4,t.set(r,e.testValue)];case 2:return n.sent(),[4,t.get(r)];case 3:return[2,n.sent()===e.testValue];case 4:return n.sent(),[2,!1];case 5:return[4,t.remove(r)];case 6:return n.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){var t;return em(this,void 0,void 0,function(){var r,n;return eb(this,function(i){switch(i.label){case 0:return[4,this.getRaw(e)];case 1:if(!(r=i.sent()))return[2,void 0];try{if(n=null!==(t=tq(r))&&void 0!==t?t:tF(r),void 0===n)return console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0];return[2,JSON.parse(n)]}catch(t){return console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(r)),[2,void 0]}return[2]}})})},e.prototype.getRaw=function(e){var t,r;return em(this,void 0,void 0,function(){var n,i;return eb(this,function(o){return(i=(null!==(r=null===(t=null==(n=tl())?void 0:n.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==r?r:[]).find(function(t){return 0===t.indexOf(e+"=")}))?[2,i.substring(e.length+1)]:[2,void 0]})})},e.prototype.set=function(e,t){var r;return em(this,void 0,void 0,function(){var n,i,o,s,a,u,c;return eb(this,function(l){try{n=null!==(r=this.options.expirationDays)&&void 0!==r?r:0,i=null!==t?n:-1,o=void 0,i&&((s=new Date).setTime(s.getTime()+864e5*i),o=s),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),o&&(a+="; expires=".concat(o.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(u=tl())&&(u.document.cookie=a)}catch(t){c=t instanceof Error?t.message:String(t),console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}return[2]})})},e.prototype.remove=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return[2]})})},e}(),tq=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}},tF=function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}},tB=function(){function e(){}return e.prototype.send=function(e,t){return Promise.resolve(null)},e.prototype.buildResponse=function(e){if("object"!=typeof e)return null;var t,r,n,i,o,s,a,u,c,l,d,f,h,p,v,g,y,m,b,w,S,E,I=e.code||0,_=this.buildStatus(I);switch(_){case W.Success:return{status:_,statusCode:I,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(n=e.server_upload_time)&&void 0!==n?n:0}};case W.Invalid:return{status:_,statusCode:I,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(s=e.events_with_invalid_fields)&&void 0!==s?s:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(h=e.throttled_devices)&&void 0!==h?h:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case W.PayloadTooLarge:return{status:_,statusCode:I,body:{error:null!==(v=e.error)&&void 0!==v?v:""}};case W.RateLimit:return{status:_,statusCode:I,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(m=e.throttled_devices)&&void 0!==m?m:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(S=e.exceeded_daily_quota_users)&&void 0!==S?S:{},throttledEvents:null!==(E=e.throttled_events)&&void 0!==E?E:[]}};case W.Timeout:default:return{status:_,statusCode:I}}},e.prototype.buildStatus=function(e){return e>=200&&e<300?W.Success:429===e?W.RateLimit:413===e?W.PayloadTooLarge:408===e?W.Timeout:e>
1=400&&e<500?W.Invalid:e>=500?W.Failed:W.Unknown},e}(),tV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ev(t,e),t.prototype.send=function(e,t){return em(this,void 0,void 0,function(){var r,n;return eb(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw Error("FetchTransport is not supported");return[4,fetch(e,{headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"})];case 1:return[4,(r=i.sent()).text()];case 2:n=i.sent();try{return[2,this.buildResponse(JSON.parse(n))]}catch(e){return[2,this.buildResponse({code:r.status})]}return[2]}})})},t}(tB),tz=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return em(this,void 0,void 0,function(){var t,r,n;return eb(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),r=new e(this.storage),n="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return i.sent(),[4,r.get(n)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:if(!(t=r.sent()))return[2,void 0];return[2,JSON.parse(t)];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(e){var t;return em(this,void 0,void 0,function(){return eb(this,function(r){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var r;return em(this,void 0,void 0,function(){return eb(this,function(n){try{null===(r=this.storage)||void 0===r||r.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return em(this,void 0,void 0,function(){return eb(this,function(r){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return em(this,void 0,void 0,function(){return eb(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),tH=function(e){function t(t){var r,n=this;return(n=e.call(this,null===(r=tl())||void 0===r?void 0:r.localStorage)||this).loggerProvider=null==t?void 0:t.loggerProvider,n}return ev(t,e),t.prototype.set=function(t,r){var n;return em(this,void 0,void 0,function(){var i;return eb(this,function(o){switch(o.label){case 0:if(!(Array.isArray(r)&&r.length>1e3))return[3,2];return i=r.length-1e3,[4,e.prototype.set.call(this,t,r.slice(0,1e3))];case 1:return o.sent(),null===(n=this.loggerProvider)||void 0===n||n.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(1e3,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,r)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(tz),tW=function(e){function t(){var t;return e.call(this,null===(t=tl())||void 0===t?void 0:t.sessionStorage)||this}return ev(t,e),t}(tz),tK=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={done:4},t}return ev(t,e),t.prototype.send=function(e,t){return em(this,void 0,void 0,function(){var r=this;return eb(this,function(n){return[2,new Promise(function(n,i){"undefined"==typeof XMLHttpRequest&&i(Error("XHRTransport is not supported."));var o=new XMLHttpRequest;o.open("POST",e,!0),o.onreadystatechange=function(){if(o.readyState===r.state.done){var e=o.responseText;try{n(r.buildResponse(JSON.parse(e)))}catch(e){n(r.buildResponse({code:o.status}))}}},o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Accept","*/*"),o.send(JSON.stringify(t))})]})})},t}(tB),tG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ev(t,e),t.prototype.send=function(e,t){return em(this,void 0,void 0,function(){var r=this;return eb(this,function(n){return[2,new Promise(function(n,i){var o=tl();if(!(null==o?void 0:o.navigator.sendBeacon))throw Error("SendBeaconTransport is not supported");try{var s=JSON.stringify(t);if(o.navigator.sendBeacon(e,JSON.stringify(t)))return n(r.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:s.length,server_upload_time:Date.now()}));return n(r.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tB),t$=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},tQ=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},tJ="[Amplitude]",tX="".concat(tJ," Form Started"),tY="".concat(tJ," Form Submitted"),tZ="".concat(tJ," File Downloaded"),t0="session_start",t1="session_end",t2="".concat(tJ," File Extension"),t3="".concat(tJ," File Name"),t4="".concat(tJ," Link ID"),t6="".concat(tJ," Link Text"),t5="".concat(tJ," Link URL"),t8="".concat(tJ," Form ID"),t7="".concat(tJ," Form Name"),t9="".concat(tJ," Form Destination"),re="cookie",rt=function(e){function t(t,r,n,i,o,s,a,u,c,l,d,f,h,p,v,g,y,m,b,w,S,E,I,_,k,x,T,C,O,A,R,M,N,P){void 0===n&&(n=new tD),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=re),void 0===g&&(g=new eP),void 0===y&&(y=H.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===I&&(I=""),void 0===_&&(_="US"),void 0===x&&(x=18e5),void 0===T&&(T=new tH({loggerProvider:g})),void 0===C&&(C={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===A&&(A=!1),void 0===R&&(R=!1);var L=e.call(this,{apiKey:t,storageProvider:T,transportProvider:rn(O)})||this;return L.apiKey=t,L.appVersion=r,L.cookieOptions=i,L.defaultTracking=o,L.autocapture=s,L.flushIntervalMillis=u,L.flushMaxRetries=c,L.flushQueueSize=l,L.identityStorage=d,L.ingestionMetadata=f,L.instanceName=h,L.loggerProvider=g,L.logLevel=y,L.minIdLength=m,L.offline=b,L.partnerId=S,L.plan=E,L.serverUrl=I,L.serverZone=_,L.sessionTimeout=x,L.storageProvider=T,L.trackingOptions=C,L.transport=O,L.useBatch=A,L.fetchRemoteConfig=R,L._optOut=!1,L._cookieStorage=n,L.deviceId=a,L.lastEventId=p,L.lastEventTime=v,L.optOut=w,L.sessionId=k,L.pageCounter=N,L.userId=M,L.debugLogsEnabled=P,L.loggerProvider.enable(P?H.Debug:L.logLevel),L}return ev(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={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(tU(this.apiKey),e)},t}(eD),rr=function(e,t){switch(void 0===e&&(e=re),void 0===t&&(t={}),e){case"localStorage":return new tH;case"sessionStorage":return new tW;case"none":return new tD;default:return new tj(eg(eg({},t),{expirationDays:t.expiration}))}},rn=function(e){return"xhr"===e?new tK:"beacon"===e?new tG:new tV},ri=function(e){var t={};for(var r in e){var n=e[r];n&&(t[r]=n)}return t},ro=function(e){void 0===e&&(e={});var t,r,n,i=tl(),o=void 0,s=e.trackOn,a=e.trackHistoryChanges,u=e.eventType,c=void 0===u?"[Amplitude] Page Viewed":u,l=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==o||o.error("Malformed URI sequence: ",e)}return t},d=function(){return em(void 0,void 0,void 0,function(){var e,t,r;return eb(this,function(n){switch(n.label){case 0:return e=l("undefined"!=typeof location&&location.href||""),r={event_type:c},t=[{}],[4,rs()];case 1:return[2,(r.event_properties=eg.apply(void 0,[eg.apply(void 0,t.concat([n.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":e,"[Amplitude] Page Path":"undefined"!=typeof location&&l(location.pathname)||"","[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":e.split("?")[0]}]),r)]}})})},f=function(){return void 0===s||"function"==typeof s&&s()},h="undefined"!=typeof location?location.href:null,p=function(){return em(void 0,void 0,void 0,function(){var e,r,n,i;return eb(this,function(s){switch(s.label){case 0:if(r=ru(a,e=location.href,h||"")&&f(),h=e,!r)return[3,4];if(null==o||o.log("Tracking page view event"),null!=t)return[3,1];return[3,3];case 1:return i=(n=t).track,[4,d()];case 2:i.apply(n,[s.sent()]),s.label=3;case 3:s.label=4;case 4:return[2]}})})},v=function(){p()};return{name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,s){return em(void 0,void 0,void 0,function(){var a,u;return eb(this,function(c){switch(c.label){case 0:if(t=s,n=e,(o=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),i&&(i.addEventListener("popstate",v),r=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,r){var n=eS(r,3),i=n[0],o=n[1],s=n[2];e.apply(t,[i,o,s]),p()}})),!f())return[3,2];return o.log("Tracking page view event"),u=(a=t).track,[4,d()];case 1:u.apply(a,[c.sent()]),c.label=2;case 2:return[2]}})})},execute:function(e){return em(void 0,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:if(!("attribution"===s&&ra(e)))return[3,2];
1return null==o||o.log("Enriching campaign event to page view event with campaign parameters"),[4,d()];case 1:t=r.sent(),e.event_type=t.event_type,e.event_properties=eg(eg({},e.event_properties),t.event_properties),r.label=2;case 2:return n&&e.event_type===c&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=eg(eg({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return em(void 0,void 0,void 0,function(){return eb(this,function(e){return i&&(i.removeEventListener("popstate",v),r&&(i.history.pushState=r)),[2]})})}}},rs=function(){return em(void 0,void 0,void 0,function(){var e;return eb(this,function(t){switch(t.label){case 0:return e=ri,[4,new th().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},ra=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,r=t[K.SET]||{},n=t[K.UNSET]||{},i=eE(eE([],eS(Object.keys(r)),!1),eS(Object.keys(n)),!1);return Object.keys(to).every(function(e){return i.includes(e)})}return!1},ru=function(e,t,r){if("pathOnly"===e){if(""==r)return!0;var n=new URL(t),i=new URL(r);return n.origin+n.pathname!==i.origin+i.pathname}return t!==r},rc=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(t,n){return em(void 0,void 0,void 0,function(){var i;return eb(this,function(o){return null===(i=tl())||void 0===i||i.addEventListener("load",function(){if(!n){t.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.");return}if("undefined"!=typeof document){var i=function(e){var t=!1;r(e,"change",function(){var r;t||n.track(tX,((r={})[t8]=rl(e.id),r[t7]=rl(e.name),r[t9]=e.action,r)),t=!0}),r(e,"submit",function(){var r,i;t||n.track(tX,((r={})[t8]=rl(e.id),r[t7]=rl(e.name),r[t9]=e.action,r)),n.track(tY,((i={})[t8]=rl(e.id),i[t7]=rl(e.name),i[t9]=e.action,i)),t=!1})};Array.from(document.getElementsByTagName("form")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return em(void 0,void 0,void 0,function(){return eb(this,function(t){return[2,e]})})},teardown:function(){return em(void 0,void 0,void 0,function(){return eb(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},rl=function(e){if("string"==typeof e)return e},rd=function(){var e,t=[],r=function(e,r,n){e.addEventListener(r,n),t.push({element:e,type:r,handler:n})},n=function(){t.forEach(function(e){var t=e.element,r=e.type,n=e.handler;null==t||t.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(t,n){return em(void 0,void 0,void 0,function(){var i;return eb(this,function(o){return null===(i=tl())||void 0===i||i.addEventListener("load",function(){if(!n){t.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.");return}if("undefined"!=typeof document){var i=function(e){try{t=new URL(e.href,window.location.href)}catch(e){return}var t,i=o.exec(t.href),s=null==i?void 0:i[1];s&&r(e,"click",function(){var r;s&&n.track(tZ,((r={})[t2]=s,r[t3]=t.pathname,r[t4]=e.id,r[t6]=e.text,r[t5]=e.href,r))})},o=/\.(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)$/;Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}),[2]})})},execute:function(e){return em(void 0,void 0,void 0,function(){return eb(this,function(t){return[2,e]})})},teardown:function(){return em(void 0,void 0,void 0,function(){return eb(this,function(t){return null==e||e.disconnect(),n(),[2]})})}}},rf=!1,rh=function(e){rf||void 0!==e.defaultTracking||(e.loggerProvider.warn("`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:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),rf=!0)},rp=function(){var e=tl(),t=[],r=function(r,n){e&&(e.addEventListener(r,n),t.push({type:r,handler:n}))},n=function(){t.forEach(function(t){var r=t.type,n=t.handler;e&&e.removeEventListener(r,n)}),t=[]};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return em(void 0,void 0,void 0,function(){return eb(this,function(n){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1):(e.offline=!navigator.onLine,r("online",function(){e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis)}),r("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0})),[2]})})},teardown:function(){return em(void 0,void 0,void 0,function(){return eb(this,function(e){return n(),[2]})})}}};(w=Q||(Q={})).US="US",w.EU="EU";var rv="Remote config fetch rejected due to timeout after 5 seconds",rg="Unexpected error occurred",ry=function(){function e(e){var t=e.localConfig,r=e.configKeys,n=this;this.retryTimeout=1e3,this.attempts=0,this.sessionTargetingMatch=!1,this.metrics={},this.getRemoteConfig=function(e,t,r){return em(n,void 0,void 0,function(){var n,i,o;return eb(this,function(s){switch(s.label){case 0:return n=Date.now(),[4,this.fetchWithTimeout(r)];case 1:if((i=s.sent())&&(o=i.configs&&i.configs[e]))return this.metrics.fetchTimeAPISuccess=Date.now()-n,[2,o[t]];return this.metrics.fetchTimeAPIFail=Date.now()-n,[2,void 0]}})})},this.fetchWithTimeout=function(e){return em(n,void 0,void 0,function(){var t,r,n;return eb(this,function(i){switch(i.label){case 0:return t=new AbortController,r=setTimeout(function(){return t.abort()},5e3),[4,this.fetchRemoteConfig(t.signal,e)];case 1:return n=i.sent(),clearTimeout(r),[2,n]}})})},this.fetchRemoteConfig=function(e,t){return em(n,void 0,void 0,function(){var r,n,i,o,s,a,u,c,l,d,f;return eb(this,function(h){switch(h.label){case 0:if(t===this.lastFetchedSessionId&&this.attempts>=this.localConfig.flushMaxRetries)return[2,this.completeRequest({err:"Remote config fetch rejected due to exceeded retry count"})];if(e.aborted)return[2,this.completeRequest({err:rv})];t!==this.lastFetchedSessionId&&(this.lastFetchedSessionId=t,this.attempts=0),h.label=1;
1case 1:h.trys.push([1,3,,4]),r=new URLSearchParams({api_key:this.localConfig.apiKey});try{for(i=(n=ew(this.configKeys)).next();!i.done;i=n.next())o=i.value,r.append("config_keys",o)}catch(e){l={error:e}}finally{try{i&&!i.done&&(d=n.return)&&d.call(n)}finally{if(l)throw l.error}}return t&&r.set("session_id",String(t)),s={headers:{Accept:"*/*"},method:"GET"},a="".concat(this.getServerUrl(),"?").concat(r.toString()),this.attempts+=1,[4,fetch(a,eg(eg({},s),{signal:e}))];case 2:if(null===(u=h.sent()))return[2,this.completeRequest({err:rg})];switch(new tB().buildStatus(u.status)){case W.Success:return this.attempts=0,[2,this.parseAndStoreConfig(u)];case W.Failed:return[2,this.retryFetch(e,t)];default:return[2,this.completeRequest({err:"Network error occurred, remote config fetch failed"})]}return[3,4];case 3:if(c=h.sent(),e.aborted)return[2,this.completeRequest({err:rv})];return[2,this.completeRequest({err:null!==(f=c.message)&&void 0!==f?f:rg})];case 4:return[2]}})})},this.retryFetch=function(e,t){return em(n,void 0,void 0,function(){var r=this;return eb(this,function(n){switch(n.label){case 0:return[4,new Promise(function(e){return setTimeout(e,r.attempts*r.retryTimeout)})];case 1:return n.sent(),[2,this.fetchRemoteConfig(e,t)]}})})},this.parseAndStoreConfig=function(e){return em(n,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:return[4,e.json()];case 1:return t=r.sent(),this.completeRequest({success:"Remote config successfully fetched"}),[2,t]}})})},this.localConfig=t,this.configKeys=r}return e.prototype.getServerUrl=function(){return this.localConfig.serverZone===Q.STAGING?"https://sr-client-cfg.stag2.amplitude.com/config":this.localConfig.serverZone===Q.EU?"https://sr-client-cfg.eu.amplitude.com/config":"https://sr-client-cfg.amplitude.com/config"},e.prototype.completeRequest=function(e){var t=e.err,r=e.success;if(t)throw Error(t);r&&this.localConfig.loggerProvider.log(r)},e}(),rm=function(e){var t=e.localConfig,r=e.configKeys;return em(void 0,void 0,void 0,function(){return eb(this,function(e){return[2,new ry({localConfig:t,configKeys:r})]})})},rb=function(){function e(e){this.config=e,this.config.loggerProvider.debug("Local configuration before merging with remote config",JSON.stringify(this.config,null,2))}return e.prototype.initialize=function(){return em(this,void 0,void 0,function(){var e;return eb(this,function(t){switch(t.label){case 0:return e=this,[4,rm({localConfig:this.config,configKeys:["analyticsSDK"]})];case 1:return e.remoteConfigFetch=t.sent(),[2]}})})},e.prototype.generateJoinedConfig=function(){var e,t,r,n;return em(this,void 0,void 0,function(){var i,o,s;return eb(this,function(a){switch(a.label){case 0:if(a.trys.push([0,3,,4]),!(o=this.remoteConfigFetch))return[3,2];return[4,this.remoteConfigFetch.getRemoteConfig("analyticsSDK","browserSDK",this.config.sessionId)];case 1:o=a.sent(),a.label=2;case 2:return i=o,this.config.loggerProvider.debug("Remote configuration:",JSON.stringify(i,null,2)),i&&"autocapture"in i&&("boolean"==typeof i.autocapture&&(this.config.autocapture=i.autocapture),"object"==typeof i.autocapture&&(void 0===this.config.autocapture&&(this.config.autocapture=i.autocapture),"boolean"==typeof this.config.autocapture&&(this.config.autocapture=eg({attribution:this.config.autocapture,fileDownloads:this.config.autocapture,formInteractions:this.config.autocapture,pageViews:this.config.autocapture,sessions:this.config.autocapture,elementInteractions:this.config.autocapture},i.autocapture)),"object"==typeof this.config.autocapture&&(this.config.autocapture=eg(eg({},this.config.autocapture),i.autocapture))),this.config.defaultTracking=this.config.autocapture),this.config.loggerProvider.debug("Joined configuration: ",JSON.stringify(this.config,null,2)),null!==(e=(n=this.config).requestMetadata)&&void 0!==e||(n.requestMetadata=new ej),(null===(t=this.remoteConfigFetch)||void 0===t?void 0:t.metrics.fetchTimeAPISuccess)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_success",this.remoteConfigFetch.metrics.fetchTimeAPISuccess),(null===(r=this.remoteConfigFetch)||void 0===r?void 0:r.metrics.fetchTimeAPIFail)&&this.config.requestMetadata.recordHistogram("remote_config_fetch_time_API_fail",this.remoteConfigFetch.metrics.fetchTimeAPIFail),[3,4];case 3:return s=a.sent(),this.config.loggerProvider.error("Failed to fetch remote configuration because of error: ",s),[3,4];case 4:return[2,this.config]}})})},e}(),rw=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],rS="data-amp-track-",rE=["div","span","h1","h2","h3","h4","h5","h6"],rI="[Amplitude] Element Clicked",r_="[Amplitude] Element Tag",rk="[Amplitude] Element Text",rx="[Amplitude] Element Selector",rT="[Amplitude] Page URL",rC="https://app.amplitude.com",rO={US:rC,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"},rA="amp-visual-tagging-selector-highlight",rR=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function rM(e){return"function"==typeof e}function rN(e){return rM(null==e?void 0:e.then)}function rP(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var rL=rP(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function rD(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var rU=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,o=this._parentage;if(o){if(this._parentage=null,Array.isArray(o))try{for(var s=ew(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else o.remove(this)}var u=this.initialTeardown;
1if(rM(u))try{u()}catch(e){i=e instanceof rL?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=ew(c),d=l.next();!d.done;d=l.next()){var f=d.value;try{rq(f)}catch(e){i=null!=i?i:[],e instanceof rL?i=eE(eE([],eS(i)),eS(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new rL(i)}},t.prototype.add=function(e){var r;if(e&&e!==this){if(this.closed)rq(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&rD(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&rD(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();function rj(e){return e instanceof rU||e&&"closed"in e&&rM(e.remove)&&rM(e.add)&&rM(e.unsubscribe)}function rq(e){rM(e)?e():e.unsubscribe()}rU.EMPTY;var rF={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},rB={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=rB.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,eE([e,t],eS(r))):setTimeout.apply(void 0,eE([e,t],eS(r)))},clearTimeout:function(e){var t=rB.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function rV(e){rB.setTimeout(function(){var t=rF.onUnhandledError;if(t)t(e);else throw e})}function rz(){}var rH=rW("C",void 0,void 0);function rW(e,t,r){return{kind:e,value:t,error:r}}var rK=null,rG=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,rj(t)&&t.add(r)):r.destination=r0,r}return ev(t,e),t.create=function(e,t,r){return new rX(e,t,r)},t.prototype.next=function(e){this.isStopped?rZ(rW("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?rZ(rW("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?rZ(rH,this):(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(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rU),r$=Function.prototype.bind;function rQ(e,t){return r$.call(e,t)}var rJ=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){rY(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){rY(e)}else rY(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){rY(e)}},e}(),rX=function(e){function t(t,r,n){var i,o,s=e.call(this)||this;return rM(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&rF.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},i={next:t.next&&rQ(t.next,o),error:t.error&&rQ(t.error,o),complete:t.complete&&rQ(t.complete,o)}):i=t,s.destination=new rJ(i),s}return ev(t,e),t}(rG);function rY(e){rF.useDeprecatedSynchronousErrorHandling?rF.useDeprecatedSynchronousErrorHandling&&rK&&(rK.errorThrown=!0,rK.error=e):rV(e)}function rZ(e,t){var r=rF.onStoppedNotification;r&&rB.setTimeout(function(){return r(e,t)})}var r0={closed:!0,next:rz,error:function(e){throw e},complete:rz},r1="function"==typeof Symbol&&Symbol.observable||"@@observable";function r2(e){return e}var r3=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,i=this,o=(n=e)&&n instanceof rG||n&&rM(n.next)&&rM(n.error)&&rM(n.complete)&&rj(n)?e:new rX(e,t,r);return function(e){if(rF.useDeprecatedSynchronousErrorHandling){var t=!rK;if(t&&(rK={errorThrown:!1,error:null}),e(),t){var r=rK,n=r.errorThrown,i=r.error;if(rK=null,n)throw i}}else e()}(function(){var e=i.operator,t=i.source;o.add(e?e.call(o,t):t?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=r4(t))(function(t,n){var i=new rX({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[r1]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0===e.length?r2:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)})(this)},e.prototype.toPromise=function(e){var t=this;return new(e=r4(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function r4(e){var t;return null!==(t=null!=e?e:rF.Promise)&&void 0!==t?t:Promise}function r6(e){return Symbol.asyncIterator&&rM(null==e?void 0:e[Symbol.asyncIterator])}function r5(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
1d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var r8="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function r7(e){return rM(null==e?void 0:e[r8])}function r9(e){return function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{var r;(r=i[e](t)).value instanceof eI?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,function(){var t,r,n;return eb(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,eI(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,eI(void 0)];case 4:return[2,i.sent()];case 5:return[4,eI(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function ne(e){return rM(null==e?void 0:e.getReader)}function nt(e){if(e instanceof r3)return e;if(null!=e){if(rM(e[r1]))return new r3(function(t){var r=e[r1]();if(rM(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(rR(e))return new r3(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()});if(rN(e))return new r3(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,rV)});if(r6(e))return nr(e);if(r7(e))return new r3(function(t){var r,n;try{for(var i=ew(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()});if(ne(e))return nr(r9(e))}throw r5(e)}function nr(e){return new r3(function(t){(function(e,t){var r,n,i,o;return em(this,void 0,void 0,function(){var s;return eb(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=ew(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,i,(t=e[r](t)).done,t.value)})}}}(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(o=r.return)))return[3,8];return[4,o.call(r)];case 7:a.sent(),a.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]}})})})(e,t).catch(function(e){return t.error(e)})})}function nn(e){return function(t){if(rM(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function ni(e,t,r,n,i){return new no(e,t,r,n,i)}var no=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return ev(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null===(t=this.onFinalize)||void 0===t||t.call(this)}},t}(rG);function ns(e,t){return nn(function(r,n){var i=0;r.subscribe(ni(n,function(r){n.next(e.call(t,r,i++))}))})}function na(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}function nu(e,t,r){return(void 0===r&&(r=1/0),rM(t))?nu(function(r,n){return ns(function(e,i){return t(r,e,n,i)})(nt(e(r,n)))},r):("number"==typeof t&&(r=t),nn(function(t,n){var i,o,s,a,u,c,l,d,f;return i=r,s=[],a=0,u=0,c=!1,l=function(){!c||s.length||a||n.complete()},d=function(e){return a<i?f(e):s.push(e)},f=function(t){a++;var r=!1;nt(e(t,u++)).subscribe(ni(n,function(e){o?d(e):n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(a--;s.length&&a<i;)!function(){var e=s.shift();f(e)}();l()}catch(e){n.error(e)}}))},t.subscribe(ni(n,d,function(){c=!0,l()})),function(){}}))}var nc=Array.isArray,nl=["addListener","removeListener"],nd=["addEventListener","removeEventListener"],nf=["on","off"];function nh(e,t,r,n){if(rM(r)&&(n=r,r=void 0),n)return nh(e,t,r).pipe((i=n,ns(function(e){return nc(e)?i.apply(void 0,eE([],eS(e))):i(e)})));var i,o=eS(rM(e.addEventListener)&&rM(e.removeEventListener)?nd.map(function(n){return function(i){return e[n](t,i,r)}}):rM(e.addListener)&&rM(e.removeListener)?nl.map(np(e,t)):rM(e.on)&&rM(e.off)?nf.map(np(e,t)):[],2),s=o[0],a=o[1];if(!s&&rR(e))return nu(function(e){return nh(e,t,r)})(nt(e));if(!s)throw TypeError("Invalid event target");return new r3(function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return s(t),function(){return a(t)}})}function np(e,t){return function(r){return function(n){return e[r](t,n)}}}function nv(e,t,r){for(var n=null,i=[],o=e,s=0;o&&"break"!==function(){var e,a,u,c,l=nI((e=o.getAttribute("id"))&&J.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||nI.apply(void 0,eE([],eS(Array.from(o.attributes).filter(function(e){return J.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||nI.apply(void 0,eE([],eS(Array.from(o.classList).filter(J.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||nI((a=o.tagName.toLowerCase(),J.tagName(a)?{name:a,penalty:2}:null))||[nw()],d=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}(o);if("all"==t)d&&(l=l.concat(l.filter(nE).map(function(e){return nS(e,d)})));else if("two"==t)l=l.slice(0,1),d&&(l=l.concat(l.filter(nE).map(function(e){return nS(e,d)})));else if("one"==t){var f=eS(l=l.slice(0,1),1)[0];d&&nE(f)&&(l=[nS(f,d)])}
1else"none"==t&&(l=[nw()],d&&(l=[nS(l[0],d)]));try{for(var h=(u=void 0,ew(l)),p=h.next();!p.done;p=h.next()){var f=p.value;f.level=s}}catch(e){u={error:e}}finally{try{p&&!p.done&&(c=h.return)&&c.call(h)}finally{if(u)throw u.error}}if(i.push(l),i.length>=J.seedMinLength&&(n=ng(i,r)))return"break";o=o.parentElement,s++}(););return(n||(n=ng(i,r)),!n&&r)?r():n}function ng(e,t){if(e.reduce(function(e,t){return e*t.length},1)>J.threshold)return t?t():null;var r,n,i=nk(function e(t,r){var n,i,o,s,a;return void 0===r&&(r=[]),eb(this,function(u){switch(u.label){case 0:if(!(t.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),i=(n=ew(t[0])).next(),u.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,ew(e(t.slice(1,t.length),r.concat(o)))];case 3:u.sent(),u.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s={error:u.sent()},[3,8];case 7:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 8:return[3,11];case 9:return[4,r];case 10:u.sent(),u.label=11;case 11:return[2]}})}(e));try{for(var o=ew(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(nb(a))return a}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function ny(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var i=e[n].level||0;r=t.level===i-1?"".concat(e[n].name," > ").concat(r):"".concat(e[n].name," ").concat(r),t=e[n]}return r}function nm(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function nb(e){var t=ny(e);switch(X.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function nw(){return{name:"*",penalty:3}}function nS(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function nE(e){return"html"!==e.name&&!e.name.startsWith("#")}function nI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(n_);return r.length>0?r:null}function n_(e){return null!=e}function nk(e){return eE([],eS(e),!1).sort(function(e,t){return nm(e)-nm(t)})}var nx=["input","select","textarea"],nT=function(e,t){return function(r,n){var i,o,s,a=e.pageUrlAllowlist,u=e.shouldTrackEventResolver,c=null===(o=null===(i=null==n?void 0:n.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!c)return!1;if(u)return u(r,n);if(!nM(window.location.href,a))return!1;var l=String(null==n?void 0:n.getAttribute("type"))||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}if(t&&!t.some(function(e){var t;return!!(null===(t=null==n?void 0:n.matches)||void 0===t?void 0:t.call(n,e))}))return!1;switch(c){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:var d=null===(s=null==window?void 0:window.getComputedStyle)||void 0===s?void 0:s.call(window,n);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===r)return!0;return"click"===r}}},nC=function(e){return!(null==e||"string"==typeof e&&(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))},nO=function(e){var t,r,n,i=null===(r=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===r?void 0:r.call(t),o=e instanceof HTMLElement&&(null===(n=e.getAttribute("contenteditable"))||void 0===n?void 0:n.toLowerCase())==="true";return!nx.includes(i)&&!o},nA=function(e){var t="";return nO(e)&&e.childNodes&&e.childNodes.length&&e.childNodes.forEach(function(e){var r="";e&&3===e.nodeType?e.textContent&&(r=e.textContent):r=nA(e),t+=r.split(/(\s+)/).filter(nC).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}),t},nR=function(e,t){var r,n,i="";try{return i=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r,n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};X=(r=(J=eg(eg({},n),t)).root).nodeType===Node.DOCUMENT_NODE?r:r===n.root?r.ownerDocument:r;var i=nv(e,"all",function(){return nv(e,"two",function(){return nv(e,"one",function(){return nv(e,"none")})})});if(i){var o=nk(function e(t,r,n){var i,o,s;return void 0===n&&(n={counter:0,visited:new Map}),eb(this,function(a){switch(a.label){case 0:if(!(t.length>2&&t.length>J.optimizedMinLength))return[3,5];i=1,a.label=1;case 1:var u;if(!(i<t.length-1))return[3,5];if(n.counter>J.maxNumberOfTries||(n.counter+=1,(o=eE([],eS(t),!1)).splice(i,1),s=ny(o),n.visited.has(s)))return[2];
1if(!(nb(o)&&(u=o,X.querySelector(ny(u))===r)))return[3,4];return[4,o];case 2:return a.sent(),n.visited.set(s,!0),[5,ew(e(o,r,n))];case 3:a.sent(),a.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(i,e));return o.length>0&&(i=o[0]),ny(i)}throw Error("Selector was not found.")}(e,{className:function(e){return e!==rA},maxNumberOfTries:1e3})}catch(e){t&&t.warn("Failed to get selector with finder, use fallback strategy instead: ".concat(e.toString()))}var o=null===(n=null===(r=null==e?void 0:e.tagName)||void 0===r?void 0:r.toLowerCase)||void 0===n?void 0:n.call(r);o&&(i=o);var s=e.getAttribute("id"),a=e.getAttribute("class");if(s)i="#".concat(s);else if(a){var u=a.split(" ").filter(function(e){return e!==rA}).join(".");u&&(i="".concat(i,".").concat(u))}return i},nM=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},nN=function(e){return Object.keys(e).reduce(function(t,r){var n=e[r];return null==n||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&0===n.trim().length||(t[r]=n),t},{})},nP=function(e){var t,r=e.parentElement;if(!r)return"";try{t=r.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}if(t){var n=t.textContent||"";return nC(n)?n:""}return nP(r)},nL=function(e,t){return e?t.some(function(t){var r;return null===(r=null==e?void 0:e.matches)||void 0===r?void 0:r.call(e,t)})?e:nL(null==e?void 0:e.parentElement,t):null},nD=function(e,t){if(!e)return{};var r,n,i,o=null===(i=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===i?void 0:i.call(n),s=nR(e,t);return nN(((r={})[r_]=o,r[rk]=nA(e),r[rx]=s,r[rT]=window.location.href.split("?")[0],r))},nU=function(e){return null!==e.event.target&&!!e.closestTrackedAncestor},nj=function(){function e(e){var t=(void 0===e?{}:e).origin,r=this;this.endpoint=rC,this.requestCallbacks={},this.onSelect=function(e){r.notify({action:"element-selected",data:e})},this.onTrack=function(e,t){"selector-mode-changed"===e?r.notify({action:"track-selector-mode-changed",data:t}):"selector-moved"===e&&r.notify({action:"track-selector-moved",data:t})},this.endpoint=void 0===t?rC:t}return e.prototype.notify=function(e){var t,r,n,i;null===(r=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(n=window.opener)||void 0===n?void 0:n.postMessage)||void 0===i||i.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,s){n.requestCallbacks[i]={resolve:t,reject:s},n.notify(o),(null==r?void 0:r.timeout)>0&&setTimeout(function(){s(Error("".concat(e," timed out (id: ").concat(i,")"))),delete n.requestCallbacks[i]},r.timeout)})},e.prototype.handleResponse=function(e){var t;if(!this.requestCallbacks[e.id]){null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id));return}this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]},e.prototype.setup=function(e){var t=this,r=void 0===e?{}:e,n=r.logger,i=r.endpoint,o=r.isElementSelectable,s=r.cssSelectorAllowlist,a=r.actionClickAllowlist;this.logger=n,i&&this.endpoint===rC&&(this.endpoint=i);var u=null;window.addEventListener("message",function(e){if(null===(n=null===(r=t.logger)||void 0===r?void 0:r.debug)||void 0===n||n.call(r,"Message received: ",JSON.stringify(e)),t.endpoint===e.origin){var r,n,i,c,l,d=null==e?void 0:e.data,f=null==d?void 0:d.action;if(f){if("id"in d)null===(c=null===(i=t.logger)||void 0===i?void 0:i.debug)||void 0===c||c.call(i,"Received Response to previous request: ",JSON.stringify(e)),t.handleResponse(d);else if("ping"===f)t.notify({action:"pong"});else if("initialize-visual-tagging-selector"===f){var h,p=null==d?void 0:d.data;(h="https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz",new Promise(function(e,t){var r;try{var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=h,n.addEventListener("load",function(){e({status:!0})},{once:!0}),n.addEventListener("error",function(){t({status:!1,message:"Failed to load the script ".concat(h)})}),null===(r=document.head)||void 0===r||r.appendChild(n)}catch(e){t(e)}})).then(function(){var e;u=null===(e=null==window?void 0:window.amplitudeVisualTaggingSelector)||void 0===e?void 0:e.call(window,{getEventTagProps:nD,isElementSelectable:function(e){return!o||o((null==p?void 0:p.actionType)||"click",e)},onTrack:t.onTrack,onSelect:t.onSelect,visualHighlightClass:rA,messenger:t,cssSelectorAllowlist:s,actionClickAllowlist:a}),t.notify({action:"selector-loaded"})}).catch(function(){var e;
vendor: 1,153 bytes, line 1
1null===(e=t.logger)||void 0===e||e.warn("Failed to initialize visual tagging selector")})}else"close-visual-tagging-selector"===f&&(null===(l=null==u?void 0:u.close)||void 0===l||l.call(u))}}}),this.notify({action:"page-loaded"})},e}(),nq=["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot"],nF=["type"],nB=["svg","path","g"],nV=["password","hidden"];function nz(e,t){return nn(function(r,n){var i=0;r.subscribe(ni(n,function(r){return e.call(t,r,i++)&&n.next(r)}))})}var nH=function(e){function t(t,r){return e.call(this)||this}return ev(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(rU),nW={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=nW.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,eE([e,t],eS(r))):setInterval.apply(void 0,eE([e,t],eS(r)))},clearInterval:function(e){var t=nW.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},nK=function(e){function t(t,r){var n=e.call(this,t,r)||this;
1return n.scheduler=t,n.work=r,n.pending=!1,n}return ev(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),nW.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&nW.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,rD(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nH),nG={now:function(){return(nG.delegate||Date).now()},delegate:void 0},n$=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=nG.now,e}(),nQ=new(function(e){function t(t,r){void 0===r&&(r=n$.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return ev(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active){r.push(e);return}this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(n$))(nK);function nJ(e){return void 0===e&&(e=1/0),nu(r2,e)}var nX=new r3(function(e){return e.complete()});function nY(e){return e&&rM(e.schedule)}function nZ(e){return e[e.length-1]}function n0(e){return nY(nZ(e))?e.pop():void 0}function n1(e,t){return void 0===t&&(t=0),nn(function(r,n){r.subscribe(ni(n,function(r){return na(n,e,function(){return n.next(r)},t)},function(){return na(n,e,function(){return n.complete()},t)},function(r){return na(n,e,function(){return n.error(r)},t)}))})}function n2(e,t){return void 0===t&&(t=0),nn(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function n3(e,t){if(!e)throw Error("Iterable cannot be null");return new r3(function(r){na(r,t,function(){var n=e[Symbol.asyncIterator]();na(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function n4(e,t){return t?function(e,t){if(null!=e){if(rM(e[r1]))return nt(e).pipe(n2(t),n1(t));if(rR(e))return new r3(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(rN(e))return nt(e).pipe(n2(t),n1(t));if(r6(e))return n3(e,t);if(r7(e))return new r3(function(r){var n;return na(r,t,function(){n=e[r8](),na(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return rM(null==n?void 0:n.return)&&n.return()}});if(ne(e))return n3(r9(e),t)}throw r5(e)}(e,t):nt(e)}function n6(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=n0(t),i=(e=1/0,"number"==typeof nZ(t)?t.pop():e);return t.length?1===t.length?nt(t[0]):nJ(i)(n4(t,n)):nX}function n5(e){return e<=0?function(){return nX}:nn(function(t,r){var n=0;t.subscribe(ni(r,function(t){++n<=e&&(r.next(t),e<=n&&r.complete())}))})}function n8(e){return e instanceof Date&&!isNaN(e)}var n7=rP(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function n9(e){throw new n7(e)}(S=Y||(Y={})).ClickObservable="clickObservable",S.ChangeObservable="changeObservable",S.NavigateObservable="navigateObservable",S.MutationObservable="mutationObservable";var ie=function(e){void 0===e&&(e={});var t,r,n,i=e.dataAttributePrefix,o=void 0===i?rS:i,s=e.visualTaggingOptions,a=void 0===s?{enabled:!0,messenger:new nj}:s;e.cssSelectorAllowlist=null!==(t=e.cssSelectorAllowlist)&&void 0!==t?t:rw,e.actionClickAllowlist=null!==(r=e.actionClickAllowlist)&&void 0!==r?r:rE,e.debounceTime=null!==(n=e.debounceTime)&&void 0!==n?n:0;var u="@amplitude/plugin-autocapture-browser",c=[],l=void 0,d=function(){var e,t,r=nh(document,"click",{capture:!0}).pipe(ns(function(e){return h(e,"click")})),n=nh(document,"change",{capture:!0}).pipe(ns(function(e){return h(e,"change")}));window.navigation&&(t=nh(window.navigation,"navigate").pipe(ns(function(e){return h(e,"navigate")})));var i=new r3(function(e){var t=new MutationObserver(function(t){e.next(t)});return t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}}).pipe(ns(function(e){return h(e,"mutation")}));return(e={})[Y.ClickObservable]=r,e[Y.ChangeObservable]=n,e[Y.NavigateObservable]=t,e[Y.MutationObservable]=i,e},f=function(e,t){var r,n,i,s,a=null===(s=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===s?void 0:s.call(i),u="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},c=t.getAttribute("aria-label"),d=t.getAttributeNames().reduce(function(e,r){if(r.startsWith(o)){var n=r.replace(o,""),i=t.getAttribute(r);n&&(e[n]=i||"")}return e},{}),f=nP(t),h=nR(t,l),p=((n={})["[Amplitude] Element ID"]=t.getAttribute("id")||"",n["[Amplitude] Element Class"]=t.getAttribute("class"),n["[Amplitude] Element Hierarchy"]=(r=t)?function(e,t){for(var r=0,n=0;n<e.length;n++){var i=e[n];if(null===i)r+=4;else{var o=function e(t,r){void 0===r&&(r=!1);try{if(null==t){if(r)return"None";return null}if("string"==typeof t){if(r){if((t=t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")).includes('"'))return"'".concat(t,"'");if(t.includes("'"))return'"'.concat(t.replace(/'/g,"\\'"),'"');return"'".concat(t,"'")}return t}if("boolean"==typeof t)return t?"True":"False";if(Array.isArray(t)){var n=t.map(function(t){return e(t,!0)});return"[".concat(n.join(", "),"]")}else if("object"==typeof t){var i=Object.entries(t).filter(function(e){var t=eS(e,1)[0];return null!=t}).map(function(t){var r=eS(t,2),n=r[0],i=r[1];return"".concat(String(e(n,!0)),": ").concat(String(e(i,!0)))}),o="{".concat(i.join(", "),"}");return o.includes("\\'")&&(o=o.replace(/'/g,"'").replace(/'/g,"\\'")),o}return t.toString()}catch(e){return null}}(i);r+=o?Array.from(o).length:4}if(r>1024)return e.slice(0,n)}return e}((function(e){var t=[];if(!e)return t;
1t.push(e);for(var r=e.parentElement;r&&"HTML"!==r.tagName;)t.push(r),r=r.parentElement;return t})(r).map(function(e){return function(e){if(null===e)return null;var t,r,n,i,o,s,a=String(e.tagName).toLowerCase(),u={tag:a},c=Array.from(null!==(i=null===(n=e.parentElement)||void 0===n?void 0:n.children)&&void 0!==i?i:[]);c.length&&(u.index=c.indexOf(e),u.indexOfType=c.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var l=null===(s=null===(o=e.previousElementSibling)||void 0===o?void 0:o.tagName)||void 0===s?void 0:s.toLowerCase();l&&(u.prevSib=String(l));var d=e.getAttribute("id");d&&(u.id=String(d));var f=Array.from(e.classList);f.length&&(u.classes=f);var h={},p=Array.from(e.attributes).filter(function(e){return!nq.includes(e.name)}),v=!nO(e);if(!nV.includes(String(e.getAttribute("type")))&&!nB.includes(a))try{for(var g=ew(p),y=g.next();!y.done;y=g.next()){var m=y.value;(!v||nF.includes(m.name))&&(h[m.name]=String(m.value).substring(0,128))}}catch(e){t={error:e}}finally{try{y&&!y.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}return Object.keys(h).length&&(u.attrs=h),u}(e)}),0):[],n[r_]=a,n[rk]=nA(t),n["[Amplitude] Element Position Left"]=null==u.left?null:Math.round(u.left),n["[Amplitude] Element Position Top"]=null==u.top?null:Math.round(u.top),n["[Amplitude] Element Aria Label"]=c,n["[Amplitude] Element Attributes"]=d,n[rx]=h,n["[Amplitude] Element Parent Label"]=f,n[rT]=window.location.href.split("?")[0],n["[Amplitude] Page Title"]="undefined"!=typeof document&&document.title||"",n["[Amplitude] Viewport Height"]=window.innerHeight,n["[Amplitude] Viewport Width"]=window.innerWidth,n);return"a"===a&&"click"===e&&t instanceof HTMLAnchorElement&&(p["[Amplitude] Element Href"]=t.href),nN(p)},h=function(t,r){var n={event:t,timestamp:Date.now(),type:r};if(("click"===n.type||"change"===n.type)&&null!==n.event.target){var i=nL(n.event.target,e.cssSelectorAllowlist);i&&(n.closestTrackedAncestor=i,n.targetElementProperties=f(n.type,i))}return n};return{name:u,type:"enrichment",setup:function(t,r){return em(void 0,void 0,void 0,function(){var n,i,o,s,h,p,v,g,y,m;return eb(this,function(b){var w,S,E,I,_,k,x,T,C,O,A,R,M,N,P,L,D,U,j,q,F,B,V,z,H,W,K,G,$,Q,J,X,Y,Z;return l=t.loggerProvider,"undefined"==typeof document||(n=nT(e,e.cssSelectorAllowlist),i=nT(e,e.actionClickAllowlist),S=(w={allObservables:o=d(),options:e,amplitude:r,shouldTrackEvent:n}).amplitude,E=w.allObservables,I=w.options,_=w.shouldTrackEvent,C=n6((k=E.clickObservable).pipe(nn(function(e,t){var r,n=!1;e.subscribe(ni(t,function(e){var i=r;r=e,n&&t.next([i,e]),n=!0}))}),nz(function(e){var t=eS(e,2),r=t[0],n=t[1],i=r.event.target!==n.event.target,o=20>=Math.abs(n.event.screenX-r.event.screenX)&&20>=Math.abs(n.event.screenY-r.event.screenY);return i&&!o})),k.pipe((x=I.debounceTime,void 0===T&&(T=nQ),nn(function(e,t){var r=null,n=null,i=null,o=function(){if(r){r.unsubscribe(),r=null;var e=n;n=null,t.next(e)}};function s(){var e=i+x,n=T.now();if(n<e){r=this.schedule(void 0,e-n),t.add(r);return}o()}e.subscribe(ni(t,function(e){n=e,i=T.now(),r||(r=T.schedule(s,x),t.add(r))},function(){o(),t.complete()},void 0,function(){n=r=null}))})),ns(function(){return"timeout"}))),s=k.pipe((void 0===O&&(O=nQ),A=0,R=O,void 0===A&&(A=0),void 0===M&&(M=nQ),N=-1,null!=R&&(nY(R)?M=R:N=R),P=new r3(function(e){var t=n8(A)?+A-M.now():A;t<0&&(t=0);var r=0;return M.schedule(function(){e.closed||(e.next(r++),0<=N?this.schedule(void 0,N):e.complete())},t)}),function e(t,r){return r?function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nJ(1)(n4(e,n0(e)))}(r.pipe(n5(1),nn(function(e,t){e.subscribe(ni(t,rz))})),n.pipe(e(t)))}:nu(function(e,r){return nt(t(e,r)).pipe(n5(1),ns(function(){return e}))})}(function(){return P})),nz(nU),nz(function(e){return _("click",e.closestTrackedAncestor)}),nn(function(e,t){var r=[];return e.subscribe(ni(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),nt(C).subscribe(ni(t,function(){var e=r;r=[],t.next(e)},rz)),function(){r=null}})).subscribe(function(e){var t,r,n=(e.length,rI);try{for(var i=ew(e),o=i.next();!o.done;o=i.next()){var s=o.value;null==S||S.track(n,s.targetElementProperties,{time:s.timestamp})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),c.push(s),D=(L={allObservables:o,getEventProperties:f,amplitude:r,shouldTrackEvent:n}).amplitude,U=L.allObservables,j=L.getEventProperties,q=L.shouldTrackEvent,h=U.
1changeObservable.pipe(nz(nU),nz(function(e){return q("change",e.closestTrackedAncestor)})).subscribe(function(e){null==D||D.track("[Amplitude] Element Changed",j("change",e.closestTrackedAncestor))}),c.push(h),B=(F={allObservables:o,options:e,getEventProperties:f,amplitude:r,shouldTrackEvent:n,shouldTrackActionClick:i}).amplitude,V=F.allObservables,z=F.options,H=F.getEventProperties,W=F.shouldTrackEvent,K=F.shouldTrackActionClick,G=V.clickObservable,$=V.mutationObservable,Q=V.navigateObservable,J=G.pipe(nz(function(e){return!W("click",e.closestTrackedAncestor)}),ns(function(e){var t=nL(e.event.target,z.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=H(e.type,e.closestTrackedAncestor)),e}),nz(nU),nz(function(e){return K("click",e.closestTrackedAncestor)})),X=[$],Q&&X.push(Q),Y=n6.apply(void 0,eE([],eS(X),!1)),p=J.pipe((Z=function(e){return Y.pipe(n5(1),function(e,t){var r=n8(e)?{first:e}:"number"==typeof e?{each:e}:e,n=r.first,i=r.each,o=r.with,s=void 0===o?n9:o,a=r.scheduler,u=void 0===a?nQ:a,c=r.meta,l=void 0===c?null:c;if(null==n&&null==i)throw TypeError("No timeout provided.");return nn(function(e,t){var r,o,a=null,c=0,d=function(e){o=na(t,u,function(){try{r.unsubscribe(),nt(s({meta:l,lastValue:a,seen:c})).subscribe(t)}catch(e){t.error(e)}},e)};r=e.subscribe(ni(t,function(e){null==o||o.unsubscribe(),c++,t.next(a=e),i>0&&d(i)},void 0,void 0,function(){(null==o?void 0:o.closed)||null==o||o.unsubscribe(),a=null})),c||d(null!=n?"number"==typeof n?n:+n-u.now():i)})}({first:500,with:function(){return nX}}),ns(function(){return e}))},nn(function(e,t){var r=null,n=0,i=!1,o=function(){return i&&!r&&t.complete()};e.subscribe(ni(t,function(e){null==r||r.unsubscribe(),nt(Z(e,n++)).subscribe(r=ni(t,function(e){return t.next(e)},function(){r=null,o()}))},function(){i=!0,o()}))}))).subscribe(function(e){null==B||B.track(rI,H("click",e.closestTrackedAncestor),{time:e.timestamp})}),c.push(p),null===(y=null==t?void 0:t.loggerProvider)||void 0===y||y.log("".concat(u," has been successfully added.")),window.opener&&a.enabled&&(v=e.cssSelectorAllowlist,g=e.actionClickAllowlist,null===(m=a.messenger)||void 0===m||m.setup(eg(eg({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:rO[t.serverZone]}),{isElementSelectable:nT(e,eE(eE([],eS(v),!1),eS(g),!1)),cssSelectorAllowlist:v,actionClickAllowlist:g})))),[2]})})},execute:function(e){return em(void 0,void 0,void 0,function(){return eb(this,function(t){return[2,e]})})},teardown:function(){return em(void 0,void 0,void 0,function(){var e,t,r,n;return eb(this,function(i){try{for(t=(e=ew(c)).next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(n=e.return)&&n.call(e)}finally{if(r)throw r.error}}return[2]})})}}},it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ev(t,e),t.prototype.init=function(e,t,r){var n,i;return void 0===e&&(e=""),arguments.length>2?(n=t,i=r):"string"==typeof t?(n=t,i=void 0):(n=null==t?void 0:t.userId,i=t),eC(this._init(eg(eg({},i),{userId:n,apiKey:e})))},t.prototype._init=function(t){var r,n,i;return em(this,void 0,void 0,function(){var o,s,a,u,c,l=this;return eb(this,function(d){var f,h,p,v,g;switch(d.label){case 0:if(this.initializing)return[2];return this.initializing=!0,[4,(f=t.apiKey,h=t,p=this,void 0===h&&(h={}),em(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,a,u,c,l,d,v,g,y,m,b,w,S,E,I,_,k,x,T,C,O,A,R,M,N,P,L,D,U,j,q,F,B,V,z,H,W;return eb(this,function(K){var G,$,Q;switch(K.label){case 0:if(e=h.identityStorage||re,S={},!(e!==re))return[3,1];return r="",[3,5];case 1:if(!(null!==(I=null===(E=h.cookieOptions)||void 0===E?void 0:E.domain)&&void 0!==I))return[3,2];return n=I,[3,4];case 2:return[4,em(void 0,void 0,void 0,function(){var e,t,r,n,i,o;return eb(this,function(s){switch(s.label){case 0:return[4,new tj().isEnabled()];case 1:if(!s.sent()||"undefined"==typeof location||!location.hostname)return[2,""];for(e=(null!=G?G:location.hostname).split("."),t=[],r="AMP_TLDTEST",n=e.length-2;n>=0;--n)t.push(e.slice(n).join("."));n=0,s.label=2;case 2:if(!(n<t.length))return[3,7];return[4,(o=new tj({domain:"."+(i=t[n])})).set(r,1)];case 3:return s.sent(),[4,o.get(r)];case 4:if(!s.sent())return[3,6];return[4,o.remove(r)];case 5:return s.sent(),[2,"."+i];case 6:return n++,[3,2];case 7:return[2,""]}})})];case 3:n=K.sent(),K.label=4;case 4:r=n,K.label=5;case 5:return t=eg.apply(void 0,[(S.domain=r,S.expiration=365,S.sameSite="Lax",S.secure=!1,S.upgrade=!0,S),h.cookieOptions]),[4,($=i=rr(h.identityStorage,t),void 0===(Q=null===(k=null===(_=h.cookieOptions)||void 0===_?void 0:_.upgrade)||void 0===k||k)&&(Q=!0),em(void 0,void 0,void 0,function(){var e,t,r,n,i,o,s,a,u;return eb(this,function(c){switch(c.label){case 0:return e="".concat("amp","_").concat(f.substring(0,6)),[4,$.getRaw(e)];case 1:if(!(t=c.sent()))return[2,{optOut:!1}];if(!Q)return[3,3];
1return[4,$.remove(e)];case 2:c.sent(),c.label=3;case 3:return n=(r=eS(t.split("."),6))[0],i=r[1],o=r[2],s=r[3],a=r[4],u=r[5],[2,{deviceId:n,userId:tQ(i),sessionId:t$(s),lastEventId:t$(u),lastEventTime:t$(a),optOut:!!o}]}})}))];case 6:return o=K.sent(),[4,i.get(tU(f))];case 7:return s=K.sent(),a=td(),u=null!==(A=null!==(O=null!==(C=null!==(T=null!==(x=h.deviceId)&&void 0!==x?x:a.ampDeviceId)&&void 0!==T?T:a.deviceId)&&void 0!==C?C:null==s?void 0:s.deviceId)&&void 0!==O?O:o.deviceId)&&void 0!==A?A:eq(),c=null!==(R=null==s?void 0:s.lastEventId)&&void 0!==R?R:o.lastEventId,l=null!==(M=null==s?void 0:s.lastEventTime)&&void 0!==M?M:o.lastEventTime,d=null!==(P=null!==(N=h.optOut)&&void 0!==N?N:null==s?void 0:s.optOut)&&void 0!==P?P:o.optOut,v=null!==(L=null==s?void 0:s.sessionId)&&void 0!==L?L:o.sessionId,g=null!==(U=null!==(D=h.userId)&&void 0!==D?D:null==s?void 0:s.userId)&&void 0!==U?U:o.userId,p.previousSessionDeviceId=null!==(j=null==s?void 0:s.deviceId)&&void 0!==j?j:o.deviceId,p.previousSessionUserId=null!==(q=null==s?void 0:s.userId)&&void 0!==q?q:o.userId,y={ipAddress:null===(B=null===(F=h.trackingOptions)||void 0===F?void 0:F.ipAddress)||void 0===B||B,language:null===(z=null===(V=h.trackingOptions)||void 0===V?void 0:V.language)||void 0===z||z,platform:null===(W=null===(H=h.trackingOptions)||void 0===H?void 0:H.platform)||void 0===W||W},m=null==s?void 0:s.pageCounter,b=null==s?void 0:s.debugLogsEnabled,void 0!==h.autocapture&&(h.defaultTracking=h.autocapture),[4,(w=new rt(f,h.appVersion,i,t,h.defaultTracking,h.autocapture,u,h.flushIntervalMillis,h.flushMaxRetries,h.flushQueueSize,e,h.ingestionMetadata,h.instanceName,c,l,h.loggerProvider,h.logLevel,h.minIdLength,h.offline,d,h.partnerId,h.plan,h.serverUrl,h.serverZone,v,h.sessionTimeout,h.storageProvider,y,h.transport,h.useBatch,h.fetchRemoteConfig,g,m,b)).storageProvider.isEnabled()];case 8:return K.sent()||(w.loggerProvider.warn("Storage provider ".concat(w.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),w.storageProvider=new tD),[2,w]}})}))];case 1:if(o=d.sent(),!t.fetchRemoteConfig)return[3,4];return[4,(v=o,em(void 0,void 0,void 0,function(){var e;return eb(this,function(t){switch(t.label){case 0:return[4,(e=new rb(v)).initialize()];case 1:return t.sent(),[2,e]}})}))];case 2:return[4,d.sent().generateJoinedConfig()];case 3:o=d.sent(),d.label=4;case 4:return[4,e.prototype._init.call(this,o)];case 5:if(d.sent(),this.logBrowserOptions(o),!eY(this.config.defaultTracking))return[3,7];return s=eY((g=this.config).defaultTracking)&&g.defaultTracking&&"object"==typeof g.defaultTracking&&g.defaultTracking.attribution&&"object"==typeof g.defaultTracking.attribution?eg({},g.defaultTracking.attribution):{},this.webAttribution=new tv(s,this.config),[4,this.webAttribution.init()];case 6:d.sent(),d.label=7;case 7:if(u=Number.isNaN(Number((a=td()).ampSessionId))?void 0:Number(a.ampSessionId),this.setSessionId(null!==(i=null!==(n=null!==(r=t.sessionId)&&void 0!==r?r:u)&&void 0!==n?n:this.config.sessionId)&&void 0!==i?i:Date.now()),(c=tx(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),!(this.config.offline!==tA))return[3,9];return[4,this.add(rp()).promise];case 8:d.sent(),d.label=9;case 9:return[4,this.add(new eB).promise];case 10:return d.sent(),[4,this.add(new tL).promise];case 11:return d.sent(),[4,this.add(new tO).promise];case 12:if(d.sent(),rh(this.config),!eX(this.config.defaultTracking,"fileDownloads"))return[3,14];return this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(rd()).promise];case 13:d.sent(),d.label=14;case 14:if(!eX(this.config.defaultTracking,"formInteractions"))return[3,16];return this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(rc()).promise];case 15:d.sent(),d.label=16;case 16:if(!eZ(this.config.defaultTracking))return[3,18];return this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(ro(e3(this.config))).promise];case 17:d.sent(),d.label=18;case 18:if(!e1(this.config.autocapture))return[3,20];return this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ie(e2(this.config))).promise];case 19:d.sent(),d.label=20;case 20:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 21:return d.sent(),c.eventBridge.setEventReceiver(function(e){l.track(e.eventType,e.eventProperties)}),[2]}})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){if(!this.config){this.q.push(this.setUserId.bind(this,e));return}this.config.loggerProvider.debug("function setUserId: ",e),(e!==this.config.userId||void 0===e)&&(this.config.userId=e,tT(e,this.config.instanceName))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){if(!this.config){this.q.push(this.setDeviceId.bind(this,e));return}this.config.loggerProvider.debug("function setDeviceId: ",e),this.config.deviceId=e,tC(e,this.config.instanceName)}
1,t.prototype.reset=function(){this.setDeviceId(eq()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,r=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),eC(Promise.resolve());if(e===this.config.sessionId)return eC(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var n=this.getSessionId(),i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,e0(this.config.defaultTracking)&&(n&&i&&r.push(this.track(t1,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:n,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var s=this.trackCampaignEventIfNeeded(++o,r);return e0(this.config.defaultTracking)&&r.push(this.track(t0,void 0,{event_id:s?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,eC(Promise.all(r))},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(e){if(!this.config){this.q.push(this.setTransport.bind(this,e));return}this.config.transportProvider=rn(e)},t.prototype.identify=function(t,r){if(tN(t)){var n=t._q;t._q=[],t=tM(new eH,n)}return(null==r?void 0:r.user_id)&&this.setUserId(r.user_id),(null==r?void 0:r.device_id)&&this.setDeviceId(r.device_id),e.prototype.identify.call(this,t,r)},t.prototype.groupIdentify=function(t,r,n,i){if(tN(n)){var o=n._q;n._q=[],n=tM(new eH,o)}return e.prototype.groupIdentify.call(this,t,r,n,i)},t.prototype.revenue=function(t,r){if(tN(t)){var n=t._q;t._q=[],t=tM(new eW,n)}return e.prototype.revenue.call(this,t,r)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign)return!1;var r=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(r).promise):this.track(r),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return em(this,void 0,void 0,function(){var r,n,i;return eb(this,function(o){return r=Date.now(),n=tp(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===t0||t.event_type===t1||t.session_id&&t.session_id!==this.getSessionId()||(n||i?(this.setSessionId(r),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):n||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=eg(eg({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",JSON.stringify(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t}(eJ),ir=function(){var e=new it;return{init:eT(e.init.bind(e),"init",e_(e),ex(e,["config"])),add:eT(e.add.bind(e),"add",e_(e),ex(e,["config.apiKey","timeline.plugins"])),remove:eT(e.remove.bind(e),"remove",e_(e),ex(e,["config.apiKey","timeline.plugins"])),track:eT(e.track.bind(e),"track",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),logEvent:eT(e.logEvent.bind(e),"logEvent",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),identify:eT(e.identify.bind(e),"identify",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),groupIdentify:eT(e.groupIdentify.bind(e),"groupIdentify",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),setGroup:eT(e.setGroup.bind(e),"setGroup",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),revenue:eT(e.revenue.bind(e),"revenue",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),flush:eT(e.flush.bind(e),"flush",e_(e),ex(e,["config.apiKey","timeline.queue.length"])),getUserId:eT(e.getUserId.bind(e),"getUserId",e_(e),ex(e,["config","config.userId"])),setUserId:eT(e.setUserId.bind(e),"setUserId",e_(e),ex(e,["config","config.userId"])),getDeviceId:eT(e.getDeviceId.bind(e),"getDeviceId",e_(e),ex(e,["config","config.deviceId"])),setDeviceId:eT(e.setDeviceId.bind(e),"setDeviceId",e_(e),ex(e,["config","config.deviceId"])),reset:eT(e.reset.bind(e),"reset",e_(e),ex(e,["config","config.userId","config.deviceId"])),getSessionId:eT(e.getSessionId.bind(e),"getSessionId",e_(e),ex(e,["config"])),setSessionId:eT(e.setSessionId.bind(e),"setSessionId",e_(e),ex(e,["config"])),extendSession:eT(e.extendSession.bind(e),"extendSession",e_(e),ex(e,["config"])),setOptOut:eT(e.setOptOut.bind(e),"setOptOut",e_(e),ex(e,["config"])),setTransport:eT(e.setTransport.bind(e),"setTransport",e_(e),ex(e,["config"]))}},ii=ir(),io=ii.add,is=ii.extendSession,ia=ii.flush,iu=ii.getDeviceId,ic=ii.get
1SessionId,il=ii.getUserId,id=ii.groupIdentify,ih=ii.identify,ip=ii.init,iv=ii.logEvent,ig=ii.remove,iy=ii.reset,im=ii.revenue,ib=ii.setDeviceId,iw=ii.setGroup,iS=ii.setOptOut,iE=ii.setSessionId,iI=ii.setTransport,i_=ii.setUserId,ik=ii.track,ix=r(1876).Buffer,iT=function(e,t){return(iT=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function iC(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}iT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var iO=function(){return(iO=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function iA(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function iR(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function iM(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function iN(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function iP(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var iL={IS:"is",IS_NOT:"is not",CONTAINS:"contains",DOES_NOT_CONTAIN:"does not contain",LESS_THAN:"less",LESS_THAN_EQUALS:"less or equal",GREATER_THAN:"greater",GREATER_THAN_EQUALS:"greater or equal",VERSION_LESS_THAN:"version less",VERSION_LESS_THAN_EQUALS:"version less or equal",VERSION_GREATER_THAN:"version greater",VERSION_GREATER_THAN_EQUALS:"version greater or equal",SET_IS:"set is",SET_IS_NOT:"set is not",SET_CONTAINS:"set contains",SET_DOES_NOT_CONTAIN:"set does not contain",SET_CONTAINS_ANY:"set contains any",SET_DOES_NOT_CONTAIN_ANY:"set does not contain any",REGEX_MATCH:"regex match",REGEX_DOES_NOT_MATCH:"regex does not match"},iD=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:((64512&i)==55296&&n+1<e.length&&(64512&e.charCodeAt(n+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++n)),t[r++]=i>>18|240,t[r++]=i>>12&63|128):t[r++]=i>>12|224,t[r++]=i>>6&63|128),t[r++]=63&i|128)}return Uint8Array.from(t)},iU=function(e,t){void 0===t&&(t=0);for(var r=iD(e),n=r.length,i=n>>2,o=t,s=0;s<i;s++)o=ij(iB(r,s<<2),o);var a=i<<2,u=0;switch(n-a){case 3:u^=r[a+2]<<16,u^=r[a+1]<<8,u^=r[a],o^=u=Math.imul(u=iF(u=Math.imul(u,-862048943),15),461845907);break;case 2:u^=r[a+1]<<8,u^=r[a],o^=u=Math.imul(u=iF(u=Math.imul(u,-862048943),15),461845907);break;case 1:u^=r[a],o^=u=Math.imul(u=iF(u=Math.imul(u,-862048943),15),461845907)}return iq(o^=n)>>>0},ij=function(e,t){var r=e,n=t;return n^=r=Math.imul(r=iF(r=Math.imul(r,-862048943),15),461845907),(n=Math.imul(n=iF(n,13),5))+-430675100|0},iq=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>
113,t=Math.imul(t,-1028477387),t^=t>>>16},iF=function(e,t,r){void 0===r&&(r=32),t>r&&(t%=r);var n=(e&4294967295<<r-t>>>0)>>>0>>>r-t>>>0;return(e<<t|n)>>>0},iB=function(e,t){return void 0===t&&(t=0),iV(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},iV=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},iz=function(e,t){var r,n;if(t&&0!==t.length){try{for(var i=iM(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!s||!e||"object"!=typeof e)return;e=e[s]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}if(e)return e}},iH="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),iW=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp(iH).exec(t);if(r){var n=Number(r[1]),i=Number(r[2]);if(!(isNaN(n)||isNaN(i)))return new e(n,i,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){if(this.major>e.major)return 1;if(this.major<e.major)return -1;if(this.minor>e.minor)return 1;if(this.minor<e.minor)return -1;if(this.patch>e.patch)return 1;if(this.patch<e.patch||this.preRelease&&!e.preRelease)return -1;if(!this.preRelease&&e.preRelease)return 1;if(this.preRelease&&e.preRelease){if(this.preRelease>e.preRelease)return 1;if(this.preRelease<e.preRelease)return -1}return 0},e}(),iK=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,i={},o={context:e,result:i};try{for(var s=iM(t),a=s.next();!a.done;a=s.next()){var u=a.value,c=this.evaluateFlag(o,u);c&&(i[u.key]=c)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return i},e.prototype.evaluateFlag=function(e,t){try{for(var r,n,i,o=iM(t.segments),s=o.next();!s.done;s=o.next()){var a=s.value;if(i=this.evaluateSegment(e,t,a)){var u=iO(iO(iO({},t.metadata),a.metadata),i.metadata);i=iO(iO({},i),{metadata:u});break}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},e.prototype.evaluateSegment=function(e,t,r){if(!r.conditions){var n=this.bucket(e,r);return void 0!==n?t.variants[n]:void 0}if(this.evaluateConditions(e,r.conditions)){var n=this.bucket(e,r);if(void 0!==n)return t.variants[n]}},e.prototype.evaluateConditions=function(e,t){var r,n,i,o;try{for(var s=iM(t),a=s.next();!a.done;a=s.next()){var u=a.value,c=!0;try{for(var l=(i=void 0,iM(u)),d=l.next();!d.done;d=l.next()){var f=d.value;if(!(c=this.matchCondition(e,f)))break}}catch(e){i={error:e}}finally{try{d&&!d.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}if(c)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1},e.prototype.matchCondition=function(e,t){var r=iz(e,t.selector);if(!r)return this.matchNull(t.op,t.values);if(this.isSetOperator(t.op)){var n=this.coerceStringArray(r);return!!n&&this.matchSet(n,t.op,t.values)}var i=this.coerceString(r);return void 0!==i&&this.matchString(i,t.op,t.values)},e.prototype.getHash=function(e){return iU(e)},e.prototype.bucket=function(e,t){if(!t.bucket)return t.variant;var r,n,i,o,s=this.coerceString(iz(e,t.bucket.selector));if(!s||0===s.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(s),u=this.getHash(a),c=u%100,l=Math.floor(u/100);try{for(var d=iM(t.bucket.allocations),f=d.next();!f.done;f=d.next()){var h=f.value,p=h.range[0],v=h.range[1];if(c>=p&&c<v)try{for(var g=(i=void 0,iM(h.distributions)),y=g.next();!y.done;y=g.next()){var m=y.value,b=m.range[0],w=m.range[1];if(l>=b&&l<w)return m.variant}}catch(e){i={error:e}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case iL.IS:case iL.CONTAINS:case iL.LESS_THAN:case iL.LESS_THAN_EQUALS:case iL.GREATER_THAN:case iL.GREATER_THAN_EQUALS:case iL.VERSION_LESS_THAN:case iL.VERSION_LESS_THAN_EQUALS:case iL.VERSION_GREATER_THAN:case iL.VERSION_GREATER_THAN_EQUALS:case iL.SET_IS:case iL.SET_CONTAINS:case iL.SET_CONTAINS_ANY:return r;case iL.IS_NOT:case iL.DOES_NOT_CONTAIN:case iL.SET_DOES_NOT_CONTAIN:case iL.SET_DOES_NOT_CONTAIN_ANY:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case iL.SET_IS:return this.setEquals(e,r);case iL.SET_IS_NOT:return!this.setEquals(e,r);case iL.SET_CONTAINS:return this.matchesSetContainsAll(e,r);case iL.SET_DOES_NOT_CONTAIN:return!this.matchesSetContainsAll(e,r);case iL.SET_CONTAINS_ANY:return this.matchesSetContainsAny(e,r);case iL.SET_DOES_NOT_CONTAIN_ANY:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case iL.IS:return this.matchesIs(e,r);case iL.IS_NOT:return!this.matchesIs(e,r);case iL.CONTAINS:return this.matchesContains(e,r);case iL.DOES_NOT_CONTAIN:return!this.matchesContains(e,r);case iL.LESS_THAN:case iL.LESS_THAN_EQUALS:case iL.GREATER_THAN:case iL.GREATER_THAN_EQUALS:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case iL.VERSION_LESS_THAN:case iL.VERSION_LESS_THAN_EQUALS:case iL.VERSION_GREATER_THAN:case iL.VERSION_GREATER_THAN_EQUALS:return this.matchesComparable(e,t,r,function(e){return iW.parse(e)},this.versionComparator);case iL.REGEX_MATCH:return this.matchesRegex(e,r);case iL.REGEX_DOES_NOT_MATCH:return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var i=iM(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(e.toLowerCase().includes(s.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,i){var o=this,s=n(e),a=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===s||0===a.length?r.some(function(r){return o.comparator(e,t,r)}):a.some(function(e){return i(s,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case iL.LESS_THAN:case iL.VERSION_LESS_THAN:return e<r;case iL.LESS_THAN_EQUALS:case iL.VERSION_LESS_THAN_EQUALS:return e<=r;case iL.GREATER_THAN:case iL.VERSION_GREATER_THAN:return e>r;case iL.GREATER_THAN_EQUALS:case iL.VERSION_GREATER_THAN_EQUALS:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case iL.LESS_THAN:case iL.VERSION_LESS_THAN:return n<0;case iL.LESS_THAN_EQUALS:case iL.VERSION_LESS_THAN_EQUALS:return n<=0;case iL.GREATER_THAN:case iL.VERSION_GREATER_THAN:return n>0;case iL.GREATER_THAN_EQUALS:case iL.VERSION_GREATER_THAN_EQUALS:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return!!new RegExp(t).exec(e)})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){return e?"object"==typeof e?JSON.stringify(e):String(e):void 0},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e)){var r=e;return r.map(function(e){return t.coerceString(e)}
1).filter(Boolean)}var n=String(e);try{var i=JSON.parse(n);if(Array.isArray(i)){var r=e;return r.map(function(e){return t.coerceString(e)}).filter(Boolean)}var o=this.coerceString(n);return o?[o]:void 0}catch(e){var o=this.coerceString(n);return o?[o]:void 0}},e.prototype.isSetOperator=function(e){switch(e){case iL.SET_IS:case iL.SET_IS_NOT:case iL.SET_CONTAINS:case iL.SET_DOES_NOT_CONTAIN:case iL.SET_CONTAINS_ANY:case iL.SET_DOES_NOT_CONTAIN_ANY:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&iP([],iN(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var i=iM(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(!this.matchesIs(s,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var i=iM(t),o=i.next();!o.done;o=i.next()){var s=o.value;if(this.matchesIs(s,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return!1},e}(),iG=function(e,t){var r,n,i=iO({},e),o=[],s=t||Object.keys(i);try{for(var a=iM(s),u=a.next();!u.done;u=a.next()){var c=u.value,l=i$(c,i);l&&o.push.apply(o,iP([],iN(l),!1))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},i$=function(e,t,r){void 0===r&&(r=[]);var n,i,o=t[e];if(o){if(!o.dependencies||0===o.dependencies.length)return delete t[o.key],[o];r.push(o.key);var s=[],a=function(e){if(r.some(function(t){return t===e}))throw Error("Detected a cycle between flags ".concat(r));var n=i$(e,t,r);n&&s.push.apply(s,iP([],iN(n),!1))};try{for(var u=iM(o.dependencies),c=u.next();!c.done;c=u.next()){var l=c.value;a(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return s.push(o),r.pop(),delete t[o.key],s}};let iQ="function"==typeof atob,iJ="function"==typeof btoa,iX="function"==typeof ix,iY="function"==typeof TextDecoder?new TextDecoder:void 0,iZ="function"==typeof TextEncoder?new TextEncoder:void 0,i0=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),i1=(f={},i0.forEach((e,t)=>f[e]=t),f),i2=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,i3=String.fromCharCode.bind(String),i4="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),i6=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),i5=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),i8=iJ?e=>btoa(e):iX?e=>ix.from(e,"binary").toString("base64"):e=>{let t,r,n,i,o="",s=e.length%3;for(let s=0;s<e.length;){if((r=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw TypeError("invalid character found");o+=i0[(t=r<<16|n<<8|i)>>18&63]+i0[t>>12&63]+i0[t>>6&63]+i0[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o},i7=iX?e=>ix.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(i3.apply(null,e.subarray(r,r+4096)));return i8(t.join(""))},i9=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?i3(192|t>>>6)+i3(128|63&t):i3(224|t>>>12&15)+i3(128|t>>>6&63)+i3(128|63&t)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return i3(240|t>>>18&7)+i3(128|t>>>12&63)+i3(128|t>>>6&63)+i3(128|63&t)},oe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ot=e=>e.replace(oe,i9),or=iX?e=>ix.from(e,"utf8").toString("base64"):iZ?e=>i7(iZ.encode(e)):e=>i8(ot(e)),on=(e,t=!1)=>t?i6(or(e)):or(e),oi=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,oo=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return i3((t>>>10)+55296)+i3((1023&t)+56320);case 3:return i3((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return i3((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},os=e=>e.replace(oi,oo),oa=iQ?e=>atob(i5(e)):iX?e=>ix.from(e,"base64").toString("binary"):e=>
1{if(e=e.replace(/\s+/g,""),!i2.test(e))throw TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r="",n,i;for(let o=0;o<e.length;)t=i1[e.charAt(o++)]<<18|i1[e.charAt(o++)]<<12|(n=i1[e.charAt(o++)])<<6|(i=i1[e.charAt(o++)]),r+=64===n?i3(t>>16&255):64===i?i3(t>>16&255,t>>8&255):i3(t>>16&255,t>>8&255,255&t);return r},ou=iX?e=>i4(ix.from(e,"base64")):e=>i4(oa(e).split("").map(e=>e.charCodeAt(0))),oc=iX?e=>ix.from(e,"base64").toString("utf8"):iY?e=>iY.decode(ou(e)):e=>os(oa(e)),ol=e=>i5(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),od={encodeURL:e=>on(e,!0)};var of=function(e){function t(r,n){var i=e.call(this,n)||this;return i.statusCode=r,Object.setPrototypeOf(i,t.prototype),i}return iC(t,e),t}(Error),oh=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return iC(t,e),t}(Error),op=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getVariants=function(e,t){return iA(this,void 0,void 0,function(){var r,n,i,o;return iR(this,function(s){switch(s.label){case 0:return r=od.encodeURL(JSON.stringify(e)),n={Authorization:"Api-Key ".concat(this.deploymentKey),"X-Amp-Exp-User":r},(null==t?void 0:t.flagKeys)&&(n["X-Amp-Exp-Flag-Keys"]=od.encodeURL(JSON.stringify(t.flagKeys))),(null==t?void 0:t.trackingOption)&&(n["X-Amp-Exp-Track"]=t.trackingOption),i=new URL("".concat(this.serverUrl,"/sdk/v2/vardata?v=0")),(null==t?void 0:t.evaluationMode)&&i.searchParams.append("eval_mode",null==t?void 0:t.evaluationMode),(null==t?void 0:t.deliveryMethod)&&i.searchParams.append("delivery_method",null==t?void 0:t.deliveryMethod),[4,this.httpClient.request({requestUrl:i.toString(),method:"GET",headers:n,timeoutMillis:null==t?void 0:t.timeoutMillis})];case 1:if(200!=(o=s.sent()).status)throw new of(o.status,"Fetch error response: status=".concat(o.status));return[2,JSON.parse(o.body)]}})})},e}(),ov=function(){function e(e,t,r){this.deploymentKey=e,this.serverUrl=t,this.httpClient=r}return e.prototype.getFlags=function(e){return iA(this,void 0,void 0,function(){var t,r;return iR(this,function(n){switch(n.label){case 0:return t={Authorization:"Api-Key ".concat(this.deploymentKey)},(null==e?void 0:e.libraryName)&&(null==e?void 0:e.libraryVersion)&&(t["X-Amp-Exp-Library"]="".concat(e.libraryName,"/").concat(e.libraryVersion)),[4,this.httpClient.request({requestUrl:"".concat(this.serverUrl,"/sdk/v2/flags"),method:"GET",headers:t,timeoutMillis:null==e?void 0:e.timeoutMillis})];case 1:if(200!=(r=n.sent()).status)throw Error("Flags error response: status=".concat(r.status));return[2,JSON.parse(r.body).reduce(function(e,t){return e[t.key]=t,e},{})]}})})},e}(),og="undefined"!=typeof globalThis?globalThis:r.g||self,oy=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==r.g?r.g:void 0},om=function(){var e=oy();if(e)try{var t="EXP_test";return e.localStorage.setItem(t,t),e.localStorage.removeItem(t),!0}catch(e){}return!1},ob=function(){function e(e,t){this.poller=void 0,this.action=e,this.ms=t}return e.prototype.start=function(){this.poller||(this.poller=og.setInterval(this.action,this.ms),this.action())},e.prototype.stop=function(){this.poller&&(og.clearInterval(this.poller),this.poller=void 0)},e}(),ow=r(9293),oS=r(1876).Buffer;!function(){function e(e){this.amplitudeInstance=e}e.prototype.getUser=function(){var e,t,r,n,i,o,s,a,u,c;return{device_id:null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e.options)||void 0===t?void 0:t.deviceId,user_id:null===(n=null===(r=this.amplitudeInstance)||void 0===r?void 0:r.options)||void 0===n?void 0:n.userId,version:null===(o=null===(i=this.amplitudeInstance)||void 0===i?void 0:i.options)||void 0===o?void 0:o.versionName,language:null===(a=null===(s=this.amplitudeInstance)||void 0===s?void 0:s.options)||void 0===a?void 0:a.language,platform:null===(c=null===(u=this.amplitudeInstance)||void 0===u?void 0:u.options)||void 0===c?void 0:c.platform,os:this.getOs(),device_model:this.getDeviceModel()}},e.prototype.getOs=function(){var e,t,r,n,i,o;return[null===(r=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.browser)||void 0===r?void 0:r.name,null===(o=null===(i=null===(n=this.amplitudeInstance)||void 0===n?void 0:n._ua)||void 0===i?void 0:i.browser)||void 0===o?void 0:o.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(){var e,t,r;return null===(r=null===(t=null===(e=this.amplitudeInstance)||void 0===e?void 0:e._ua)||void 0===t?void 0:t.os)||void 0===r?void 0:r.name}}(),function(){function e(e){this.amplitudeInstance=e}e.prototype.track=function(e){this.amplitudeInstance.logEvent(e.name,e.properties)},e.prototype.setUserProperty=function(e){var t,r;this.amplitudeInstance.setUserProperties(((t={})[e.userProperty]=null===(r=e.variant)||void 0===r?void 0:r.value,t))},e.prototype.unsetUserProperty=function(e){var t;this.amplitudeInstance._logEvent("$identify",null,null,{$unset:((t={})[e.userProperty]="-",t)})}}();var oE=function(){return(oE=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function oI(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function o_(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
1function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function ok(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ox(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function oT(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var oC=function(e,t){void 0===t&&(t=!1);var r,n,i=oR(e,t),o=void 0,s=og.document.cookie.split("; ");try{for(var a=ok(s),u=a.next();!u.done;u=a.next()){var c=u.value,l=ox(c.split("="),2),d=l[0],f=l[1];d===i&&(o=decodeURIComponent(f))}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}if(o)try{if(t){var h=oS.from(o,"base64").toString("utf-8");return JSON.parse(decodeURIComponent(h))}var p=o.split("."),v=void 0;return p.length>=2&&p[1]&&(v=oS.from(p[1],"base64").toString("utf-8")),{deviceId:p[0],userId:v}}catch(e){return}},oO=function(e){var t=oR(e,!0);try{var r=og.localStorage.getItem(t);if(!r)return;var n=JSON.parse(r);if("object"!=typeof n)return;return n}catch(e){return}},oA=function(e){var t=oR(e,!0);try{var r=og.sessionStorage.getItem(t);if(!r)return;var n=JSON.parse(r);if("object"!=typeof n)return;return n}catch(e){return}},oR=function(e,t){if(t){if((null==e?void 0:e.length)<10)return;return"AMP_".concat(e.substring(0,10))}if(!((null==e?void 0:e.length)<6))return"amp_".concat(e.substring(0,6))},oM=function(){function e(e,t,r){this.type="integration",this.apiKey=e,this.identityStore=t.identityStore,this.eventBridge=t.eventBridge,this.contextProvider=t.applicationContextProvider,this.timeoutMillis=r,this.loadPersistedState(),r<=0&&(this.setup=void 0)}return e.prototype.setup=function(e,t){return oI(this,void 0,void 0,function(){return o_(this,function(r){return(null==e?void 0:e.automaticFetchOnAmplitudeIdentityChange)&&this.identityStore.addIdentityListener(function(){null==t||t.fetch()}),[2,this.waitForConnectorIdentity(this.timeoutMillis)]})})},e.prototype.getUser=function(){var e=this.identityStore.getIdentity();return{user_id:e.userId,device_id:e.deviceId,user_properties:e.userProperties,version:this.contextProvider.versionName}},e.prototype.track=function(e){return!!this.eventBridge.receiver&&(this.eventBridge.logEvent({eventType:e.eventType,eventProperties:e.eventProperties}),!0)},e.prototype.loadPersistedState=function(){if(!this.apiKey||this.apiKey.startsWith("client-"))return!1;var e=oC(this.apiKey,!0);return!!(e||(e=oC(this.apiKey,!1))||(e=oO(this.apiKey))||(e=oA(this.apiKey)))&&(this.commitIdentityToConnector(e),!0)},e.prototype.commitIdentityToConnector=function(e){var t=this.identityStore.editIdentity();t.setDeviceId(e.deviceId),e.userId&&t.setUserId(e.userId),t.commit()},e.prototype.waitForConnectorIdentity=function(e){return oI(this,void 0,void 0,function(){var t,r=this;return o_(this,function(n){return(t=this.identityStore.getIdentity()).userId||t.deviceId?[2]:[2,Promise.race([new Promise(function(e){var t=function(){e(),r.identityStore.removeIdentityListener(t)};r.identityStore.addIdentityListener(t)}),new Promise(function(t,r){og.setTimeout(r,e,"Timed out waiting for Amplitude Analytics SDK to initialize.")})])]})})},e}(),oN=og.fetch||function(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],s=[],a={},u=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:u,headers:{keys:function(){return o},entries:function(){return s},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase() in a}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,r){o.push(t=t.toLowerCase()),s.push([t,r]),a[t]=a[t]?a[t]+","+r:r}),r(u())},i.onerror=n,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})},oP=function(){function e(e){this.client=e}return e.prototype.request=function(e){return oI(this,void 0,void 0,function(){return o_(this,function(t){switch(t.label){case 0:return[4,this.client.request(e.requestUrl,e.method,e.headers,null,e.timeoutMillis)];case 1:return[2,t.sent()]}})})},e}(),oL={request:function(e,t,r,n,i){var o;return o=oI(void 0,void 0,void 0,function(){var i,o;return o_(this,function(s){switch(s.label){case 0:return[4,oN(e,{method:t,headers:r,body:n})];case 1:return o={status:(i=s.sent()).status},[4,i.text()];case 2:return o.body=s.sent(),[2,o]}})}),null==i||i<=0?o:new Promise(function(e,t){og.setTimeout(function(){t(new oh("Request timeout after "+i+" milliseconds"))},i),o.then(e,t)})}};(E=Z||(Z={})).LocalStorage="localStorage",E.InitialVariants="initialVariants",(I=ee||(ee={})).LocalStorage="storage",I.InitialVariants="initial",I.SecondaryLocalStorage="secondary-storage",I.SecondaryInitialVariants="secondary-initial",I.FallbackInline="fallback-inline",I.FallbackConfig="fallback-config",I.LocalEvaluation="local-evaluation";var oD=function(e){return!e||e===ee.FallbackInline||e===ee.FallbackConfig||e===ee.SecondaryInitialVariants},oU={debug:!1,instanceName:"$default_instance",fallbackVariant:{},initialVariants:{},initialFlags:void 0,source:Z.LocalStorage,serverUrl:"https://api.lab.amplitude.com",flagsServerUrl:"https://flag.lab.amplitude.com",serverZone:"US",fetchTimeoutMillis:1e4,retryFetchOnFailure:!0,automaticExposureTracking:!0,pollOnStart:!0,fetchOnStart:!0,automaticFetchOnAmplitudeIdentityChange:!1,userProvider:null,analyticsProvider:null,exposureTrackingProvider:null,httpClient:oL},oj="1.12.2",oq=function(){function e(e,t){var r,n=this;this.isReady=new Promise(function(e){n.resolve=e}),this.config=e,this.client=t;var i=null!==(r=e.instanceName)&&void 0!==r?r:oU.instanceName;this.queue=new oB(i),this.cache=new oF(i)}return e.prototype.ready=function(){return this.integration?this.isReady:Prom
1ise.resolve()},e.prototype.setIntegration=function(e){var t=this;this.integration&&this.integration.teardown&&this.integration.teardown(),this.integration=e,e.setup?this.integration.setup(this.config,this.client).then(function(){t.queue.setTracker(t.integration.track.bind(e)),t.resolve()},function(r){console.error("Integration setup failed.",r),t.queue.setTracker(t.integration.track.bind(e)),t.resolve()}):(this.queue.setTracker(this.integration.track.bind(e)),this.resolve())},e.prototype.getUser=function(){return this.integration?this.integration.getUser():{}},e.prototype.track=function(e){if(this.cache.shouldTrack(e)){var t=this.getExposureEvent(e);this.queue.push(t)}},e.prototype.getExposureEvent=function(e){var t,r,n,i={eventType:"$exposure",eventProperties:e};return(null===(t=e.metadata)||void 0===t?void 0:t.exposureEvent)?i={eventType:null===(r=e.metadata)||void 0===r?void 0:r.exposureEvent,eventProperties:e}:(null===(n=e.metadata)||void 0===n?void 0:n.deliveryMethod)==="web"&&(i={eventType:"$impression",eventProperties:e}),i},e}(),oF=function(){function e(e){this.isSessionStorageAvailable=oV(),this.inMemoryCache={},this.storageKey="EXP_sent_".concat(e)}return e.prototype.shouldTrack=function(e){if((null===(t=e.metadata)||void 0===t?void 0:t.deliveryMethod)==="web")return!0;this.loadCache();var t,r=this.inMemoryCache[e.flag_key],n=!1;return r||(n=!0,this.inMemoryCache[e.flag_key]=e.variant),this.storeCache(),n},e.prototype.loadCache=function(){if(this.isSessionStorageAvailable){var e=og.sessionStorage.getItem(this.storageKey);this.inMemoryCache=e?JSON.parse(e):{}}},e.prototype.storeCache=function(){this.isSessionStorageAvailable&&og.sessionStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryCache))},e}(),oB=function(){function e(e,t){void 0===t&&(t=512),this.isLocalStorageAvailable=om(),this.inMemoryQueue=[],this.storageKey="EXP_unsent_".concat(e),this.maxQueueSize=t}return e.prototype.push=function(e){this.loadQueue(),this.inMemoryQueue.push(e),this.flush(),this.storeQueue()},e.prototype.setTracker=function(e){var t=this;this.tracker=e,this.poller=og.setInterval(function(){t.loadFlushStore()},1e3),this.loadFlushStore()},e.prototype.flush=function(){var e,t;if(this.tracker&&0!==this.inMemoryQueue.length){try{for(var r=ok(this.inMemoryQueue),n=r.next();!n.done;n=r.next()){var i=n.value;if(!this.tracker(i))return}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.inMemoryQueue=[],this.poller&&(og.clearInterval(this.poller),this.poller=void 0)}},e.prototype.loadQueue=function(){if(this.isLocalStorageAvailable){var e=og.localStorage.getItem(this.storageKey);this.inMemoryQueue=e?JSON.parse(e):[]}},e.prototype.storeQueue=function(){this.isLocalStorageAvailable&&(this.inMemoryQueue.length>this.maxQueueSize&&(this.inMemoryQueue=this.inMemoryQueue.slice(this.inMemoryQueue.length-this.maxQueueSize)),og.localStorage.setItem(this.storageKey,JSON.stringify(this.inMemoryQueue)))},e.prototype.loadFlushStore=function(){this.loadQueue(),this.flush(),this.storeQueue()},e}(),oV=function(){var e=oy();if(e)try{var t="EXP_test";return e.sessionStorage.setItem(t,t),e.sessionStorage.removeItem(t),!0}catch(e){}return!1},oz=function(){function e(){this.globalScope=oy()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.localStorage.getItem(e)},e.prototype.put=function(e,t){var r;null===(r=this.globalScope)||void 0===r||r.localStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.localStorage.removeItem(e)},e}(),oH=function(e,t,r){var n=e.substring(e.length-6);return new oK("amp-exp-".concat(t,"-").concat(n),r,oG)},oW=function(e,t,r){void 0===r&&(r=new oz);var n=e.substring(e.length-6);return new oK("amp-exp-".concat(t,"-").concat(n,"-flags"),r)},oK=function(){function e(e,t,r){this.cache={},this.namespace=e,this.storage=t,this.transformer=r}return e.prototype.get=function(e){return this.cache[e]},e.prototype.getAll=function(){return oE({},this.cache)},e.prototype.put=function(e,t){this.cache[e]=t},e.prototype.putAll=function(e){var t,r;try{for(var n=ok(Object.keys(e)),i=n.next();!i.done;i=n.next()){var o=i.value;this.cache[o]=e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.remove=function(e){delete this.cache[e]},e.prototype.clear=function(){this.cache={}},e.prototype.load=function(){var e,t,r,n=this.storage.get(this.namespace);try{r=JSON.parse(n)||{}}catch(e){return}var i={};try{for(var o=ok(Object.keys(r)),s=o.next();!s.done;s=o.next()){var a=s.value;try{var u=void 0;(u=this.transformer?this.transformer(r[a]):r[a])&&(i[a]=u)}catch(e){}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.clear(),this.putAll(i)},e.prototype.store=function(e){void 0===e&&(e=this.cache),this.storage.put(this.namespace,JSON.stringify(e))},e}(),oG=function(e){if("string"==typeof e)return{key:e,value:e};if("object"==typeof e){var t=e.key,r=e.value,n=e.payload,i=e.metadata,o=e.expKey;i&&i.experimentKey?o=i.experimentKey:o&&((i=i||{}).experimentKey=o);var s={};return t?s.key=t:r&&(s.key=r),r&&(s.value=r),i&&(s.metadata=i),n&&(s.payload=n),o&&(s.expKey=o),s}},o$=function(e,t,r,n){var i,o=null==r?void 0:r.value,s="[Experiment] ".concat(t);return{name:"[Experiment] Exposure",user:e,key:t,variant:r,userProperty:s,properties:{key:t,variant:o,source:n},userProperties:((i={})[s]=o,i)}},oQ=function(e){return null==e},oJ=function(e){return!!oQ(e)||e&&0===Object.keys(e).length},oX=function(e){var t;return(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.evaluationMode)==="local"},oY=function(){function e(e,t,r,n){this.started=!1,this.done=!1,this.attempts=e,this.min=t,this.max=r,this.scalar=n}return e.prototype.start=function(e){return oI(this,void 0,void 0,function(){return o_(this,function(t){switch(t.label){case 0:if(this.started)throw Error("Backoff already started");return this.started=!0,[4,this.backoff(e,0,this.min)];case 1:return t.sent(),[2]}})})},e.prototype.cancel=function(){this.done=!0,clearTimeout(this.timeoutHandle)},e.prototype.backoff=function(e,t,r){return oI(this,void 0,void 0,function(){var n=this;return o_(this,function(i){return this.done||(this.timeoutHandle=og.
1setTimeout(function(){return oI(n,void 0,void 0,function(){var n,i;return o_(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e()];case 1:return o.sent(),[3,3];case 2:return o.sent(),(n=t+1)<this.attempts&&(i=Math.min(r*this.scalar,this.max),this.backoff(e,n,i)),[3,3];case 3:return[2]}})})},r)),[2]})})},e}(),oZ=function(e){if(!e)return{};var t,r,n,i,o={user:e},s=oy();s&&(o.page={url:s.location.href});var a={};if(!e.groups)return o;try{for(var u=ok(Object.keys(e.groups)),c=u.next();!c.done;c=u.next()){var l=c.value,d=e.groups[l];if(d.length>0&&d[0]){var f=d[0],h={group_name:f},p=null===(i=null===(n=e.group_properties)||void 0===n?void 0:n[l])||void 0===i?void 0:i[f];p&&Object.keys(p).length>0&&(h.group_properties=p),a[l]=h}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return Object.keys(a).length>0&&(o.groups=a),delete o.user.groups,delete o.user.group_properties,o},o0=function(e){return null==e?{}:"string"==typeof e?{key:e,value:e}:e},o1=function(e){if(!e)return{};var t=void 0;e.metadata&&(t=e.metadata.experimentKey);var r={};return e.key&&(r.key=e.key),e.value&&(r.value=e.value),e.payload&&(r.payload=e.payload),t&&(r.expKey=t),e.metadata&&(r.metadata=e.metadata),r},o2=function(){function e(e){this.setProperties={},this.unsetProperties={},this.analyticsProvider=e}return e.prototype.track=function(e){this.setProperties[e.key]!=e.variant.value&&(this.setProperties[e.key]=e.variant.value,delete this.unsetProperties[e.key],this.analyticsProvider.track(e))},e.prototype.setUserProperty=function(e){this.setProperties[e.key]!=e.variant.value&&this.analyticsProvider.setUserProperty(e)},e.prototype.unsetUserProperty=function(e){this.unsetProperties[e.key]||(this.unsetProperties[e.key]="unset",delete this.setProperties[e.key],this.analyticsProvider.unsetUserProperty(e))},e}(),o3=function(){function e(e){this.tracked={},this.exposureTrackingProvider=e}return e.prototype.track=function(e){var t=this.tracked[e.flag_key];t&&t.variant===e.variant||(this.tracked[e.flag_key]=e,this.exposureTrackingProvider.track(e))},e}(),o4=function(){function e(e,t){var r,n,i=this;if(this.engine=new iK,this.poller=new ob(function(){return i.doFlags()},6e4),this.isRunning=!1,this.apiKey=e,this.config=oE(oE(oE({},oU),t),{serverUrl:(null==t?void 0:t.serverUrl)||((null===(r=null==t?void 0:t.serverZone)||void 0===r?void 0:r.toLowerCase())==="eu"?"https://api.lab.eu.amplitude.com":oU.serverUrl),flagsServerUrl:(null==t?void 0:t.flagsServerUrl)||((null===(n=null==t?void 0:t.serverZone)||void 0===n?void 0:n.toLowerCase())==="eu"?"https://flag.lab.eu.amplitude.com":oU.flagsServerUrl)}),this.config.initialVariants)for(var o in this.config.initialVariants)this.config.initialVariants[o]=oG(this.config.initialVariants[o]);this.config.userProvider&&(this.userProvider=this.config.userProvider),this.config.analyticsProvider&&(this.analyticsProvider=new o2(this.config.analyticsProvider)),this.config.exposureTrackingProvider&&(this.exposureTrackingProvider=new o3(this.config.exposureTrackingProvider)),this.integrationManager=new oq(this.config,this);var s=new oP(this.config.httpClient||oL);this.flagApi=new ov(this.apiKey,this.config.flagsServerUrl,s),this.evaluationApi=new op(this.apiKey,this.config.serverUrl,s);var a=new oz;this.variants=oH(this.apiKey,this.config.instanceName,a),this.flags=oW(this.apiKey,this.config.instanceName,a);try{this.flags.load(),this.variants.load()}catch(e){}this.mergeInitialFlagsWithStorage()}return e.prototype.start=function(e){var t;return oI(this,void 0,void 0,function(){var r;return o_(this,function(n){switch(n.label){case 0:if(this.isRunning)return[2];if(this.isRunning=!0,this.setUser(e),r=this.doFlags(),!(null===(t=this.config.fetchOnStart)||void 0===t||t))return[3,2];return[4,Promise.all([this.fetch(e),r])];case 1:return n.sent(),[3,4];case 2:return[4,r];case 3:n.sent(),n.label=4;case 4:return this.config.pollOnStart&&this.poller.start(),[2]}})})},e.prototype.stop=function(){this.isRunning&&(this.poller.stop(),this.isRunning=!1)},e.prototype.fetch=function(e,t){return void 0===e&&(e=this.user),oI(this,void 0,void 0,function(){var r;return o_(this,function(n){switch(n.label){case 0:this.setUser(e||{}),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.fetchInternal(e,this.config.fetchTimeoutMillis,this.config.retryFetchOnFailure,t)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),this.config.debug&&(r instanceof oh?console.debug(r):console.error(r)),[3,4];case 4:return[2,this]}})})},e.prototype.variant=function(e,t){if(!this.apiKey)return{value:void 0};var r,n,i=this.variantAndSource(e,t);return this.config.automaticExposureTracking&&this.exposureInternal(e,i),this.debug("[Experiment] variant for ".concat(e," is ").concat((null===(r=i.variant)||void 0===r?void 0:r.key)||(null===(n=i.variant)||void 0===n?void 0:n.value))),i.variant||{}}
1,e.prototype.exposure=function(e){var t=this.variantAndSource(e);this.exposureInternal(e,t)},e.prototype.all=function(){if(!this.apiKey)return{};var e=this.evaluate();for(var t in e)oX(this.flags.get(t))||delete e[t];return oE(oE(oE({},this.secondaryVariants()),this.sourceVariants()),e)},e.prototype.clear=function(){this.variants.clear();try{this.variants.store()}catch(e){}},e.prototype.getUser=function(){if(!this.user)return this.user;if(null===(e=this.user)||void 0===e||!e.user_properties)return oE({},this.user);var e,t=oE({},this.user.user_properties);return oE(oE({},this.user),{user_properties:t})},e.prototype.setUser=function(e){var t;if(!e){this.user=null;return}if(null===(t=this.user)||void 0===t?void 0:t.user_properties){var r=oE({},e.user_properties);this.user=oE(oE({},e),{user_properties:r})}else this.user=oE({},e)},e.prototype.getUserProvider=function(){return this.userProvider},e.prototype.setUserProvider=function(e){return this.userProvider=e,this},e.prototype.mergeInitialFlagsWithStorage=function(){var e=this;this.config.initialFlags&&JSON.parse(this.config.initialFlags).forEach(function(t){e.flags.get(t.key)||e.flags.put(t.key,t)})},e.prototype.evaluate=function(e){var t,r,n=this.addContext(this.user),i=iG(this.flags.getAll(),e),o=oZ(n),s=this.engine.evaluate(o,i),a={};try{for(var u=ok(Object.keys(s)),c=u.next();!c.done;c=u.next()){var l=c.value;a[l]=o1(s[l])}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return a},e.prototype.variantAndSource=function(e,t){var r={};this.config.source===Z.LocalStorage?r=this.localStorageVariantAndSource(e,t):this.config.source===Z.InitialVariants&&(r=this.initialVariantsVariantAndSource(e,t));var n=this.flags.get(e);return(oX(n)||!r.variant&&n)&&(r=this.localEvaluationVariantAndSource(e,n,t)),r},e.prototype.localEvaluationVariantAndSource=function(e,t,r){var n,i={},o=this.evaluate([t.key])[e],s=ee.LocalEvaluation,a=null===(n=null==o?void 0:o.metadata)||void 0===n?void 0:n.default;if(!oQ(o)&&!a)return{variant:o0(o),source:s,hasDefaultVariant:!1};if(a&&(i={variant:o0(o),source:s,hasDefaultVariant:!0}),!oQ(r))return{variant:o0(r),source:ee.FallbackInline,hasDefaultVariant:i.hasDefaultVariant};var u=this.config.initialVariants[e];if(!oQ(u))return{variant:o0(u),source:ee.SecondaryInitialVariants,hasDefaultVariant:i.hasDefaultVariant};var c=o0(this.config.fallbackVariant),l={variant:c,source:ee.FallbackConfig,hasDefaultVariant:i.hasDefaultVariant};return oJ(c)?i:l},e.prototype.localStorageVariantAndSource=function(e,t){var r,n={},i=this.variants.get(e),o=null===(r=null==i?void 0:i.metadata)||void 0===r?void 0:r.default;if(!oQ(i)&&!o)return{variant:o0(i),source:ee.LocalStorage,hasDefaultVariant:!1};if(o&&(n={variant:o0(i),source:ee.LocalStorage,hasDefaultVariant:!0}),!oQ(t))return{variant:o0(t),source:ee.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var s=this.config.initialVariants[e];if(!oQ(s))return{variant:o0(s),source:ee.SecondaryInitialVariants,hasDefaultVariant:n.hasDefaultVariant};var a=o0(this.config.fallbackVariant),u={variant:a,source:ee.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return oJ(a)?n:u},e.prototype.initialVariantsVariantAndSource=function(e,t){var r,n={},i=this.config.initialVariants[e];if(!oQ(i))return{variant:o0(i),source:ee.InitialVariants,hasDefaultVariant:!1};var o=this.variants.get(e),s=null===(r=null==o?void 0:o.metadata)||void 0===r?void 0:r.default;if(!oQ(o)&&!s)return{variant:o0(o),source:ee.LocalStorage,hasDefaultVariant:!1};if(s&&(n={variant:o0(o),source:ee.LocalStorage,hasDefaultVariant:!0}),!oQ(t))return{variant:o0(t),source:ee.FallbackInline,hasDefaultVariant:n.hasDefaultVariant};var a=o0(this.config.fallbackVariant),u={variant:a,source:ee.FallbackConfig,hasDefaultVariant:n.hasDefaultVariant};return oJ(a)?n:u},e.prototype.fetchInternal=function(e,t,r,n){return oI(this,void 0,void 0,function(){var i,o;return o_(this,function(s){switch(s.label){case 0:if(!this.apiKey)throw Error("Experiment API key is empty");this.debug("[Experiment] Fetch all: retry=".concat(r)),r&&this.stopRetries(),s.label=1;
1case 1:return s.trys.push([1,4,,5]),[4,this.doFetch(e,t,n)];case 2:return i=s.sent(),[4,this.storeVariants(i,n)];case 3:return s.sent(),[2,i];case 4:throw o=s.sent(),r&&this.shouldRetryFetch(o)&&this.startRetries(e,n),o;case 5:return[2]}})})},e.prototype.cleanUserPropsForFetch=function(e){var t=oE({},e);return delete t.cookie,t},e.prototype.doFetch=function(e,t,r){return oI(this,void 0,void 0,function(){var n,i,o,s,a,u,c;return o_(this,function(l){switch(l.label){case 0:return[4,this.addContextOrWait(e)];case 1:return e=l.sent(),e=this.cleanUserPropsForFetch(e),this.debug("[Experiment] Fetch variants for user: ",e),[4,this.evaluationApi.getVariants(e,oE({timeoutMillis:t},r))];case 2:n=l.sent(),i={};try{for(s=(o=ok(Object.keys(n))).next();!s.done;s=o.next())i[a=s.value]=o1(n[a])}catch(e){u={error:e}}finally{try{s&&!s.done&&(c=o.return)&&c.call(o)}finally{if(u)throw u.error}}return this.debug("[Experiment] Received variants: ",i),[2,i]}})})},e.prototype.doFlags=function(){return oI(this,void 0,void 0,function(){var e,t;return o_(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.flagApi.getFlags({libraryName:"experiment-js-client",libraryVersion:oj,timeoutMillis:this.config.fetchTimeoutMillis})];case 1:return e=r.sent(),this.flags.clear(),this.flags.putAll(e),[3,3];case 2:if(t=r.sent(),this.config.debug&&t instanceof oh)console.debug(t);else throw t;return[3,3];case 3:try{this.flags.store()}catch(e){}return this.mergeInitialFlagsWithStorage(),[2]}})})},e.prototype.storeVariants=function(e,t){return oI(this,void 0,void 0,function(){var r,n,i,o;return o_(this,function(s){for(o in 0===(r=t&&t.flagKeys?t.flagKeys:[]).length&&this.variants.clear(),n=function(t){r=r.filter(function(e){return e!==t}),i.variants.put(t,e[t])},i=this,e)n(o);for(o in r)this.variants.remove(o);try{this.variants.store()}catch(e){}return this.debug("[Experiment] Stored variants: ",e),[2]})})},e.prototype.startRetries=function(e,t){return oI(this,void 0,void 0,function(){var r=this;return o_(this,function(n){return this.debug("[Experiment] Retry fetch"),this.retriesBackoff=new oY(8,500,1e4,1.5),this.retriesBackoff.start(function(){return oI(r,void 0,void 0,function(){return o_(this,function(r){switch(r.label){case 0:return[4,this.fetchInternal(e,1e4,!1,t)];case 1:return r.sent(),[2]}})})}),[2]})})},e.prototype.stopRetries=function(){this.retriesBackoff&&this.retriesBackoff.cancel()},e.prototype.addContext=function(e){var t,r=null===(t=this.userProvider)||void 0===t?void 0:t.getUser(),n=this.integrationManager.getUser(),i=oE(oE(oE({},null==r?void 0:r.user_properties),n.user_properties),null==e?void 0:e.user_properties);return oE(oE(oE(oE({library:"experiment-js-client/".concat(oj)},r),n),e),{user_properties:i})},e.prototype.addContextOrWait=function(e){return oI(this,void 0,void 0,function(){return o_(this,function(t){switch(t.label){case 0:return[4,this.integrationManager.ready()];case 1:return t.sent(),[2,this.addContext(e)]}})})},e.prototype.sourceVariants=function(){return this.config.source==Z.LocalStorage?this.variants.getAll():this.config.source==Z.InitialVariants?this.config.initialVariants:void 0},e.prototype.secondaryVariants=function(){return this.config.source==Z.LocalStorage?this.config.initialVariants:this.config.source==Z.InitialVariants?this.variants.getAll():void 0},e.prototype.exposureInternal=function(e,t){if(null===(i=null===(n=null===(r=t.variant)||void 0===r?void 0:r.metadata)||void 0===n?void 0:n.trackExposure)||void 0===i||i){this.legacyExposureInternal(e,t.variant,t.source);var r,n,i,o,s,a,u,c,l,d={flag_key:e},f=oD(t.source);if(!f||t.hasDefaultVariant){(null===(o=t.variant)||void 0===o?void 0:o.expKey)&&(d.experiment_key=null===(s=t.variant)||void 0===s?void 0:s.expKey);var h=null===(a=t.variant)||void 0===a?void 0:a.metadata;f||(null==h?void 0:h.default)||((null===(u=t.variant)||void 0===u?void 0:u.key)?d.variant=t.variant.key:(null===(c=t.variant)||void 0===c?void 0:c.value)&&(d.variant=t.variant.value)),h&&(d.metadata=h),null===(l=this.exposureTrackingProvider)||void 0===l||l.track(d),this.integrationManager.track(d)}}},e.prototype.legacyExposureInternal=function(e,t,r){var n,i,o,s,a;if(this.analyticsProvider){var u=o$(this.addContext(this.getUser()),e,t,r);!oD(r)&&(null==t?void 0:t.value)?(null==t?void 0:t.value)&&(null===(s=null===(o=this.analyticsProvider)||void 0===o?void 0:o.setUserProperty)||void 0===s||s.call(o,u),null===(a=this.analyticsProvider)||void 0===a||a.track(u)):null===(i=null===(n=this.analyticsProvider)||void 0===n?void 0:n.unsetUserProperty)||void 0===i||i.call(n,u)}},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.config.debug&&console.debug.apply(console,oT([e],ox(t),!1))},e.prototype.shouldRetryFetch=function(e){return!(e instanceof of)||e.statusCode<400||e.statusCode>=500||429===e.statusCode}
1,e.prototype.addPlugin=function(e){"integration"===e.type&&this.integrationManager.setIntegration(e)},e}(),o6=function(){function e(){this.globalScope=oy()}return e.prototype.get=function(e){var t;return null===(t=this.globalScope)||void 0===t?void 0:t.sessionStorage.getItem(e)},e.prototype.put=function(e,t){var r;null===(r=this.globalScope)||void 0===r||r.sessionStorage.setItem(e,t)},e.prototype.delete=function(e){var t;null===(t=this.globalScope)||void 0===t||t.sessionStorage.removeItem(e)},e}(),o5=function(){function e(e,t){var r,n,i;this.globalScope=oy(),this.userAgent=void 0!==(null===(r=this.globalScope)||void 0===r?void 0:r.navigator)?null===(n=this.globalScope)||void 0===n?void 0:n.navigator.userAgent:void 0,this.ua=new ow.UAParser(this.userAgent).getResult(),this.localStorage=new oz,this.sessionStorage=new o6,this.userProvider=e,this.apiKey=t,this.storageKey="EXP_".concat(null===(i=this.apiKey)||void 0===i?void 0:i.slice(0,10),"_DEFAULT_USER_PROVIDER")}return e.prototype.getUser=function(){var e,t,r,n,i,o=(null===(e=this.userProvider)||void 0===e?void 0:e.getUser())||{};return oE({language:this.getLanguage(),platform:"Web",os:this.getOs(this.ua),device_model:this.getDeviceModel(this.ua),device_category:null!==(r=null===(t=this.ua.device)||void 0===t?void 0:t.type)&&void 0!==r?r:"desktop",referring_url:null===(i=null===(n=this.globalScope)||void 0===n?void 0:n.document)||void 0===i?void 0:i.referrer.replace(/\/$/,""),cookie:this.getCookie(),browser:this.getBrowser(this.ua),landing_url:this.getLandingUrl(),first_seen:this.getFirstSeen(),url_param:this.getUrlParam(),user_agent:this.userAgent},o)},e.prototype.getLanguage=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},e.prototype.getOs=function(e){var t,r;return[null===(t=e.browser)||void 0===t?void 0:t.name,null===(r=e.browser)||void 0===r?void 0:r.major].filter(function(e){return null!=e}).join(" ")},e.prototype.getDeviceModel=function(e){var t;return null===(t=e.os)||void 0===t?void 0:t.name},e.prototype.getBrowser=function(e){var t,r=null===(t=e.browser)||void 0===t?void 0:t.name;return(null==r?void 0:r.includes("Chrom"))&&(r="Chrome"),(null==r?void 0:r.includes("Firefox"))&&(r="Firefox"),(null==r?void 0:r.includes("Safari"))&&(r="Safari"),(null==r?void 0:r.includes("Edge"))&&(r="Edge"),(null==r?void 0:r.includes("Opera"))&&(r="Opera"),r},e.prototype.getCookie=function(){var e,t,r,n,i;if(null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.document)||void 0===t?void 0:t.cookie)return Object.fromEntries(null===(i=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.document)||void 0===n?void 0:n.cookie)||void 0===i?void 0:i.split("; ").map(function(e){return e.split("=")}))},e.prototype.getLandingUrl=function(){var e,t;try{var r=JSON.parse(this.sessionStorage.get(this.storageKey)||"{}");return r.landing_url||(r.landing_url=null===(t=null===(e=this.globalScope)||void 0===e?void 0:e.location)||void 0===t?void 0:t.href.replace(/\/$/,""),this.sessionStorage.put(this.storageKey,JSON.stringify(r))),r.landing_url}catch(e){return}},e.prototype.getFirstSeen=function(){try{var e=JSON.parse(this.localStorage.get(this.storageKey)||"{}");return e.first_seen||(e.first_seen=(Date.now()/1e3).toString(),this.localStorage.put(this.storageKey,JSON.stringify(e))),e.first_seen}catch(e){return}},e.prototype.getUrlParam=function(){if(!this.globalScope)return{};var e,t,r,n,i,o={};try{for(var s=ok(new URL(null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.location)||void 0===n?void 0:n.href).searchParams),a=s.next();!a.done;a=s.next()){var u=ox(a.value,2),c=u[0],l=u[1];o[c]=oT(oT([],ox(null!==(i=o[c])&&void 0!==i?i:[]),!1),ox(l.split(",")),!1)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return Object.entries(o).reduce(function(e,t){var r=ox(t,2),n=r[0],i=r[1];return e[n]=1==i.length?i[0]:i,e},{})},e}(),o8={},o7=function(e){return(null==e?void 0:e.instanceName)||oU.instanceName},o9=function(e,t){var r=o7(t),n=null==t?void 0:t.internalInstanceNameSuffix,i=n?"".concat(r,".").concat(e,".").concat(n):"".concat(r,".").concat(e);return o8[i]||(t=oE(oE({},t),{userProvider:new o5(null==t?void 0:t.userProvider,e)}),o8[i]=new o4(e,t)),o8[i]},se=function(e,t){var r=o7(t),n=o9(e,t);return n.addPlugin(new oM(e,tk.getInstance(r),1e4)),n};!function(){function e(){}e.prototype.getUser=function(){return{}},e.prototype.start=function(e){return oI(this,void 0,void 0,function(){return o_(this,function(e){return[2]})})},e.prototype.stop=function(){},e.prototype.setUser=function(e){},e.prototype.fetch=function(e){return oI(this,void 0,void 0,function(){return o_(this,function(e){return[2,this]})})},e.prototype.getUserProvider=function(){return null},e.prototype.setUserProvider=function(e){return this},e.prototype.variant=function(e,t){return oU.fallbackVariant},e.prototype.all=function(){return{}},e.prototype.clear=function(){}
1,e.prototype.exposure=function(e){}}();var st="[Amplitude]",sr="".concat(st," Session Replay ID"),sn=Q.US,si="".concat(st," Session Replay Debug"),so="amp-mask";(_=et||(et={})).GET_SR_PROPS="get-sr-props",_.DEBUG_INFO="debug-info";var ss=function(){return{flushMaxRetries:2,logLevel:H.Warn,loggerProvider:new eP,transportProvider:new tV}},sa=function(e){function t(t,r){var n,i=this,o=ss();return(i=e.call(this,eg(eg({transportProvider:o.transportProvider},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=o.flushMaxRetries?r.flushMaxRetries:o.flushMaxRetries,i.apiKey=t,i.sampleRate=r.sampleRate||0,i.serverZone=r.serverZone||sn,i.configEndpointUrl=r.configEndpointUrl,i.shouldInlineStylesheet=r.shouldInlineStylesheet,i.version=r.version,i.performanceConfig=r.performanceConfig,i.storeType=null!==(n=r.storeType)&&void 0!==n?n:"idb",r.privacyConfig&&(i.privacyConfig=r.privacyConfig),r.debugMode&&(i.debugMode=r.debugMode),i}return ev(t,e),t}(eD);function su(e){let t=null==e?void 0:e.host;return(null==t?void 0:t.shadowRoot)===e}function sc(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function sl(e){try{var t;let r=e.rules||e.cssRules;return r?((t=Array.from(r,sd).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}}function sd(e){let t;if("styleSheet"in e)try{t=sl(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(e){}else if("selectorText"in e&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}(k=er||(er={}))[k.Document=0]="Document",k[k.DocumentType=1]="DocumentType",k[k.Element=2]="Element",k[k.Text=3]="Text",k[k.CDATA=4]="CDATA",k[k.Comment=5]="Comment";class sf{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function sh({element:e,maskInputOptions:t,tagName:r,type:n,value:i,maskInputFn:o}){let s=i||"",a=n&&sp(n);return(t[r.toLowerCase()]||a&&t[a])&&(s=o?o(s,e):"*".repeat(s.length)),s}function sp(e){return e.toLowerCase()}let sv="__rrweb_original__";function sg(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?sp(t):null}let sy=1,sm=RegExp("[^a-z0-9-_:]");function sb(){return sy++}let sw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,sS=/^(?:[a-z+]+:)?\/\//i,sE=/^www\..*/i,sI=/^(data:)([^,]*),(.*)/i;function s_(e,t){return(e||"").replace(sw,(e,r,n,i,o,s)=>{let a=n||o||s,u=r||i||"";if(!a)return e;if(sS.test(a)||sE.test(a)||sI.test(a))return`url(${u}${a}${u})`;if("/"===a[0])return`url(${u}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${u})`;let c=t.split("/"),l=a.split("/");for(let e of(c.pop(),l))"."!==e&&(".."===e?c.pop():c.push(e));return`url(${u}${c.join("/")}${u})`})}let sk=/^[^ \t\n\r\u000c]+/,sx=/^[, \t\n\r\u000c]+/;function sT(e,t){if(!t||""===t.trim())return t;let r=e.createElement("a");return r.href=t,r.href}function sC(){let e=document.createElement("a");return e.href="",e.href}function sO(e,t,r,n){return n?"src"!==r&&("href"!==r||"use"===t&&"#"===n[0])&&("xlink:href"!==r||"#"===n[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n;let i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}let i=[];for(;n(sx),!(r>=t.length);){let o=n(sk);if(","===o.slice(-1))o=sT(e,o.substring(0,o.length-1)),i.push(o);else{let n="";o=sT(e,o);let s=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((o+n).trim());break}if(s)")"===e&&(s=!1);else{if(","===e){r+=1,i.push((o+n).trim());break}"("===e&&(s=!0)}n+=e,r+=1}}}return i.join(", ")}(e,n):"style"===r?s_(n,sC()):"object"===t&&"data"===r?sT(e,n):n:sT(e,n):n}function sA(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function sR(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&sR(e.parentNode,t,r);for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!!r&&sR(e.parentNode,t,r)}function sM(e,t,r){try{let n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t)||n.closest(`.${t}`))return!0}else if(sR(n,t,!0))return!0;
1if(r&&(n.matches(r)||n.closest(r)))return!0}catch(e){}return!1}function sN(e){return null==e?"":e.toLowerCase()}function sP(e,t){let r;let{doc:n,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:l,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskTextFn:p,maskInputFn:v,slimDOMOptions:g,dataURLOptions:y={},inlineImages:m=!1,recordCanvas:b=!1,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:_=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:x=!1}=t,{preserveWhiteSpace:T=!0}=t,C=function(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:a,maskTextClass:u,maskTextSelector:c,inlineStylesheet:l,maskInputOptions:d={},maskTextFn:f,maskInputFn:h,dataURLOptions:p={},inlineImages:v,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:m=!1}=t,b=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:er.Document,childNodes:[],compatMode:e.compatMode};return{type:er.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:er.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){let{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:u={},maskInputFn:c,dataURLOptions:l={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:v}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,n,s),y=function(e){if(e instanceof HTMLFormElement)return"form";let t=sp(e.tagName);return sm.test(t)?"div":t}(e),m={},b=e.attributes.length;for(let t=0;t<b;t++){let n=e.attributes[t];sA(y,n.name,n.value)||(m[n.name]=sO(r,y,sp(n.name),n.value))}if("link"===y&&a){let t=Array.from(r.styleSheets).find(t=>t.href===e.href),n=null;t&&(n=sl(t)),n&&(delete m.rel,delete m.href,m._cssText=s_(n,t.href))}if("style"===y&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=sl(e.sheet);t&&(m._cssText=s_(t,sC()))}if("input"===y||"textarea"===y||"select"===y){let t=e.value,r=e.checked;"radio"!==m.type&&"checkbox"!==m.type&&"submit"!==m.type&&"button"!==m.type&&t?m.value=sh({element:e,type:sg(e),tagName:y,value:t,maskInputOptions:u,maskInputFn:c}):r&&(m.checked=r)}if("option"===y&&(e.selected&&!u.select?m.selected=!0:delete m.selected),"canvas"===y&&f){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let i=t.getImageData;if(new Uint32Array((sv in i?i[sv]:i).call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(m.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){let t=e.toDataURL(l.type,l.quality),r=document.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(l.type,l.quality)&&(m.rr_dataURL=t)}}if("img"===y&&d){i||(o=(i=r.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let n=()=>{e.removeEventListener("load",n);try{i.width=e.naturalWidth,i.height=e.naturalHeight,o.drawImage(e,0,0),m.rr_dataURL=i.toDataURL(l.type,l.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}t?m.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?n():e.addEventListener("load",n)}if(("audio"===y||"video"===y)&&(m.rr_mediaState=e.paused?"paused":"played",m.rr_mediaCurrentTime=e.currentTime),!p&&(e.scrollLeft&&(m.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(m.rr_scrollTop=e.scrollTop)),g){let{width:t,height:r}=e.getBoundingClientRect();m={class:m.class,rr_width:`${t}px`,rr_height:`${r}px`}}return"iframe"!==y||h(m.src)||(e.contentDocument||(m.rr_src=m.src),delete m.src),{type:er.Element,tagName:y,attributes:m,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:g,rootId:v}}(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:l,maskInputOptions:d,maskInputFn:h,dataURLOptions:p,inlineImages:v,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:m,rootId:b});case e.TEXT_NODE:return function(e,t){var r;let{maskTextClass:n,maskTextSelector:i,maskTextFn:o,rootId:s}=t,a=e.parentNode&&e.parentNode.tagName,u=e.textContent,c="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(c&&u){try{e.nextSibling||e.previousSibling||(null===(r=e.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(u=sl(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}u=s_(u,sC())}return l&&(u="SCRIPT_PLACEHOLDER"),!c&&!l&&u&&sM(e,n,i)&&(u=o?o(u,e.parentElement):u.replace(/[\S]/g,"*")),{type:er.Text,textContent:u||"",isStyle:c,rootId:s}}(e,{maskTextClass:u,maskTextSelector:c,maskTextFn:f,rootId:b});case e.CDATA_SECTION_NODE:return{type:er.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:er.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}(e,{doc:n,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskTextFn:p,maskInputFn:v,dataURLOptions:y,inlineImages:m,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:x});if(!C)return console.warn(e,"not serialized"),null;r=s.hasNode(e)?s.getId(e):!function(e,t){if(t.comment&&e.type===er.Comment)return!0;
1if(e.type===er.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js"))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(sN(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===sN(e.attributes.name)||"icon"===sN(e.attributes.rel)||"apple-touch-icon"===sN(e.attributes.rel)||"shortcut icon"===sN(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&sN(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(sN(e.attributes.property).match(/^(og|twitter|fb):/)||sN(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===sN(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===sN(e.attributes.name)||"googlebot"===sN(e.attributes.name)||"bingbot"===sN(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===sN(e.attributes.name)||"generator"===sN(e.attributes.name)||"framework"===sN(e.attributes.name)||"publisher"===sN(e.attributes.name)||"progid"===sN(e.attributes.name)||sN(e.attributes.property).match(/^article:/)||sN(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===sN(e.attributes.name)||"yandex-verification"===sN(e.attributes.name)||"csrf-token"===sN(e.attributes.name)||"p:domain_verify"===sN(e.attributes.name)||"verify-v1"===sN(e.attributes.name)||"verification"===sN(e.attributes.name)||"shopify-checkout-api-token"===sN(e.attributes.name)))return!0}}return!1}(C,g)&&(T||C.type!==er.Text||C.isStyle||C.textContent.replace(/^\s+|\s+$/gm,"").length)?sb():-2;let O=Object.assign(C,{id:r});if(s.add(e,O),-2===r)return null;w&&w(e);let A=!d;if(O.type===er.Element){A=A&&!O.needBlock,delete O.needBlock;let t=e.shadowRoot;t&&sc(t)&&(O.isShadowHost=!0)}if((O.type===er.Document||O.type===er.Element)&&A){g.headWhitespace&&O.type===er.Element&&"head"===O.tagName&&(T=!1);let t={doc:n,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:l,skipChild:d,inlineStylesheet:f,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:b,preserveWhiteSpace:T,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:k};if(O.type===er.Element&&"textarea"===O.tagName&&void 0!==O.attributes.value);else for(let r of Array.from(e.childNodes)){let e=sP(r,t);e&&O.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let r of Array.from(e.shadowRoot.childNodes)){let n=sP(r,t);n&&(sc(e.shadowRoot)&&(n.isShadow=!0),O.childNodes.push(n))}}return e.parentNode&&su(e.parentNode)&&sc(e.parentNode)&&(O.isShadow=!0),O.type===er.Element&&"iframe"===O.tagName&&function(e,t,r){let n;let i=e.contentWindow;if(!i)return;let o=!1;try{n=i.document.readyState}catch(e){return}if("complete"!==n){let n=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),o=!0,t()});return}let s="about:blank";if(i.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&S){let r=sP(t,{doc:t,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:b,preserveWhiteSpace:T,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:k});r&&S(e,r)}},E),O.type===er.Element&&"link"===O.tagName&&"stylesheet"===O.attributes.rel&&function(e,t,r){let n,i=!1;try{n=e.sheet}catch(e){return}if(n)return;let o=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),i=!0,t()})}(e,()=>{if(I){let t=sP(e,{doc:n,mirror:s,blockClass:a,blockSelector:u,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:g,dataURLOptions:y,inlineImages:m,recordCanvas:b,preserveWhiteSpace:T,onSerialize:w,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:_,keepIframeSrcFn:k});t&&I(e,t)}},_),O}RegExp(/(max|min)-device-(width|height)/.source,"g"),RegExp(/([^\\]):hover/.source,"g");var sL=((x=sL||{})[x.DomContentLoaded=0]="DomContentLoaded",x[x.Load=1]="Load",x[x.FullSnapshot=2]="FullSnapshot",x[x.IncrementalSnapshot=3]="IncrementalSnapshot",x[x.Meta=4]="Meta",x[x.Custom=5]="Custom",x[x.Plugin=6]="Plugin",x),sD=((T=sD||{})[T.Mutation=0]="Mutation",T[T.MouseMove=1]="MouseMove",T[T.MouseInteraction=2]="MouseInteraction",T[T.Scroll=3]="Scroll",T[T.ViewportResize=4]="ViewportResize",T[T.Input=5]="Input",T[T.TouchMove=6]="TouchMove",T[T.MediaInteraction=7]="MediaInteraction",T[T.StyleSheetRule=8]="StyleSheetRule",T[T.CanvasMutation=9]="CanvasMutation",T[T.Font=10]="Font",T[T.Log=11]="Log",T[T.Drag=12]="Drag",T[T.StyleDeclaration=13]="StyleDeclaration",T[T.Selection=14]="Selection",T[T.AdoptedStyleSheet=15]="AdoptedStyleSheet",T),sU=((C=sU||{})[C.MouseUp=0]="MouseUp",C[C.MouseDown=1]="MouseDown",C[C.Click=2]="Click",C[C.ContextMenu=3]="ContextMenu",C[C.DblClick=4]="DblClick",C[C.Focus=5]="Focus",C[C.Blur=6]="Blur",C[C.TouchStart=7]="TouchStart",C[C.TouchMove_Departed=8]="TouchMove_Departed",C[C.TouchEnd=9]="TouchEnd",C[C.TouchCancel=10]="TouchCancel",C),sj=((O=sj||{})[O.Mouse=0]="Mouse",O[O.Pen=1]="Pen",O[O.Touch=2]="Touch",O),sq=((A=sq||{})[A["2D"]=0]="2D",A[A.WebGL=1]="WebGL",A[A.WebGL2=2]="WebGL2",A),sF=((R=sF||{}).Start="start",R.Pause="pause",R.Resume="resume",R.Resize="resize",R.Finish="finish",R.FullsnapshotRebuilded="fullsnapshot-rebuilded",R.LoadStylesheetStart="load-stylesheet-start",R.LoadStylesheetEnd="load-stylesheet-end",R.SkipStart="skip-start",R.SkipEnd="skip-end",R.MouseInteraction="mouse-interaction",R.EventCast="event-cast",R.CustomEvent="custom-event",R.Flush="flush",R.StateChange="state-change",R.PlayBack="play-back",R.Destroy="destroy",R);function sB(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let sV="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",sz={map:{},getId:()=>(console.error(sV),-1),getNode:()=>(console.error(sV),null),removeNodeFromMap(){console.error(sV)},has:()=>(console.error(sV),!1),reset(){console.error(sV)}};function sH(e,t,r={}){let n=null,i=0;return function(...o){let s=Date.now();i||!1!==r.leading||(i=s);let a=t-(s-i),u=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(u,o)):n||!1===r.trailing||(n=setTimeout(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(u,o)},a))}}function sW(e,t,r,n,i=window){let o=i.Object.getOwnPropertyDescriptor(e,t);
1return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>sW(e,t,o||{},!0)}function sK(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(sz=new Proxy(sz,{get:(e,t,r)=>("map"===t&&console.error(sV),Reflect.get(e,t,r))}));let sG=Date.now;function s$(e){var t,r,n,i,o,s;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==a?void 0:a.documentElement.scrollLeft)||(null===(r=null===(t=null==a?void 0:a.body)||void 0===t?void 0:t.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===(n=null==a?void 0:a.body)||void 0===n?void 0:n.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null===(o=null===(i=null==a?void 0:a.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(s=null==a?void 0:a.body)||void 0===s?void 0:s.scrollTop)||0}}function sQ(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sJ(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sX(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function sY(e,t,r,n){if(!e)return!1;let i=sX(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t)||n&&null!==i.closest("."+t))return!0}else if(sR(i,t,n))return!0}catch(e){}return!!(r&&(i.matches(r)||n&&null!==i.closest(r)))}function sZ(e,t){return -2===t.getId(e)}function s0(e){return!!e.changedTouches}function s1(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function s2(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function s3(e){return!!(null==e?void 0:e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(sG=()=>new Date().getTime());class s4{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function s6(e){var t,r;let n=null;return(null===(r=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===r?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function s5(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let r=function(e){let t,r=e;for(;t=s6(r);)r=t;return r}(e);return t.contains(r)}(e))}let s8=e=>s?(...t)=>{try{return e(...t)}catch(e){if(s&&!0===s(e))return;throw e}}:e;function s7(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch(e){}throw e}}}class s9{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e),s=i.get(t);return s||(s=this.generateIdFn(),i.set(t,s),o.set(s,t)),s}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ae{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=ne
1w s9(sb),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new s9(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case sL.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:sL.IncrementalSnapshot,data:{source:sD.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case sL.Meta:case sL.Load:case sL.DomContentLoaded:return!1;case sL.Plugin:return t;case sL.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case sL.IncrementalSnapshot:switch(t.data.source){case sD.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case sD.Drag:case sD.TouchMove:case sD.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case sD.ViewportResize:return!1;case sD.MediaInteraction:case sD.MouseInteraction:case sD.Scroll:case sD.CanvasMutation:case sD.Input:return this.replaceIds(t.data,e,["id"]),t;case sD.StyleSheetRule:case sD.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case sD.Font:return t;case sD.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case sD.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(r=t.data.styles)||void 0===r||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}}replace(e,t,r,n){for(let i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===er.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class at{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;
1this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let ar=(e,t)=>`${e}@${t}`;class an{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new at,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{if(!i.parentNode||!s5(i)||"TEXTAREA"===i.parentNode.tagName)return;let o=su(i.parentNode)?this.mirror.getId(s6(i)):this.mirror.getId(i.parentNode),s=n(i);if(-1===o||-1===s)return r.addNode(i);let a=sP(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{s1(e,this.mirror)&&this.iframeManager.addIframe(e),s2(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),s3(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:o,nextId:s,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!ao(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)as(this.droppedSet,e)||ao(this.removes,e,this.mirror)?as(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let o=null;for(;r.length;){let e=null;if(o){let t=this.mirror.getId(o.value.parentNode),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(r.value.parentNode);if(-1===n(r.value))continue;if(-1!==t){e=r;break}{let t=r.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),i(e.value)}let s={texts:this.texts.map(e=>{let t=e.node;return t.parentNode&&"TEXTAREA"===t.parentNode.tagName&&this.genTextAreaValueMutation(t.parentNode),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(e.childNodes,e=>e.textContent||"").join("")},this.processMutation=e=>{if(!sZ(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;sY(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:sM(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t,sX(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let e=sg(t);n=sh({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(sY(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!sA(t.tagName,r)&&(i.attributes[r]=sO(this.doc,sp(t.tagName),sp(r),n),"style"===r)){let r;try{r=document.implementation.createHTMLDocument()}catch(e){r=this.doc}let n=r.createElement("span");for(let r of(e.oldValue&&n.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),o=t.style.getPropertyPriority(r);e!==n.style.getPropertyValue(r)||o!==n.style.getPropertyPriority(r)?""===o?i.styleDiff[r]=e:i.styleDiff[r]=[e,o]:i._unchangedStyles[r]=[e,o]}for(let e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(sY(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=su(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);sY(e.target,this.blockClass,this.blockSelector,!1)||sZ(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(ai(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(su(t))return!1;let n=r.getId(t);return!r.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ar(r,n)]?ai(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!!(su(e.target)&&sc(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(sZ(e,this.mirror))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[ar(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!sY(e,this.blockClass,this.blockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),s3(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ai(e,t){e.delete(t),t.childNodes.forEach(t=>ai(e,t))}function ao(e,t,r){return 0!==e.length&&function e(t,r,n){let{parentNode:i}=r;if(!i)return!1;let o=n.getId(i);return!!t.some(e=>e.id===o)||e(t,i,n)}(e,t,r)}function as(e,t){return 0!==e.size&&function e(t,r){let{parentNode:n}=r;return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let aa=[];function au(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function ac(e,t){var r,n;let i=new an;aa.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver,s=null===(n=null===(r=null==window?void 0:window.Zone)||void 0===r?void 0:r.__symbol__)||void 0===n?void 0:n.call(r,"MutationObserver");s&&window[s]&&(o=window[s]);let a=new o(s8(i.processMutations.bind(i)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function al({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){return sB("scroll",s8(sH(s8(o=>{let s=au(o);if(!s||sY(s,n,i,!0))return;let a=r.getId(s);if(s===t&&t.defaultView){let r=s$(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function ad(e,t){let r=Object.assign({},e);return t||delete r.userTriggered,r}let af=["INPUT","TEXTAREA","SELECT"],ah=new WeakMap;function ap(e){var t;return t=[],am("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||am("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||am("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||am("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function av(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function ag({mirror:e,stylesheetManager:t},r){var n,i,o;let s=null;s="#document"===r.nodeName?e.getId(r):e.getId(r.host);let a="#document"===r.nodeName?null===(n=r.defaultView)||void 0===n?void 0:n.Document:null===(o=null===(i=r.ownerDocument)||void 0===i?void 0:i.defaultView)||void 0===o?void 0:o.ShadowRoot,u=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&u?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var e;return null===(e=u.get)||void 0===e?void 0:e.call(this)},set(e){var r;let n=null===(r=u.set)||void 0===r?void 0:r.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return n}}),s8(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})})):()=>{}}function ay(e,t={}){let r;let n=e.doc.defaultView;if(!n)return()=>{};
1!function(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:l,canvasMutationCb:d,fontCb:f,selectionCb:h}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),u(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),l(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),f(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),h(...e)}}(e,t),e.recordDOM&&(r=ac(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let i;if(!1===t.mousemove)return()=>{};let o="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],u=sH(s8(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),s),c=s8(sH(s8(e=>{let t=au(e),{clientX:r,clientY:o}=s0(e)?e.changedTouches[0]:e;i||(i=sG()),a.push({x:r,y:o,id:n.getId(t),timeOffset:sG()-i}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?sD.Drag:e instanceof MouseEvent?sD.MouseMove:sD.TouchMove)}),o,{trailing:!1})),l=[sB("mousemove",c,r),sB("touchmove",c,r),sB("drag",c,r)];return s8(()=>{l.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let s=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[],u=null,c=t=>o=>{let s=au(o);if(sY(s,n,i,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=sj.Mouse;break;case"touch":a=sj.Touch;break;case"pen":a=sj.Pen}a===sj.Touch?sU[t]===sU.MouseDown?c="TouchStart":sU[t]===sU.MouseUp&&(c="TouchEnd"):sj.Pen}else s0(o)&&(a=sj.Touch);null!==a?(u=a,(c.startsWith("Touch")&&a===sj.Touch||c.startsWith("Mouse")&&a===sj.Mouse)&&(a=null)):sU[t]===sU.Click&&(a=u,u=null);let l=s0(o)?o.changedTouches[0]:o;if(!l)return;let d=r.getId(s),{clientX:f,clientY:h}=l;s8(e)(Object.assign({type:sU[c],id:d,x:f,y:h},null!==a&&{pointerType:a}))};return Object.keys(sU).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(e=>{let r=sp(e),n=c(e);if(window.PointerEvent)switch(sU[e]){case sU.MouseDown:case sU.MouseUp:r=r.replace("mouse","pointer");break;case sU.TouchStart:case sU.TouchEnd:return}a.push(sB(r,n,t))}),s8(()=>{a.forEach(e=>e())})}(e),s=al(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return sB("resize",s8(sH(s8(()=>{let t=sQ(),i=sJ();(r!==t||n!==i)&&(e({width:Number(i),height:Number(t)}),r=t,n=i)}),200)),t)}(e,{win:n}),u=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,ignoreSelector:s,maskInputOptions:a,maskInputFn:u,sampling:c,userTriggeredOnInput:l}){function d(e){let r=au(e),c=e.isTrusted,d=r&&r.tagName;if(r&&"OPTION"===d&&(r=r.parentElement),!r||!d||0>af.indexOf(d)||sY(r,n,i,!0)||r.classList.contains(o)||s&&r.matches(s))return;let h=r.value,p=!1,v=sg(r)||"";"radio"===v||"checkbox"===v?p=r.checked:(a[d.toLowerCase()]||a[v])&&(h=sh({element:r,maskInputOptions:a,tagName:d,type:v,value:h,maskInputFn:u})),f(r,s8(ad)({text:h,isChecked:p,userTriggered:c},l));let g=r.name;"radio"===v&&g&&p&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{e!==r&&f(e,s8(ad)({text:e.value,isChecked:!p,userTriggered:!1},l))})}function f(t,n){let i=ah.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){ah.set(t,n);let i=r.getId(t);s8(e)(Object.assign(Object.assign({},n),{id:i}))}}let h=("last"===c.input?["change"]:["input","change"]).map(e=>sB(e,s8(d),t)),p=t.defaultView;if(!p)return()=>
1{h.forEach(e=>e())};let v=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&h.push(...g.map(e=>sW(e[0],e[1],{set(){s8(d)({target:this,isTrusted:!1})}},!1,p))),s8(()=>{h.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:o}){let s=s8(o=>sH(s8(i=>{let s=au(i);if(!s||sY(s,t,r,!0))return;let{currentTime:a,volume:u,muted:c,playbackRate:l}=s;e({type:o,id:n.getId(s),currentTime:a,volume:u,muted:c,playbackRate:l})}),i.media||500)),a=[sB("play",s(0),o),sB("pause",s(1),o),sB("seeked",s(2),o),sB("volumechange",s(3),o),sB("ratechange",s(4),o)];return s8(()=>{a.forEach(e=>e())})}(e),l=()=>{},d=()=>{},f=()=>{},h=()=>{};e.recordDOM&&(l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let i,o;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:s8((n,i,o)=>{let[s,a]=o,{id:u,styleId:c}=av(i,t,r.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,adds:[{rule:s,index:a}]}),s7(()=>n.apply(i,o))()})});let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:s8((n,i,o)=>{let[s]=o,{id:a,styleId:u}=av(i,t,r.styleMirror);return(a&&-1!==a||u&&-1!==u)&&e({id:a,styleId:u,removes:[{index:s}]}),s7(()=>n.apply(i,o))()})}),n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:s8((n,i,o)=>{let[s]=o,{id:a,styleId:u}=av(i,t,r.styleMirror);return(a&&-1!==a||u&&-1!==u)&&e({id:a,styleId:u,replace:s}),n.apply(i,o)})})),n.CSSStyleSheet.prototype.replaceSync&&(o=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:s8((n,i,o)=>{let[s]=o,{id:a,styleId:u}=av(i,t,r.styleMirror);return(a&&-1!==a||u&&-1!==u)&&e({id:a,styleId:u,replaceSync:s}),n.apply(i,o)})}));let u={};ab("CSSGroupingRule")?u.CSSGroupingRule=n.CSSGroupingRule:(ab("CSSMediaRule")&&(u.CSSMediaRule=n.CSSMediaRule),ab("CSSConditionRule")&&(u.CSSConditionRule=n.CSSConditionRule),ab("CSSSupportsRule")&&(u.CSSSupportsRule=n.CSSSupportsRule));let c={};return Object.entries(u).forEach(([n,i])=>{c[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(c[n].insertRule,{apply:s8((n,i,o)=>{let[s,a]=o,{id:u,styleId:c}=av(i.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,adds:[{rule:s,index:[...ap(i),a||0]}]}),n.apply(i,o)})}),i.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:s8((n,i,o)=>{let[s]=o,{id:a,styleId:u}=av(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||u&&-1!==u)&&e({id:a,styleId:u,removes:[{index:[...ap(i),s]}]}),n.apply(i,o)})})}),s8(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),o&&(n.CSSStyleSheet.prototype.replaceSync=o),Object.entries(u).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:n}),d=ag(e,e.doc),f=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:s8((i,s,a)=>{var u;let[c,l,d]=a;if(r.has(c))return o.apply(s,[c,l,d]);let{id:f,styleId:h}=av(null===(u=s.parentRule)||void 0===u?void 0:u.parentStyleSheet,t,n.styleMirror);return(f&&-1!==f||h&&-1!==h)&&e({id:f,styleId:h,set:{property:c,value:l,priority:d},index:ap(s.parentRule)}),i.apply(s,a)})});let s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:s8((i,o,a)=>{var u;let[c]=a;if(r.has(c))return s.apply(o,[c]);let{id:l,styleId:d}=av(null===(u=o.parentRule)||void 0===u?void 0:u.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||d&&-1!==d)&&e({id:l,styleId:d,remove:{property:c},index:ap(o.parentRule)}),i.apply(o,a)})}),s8(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s})}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){let n=new o(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let s=sK(t.fonts,"add",function(t){return function(r){return setTimeout(s8(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=o}),n.push(s),s8(()=>
1{n.forEach(e=>e())})}(e)));let p=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e,s=!0,a=s8(()=>{let e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;let a=[],u=e.rangeCount||0;for(let t=0;t<u;t++){let{startContainer:o,startOffset:s,endContainer:u,endOffset:c}=e.getRangeAt(t);sY(o,n,i,!0)||sY(u,n,i,!0)||a.push({start:r.getId(o),startOffset:s,end:r.getId(u),endOffset:c})}o({ranges:a})});return a(),sB("selectionchange",a)}(e),v=[];for(let t of e.plugins)v.push(t.observer(t.callback,n,t.options));return s8(()=>{aa.forEach(e=>e.reset()),null==r||r.disconnect(),i(),o(),s(),a(),u(),c(),l(),d(),f(),h(),p(),v.forEach(e=>e())})}function am(e){return void 0!==window[e]}function ab(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var aw=(M=function(){!function(){/*! ***************************************************************************** 2 Copyright (c) Microsoft Corporation. 3 4 Permission to use, copy, modify, and/or distribute this software for any 5 purpose with or without fee is hereby granted. 6 7 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 12 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13 PERFORMANCE OF THIS SOFTWARE. 14 ***************************************************************************** */function e(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;var i=function(e){var r,n=new Uint8Array(e),i=n.length,o="";for(r=0;r<i;r+=3)o+=t[n[r]>>2]+t[(3&n[r])<<4|n[r+1]>>4]+t[(15&n[r+1])<<2|n[r+2]>>6]+t[63&n[r+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o};let o=new Map,s=new Map,a=self;a.onmessage=function(t){return e(this,void 0,void 0,function*(){if(!("OffscreenCanvas"in globalThis))return a.postMessage({id:t.data.id});{let{id:r,bitmap:n,width:u,height:c,dataURLOptions:l}=t.data,d=function(t,r,n){return e(this,void 0,void 0,function*(){let e=`${t}-${r}`;if(!("OffscreenCanvas"in globalThis))return"";{if(s.has(e))return s.get(e);let o=new OffscreenCanvas(t,r);o.getContext("2d");let a=yield o.convertToBlob(n),u=i((yield a.arrayBuffer()));return s.set(e,u),u}})}(u,c,l),f=new OffscreenCanvas(u,c);f.getContext("2d").drawImage(n,0,0),n.close();let h=yield f.convertToBlob(l),p=h.type,v=i((yield h.arrayBuffer()));if(!o.has(r)&&(yield d)===v)return o.set(r,v),a.postMessage({id:r});if(o.get(r)===v)return a.postMessage({id:r});a.postMessage({id:r,type:p,base64:v,width:u,height:c}),o.set(r,v)}})}}()},function(e){var t;return new Worker(N=N||(t=new Blob(function(e,t){var r=e.toString().split("\n");r.pop(),r.shift();for(var n=r[0].search(/\S/),i=/(['"])__worker_loader_strict__(['"])/g,o=0,s=r.length;o<s;++o)r[o]=r[o].substring(n).replace(i,"$1use strict$2")+"\n";return r}(M,null),{type:"application/javascript"}),URL.createObjectURL(t)),e)}),aS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",aE="undefined"==typeof Uint8Array?[]:new Uint8Array(256),aI=0;aI<aS.length;aI++)aE[aS.charCodeAt(aI)]=aI;var a_=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=aS[r[t]>>2]+aS[(3&r[t])<<4|r[t+1]>>4]+aS[(15&r[t+1])<<2|r[t+2]>>6]+aS[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let ak=new Map,ax=(e,t,r)=>{let n;if(!e||!(aC(e,t)||"object"==typeof e))return;let i=e.constructor.name,o=((n=ak.get(r))||(n=new Map,ak.set(r,n)),n.has(i)||n.set(i,[]),n.get(i)),s=o.indexOf(e);return -1===s&&(s=o.length,o.push(e)),s},aT=(e,t,r)=>[...e].map(e=>(function e(t,r,n){if(t instanceof Array)return t.map(t=>e(t,r,n));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:a_(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,r,n),t.byteOffset,t.byteLength]};else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:r}=t;return{rr_type:e,src:r}}else if(t instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,r,n),t.width,t.height]};else if(aC(t,r)||"object"==typeof t)return{rr_type:t.constructor.name,index:ax(t,r,n)};return t})(e,t,r)),aC=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function aO(e,t,r,n){let i=[];try{let o=sK(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i,...o){if(!sY(this,t,r,!0)){let e="experimental-webgl"===i?"webgl":i;if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e)){if(o[0]&&"object"==typeof o[0]){let e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[i,...o])}});i.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
14{i.forEach(e=>e())}}function aA(e,t,r,n,i,o,s){let a=[];for(let o of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if("function"!=typeof e[o])continue;let u=sK(e,o,function(e){return function(...a){let u=e.apply(this,a);if(ax(u,s,this),"tagName"in this.canvas&&!sY(this.canvas,n,i,!0)){let e=aT([...a],s,this),n={type:t,property:o,args:e};r(this.canvas,n)}return u}});a.push(u)}catch(i){let n=sW(e,o,{set(e){r(this.canvas,{type:t,property:o,args:[e],setter:!0})}});a.push(n)}return a}class aR{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:s})}initCanvasFPSObserver(e,t,r,n,i){let o;let s=aO(t,r,n,!0),a=new Map,u=new aw;u.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:r,type:n,width:i,height:o}=e.data;this.mutationCb({id:t,type:sq["2D"],commands:[{property:"clearRect",args:[0,0,i,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};let c=1e3/e,l=0,d=()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{sY(t,r,n,!0)||e.push(t)}),e},f=e=>{if(l&&e-l<c){o=requestAnimationFrame(f);return}l=e,d().forEach(e=>{var t,r,n,o;return t=this,r=void 0,n=void 0,o=function*(){var t;let r=this.mirror.getId(e);if(a.get(r))return;if(a.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);(null===(t=null==r?void 0:r.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)===!1&&r.clear(r.COLOR_BUFFER_BIT)}let n=yield createImageBitmap(e);u.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])},new(n||(n=Promise))(function(e,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(s,a)}u((o=o.apply(t,r||[])).next())})}),o=requestAnimationFrame(f)};o=requestAnimationFrame(f),this.resetObservers=()=>{s(),cancelAnimationFrame(o)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=aO(e,t,r,!1),i=function(e,t,r,n){let i=[];for(let o of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;let s=sK(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...s){return sY(this.canvas,r,n,!0)||setTimeout(()=>{let r=aT([...s],t,this);e(this.canvas,{type:sq["2D"],property:o,args:r})},0),i.apply(this,s)}});i.push(s)}catch(n){let r=sW(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:sq["2D"],property:o,args:[t],setter:!0})}});i.push(r)}return()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,n,i){let o=[];return o.push(...aA(t.WebGLRenderingContext.prototype,sq.WebGL,e,r,n,i,t)),void 0!==t.WebGL2RenderingContext&&o.push(...aA(t.WebGL2RenderingContext.prototype,sq.WebGL2,e,r,n,i,t)),()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r,this.mirror);this.resetObservers=()=>{n(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let n=r.map(e=>/*! ***************************************************************************** 15Copyright (c) Microsoft Corporation. 16 17Permission to use, copy, modify, and/or distribute this software for any 18purpose with or without fee is hereby granted. 19 20THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 21REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 22AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 23INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 24LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 25OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 26PERFORMANCE OF THIS SOFTWARE. 27***************************************************************************** */(function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r})(e,["type"])),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e)}}class aM{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}class aN{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!sc(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ac(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(al(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(ag({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(sK(e.prototype,"attachShadow",function(e){return function(n){let i=e.call(this,n);return this.shadowRoot&&s5(this)&&r.addShadowRoot(this.shadowRoot,t),i}}))}
27reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class aP{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new s4,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:sd(e),index:t}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function aL(e){return Object.assign(Object.assign({},e),{timestamp:sG()})}let aD=!1,aU=new sf;function aj(e={}){let t;let{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:o="rr-block",blockSelector:l=null,ignoreClass:d="rr-ignore",ignoreSelector:f=null,maskTextClass:h="rr-mask",maskTextSelector:p=null,inlineStylesheet:v=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:m,maskInputFn:b,maskTextFn:w,hooks:S,packFn:E,sampling:I={},dataURLOptions:_={},mousemoveWait:k,recordDOM:x=!0,recordCanvas:T=!1,recordCrossOriginIframes:C=!1,recordAfter:O="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:R=!1,inlineImages:M=!1,plugins:N,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:D}=e;s=D;let U=!C||window.parent===window,j=!1;if(!U)try{window.parent.document&&(j=!1)}catch(e){j=!0}if(U&&!r)throw Error("emit function is required");void 0!==k&&void 0===I.mousemove&&(I.mousemove=k),aU.reset();let q=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==y?y:{password:!0},F=!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===m,headMetaDescKeywords:"all"===m}:m||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let B=0,V=e=>{for(let t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return E&&!j&&(e=E(e)),e};a=(e,o)=>{var s;if((null===(s=aa[0])||void 0===s?void 0:s.isFrozen())&&e.type!==sL.FullSnapshot&&!(e.type===sL.IncrementalSnapshot&&e.data.source===sD.Mutation)&&aa.forEach(e=>e.unfreeze()),U)null==r||r(V(e),o);else if(j){let t={type:"rrweb",event:V(e),origin:window.location.origin,isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===sL.FullSnapshot)t=e,B=0;else if(e.type===sL.IncrementalSnapshot){if(e.data.source===sD.Mutation&&e.data.isAttachIframe)return;B++;let r=i&&B>=i,o=n&&e.timestamp-t.timestamp>n;(r||o)&&u(!0)}};let z=e=>{a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.Mutation},e)}))},H=e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.Scroll},e)})),W=e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.CanvasMutation},e)})),K=new aP({mutationCb:z,adoptedStyleSheetCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.AdoptedStyleSheet},e)}))}),G=new ae({mirror:aU,mutationCb:z,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:a});for(let e of N||[])e.getMirror&&e.getMirror({nodeMirror:aU,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});let $=new aM;c=new aR({recordCanvas:T,mutationCb:W,win:window,blockClass:o,blockSelector:l,mirror:aU,sampling:I.canvas,dataURLOptions:_});let Q=new aN({mutationCb:z,scrollCb:H,bypassOptions:{blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:q,dataURLOptions:_,maskTextFn:w,maskInputFn:b,recordCanvas:T,inlineImages:M,sampling:I,slimDOMOptions:F,iframeManager:G,stylesheetManager:K,
27canvasManager:c,keepIframeSrcFn:P,processedNodeManager:$},mirror:aU});u=(e=!1)=>{if(!x)return;a(aL({type:sL.Meta,data:{href:window.location.href,width:sJ(),height:sQ()}}),e),K.reset(),Q.init(),aa.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new sf,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:s=null,inlineStylesheet:a=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:l=!1,maskTextFn:d,maskInputFn:f,slimDOM:h=!1,dataURLOptions:p,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:m,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:S=()=>!1}=t||{};return sP(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:s,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===l?{password:!0}:l,maskTextFn:d,maskInputFn:f,slimDOMOptions:!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===h,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===h?{}:h,dataURLOptions:p,inlineImages:u,recordCanvas:c,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:m,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:aU,blockClass:o,blockSelector:l,maskTextClass:h,maskTextSelector:p,inlineStylesheet:v,maskAllInputs:q,maskTextFn:w,maskInputFn:b,slimDOM:F,dataURLOptions:_,recordCanvas:T,inlineImages:M,onSerialize:e=>{s1(e,aU)&&G.addIframe(e),s2(e,aU)&&K.trackLinkElement(e),s3(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");a(aL({type:sL.FullSnapshot,data:{node:t,initialOffset:s$(window)}}),e),aa.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,aU.getId(document))};try{let e=[],t=e=>{var t;return s8(ay)({mutationCb:z,mousemoveCb:(e,t)=>a(aL({type:sL.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.MouseInteraction},e)})),scrollCb:H,viewportResizeCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.ViewportResize},e)})),inputCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.Input},e)})),mediaInteractionCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.MediaInteraction},e)})),styleSheetRuleCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.StyleSheetRule},e)})),styleDeclarationCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.StyleDeclaration},e)})),canvasMutationCb:W,fontCb:e=>a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.Font},e)})),selectionCb:e=>{a(aL({type:sL.IncrementalSnapshot,data:Object.assign({source:sD.Selection},e)}))},blockClass:o,ignoreClass:d,ignoreSelector:f,maskTextClass:h,maskTextSelector:p,maskInputOptions:q,inlineStylesheet:v,sampling:I,recordDOM:x,recordCanvas:T,inlineImages:M,userTriggeredOnInput:A,collectFonts:R,doc:e,maskInputFn:b,maskTextFn:w,keepIframeSrcFn:P,blockSelector:l,slimDOMOptions:F,dataURLOptions:_,mirror:aU,iframeManager:G,stylesheetManager:K,shadowDomManager:Q,processedNodeManager:$,canvasManager:c,ignoreCSSAttributes:L,plugins:(null===(t=null==N?void 0:N.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>a(aL({type:sL.Plugin,data:{plugin:e.name,payload:t}}))})))||[]},S)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{u(),e.push(t(document)),aD=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(sB("DOMContentLoaded",()=>{a(aL({type:sL.DomContentLoaded,data:{}})),"DOMContentLoaded"===O&&r()})),e.push(sB("load",()=>{a(aL({type:sL.Load,data:{}})),"load"===O&&r()}
27,window))),()=>{e.forEach(e=>e()),$.destroy(),aD=!1,s=void 0}}catch(e){console.warn(e)}}aj.addCustomEvent=(e,t)=>{if(!aD)throw Error("please add custom event after start recording");a(aL({type:sL.Custom,data:{tag:e,payload:t}}))},aj.freezePage=()=>{aa.forEach(e=>e.freeze())},aj.takeFullSnapshot=e=>{if(!aD)throw Error("please take full snapshot after start recording");u(e)},aj.mirror=aU;var aq="medium";(P=en||(en={}))[P.Document=0]="Document",P[P.DocumentType=1]="DocumentType",P[P.Element=2]="Element",P[P.Text=3]="Text",P[P.CDATA=4]="CDATA",P[P.Comment=5]="Comment",RegExp(/(max|min)-device-(width|height)/.source,"g"),RegExp(/([^\\]):hover/.source,"g");var aF=function(e,t,r){switch(t){case"light":if("input"!==e)return!0;var n=r?function(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";if(!n)return!1;if(["password","hidden","email","tel"].includes(n)||r.autocomplete.startsWith("cc-"))return!0;return!1;case"medium":case"conservative":return!0;default:return aF(e,aq,r)}},aB=function(e,t,r){var n,i,o;if(void 0===t&&(t={defaultMaskLevel:aq}),r){if(r.closest("."+so)||(null!==(n=t.maskSelector)&&void 0!==n?n:[]).some(function(e){return r.closest(e)}))return!0;if(r.closest(".amp-unmask")||(null!==(i=t.unmaskSelector)&&void 0!==i?i:[]).some(function(e){return r.closest(e)}))return!1}return aF(e,null!==(o=t.defaultMaskLevel)&&void 0!==o?o:aq,r)},aV=function(e,t){return function(r,n){return aB(e,t,n)?r.replace(/[^\s]/g,"*"):r}},az=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return t},aH=function(){var e=tl();return(null==e?void 0:e.location)?e.location.href:""},aW=function(e){return e===Q.STAGING?"https://api-sr.stag2.amplitude.com/sessions/v2/track":e===Q.EU?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track"},aK=function(){return em(void 0,void 0,void 0,function(){var e,t,r,n;return eb(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),!(e=tl()))return[3,2];return[4,e.navigator.storage.estimate()];case 1:return r=(t=i.sent()).usage,n=t.quota,[2,{totalStorageSize:r?Math.round(r/1024):0,percentOfQuota:r&&n?Math.round((r/n+Number.EPSILON)*1e3)/1e3:0,usageDetails:JSON.stringify(t.usageDetails)}];case 2:return[3,4];case 3:return i.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},aG=function(e){var t=eg({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},a$=function(e,t){var r=document.createDocumentFragment(),n=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),0!==(e=e.filter(function(e){try{r.querySelector(e)}catch(r){return t.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0})).length)return e};return e.blockSelector=n(e.blockSelector),e.maskSelector=n(e.maskSelector),e.unmaskSelector=n(e.unmaskSelector),e},aQ=function(){function e(e,t){this.localConfig=t,this.remoteConfigFetch=e}return e.prototype.generateJoinedConfig=function(e){var t,r,n;return em(this,void 0,void 0,function(){var i,o,s,a,u,c,l,d,f,h,p,v,g,y,m,b,w,S,E;return eb(this,function(I){switch(I.label){case 0:(i=eg({},this.localConfig)).optOut=this.localConfig.optOut,i.captureEnabled=!0,I.label=1;case 1:return I.trys.push([1,5,,6]),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_sampling_config",e)];case 2:return s=I.sent(),[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_privacy_config",e)];case 3:return a=I.sent(),u=i,[4,this.remoteConfigFetch.getRemoteConfig("sessionReplay","sr_interaction_config",e)];case 4:return u.interactionConfig=I.sent(),(s||a)&&(o={},s&&(o.sr_sampling_config=s),a&&(o.sr_privacy_config=a)),[3,6];case 5:return c=I.sent(),this.localConfig.loggerProvider.warn(c.message),i.captureEnabled=!1,[3,6];case 6:if(!o)return[2,i];if(l=o.sr_sampling_config,d=o.sr_privacy_config,l&&Object.keys(l).length>0?(Object.prototype.hasOwnProperty.call(l,"capture_enabled")?i.captureEnabled=l.capture_enabled:i.captureEnabled=!1,Object.prototype.hasOwnProperty.call(l,"sample_rate")&&(i.sampleRate=l.s
27ample_rate)):(i.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),d){f=null!==(t=i.privacyConfig)&&void 0!==t?t:{},h={defaultMaskLevel:null!==(n=null!==(r=d.defaultMaskLevel)&&void 0!==r?r:f.defaultMaskLevel)&&void 0!==n?n:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[]},v=eg(eg({},(p=function(e){var t,r,n,i,o,s,a,u,c,l={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=ew(null!==(a=e.blockSelector)&&void 0!==a?a:[]),f=d.next();!f.done;f=d.next()){var h=f.value;l[h]="block"}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var p=ew(null!==(u=e.maskSelector)&&void 0!==u?u:[]),v=p.next();!v.done;v=p.next()){var h=v.value;l[h]="mask"}}catch(e){n={error:e}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}try{for(var g=ew(null!==(c=e.unmaskSelector)&&void 0!==c?c:[]),y=g.next();!y.done;y=g.next()){var h=y.value;l[h]="unmask"}}catch(e){o={error:e}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(o)throw o.error}}return l})(f)),p(d));try{for(y=(g=ew(Object.entries(v))).next();!y.done;y=g.next())b=(m=eS(y.value,2))[0],w=m[1],"mask"===w?h.maskSelector.push(b):"block"===w?h.blockSelector.push(b):"unmask"===w&&h.unmaskSelector.push(b)}catch(e){S={error:e}}finally{try{y&&!y.done&&(E=g.return)&&E.call(g)}finally{if(S)throw S.error}}i.privacyConfig=a$(h,this.localConfig.loggerProvider)}return this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:aG(i)},null,2)),[2,i]}})})},e}(),aJ="Failed to store session replay events in IndexedDB",aX="1.15.0",aY=function(){function e(e){var t=e.loggerProvider,r=e.payloadBatcher;this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.loggerProvider=t,this.payloadBatcher=r||function(e){return e}}return e.prototype.sendEventsList=function(e){this.addToQueue(eg(eg({},e),{attempts:0,timeout:0}))},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.filter(function(t){return t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:"Session replay event batch rejected due to exceeded retry count"}),!1)}).forEach(function(t){if(e.queue=e.queue.concat(t),0===t.timeout){e.schedule(0);return}setTimeout(function(){t.timeout=0,e.schedule(0)},t.timeout)})},e.prototype.schedule=function(e){var t=this;this.scheduled||(this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),em(this,void 0,void 0,function(){var t,r,n=this;return eb(this,function(i){switch(i.label){case 0:return t=[],r=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):r.push(e)}),this.queue=r,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),[4,Promise.all(t.map(function(t){return n.send(t,e)}))];case 1:return i.sent(),[2]}})})},e.prototype.send=function(e,t){var r,n;return void 0===t&&(t=!0),em(this,void 0,void 0,function(){var i,o,s,a,u,c,l,d,f,h,p,v;return eb(this,function(g){switch(g.label){case 0:if(!(i=e.apiKey))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})];if(!(o=e.deviceId))return[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})];if(s=aH(),a=aX,u=e.sampleRate,c=new URLSearchParams({device_id:o,session_id:"".concat(e.sessionId),type:"".concat(e.type)}),l="".concat((null===(r=e.version)||void 0===r?void 0:r.type)||"standalone","/").concat((null===(n=e.version)||void 0===n?void 0:n.version)||a),0===(d=this.payloadBatcher({version:1,events:e.events})).events.length)return this.completeRequest({context:e}),[2];g.label=1;case 1:return g.trys.push([1,3,,4]),f={headers:{"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(i),"X-Client-Version":a,"X-Client-Library":l,"X-Client-Url":s,"X-Client-Sample-Rate":"".concat(u)},body:JSON.stringify(d),method:"POST"},[4,fetch("".concat(aW(e.serverZone),"?").concat(c.toString()),f)];case 2:if(null===(h=g.sent()))return this.completeRequest({context:e,err:"Unexpected error occurred"}),[2];if(t)this.handleReponse(h.status,e);else{p="";try{p=JSON.stringify(h.body,null,2)}catch(e){}this.completeRequest({context:e,success:"".concat(h.status,": ").concat(p)})}return[3,4];case 3:return v=g.sent(),this.completeRequest({context:e,err:v}),[3,4];case 4:return[2]}})})},e.prototype.handleReponse=function(e,t){switch(new tB().buildStatus(e)){case W.Success:this.handleSuccessResponse(t);break;case W.Failed:this.handleOtherResponse(t);break;default:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"})}},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/1024);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){this.addToQueue(eg(eg({},e),{timeout:e.attempts*this.retryTimeout}))},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,n=e.success;t.onComplete(),r?this.loggerProvider.warn(r):n&&this.loggerProvider.log(n)},e}();let aZ=(e,t)=>t.some(t=>e instanceof t),a0=new WeakMap,a1=new WeakMap,a2=new WeakMap,a3={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return a0.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return a4(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function a4(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",o)},i=()=>{t(a4(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",o)});return a2.set(t,e),t}(e);if(a1.has(e))return a1.get(e);
27let r="function"==typeof(t=e)?(d||(d=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(a6(this),e),a4(this.request)}:function(...e){return a4(t.apply(a6(this),e))}:(t instanceof IDBTransaction&&function(e){if(a0.has(e))return;let t=new Promise((t,r)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",o),e.removeEventListener("abort",o)},i=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",o),e.addEventListener("abort",o)});a0.set(e,t)}(t),aZ(t,l||(l=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,a3):t;return r!==e&&(a1.set(e,r),a2.set(r,e)),r}let a6=e=>a2.get(e),a5=["get","getKey","getAll","getAllKeys","count"],a8=["put","add","delete","clear"],a7=new Map;function a9(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(a7.get(t))return a7.get(t);let r=t.replace(/FromIndex$/,""),n=t!==r,i=a8.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||a5.includes(r)))return;let o=async function(e,...t){let o=this.transaction(e,i?"readwrite":"readonly"),s=o.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[r](...t),i&&o.done]))[0]};return a7.set(t,o),o}a3={...h=a3,get:(e,t,r)=>a9(e,t)||h.get(e,t,r),has:(e,t)=>!!a9(e,t)||h.has(e,t)};let ue=["continue","continuePrimaryKey","advance"],ut={},ur=new WeakMap,un=new WeakMap,ui={get(e,t){if(!ue.includes(t))return e[t];let r=ut[t];return r||(r=ut[t]=function(...e){ur.set(this,un.get(this)[t](...e))}),r}};async function*uo(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;let r=new Proxy(t,ui);for(un.set(r,t),a2.set(r,a6(t));t;)yield r,t=await (ur.get(r)||t.continue()),ur.delete(r)}function us(e,t){return t===Symbol.asyncIterator&&aZ(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&aZ(e,[IDBIndex,IDBObjectStore])}a3={...p=a3,get:(e,t,r)=>us(e,t)?uo:p.get(e,t,r),has:(e,t)=>us(e,t)||p.has(e,t)};var ua=function(){function e(e){var t,r,n,i=this;this.minInterval=500,this.maxInterval=1e4,this.maxPersistedEventsSize=1e6,this.interval=this.minInterval,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=new Blob([t]).size;return new Blob(e).size+r>=i.maxPersistedEventsSize||Date.now()-i.timeAtLastSplit>i.interval&&!!e.length&&(i.interval=Math.min(i.maxInterval,i.interval+i.minInterval),i._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(n=e.maxPersistedEventsSize)&&void 0!==n?n:this.maxPersistedEventsSize}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e}();(L=ei||(ei={})).RECORDING="recording",L.SENT="sent";var uu="sessionCurrentSequence",uc="sequencesToSend",ul=function(){var e=tl();return new Promise(function(t,r){if(!e)return r(Error("Global scope not found"));if(!e.indexedDB)return r(Error("Session Replay: cannot find indexedDB"));try{var n=e.indexedDB.open("keyval-store");n.onupgradeneeded=function(){1===n.result.version&&(n.result.close(),n.transaction&&n.transaction.abort(),e.indexedDB.deleteDatabase("keyval-store"),t())},n.onsuccess=function(){t(n.result)}}catch(e){r(e)}})},ud=function(e){return em(void 0,void 0,void 0,function(){return eb(this,function(t){switch(t.label){case 0:if(!(e.length>0))return[3,2];return[4,Promise.all(e.splice(0,10))];case 1:return t.sent(),[3,0];case 2:return[2]}})})},uf=function(e){var t,r;return e.objectStoreNames.contains(uu)||(r=e.createObjectStore(uu,{keyPath:"sessionId"})),e.objectStoreNames.contains(uc)||(t=e.createObjectStore(uc,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},uh=function(e){function t(t){var r=e.call(this,t)||this;return r.getSequencesToSend=function(){return em(r,void 0,void 0,function(){var e,t,r,n,i,o;return eb(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),e=[],[4,this.db.transaction("sequencesToSend").store.openCursor()];case 1:t=s.sent(),s.label=2;case 2:if(!t)return[3,4];return n=(r=t.value).sessionId,i=r.events,e.push({events:i,sequenceId:t.key,sessionId:n}),[4,t.continue()];case 3:return t=s.sent(),[3,2];case 4:return[2,e];case 5:return o=s.sent(),this.loggerProvider.warn("".concat(aJ,": ").concat(o)),[3,6];case 6:return[2,void 0]}})})},r.storeCurrentSequence=function(e){return em(r,void 0,void 0,function(){var t,r,n;return eb(this,function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.db.get(uu,e)];case 1:if(!(t=i.sent()))return[2,void 0];return[4,this.db.put(uc,{sessionId:e,events:t.events})];case 2:return r=i.sent(),[4,this.db.put(uu,{sessionId:e,events:[]})];case 3:return i.sent(),[2,eg(eg({},t),{sessionId:e,sequenceId:r})];case 4:return n=i.sent(),this.loggerProvider.warn("".concat(aJ,": ").concat(n)),[3,5];case 5:return[2,void 0]}})})},r.addEventToCurrentSequence=function(e,t){return em(r,void 0,void 0,function(){var r,n,i,o,s,a;return eb(this,function(u){switch(u.label){case 0:return u.trys.push([0,10,,11]),[4,(r=this.db.transaction(uu,"readwrite")).store.get(e)];case 1:if(n=u.sent())return[3,3];return[4,r.store.put({sessionId:e,events:[t]})];case 2:return u.sent(),[2];case 3:if(i=void 0,!this.shouldSplitEventsList(n.events,t))return[3,5];return i=n.events,[4,r.store.put({sessionId:e,events:[t]})];case 4:return u.sent(),[3,7];case 5:return o=n.events.concat(t),[4,r.store.put({sessionId:e,events:o})];case 6:u.sent(),u.label=7;case 7:return[4,r.done];case 8:if(u.sent(),!i)return[2,void 0];return[4,this.storeSendingEvents(e,i)];case 9:if(!(s=u.sent()))return[2,void 0];return[2,{events:i,sessionId:e,sequenceId:s}];case 10:return a=u.sent(),this.loggerProvider.warn("".concat(aJ,": ").concat(a)),[3,11];case 11:return[2,void 0]}})})},r.storeSendingEvents=function(e,t){return em(r,void 0,void 0,function(){var r;return eb(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.db.put(uc,{sessionId:e,events:t})];case 1:return[2,n.sent()];case 2:return r=n.sent(),this.loggerProvider.warn("".concat(aJ,": ").concat(r)),[3,3];case 3:return[2,void 0]}})})},r.cleanUpSessionEventsStore=function(e,t){return em(r,void 0,void 0,function(){var e;return eb(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete(uc,t)];case 2:return r.sent(),[3,4];case 3:return e=r.sent(),this.loggerProvider.warn("".concat(aJ,": ").concat(e)),[3,4];case 4:return[2]}})})},r.transitionFromKeyValStore=function(e){return em(r,void 0,void 0,function(){var t,r,n,i,o,s,a,u=this;return eb(this,function(c){switch(c.label){case 0:return c.trys.push([0,6,,7]),[4,ul()];case 1:if(!(t=c.sent()))return[2];r=function(e,t){return em(u,void 0,void 0,function(){var r,n,i=this;return eb(this,function(o){switch(o.label){case 0:return r=t.sessionSequences,n=[],Object.keys(r).forEach(function(o){var s=parseInt(o,10),a=r[s];if(s===t.currentSequenceId){var u=a.events.map(function(t){return em(i,void 0,void 0,function(){return eb(this,function(r){return[2,this.addEventToCurrentSequence(e,t)]})})});n.concat(u)}else a.status!==ei.SENT&&n.push(i.storeSendingEvents(e,a.events))}),[4,ud(n)];case 1:return o.sent(),[2]}})})},n="".concat(eO,"_").concat(this.apiKey.substring(0,10)),c.label=2;case 2:return c.trys.push([2,4,,5]),i=t.transaction("keyval").objectStore("keyval").getAll(n),[4,new Promise(function(t){i.onsuccess=function(n){return em(u,void 0,void 0,function(){var i,o,s,a=this;return eb(this,function(u){switch(u.label){case 0:if(!(o=(i=n&&n.target.result)&&i[0]))return[3,2];
27return s=[],Object.keys(o).forEach(function(t){var n=parseInt(t,10),i=o[n];if(e===n)s.push(r(n,i));else{var u=i.sessionSequences;Object.keys(u).forEach(function(e){var t=parseInt(e,10);u[t].status!==ei.SENT&&s.push(a.storeSendingEvents(n,u[t].events))})}}),[4,ud(s)];case 1:u.sent(),u.label=2;case 2:return t(),[2]}})})}})];case 3:return c.sent(),(o=tl())&&o.indexedDB.deleteDatabase("keyval-store"),[3,5];case 4:return s=c.sent(),this.loggerProvider.warn("Failed to transition session replay events from keyval to new store: ".concat(s)),[3,5];case 5:return[3,7];case 6:return a=c.sent(),this.loggerProvider.warn("Failed to access keyval store: ".concat(a,". For more information, visit: https://www.docs.developers.amplitude.com/session-replay/sdks/standalone/#indexeddb-best-practices")),[3,7];case 7:return[2]}})})},r.apiKey=t.apiKey,r.db=t.db,r}return ev(t,e),t.new=function(e,r,n){return em(this,void 0,void 0,function(){var i,o,s,a;return eb(this,function(u){switch(u.label){case 0:var c;return u.trys.push([0,3,,4]),i="replay"===e?"":"_".concat(e),[4,(c="".concat(r.apiKey.substring(0,10),"_amp_session_replay_events").concat(i),em(void 0,void 0,void 0,function(){return eb(this,function(e){switch(e.label){case 0:return[4,function(e,t,{blocked:r,upgrade:n,blocking:i,terminated:o}={}){let s=indexedDB.open(e,1),a=a4(s);return n&&s.addEventListener("upgradeneeded",e=>{n(a4(s.result),e.oldVersion,e.newVersion,a4(s.transaction),e)}),r&&s.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}(c,0,{upgrade:uf})];case 1:return[2,e.sent()]}})}))];case 1:return o=u.sent(),[4,(s=new t(eg(eg({},r),{db:o}))).transitionFromKeyValStore(n)];case 2:return u.sent(),[2,s];case 3:return a=u.sent(),r.loggerProvider.warn("".concat(aJ,": ").concat(a)),[3,4];case 4:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return em(this,void 0,void 0,function(){var t,r,n,i,o,s;return eb(this,function(a){switch(a.label){case 0:if(!e)return[3,2];return[4,this.db.get("sessionCurrentSequence",e)];case 1:if(!(t=a.sent()))return[2,void 0];return[2,[t]];case 2:r=[],a.label=3;case 3:return a.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:i=(n=ew.apply(void 0,[a.sent()])).next(),a.label=5;case 5:if(i.done)return[3,7];t=i.value,r.push(t),a.label=6;case 6:return i=n.next(),[3,5];case 7:return[3,10];case 8:return o={error:a.sent()},[3,10];case 9:try{i&&!i.done&&(s=n.return)&&s.call(n)}finally{if(o)throw o.error}return[7];case 10:return[2,r]}})})},t}(ua),up=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t}return ev(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=eE([],eS(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.getSequencesToSend=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return[2,Object.entries(this.finalizedSequences).map(function(e){var t=eS(e,2),r=t[0],n=t[1],i=n.sessionId,o=n.events;return{sequenceId:Number(r),sessionId:i,events:o}})]})})},t.prototype.storeCurrentSequence=function(e){return em(this,void 0,void 0,function(){return eb(this,function(t){return this.sequences[e]?[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return em(this,void 0,void 0,function(){var r;return eb(this,function(n){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(r=this.addSequence(e)),this.sequences[e].push(t),[2,r]})})},t.prototype.storeSendingEvents=function(e,t){return em(this,void 0,void 0,function(){return eb(this,function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return em(this,void 0,void 0,function(){return eb(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(ua),uv=function(e){var t=e.config,r=e.sessionId,n=e.minInterval,i=e.maxInterval,o=e.type,s=e.payloadBatcher,a=e.storeType;return em(void 0,void 0,void 0,function(){var e,u,c,l,d,f;function h(t){return void 0===t&&(t=!1),em(this,void 0,void 0,function(){return eb(this,function(r){return[2,e.flush(t)]})})}return eb(this,function(p){switch(p.label){case 0:if(e=new aY({loggerProvider:t.loggerProvider,payloadBatcher:s}),u=function(){return new up({loggerProvider:t.loggerProvider,maxInterval:i,minInterval:n})},c=function(){return em(void 0,void 0,void 0,function(){var e;return eb(this,function(s){switch(s.label){case 0:return[4,uh.new(o,{loggerProvider:t.loggerProvider,minInterval:n,maxInterval:i,apiKey:t.apiKey},r)];case 1:return e=s.sent(),t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,null!=e?e:u()]}})})},"idb"!==a)return[3,2];return[4,c()];case 1:return d=p.sent(),[3,3];case 2:d=u(),p.label=3;case 3:return l=d,f=function(r){var n=r.events,i=r.sessionId,s=r.deviceId,a=r.sequenceId;t.debugMode&&aK().then(function(e){var r=e.totalStorageSize,n=e.percentOfQuota,i=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(n,"%, usage details: ").concat(i))}).catch(function(){}),e.sendEventsList({events:n,sessionId:i,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:s,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:o,onComplete:function(){return em(void 0,void 0,void 0,function(){return eb(this,function(e){switch(e.label){case 0:return[4,l.cleanUpSessionEventsStore(i,a)];case 1:return e.sent(),[2]}})})}})},[2,{sendCurrentSequenceEvents:function(e){var r=e.sessionId,n=e.deviceId;l.storeCurrentSequence(r).then(function(e){e&&f({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})}).catch(function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})},addEvent:function(e){var r=e.event,n=e.sessionId,i=e.deviceId;l.addEventToCurrentSequence(n,r.data).then(function(e){return e&&f({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:i})}).catch(function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)})},sendStoredEvents:function(e){var t=e.deviceId;return em(void 0,void 0,void 0,function(){var e;return eb(this,function(r){switch(r.label){case 0:return[4,l.getSequencesToSend()];case 1:return(e=r.sent())&&e.forEach(function(e){f({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:t})}),[2]}})})},flush:h}]}})})},ug=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach(function(e){r.set(e.name,e.manager)}),this.managers=r}return e.prototype.sendStoredEvents=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEac
27h(function(r){t.push(r.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,r=e.sessionId,n=e.event,i=e.deviceId;null===(t=this.managers.get(n.type))||void 0===t||t.addEvent({sessionId:r,event:n,deviceId:i})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})})},e.prototype.flush=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEach(function(r){t.push(r.flush(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e}(),uy=((D=uy||{})[D.DomContentLoaded=0]="DomContentLoaded",D[D.Load=1]="Load",D[D.FullSnapshot=2]="FullSnapshot",D[D.IncrementalSnapshot=3]="IncrementalSnapshot",D[D.Meta=4]="Meta",D[D.Custom=5]="Custom",D[D.Plugin=6]="Plugin",D),um=((U=um||{})[U.Mutation=0]="Mutation",U[U.MouseMove=1]="MouseMove",U[U.MouseInteraction=2]="MouseInteraction",U[U.Scroll=3]="Scroll",U[U.ViewportResize=4]="ViewportResize",U[U.Input=5]="Input",U[U.TouchMove=6]="TouchMove",U[U.MediaInteraction=7]="MediaInteraction",U[U.StyleSheetRule=8]="StyleSheetRule",U[U.CanvasMutation=9]="CanvasMutation",U[U.Font=10]="Font",U[U.Log=11]="Log",U[U.Drag=12]="Drag",U[U.StyleDeclaration=13]="StyleDeclaration",U[U.Selection=14]="Selection",U[U.AdoptedStyleSheet=15]="AdoptedStyleSheet",U[U.CustomElement=16]="CustomElement",U),ub=((j=ub||{})[j.MouseUp=0]="MouseUp",j[j.MouseDown=1]="MouseDown",j[j.Click=2]="Click",j[j.ContextMenu=3]="ContextMenu",j[j.DblClick=4]="DblClick",j[j.Focus=5]="Focus",j[j.Blur=6]="Blur",j[j.TouchStart=7]="TouchStart",j[j.TouchMove_Departed=8]="TouchMove_Departed",j[j.TouchEnd=9]="TouchEnd",j[j.TouchCancel=10]="TouchCancel",j),uw=((q=uw||{})[q.Mouse=0]="Mouse",q[q.Pen=1]="Pen",q[q.Touch=2]="Touch",q),uS=((F=uS||{})[F["2D"]=0]="2D",F[F.WebGL=1]="WebGL",F[F.WebGL2=2]="WebGL2",F),uE=((B=uE||{})[B.Play=0]="Play",B[B.Pause=1]="Pause",B[B.Seeked=2]="Seeked",B[B.VolumeChange=3]="VolumeChange",B[B.RateChange=4]="RateChange",B),uI=((V=uI||{}).Start="start",V.Pause="pause",V.Resume="resume",V.Resize="resize",V.Finish="finish",V.FullsnapshotRebuilded="fullsnapshot-rebuilded",V.LoadStylesheetStart="load-stylesheet-start",V.LoadStylesheetEnd="load-stylesheet-end",V.SkipStart="skip-start",V.SkipEnd="skip-end",V.MouseInteraction="mouse-interaction",V.EventCast="event-cast",V.CustomEvent="custom-event",V.Flush="flush",V.StateChange="state-change",V.PlayBack="play-back",V.Destroy="destroy",V);function u_(e,t,r){for(var n=null,i=[],o=e,s=0;o&&"break"!==function(){var e,a,u,c,l=new Date().getTime()-ea.getTime();if(void 0!==eo.timeoutMs&&l>eo.timeoutMs)throw Error("Timeout: Can't find a unique selector after ".concat(l,"ms"));var d=uM((e=o.getAttribute("id"))&&eo.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null)||uM.apply(void 0,eE([],eS(Array.from(o.attributes).filter(function(e){return eo.attr(e.name,e.value)}).map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})),!1))||uM.apply(void 0,eE([],eS(Array.from(o.classList).filter(eo.className).map(function(e){return{name:"."+CSS.escape(e),penalty:1}})),!1))||uM((a=o.tagName.toLowerCase(),eo.tagName(a)?{name:a,penalty:2}:null))||[uO()],f=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;for(var n=0;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}(o);if("all"==t)f&&(d=d.concat(d.filter(uR).map(function(e){return uA(e,f)})));else if("two"==t)d=d.slice(0,1),f&&(d=d.concat(d.filter(uR).map(function(e){return uA(e,f)})));else if("one"==t){var h=eS(d=d.slice(0,1),1)[0];f&&uR(h)&&(d=[uA(h,f)])}else"none"==t&&(d=[uO()],f&&(d=[uA(d[0],f)]));try{for(var p=(u=void 0,ew(d)),v=p.next();!v.done;v=p.next()){var h=v.value;h.level=s}}catch(e){u={error:e}}finally{try{v&&!v.done&&(c=p.return)&&c.call(p)}finally{if(u)throw u.error}}if(i.push(d),i.length>=eo.seedMinLength&&(n=uk(i,r)))return"break";o=o.parentElement,s++}(););return(n||(n=uk(i,r)),!n&&r)?r():n}function uk(e,t){var r,n,i=uP(function e(t,r){var n,i,o,s,a;return void 0===r&&(r=[]),eb(this,function(u){switch(u.label){case 0:if(!(t.length>0))return[3,9];u.label=1;case 1:u.trys.push([1,6,7,8]),i=(n=ew(t[0])).next(),u.label=2;case 2:if(i.done)return[3,5];return o=i.value,[5,ew(e(t.slice(1,t.length),r.concat(o)))];case 3:u.sent(),u.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s={error:u.sent()},[3,8];case 7:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}
27return[7];case 8:return[3,11];case 9:return[4,r];case 10:u.sent(),u.label=11;case 11:return[2]}})}(e));if(i.length>eo.threshold)return t?t():null;try{for(var o=ew(i),s=o.next();!s.done;s=o.next()){var a=s.value;if(uC(a))return a}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function ux(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var i=e[n].level||0;r=t.level===i-1?"".concat(e[n].name," > ").concat(r):"".concat(e[n].name," ").concat(r),t=e[n]}return r}function uT(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function uC(e){var t=ux(e);switch(es.querySelectorAll(t).length){case 0:throw Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function uO(){return{name:"*",penalty:3}}function uA(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function uR(e){return"html"!==e.name&&!e.name.startsWith("#")}function uM(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(uN);return r.length>0?r:null}function uN(e){return null!=e}function uP(e){return eE([],eS(e),!1).sort(function(e,t){return uT(e)-uT(t)})}var uL=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&n.push(t)}),{version:t,events:n}},uD=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)}),{version:t,events:Object.values(n.reduce(function(e,t){var r=t.x,n=t.y,i=t.selector,o=t.timestamp,s=o-o%36e5,a="".concat(r,":").concat(n,":").concat(null!=i?i:"",":").concat(s);return e[a]?e[a].count+=1:e[a]=eg(eg({},t),{timestamp:s,count:1}),e},{}))}},uU=function(e){var t=e.eventsManager,r=e.sessionId,n=e.deviceIdFn;return function(e){if(e.type===ub.Click){var i,o=tl();if(o){var s=o.location,a=o.innerHeight,u=o.innerWidth;if(s){var c=e.x,l=e.y,d=aj.mirror.getNode(e.id);d&&(i=function(e,t){if(ea=new Date,e.nodeType!==Node.ELEMENT_NODE)throw Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r,n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};es=(r=(eo=eg(eg({},n),void 0)).root).nodeType===Node.DOCUMENT_NODE?r:r===n.root?r.ownerDocument:r;var i=u_(e,"all",function(){return u_(e,"two",function(){return u_(e,"one",function(){return u_(e,"none")})})});if(i){var o=uP(function e(t,r,n){var i,o,s;return void 0===n&&(n={counter:0,visited:new Map}),eb(this,function(a){switch(a.label){case 0:if(!(t.length>2&&t.length>eo.optimizedMinLength))return[3,5];i=1,a.label=1;case 1:var u;if(!(i<t.length-1))return[3,5];if(n.counter>eo.maxNumberOfTries||(n.counter+=1,(o=eE([],eS(t),!1)).splice(i,1),s=ux(o),n.visited.has(s)))return[2];if(!(uC(o)&&(u=o,es.querySelector(ux(u))===r)))return[3,4];return[4,o];case 2:return a.sent(),n.visited.set(s,!0),[5,ew(e(o,r,n))];case 3:a.sent(),a.label=4;case 4:return i++,[3,1];case 5:return[2]}})}(i,e));return o.length>0&&(i=o[0]),ux(i)}throw Error("Selector was not found.")}(d));var f=s$(o),h={x:c+f.left,y:l+f.top,selector:i,viewportHeight:a,viewportWidth:u,pageUrl:s.href,timestamp:Date.now(),type:"click"},p=n();p&&t.addEvent({sessionId:r,event:{type:"interaction",data:JSON.stringify(h)},deviceId:p})}}}}},uj=function(){function e(e,t){var r=tl();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=aW(t.serverZone),this.apiKey=t.apiKey,this.context=e}return e.prototype.send=function(e,t){var r=this.context,n=r.sessionId,i=r.type,o=new URLSearchParams({device_id:e,session_id:String(n),type:String(i),api_key:this.apiKey}),s="".concat(this.basePageUrl,"?").concat(o.toString());this.sendBeacon(s,t)||this.sendXhr(s,t)},e}(),uq=function(){function e(e){var t=this;this.timestamp=Date.now(),this.hook=function(e){t.update(e)},this.send=function(e){return function(r){var n=e(),i=tl();i&&n&&t.transport.send(n,{version:1,events:[{maxScrollX:t._maxScrollX,maxScrollY:t._maxScrollY,maxScrollWidth:t._maxScrollWidth,maxScrollHeight:t._maxScrollHeight,viewportHe
27ight:sQ(),viewportWidth:sJ(),pageUrl:i.location.href,timestamp:t.timestamp,type:"scroll"}]})}},this._maxScrollX=0,this._maxScrollY=0,this._maxScrollWidth=sJ(),this._maxScrollHeight=sQ(),this.transport=e}return e.default=function(t,r){return new e(new uj(t,r))},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(e.x>this._maxScrollX){var r=sJ();this._maxScrollX=e.x;var n=e.x+r;n>this._maxScrollWidth&&(this._maxScrollWidth=n),this.timestamp=t}if(e.y>this._maxScrollY){var i=sQ();this._maxScrollY=e.y;var o=e.y+i;o>this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),uF=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId="".concat(r,"/").concat(t))},uB=Uint8Array,uV=Uint16Array,uz=Uint32Array,uH=new uB([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),uW=new uB([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),uK=new uB([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),uG=function(e,t){for(var r=new uV(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new uz(r[30]),n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return[r,i]},u$=uG(uH,2),uQ=u$[0],uJ=u$[1];uQ[28]=258,uJ[258]=28;for(var uX=uG(uW,0),uY=(uX[0],uX[1]),uZ=new uV(32768),u0=0;u0<32768;++u0){var u1=(43690&u0)>>>1|(21845&u0)<<1;u1=(61680&(u1=(52428&u1)>>>2|(13107&u1)<<2))>>>4|(3855&u1)<<4,uZ[u0]=((65280&u1)>>>8|(255&u1)<<8)>>>1}for(var u2=function(e,t,r){for(var n,i=e.length,o=0,s=new uV(t);o<i;++o)++s[e[o]-1];var a=new uV(t);for(o=0;o<t;
27++o)a[o]=a[o-1]+s[o-1]<<1;if(r){n=new uV(1<<t);var u=15-t;for(o=0;o<i;++o)if(e[o])for(var c=o<<4|e[o],l=t-e[o],d=a[e[o]-1]++<<l,f=d|(1<<l)-1;d<=f;++d)n[uZ[d]>>>u]=c}else for(o=0,n=new uV(i);o<i;++o)n[o]=uZ[a[e[o]-1]++]>>>15-e[o];return n},u3=new uB(288),u0=0;u0<144;++u0)u3[u0]=8;for(var u0=144;u0<256;++u0)u3[u0]=9;for(var u0=256;u0<280;++u0)u3[u0]=7;for(var u0=280;u0<288;++u0)u3[u0]=8;for(var u4=new uB(32),u0=0;u0<32;++u0)u4[u0]=5;var u6=u2(u3,9,0),u5=u2(u4,5,0),u8=function(e){return(e/8>>0)+(7&e&&1)},u7=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var n=new(e instanceof uV?uV:e instanceof uz?uz:uB)(r-t);return n.set(e.subarray(t,r)),n},u9=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8},ce=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},ct=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,o=r.slice();if(!i)return[new uB(0),0];if(1==i){var s=new uB(r[0].s+1);return s[r[0].s]=1,[s,1]}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var a=r[0],u=r[1],c=0,l=1,d=2;for(r[0]={s:-1,f:a.f+u.f,l:a,r:u};l!=i-1;)a=r[r[c].f<r[d].f?c++:d++],u=r[c!=l&&r[c].f<r[d].f?c++:d++],r[l++]={s:-1,f:a.f+u.f,l:a,r:u};for(var f=o[0].s,n=1;n<i;++n)o[n].s>f&&(f=o[n].s);var h=new uV(f+1),p=cr(r[l-1],h,0);if(p>t){var n=0,v=0,g=p-t,y=1<<g;for(o.sort(function(e,t){return h[t.s]-h[e.s]||e.f-t.f});n<i;++n){var m=o[n].s;if(h[m]>t)v+=y-(1<<p-h[m]),h[m]=t;else break}for(v>>>=g;v>0;){var b=o[n].s;h[b]<t?v-=1<<t-h[b]++-1:++n}for(;n>=0&&v;--n){var w=o[n].s;h[w]==t&&(--h[w],++v)}p=t}return[new uB(h),p]},cr=function(e,t,r){return -1==e.s?Math.max(cr(e.l,t,r+1),cr(e.r,t,r+1)):t[e.s]=r},cn=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new uV(++t),n=0,i=e[0],o=1,s=function(e){r[n++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[r.subarray(0,n),t]},ci=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},co=function(e,t,r){var n=r.length,i=u8(t+2);e[i]=255&n,e[i+1]=n>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<n;++o)e[i+o+4]=r[o];return(i+4+n)*8},cs=function(e,t,r,n,i,o,s,a,u,c,l){u9(t,l++,r),++i[256];for(var d,f,h,p,v=ct(i,15),g=v[0],y=v[1],m=ct(o,15),b=m[0],w=m[1],S=cn(g),E=S[0],I=S[1],_=cn(b),k=_[0],x=_[1],T=new uV(19),C=0;C<E.length;++C)T[31&E[C]]++;for(var C=0;C<k.length;++C)T[31&k[C]]++;for(var O=ct(T,7),A=O[0],R=O[1],M=19;M>4&&!A[uK[M-1]];--M);var N=c+5<<3,P=ci(i,u3)+ci(o,u4)+s,L=ci(i,g)+ci(o,b)+s+14+3*M+ci(T,A)+(2*T[16]+3*T[17]+7*T[18]);if(N<=P&&N<=L)return co(t,l,e.subarray(u,u+c));if(u9(t,l,1+(L<P)),l+=2,L<P){d=u2(g,y,0),f=g,h=u2(b,w,0),p=b;var D=u2(A,R,0);u9(t,l,I-257),u9(t,l+5,x-1),u9(t,l+10,M-4),l+=14;for(var C=0;C<M;++C)u9(t,l+3*C,A[uK[C]]);l+=3*M;for(var U=[E,k],j=0;j<2;++j)for(var q=U[j],C=0;C<q.length;++C){var F=31&q[C];u9(t,l,D[F]),l+=A[F],F>15&&(u9(t,l,q[C]>>>5&127),l+=q[C]>>>12)}}else d=u6,f=u3,h=u5,p=u4;for(var C=0;C<a;++C)if(n[C]>255){var F=n[C]>>>18&31;ce(t,l,d[F+257]),l+=f[F+257],F>7&&(u9(t,l,n[C]>>>23&31),l+=uH[F]);var B=31&n[C];ce(t,l,h[B]),l+=p[B],B>3&&(ce(t,l,n[C]>>>5&8191),l+=uW[B])}else ce(t,l,d[n[C]]),l+=f[n[C]];return ce(t,l,d[256]),l+f[256]},ca=new uz([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),cu=new uB(0),cc=function(e,t,r,n,i,o){var s=e.length,a=new uB(n+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(n,a.length-i),c=0;if(!t||s<8)for(var l=0;l<=s;l+=65535){var d=l+65535;d<s?c=co(u,c,e.subarray(l,d)):(u[l]=o,c=co(u,c,e.subarray(l,s)))}else{for(var f=ca[t-1],h=f>>>13,p=8191&f,v=(1<<r)-1,g=new uV(32768),y=new uV(v+1),m=Math.ceil(r/3),b=2*m,w=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<b)&v},S=new uz(25e3),E=new uV(288),I=new uV(32),_=0,k=0,l=0,x=0,T=0,C=0;l<s;++l){var O=w(l),A=32767&l,R=y[O];if(g[A]=R,y[O]=A,T<=l){var M=s-l;if((_>7e3||x>24576)&&M>423){c=cs(e,u,0,S,E,I,k,x,C,l-C,c),x=_=k=0,C=l;for(var N=0;N<286;++N)E[N]=0;for(var N=0;N<30;++N)I[N]=0}var P=2,L=0,D=p,U=A-R&32767;if(M>2&&O==w(l-U))for(var j=Math.min(h,M)-1,q=Math.min(32767,l),F=Math.min(258,M);U<=q&&--D&&A!=R;){if(e[l+P]==e[l+P-U]){for(var B=0;B<F&&e[l+B]==e[l+B-U];++B);if(B>P){if(P=B,L=U,B>j)break;for(var V=Math.min(U,B-2),z=0,N=0;N<V;++N){var H=l-U+N+32768&32767,W=g[H],K=H-W+32768&32767;K>z&&(z=K,R=H)}}}R=g[A=R],U+=A-R+32768&32767}if(L){S[x++]=268435456|uJ[P]<<18|uY[L];var G=31&uJ[P],$=31&uY[L];k+=uH[G]+uW[$],++E[257+G],++I[$],T=l+P,++_}else S[x++]=e[l],++E[e[l]]}}c=cs(e,u,o,S,E,I,k,x,C,l-C,c),o||(c=co(u,c,cu))}return u7(a,0,n+u8(c)+i)},cl=function(){var e=1,t=0;return{p:function(r){for(var n=e,i=t,o=r.length,s=0;s!=o;){for(var a=Math.min(s+5552,o);s<a;++s)n+=r[s],i+=n;n%=65521,i%=65521}e=n,t=i},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+((255&e)<<23)*2}}},cd=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},cf=function(e,t){var r=t.level,n=0==r?0:r<6?1:9==r?3:2;e[0]=120,e[1]=n<<6|(n?32-2*n:1)};let ch=e=>{var t,r,n,i,o;return function(e,t){var r="";if(!t&&"undefined"!=typeof TextDecoder)return new TextDecoder().decode(e);for(var n=0;n<e.length;){var i=e[n++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((31&i)<<6|63&e[n++]):i<240?r+=String.fromCharCode((1
275&i)<<12|(63&e[n++])<<6|63&e[n++]):r+=String.fromCharCode(55296|(i=((15&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536)>>10,56320|1023&i)}return r}((t=function(e,t){var r=e.length;if("undefined"!=typeof TextEncoder)return new TextEncoder().encode(e);for(var n=new uB(e.length+(e.length>>>1)),i=0,o=function(e){n[i++]=e},s=0;s<r;++s){if(i+5>n.length){var a=new uB(i+8+(r-s<<1));a.set(n),n=a}var u=e.charCodeAt(s);u<128?o(u):(u<2048?o(192|u>>>6):(u>55295&&u<57344?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>>18),o(128|u>>>12&63)):o(224|u>>>12),o(128|u>>>6&63)),o(128|63&u))}return u7(n,0,i)}(JSON.stringify(Object.assign(Object.assign({},e),{v:"v1"}))),void 0===r&&(r={}),(n=cl()).p(t),cf(o=cc(t,null==(i=r).level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+i.mem,2,4,!0),r),cd(o,o.length-4,n.d()),o),!0)};var cp=function(){function e(e,t,r){var n,i=this;this.taskQueue=[],this.isProcessing=!1,this.compressEvent=function(e){return JSON.stringify(ch(e))},this.addCompressedEvent=function(e,t){var r=i.compressEvent(e);i.eventsManager&&i.deviceId&&i.eventsManager.addEvent({event:{type:"replay",data:r},sessionId:t,deviceId:i.deviceId})};var o=tl();this.canUseIdleCallback=o&&"requestIdleCallback"in o,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(n=t.performanceConfig)||void 0===n?void 0:n.timeout)||2e3}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var r;this.canUseIdleCallback&&(null===(r=this.config.performanceConfig)||void 0===r?void 0:r.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.taskQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){for(var t=this;this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var r=this.taskQueue.shift();if(r){var n=r.event,i=r.sessionId;this.addCompressedEvent(n,i)}}this.taskQueue.length>0?requestIdleCallback(function(e){t.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e}(),cv=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.pageLeaveFns=[],this.teardownEventListeners=function(t){var r=tl();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),t||r.addEventListener("blur",e.blurListener),t||r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),t||r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),t||r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){e.recordEvents()},this.pageLeaveListener=function(t){e.pageLeaveFns.forEach(function(e){e(t)})},this.addCustomRRWebEvent=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n=!0),em(e,void 0,void 0,function(){var e,i,o,s;return eb(this,function(a){switch(a.label){case 0:if(a.trys.push([0,3,,4]),e=void 0,!(i=this.config)||(e={config:aG(i),version:aX},!n))return[3,2];return[4,aK()];case 1:o=a.sent(),e=eg(eg({},o),e),a.label=2;case 2:return this.recordCancelCallback?aj.addCustomEvent(t,eg(eg({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return s=a.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",s),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null}catch(t){e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(t.toString()))}},this.loggerProvider=new eP}return e.prototype.init=function(e,t){return eC(this._init(e,t))},e.prototype._init=function(e,t){var r,n,i,o;return em(this,void 0,void 0,function(){var s,a,u,c,l,d,f,h,p;return eb(this,function(v){switch(v.label){case 0:return this.loggerProvider=t.loggerProvider||new eP,Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.identifiers=new uF({sessionId:t.sessionId,deviceId:t.deviceId}),s=this,[4,em(void 0,void 0,void 0,function(){var r;return eb(this,function(n){switch(n.label){case 0:return[4,rm({localConfig:r=new sa(e,t),configKeys:["sessionReplay"]})];case 1:return[2,new aQ(n.sent(),r)]}})})];case 1:return s.joinedConfigGenerator=v.sent(),a=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)];case 2:a.config=v.sent(),t.sessionId&&(null===(r=this.config.interactionConfig)||void 0===r?void 0:r.enabled)&&(u=uq.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[u.send(this.getDeviceId.bind(this)).bind(u)],this.scrollHook=u.hook.bind(u)),c=[],"idb"!==(l=this.config.storeType)||(null===(n=tl())||void 0===n?void 0:n.indexedDB)||(l="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(l," for event storage.")),v.label=3;case 3:return v.trys.push([3,5,,6]),[4,uv({config:this.config,sessionId:this.identifiers.sessionId,type:"replay",storeType:l})];case 4:return d=v.sent(),c.push({name:"replay",manager:d}),[3,6];case 5:return f=v.sent(),this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(f.toString())),[3,6];case 6:if(!(null===(i=this.config.interactionConfig)||void 0===i?void 0:i.enabled))return[3,10];h=this.config.interactionConfig.batch?uD:uL,v.label=7;case 7:return v.trys.push([7,9,,10]),[4,uv({config:this.config,sessionId:this.identifiers.sessionId,type:"interaction",minInterval:null!==(o=this.config.interactionConfig.trackEveryNms)&&void 0!==o?o:3e4,maxInterval:6e4,payloadBatcher:h,storeType:l})];case 8:return p=v.sent(),c.push({name:"interaction",manager:p}),[3,10];case 9:return f=v.sent(),this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(f.toString())),[3,10];case 10:return this.eventsManager=new(ug.bind.apply(ug,eE([void 0],eS(c),!1))),this.eventCompressor=new cp(this.eventsManager,this.config,this.getDeviceId()),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),this.initialize(!0),[2]}})})},e.prototype.setSessionId=function(e,t){return eC(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t){return em(this,void 0,void 0,function(){var r,n,i;return eb(this,function(o){switch(o.label){case 0:if((r=this.identifiers&&this.identifiers.sessionId)&&this.sendEvents(r),n=t||this.getDeviceId(),this.identifiers=new uF({sessionId:e,deviceId:n}),!(this.joinedConfigGenerator&&r))return[3,2];return i=this,[4,this.joinedConfigGenerator.generateJoinedConfig(this.identifiers.sessionId)];case 1:i.config=o.sent(),o.label=2;case 2:return this.recordEvents(),[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var n=this.getShouldRecord(),i={};return n&&((e={})[sr]=r.sessionReplayId?r.sessionReplayId:null,i=e,t.debugMode&&(i[si]=JSON.stringify({appHash:az(t.apiKey).toString()}))),this.addCustomRRWebEvent(et.GET_SR_PROPS,{shouldRecord:n,eventProperties:i},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,i},e.prototype.sendEvents=function(e){var t,r=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),n=this.getDeviceId();this.eventsManager&&r&&n&&this.eventsManager.sendCurrentSequenceEvents({sessionId:r,deviceId:n})},e.prototype.initialize=function(e){if(void 0===e&&(e=!1),!(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId)){this.loggerProvider.log("Session is not being recorded due to lack of session id.");return}var t,r=this.getDeviceId();if(!r){this.loggerProvider.log("Session is not being recorded due to lack of device id.");return}this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),this.recordEvents()},e.prototype.shouldOptOut=function(){if(null===(e=this.config)||void 0===e?void 0:e.instanceName){var e,t,r;r=tx(this.config.instanceName).identityStore.getIdentity().optOut}return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r=(e=this.identifiers.sessionId,t=this.config.sampleRate,31*Math.abs(az(e.toString()))%1e6/1e6<t);return r||this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate.")),r},e.prototype.getBlockSelectors=function(){var e,t,r,n=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==n.length)return n},e.prototype.getMaskTextSelectors=function(){if((null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.defaultMaskLevel)==="conservative")return"*";var e,t,r,n,i=null===(n=null===(r=this.config)||void 0===r?void 0:r.privacyConfig)||void 0===n?void 0:n.maskSelector;if(i)return i},e.prototype.recordEvents=function(){var e,t=this,r=this.config,n=this.getShouldRecord(),i=null===(e=this.identifiers)||void 0===e?void 0:e.sessionId;if(n&&i&&r){this.stopRecordingEvents();var o=r.privacyConfig;this.loggerProvider.log("Session Replay capture beginning for ".concat(i,".")),this.recordCancelCallback=aj({emit:function(e){if(t.shouldOptOut()){t.loggerProvider.log("Opting session ".concat(i," out of recording due to optOut config.")),t.stopRecordingEvents(),t.sendEvents();return}t.eventCompressor&&t.eventCompressor.enqueueEvent(e,i)},inlineStylesheet:r.shouldInlineStylesheet,hooks:{mouseInteraction:this.eventsManager&&uU({eventsManager:this.eventsManager,sessionId:i,deviceIdFn:this.getDeviceId.bind(this)}),scroll:this.scrollHook},maskAllInputs:!0,maskTextClass:so,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),maskInputFn:aV("input",o),maskTextFn:aV("text",o),maskTextSelector:this.getMaskTextSelectors(),recordCanvas:!1,errorHandler:function(e){if(e.message.includes("insertRule")&&e.message.includes("CSSStyleSheet")||e._external_)throw e;return t.loggerProvider.warn("Error while capturing replay: ",e.toString()),!0}}),this.addCustomRRWebEvent(et.DEBUG_INFO)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),em(this,void 0,void 0,function(){return eb(this,function(r){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e}(),cg=function(e){return function(){var t=e.config||ss();return{logger:t.loggerProvider,logLevel:t.logLevel}}},cy={init:eT((z=new cv).init.bind(z),"init",cg(z)),setSessionId:eT(z.setSessionId.bind(z),"setSessionId",cg(z)),getSessionId:eT(z.getSessionId.bind(z),"getSessionId",cg(z)),getSessionReplayProperties:eT(z.getSessionReplayProperties.bind(z),"getSessionReplayProperties",cg(z)),flush:eT(z.flush.bind(z),"flush",cg(z)),shutdown:eT(z.shutdown.bind(z),"shutdown",cg(z))},cm=cy.init,cb=cy.setSessionId,cw=cy.getSessionId,cS=cy.getSessionReplayProperties,cE=(cy.flush,cy.shutdown),cI="1.8.0",c_=function(){function e(e){this.name="@amplitude/plugin-session-replay-browser",this.type="enrichment",this.options=eg({},e),!1!==this.options.forceSessionTracking&&(this.options.forceSessionTracking=!0)}return e.prototype.setup=function(e){var t,r,n,i;return em(this,void 0,void 0,function(){return eb(this,function(o){switch(o.label){case 0:return e.loggerProvider.log("Installing @amplitude/plugin-session-replay, version ".concat(cI,".")),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=eg(eg({},e.defaultTracking),{sessions:!0})),[4,cm(e.apiKey,{instanceName:this.config.instanceName,deviceId:this.config.deviceId,optOut:this.config.optOut,sessionId:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null===(t=this.options.privacyConfig)||void 0===t?void 0:t.blockSelector,maskSelector:null===(r=this.options.privacyConfig)||void 0===r?void 0:r.maskSelector,unmaskSelector:null===(n=this.options.privacyConfig)||void 0===n?void 0:n.unmaskSelector,defaultMaskLevel:null===(i=this.options.privacyConfig)||void 0===i?void 0:i.defaultMaskLevel},debugMode:this.options.debugMode,configEndpointUrl:this.options.configEndpointUrl,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:cI},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType}).promise];case 1:return o.sent(),[2]}})})},e.prototype.execute=function(e){return em(this,void 0,void 0,function(){var t;return eb(this,function(r){switch(r.label){case 0:if(!(this.config.sessionId&&this.config.sessionId!==cw()))return[3,2];return[4,cb(this.config.sessionId).promise];case 1:r.sent(),r.label=2;case 2:return this.config.sessionId&&this.config.sessionId===e.session_id&&(t=cS(),e.event_properties=eg(eg({},e.event_properties),t)),[2,Promise.resolve(e)]}})})},e.prototype.teardown=function(){return em(this,void 0,void 0,function(){return eb(this,function(e){return cE(),this.config=null,[2]})})},e.prototype.getSessionReplayProperties=function(){return cS()},e}();let ck="34b9b7435ca0ed4023a8116ad1fa02f6";var cx=r(8717),cT=r(8966);r(7294);let cC=(localStorage.getItem("b")||localStorage.setItem("b",eh()),localStorage.getItem("b")),cO=function(e){if(e)return io(new c_({forceSessionTracking:!1,sampleRate:.01})),ip(ck,{flushIntervalMillis:50,deviceId:e,autocapture:{elementInteractions:!0},serverUrl:"/api/proxy/amplitude-events"}),ec}(cC),cA=(sessionStorage.getItem("s")||sessionStorage.setItem("s",eh()),sessionStorage.getItem("s"));async function cR(){try{let e;for(cN();;)e=function(e){let t=location.href;return t!==e&&cM({type:"pageView",data:(0,cT.b)()}),t}(e),await new Promise(e=>setTimeout(e,50))}catch(e){console.error(e)}}async function cM(e){var t,r,n,i,o,s,a;let{type:u,data:c}=e;"redirectToStore"===u&&(null==cO||cO.track("redirect_to_app_store"),null==cO||cO.flush());
27let l=document.referrer,d=window.navigator.language,f={cookies:document.cookie,browserId:cC,sessionId:cA,referrer:l,bcp47LangTag:d,eventType:u,epochMs:Date.now(),data:c},h=btoa(JSON.stringify({...f,hardwareConcurrency:navigator.hardwareConcurrency,screen:{width:null===(t=screen)||void 0===t?void 0:t.width,height:null===(r=screen)||void 0===r?void 0:r.height,availWidth:null===(n=screen)||void 0===n?void 0:n.availWidth,availHeight:null===(i=screen)||void 0===i?void 0:i.availHeight,orientationType:null===(s=screen)||void 0===s?void 0:null===(o=s.orientation)||void 0===o?void 0:o.type,availTop:null===(a=screen)||void 0===a?void 0:a.availTop},data:c}));h.length>4500&&(h=btoa(JSON.stringify(f))),await fetch("".concat(cx.OB.API_URL,"/api/website-events?body=").concat(h),{method:"GET",credentials:"omit",mode:"no-cors"})}async function cN(){let e=!1;for(;!e;)await fetch("".concat(cx.OB.API_URL,"/api/website-sessions/").concat(cA),{method:"GET",credentials:"omit",mode:"no-cors"}).catch(t=>{console.warn(t),e=!0}),await new Promise(e=>setTimeout(e,50))}!function(){let e=se(ck,{flagsServerUrl:"/api/proxy/amplitude-flags",serverUrl:"/api/proxy/amplitude-events"});(async()=>{try{await e.start()}catch(e){console.error("Failed to initialize experiments:",e)}})()}(),console.log({browserId:cC,sessionId:cA})},8717:function(e,t,r){"use strict";var n;r.d(t,{FH:function(){return s},OB:function(){return i},aH:function(){return o}});let i={API_URL:null!==(n=r(3454).env.NEXT_PUBLIC_API_URL)&&void 0!==n?n:"https://api.prosa.app"},o=50,s="https://www.prosa.app"},4453:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return A}});var n=r(5893),i=r(1505),o=r.n(i),s=r(9730),a=r.n(s),u=r(3591),c=r.n(u),l=r(5202),d=r(8966),f=r(7294),h=r(9332),p=()=>{window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)})};function v(){return false}var g="https://va.vercel-scripts.com/v1/speed-insights",y=`${g}/script.js`,m=`${g}/script.debug.js`;function b(e){let t=(0,f.useRef)(null);return(0,f.useEffect)(()=>{if(t.current)e.route&&t.current(e.route);else{let r=function(e={}){var t;if(!("undefined"!=typeof window)||null===e.route)return null;p();let r=!!e.dsn,n=e.scriptSrc||(r?y:"/_vercel/speed-insights/script.js");if(document.head.querySelector(`script[src*="${n}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let i=document.createElement("script");return i.src=n,i.defer=!0,i.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),i.dataset.sdkv="1.0.10",e.sampleRate&&(i.dataset.sampleRate=e.sampleRate.toString()),e.route&&(i.dataset.route=e.route),e.endpoint&&(i.dataset.endpoint=e.endpoint),e.dsn&&(i.dataset.dsn=e.dsn),i.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${n}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(i),{setRoute:e=>{i.dataset.route=e??void 0}}}({framework:e.framework||"react",...e});r&&(t.current=r.setRoute)}},[e.route]),null}var w=()=>{let e=(0,h.useParams)(),t=(0,h.useSearchParams)(),r=(0,h.usePathname)(),n={...Object.fromEntries(t.entries()),...e||{}};return e?function(e,t){if(!e||!t)return e;let r=e;try{for(let[e,n]of Object.entries(t)){let t=Array.isArray(n),i=t?n.join("/"):n,o=t?`...${e}`:e,s=RegExp(`/${i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`);s.test(r)&&(r=r.replace(s,`/[${o}]`))}return r}catch(t){return e}}(r,n):null};function S(e){let t=w();return f.createElement(b,{route:t,...e,framework:"next"})}function E(e){return f.createElement(f.Suspense,{fallback:null},f.createElement(S,{...e}))}var I=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function _(){return"undefined"!=typeof window}function k(){return"production"}function x(){return"development"===((_()?window.vam:k())||"production")}function T(e){return(0,f.useEffect)(()=>{!function(e={debug:!0}){var t;if(!_())return;(function(e="auto"){if("auto"===e){window.vam=k();return}window.vam=e})(e.mode),I(),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc||(x()?"https://va.vercel-scripts.com/v1/script.debug.js":"/_vercel/insights/script.
27js");if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.2.2",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint&&(n.dataset.endpoint=e.endpoint),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=x()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},x()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,f.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}var C=r(2238),O=r.n(C);function A(e){let{Component:t,pageProps:r}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(T,{}),(0,n.jsx)(E,{}),(0,n.jsx)(c(),{id:"4b34ebfdb2b7ae91",dynamic:[a().style.fontFamily,o().style.fontFamily],children:"html{--color-neutral-50:#f9fafb;--color-neutral-100:#f3f4f6;--color-neutral-200:#e5e7eb;--color-neutral-300:#d1d5db;--color-neutral-400:#6b7280;--color-neutral-500:#6b7280;--color-neutral-600:#4b5563;--color-neutral-700:#374151;--color-neutral-800:#1f2937;--color-neutral-900:#111827;--color-primary-50:#e3fbeb;--color-primary-100:#c1ecce;--color-primary-200:#9edfb2;--color-primary-300:#79d193;--color-primary-400:#54c476;--color-primary-500:#3bab5c;--color-primary-600:#2c8547;--color-primary-700:#1e5f32;--color-primary-800:#0e3a1d;--color-primary-900:#001503;--gold-gradient-2:linear-gradient(\n to bottom right,\n #c79d32,\n #e8bc4a,\n #d2ad4a,\n #e0b64b\n );--cool-gradient-dark:linear-gradient(\n to bottom right,\n #359350,\n #674fdd\n );--cool-gradient-light:linear-gradient(\n to bottom right,\n #9edfb2,\n #c3b5ff\n );color:var(--color-neutral-700);--font-body:".concat(a().style.fontFamily,";--font-heading:").concat(o().style.fontFamily,';overflow:hidden}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1.6}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}')}),(0,n.jsx)(t,{...r,className:c().dynamic([["4b34ebfdb2b7ae91",[a().style.fontFamily,o().style.fontFamily]]])+" "+(r&&null!=r.className&&r.className||"")}),";"]})}async function R(){var e,t,r;if(!(location.pathname.startsWith("/loja")||location.pathname.startsWith("/store")))return;let n=new(O())().getOS();(null===(e=n.name)||void 0===e?void 0:e.toLowerCase().includes("android"))&&(await M(),location.href="market://details?id=app.prosa"),((null===(t=n.name)||void 0===t?void 0:t.toLowerCase().includes("iphone"))||(null===(r=n.name)||void 0===r?void 0:r.toLowerCase().includes("ios")))&&(await M(),location.href="https://apps.apple.com/app/prosa/id1619723707")}async function M(){await (0,l.Ny)({type:"redirectToStore",data:(0,d.b)()})}r(7232),R(),(0,l.rl)()},8966:function(e,t,r){"use strict";function n(){var e;let t=location.href,r=null!==(e=location.host)&&void 0!==e?e:location.hostname;return{href:t,host:r,pathname:location.pathname,hash:location.hash,search:location.search}}r.d(t,{b:function(){return n}})},1876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],c=new i((s+a)*3/4-a),l=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(e,t,n){for(var i,o=[],s=t;s<n;s+=3)o.push(r[(i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
27+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},72:function(e,t,r){"use strict";/*! 28 * The buffer module from node.js, for the browser. 29 * 30 * @author Feross Aboukhadijeh <https://feross.org> 31 * @license MIT 32 */var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=s(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return d(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t,r=0|f(e.length),n=s(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),s(e<0?0:0|f(e))}function d(e){for(var t=e.length<0?0:0|f(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(e).length;default:if(i)return n?-1:k(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var i,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=A[e[o]];return i}(this,t,r);case"utf8":case"utf-8":return m(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,o=r,0===i&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,t,r);default:if(s)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){var o;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}
32else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else -1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var d=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){d=!1;break}if(d)return o}return -1}function m(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(l=c);break;case 2:(192&(o=e[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,d=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function S(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function E(e,t,r,n,o){return t=+t,r>>>=0,o||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function I(e,t,r,n,o){return t=+t,r>>>=0,o||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=2147483647,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(O(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=h,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?m(this,0,e):p.apply(this,arguments)}
vendor: 8,902 bytes, line 32
32,a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,u=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r),d=0;d<u;++d)if(c[d]!==l[d]){o=c[d],s=l[d];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,c,l,d,f,h,p,v,g=this.length-t;if((void 0===r||r>g)&&(r=g),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var y=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(a!=a)break;e[r+s]=a}return s}(this,e,t,r);case"utf8":case"utf-8":return u=t,c=r,C(k(e,this.length-u),this,u,c);case"ascii":return l=t,d=r,C(x(e),this,l,d);case"latin1":case"binary":return i=this,o=e,s=t,a=r,C(x(o),i,s,a);case"base64":return f=t,h=r,C(T(e),this,f,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p=t,v=r,C(function(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(e,this.length-p),this,p,v);default:if(y)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),y=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return E(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return E(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return I(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),u=s.length;
32if(0===u)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%u]}return this};var _=/[^+/0-9A-Za-z-_]/g;function k(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function x(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function T(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var A=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},783:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,d=r?i-1:0,f=r?-1:1,h=e[t+d];for(d+=f,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+e[t+d],d+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+d],d+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),o-=c}return(h?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,d=l>>1,f=23===i?5960464477539062e-23:0,h=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*u-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+h]=255&a,h+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+h]=255&s,h+=p,s/=256,c-=8);e[r+h-p]|=128*v}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(72);e.exports=i}()},1479:function(){},7232:function(){},1505:function(e){e.exports={style:{fontFamily:"'__Poppins_54aefa', '__Poppins_Fallback_54aefa'",fontStyle:"normal"},className:"__className_54aefa"}},9730:function(e){e.exports={style:{fontFamily:"'__Roboto_663b55', '__Roboto_Fallback_663b55'",fontStyle:"normal"},className:"__className_663b55"}},7663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u=[],c=!1,l=-1;function d(){c&&n&&(c=!1,n.length?u=n.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(d);c=!0;for(var t=u.length;t;){for(n=u,u=[];++l<t;)n&&n[l].run();l=-1,t=u.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||a(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},9332:function(e,t,r){e.exports=r(9108)},2238:function(e,t,r){var n;!function(i,o){"use strict";var s="function",a="undefined",u="object",c="string",l="major",d="model",f="name",h="type",p="vendor",v="version",g
vendor: 4,246 bytes, line 32
32="architecture",y="console",m="mobile",b="tablet",w="smarttv",S="wearable",E="embedded",I="Amazon",_="Apple",k="ASUS",x="BlackBerry",T="Browser",C="Chrome",O="Firefox",A="Google",R="Huawei",M="Microsoft",N="Motorola",P="Opera",L="Samsung",D="Sharp",U="Sony",j="Xiaomi",q="Zebra",F="Facebook",B="Chromium OS",V="Mac OS",z=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},H=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},W=function(e,t){return typeof e===c&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},G=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},$=function(e,t){for(var r,n,i,a,c,l,d=0;d<t.length&&!c;){var f=t[d],h=t[d+1];for(r=n=0;r<f.length&&!c&&f[r];)if(c=f[r++].exec(e))for(i=0;i<h.length;i++)l=c[++n],typeof(a=h[i])===u&&a.length>0?2===a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):void 0:this[a[0]]=l?a[1].call(this,l,a[2]):void 0:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):void 0):this[a]=l||o;d+=2}},Q=function(e,t){for(var r in t)if(typeof t[r]===u&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(W(t[r][n],e))return"?"===r?o:r}else if(W(t[r],e))return"?"===r?o:r;return e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},X={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,v],[/opios[\/ ]+([\w\.]+)/i],[v,[f,P+" Mini"]],[/\bopr\/([\w\.]+)/i],[v,[f,P]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[f,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,v],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[f,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[f,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[f,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+T],v],[/\bfocus\/([\w\.]+)/i],[v,[f,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[f,P+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[f,P+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[f,"MIUI "+T]],[/fxios\/([-\w\.]+)/i],[v,[f,O]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+T]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+T],v],[/samsungbrowser\/([\w\.]+)/i],[v,[f,L+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],v],[/metasr[\/ ]?([\d\.]+)/i],[v,[f,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[f,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[f,v],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,F],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[f,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[f,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,C+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[f,"Android "+T]],[/(chrome|omniweb|arora|[t
vendor: 5,068 bytes, line 32
32izenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[v,Q,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[f,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[f,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,v],[/(cobalt)\/([\w\.]+)/i],[f,[v,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,K]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",K]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[p,L],[h,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[p,L],[h,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[p,_],[h,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[p,_],[h,b]],[/(macintosh);/i],[d,[p,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[p,D],[h,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[p,R],[h,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[p,R],[h,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[p,j],[h,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[p,j],[h,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[p,"OPPO"],[h,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[p,"Vivo"],[h,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[p,"Realme"],[h,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[p,N],[h,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[p,N],[h,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[p,"LG"],[h,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[p,"LG"],[h,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[p,"Lenovo"],[h,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[p,"Nokia"],[h,m]],[/(pixel c)\b/i],[d,[p,A],[h,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[p,A],[h,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[p,U],[h,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[p,U],[h,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[p,"OnePlus"],[h,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[p,I],[h,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[p,I],[h,m]],[/(playbook);[-\w\),; ]+(rim)/i],[d,p,[h,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[p,x],[h,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[p,k],[h,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[p,k],[h,m]],[/(nexus 9)/i],[d,[p,"HTC"],[h,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[d,/_/g," "],[h,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[p,"Acer"],[h,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[p,"Meizu"],[h,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[p,"Ulefone"],[h,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asu
vendor: 7,605 bytes, line 32
32s)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,d,[h,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,d,[h,b]],[/(surface duo)/i],[d,[p,M],[h,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[p,"Fairphone"],[h,m]],[/(u304aa)/i],[d,[p,"AT&T"],[h,m]],[/\bsie-(\w*)/i],[d,[p,"Siemens"],[h,m]],[/\b(rct\w+) b/i],[d,[p,"RCA"],[h,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[p,"Dell"],[h,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[p,"Verizon"],[h,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[p,"Barnes & Noble"],[h,b]],[/\b(tm\d{3}\w+) b/i],[d,[p,"NuVision"],[h,b]],[/\b(k88) b/i],[d,[p,"ZTE"],[h,b]],[/\b(nx\d{3}j) b/i],[d,[p,"ZTE"],[h,m]],[/\b(gen\d{3}) b.+49h/i],[d,[p,"Swiss"],[h,m]],[/\b(zur\d{3}) b/i],[d,[p,"Swiss"],[h,b]],[/\b((zeki)?tb.*\b) b/i],[d,[p,"Zeki"],[h,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],d,[h,b]],[/\b(ns-?\w{0,9}) b/i],[d,[p,"Insignia"],[h,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[p,"NextBook"],[h,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],d,[h,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],d,[h,m]],[/\b(ph-1) /i],[d,[p,"Essential"],[h,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[p,"Envizen"],[h,b]],[/\b(trio[-\w\. ]+) b/i],[d,[p,"MachSpeed"],[h,b]],[/\btu_(1491) b/i],[d,[p,"Rotor"],[h,b]],[/(shield[\w ]+) b/i],[d,[p,"Nvidia"],[h,b]],[/(sprint) (\w+)/i],[p,d,[h,m]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[p,M],[h,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[p,q],[h,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[p,q],[h,m]],[/smart-tv.+(samsung)/i],[p,[h,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[p,L],[h,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[h,w]],[/(apple) ?tv/i],[p,[d,_+" TV"],[h,w]],[/crkey/i],[[d,C+"cast"],[p,A],[h,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[p,I],[h,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[p,D],[h,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[p,U],[h,w]],[/(mitv-\w{5}) bui/i],[d,[p,j],[h,w]],[/Hbbtv.*(technisat) (.*);/i],[p,d,[h,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,G],[d,G],[h,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,d,[h,y]],[/droid.+; (shield) bui/i],[d,[p,"Nvidia"],[h,y]],[/(playstation [345portablevi]+)/i],[d,[p,U],[h,y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[p,M],[h,y]],[/((pebble))app/i],[p,d,[h,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[p,_],[h,S]],[/droid.+; (glass) \d/i],[d,[p,A],[h,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[p,q],[h,S]],[/(quest( 2| pro)?)/i],[d,[p,F],[h,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[h,E]],[/(aeobc)\b/i],[d,[p,I],[h,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[h,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[h,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,m]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[f,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,v],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,v],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[f,[v,Q,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,Q,J],[f,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,V],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,v],[/\(bb(10);/i],[v,[f,x]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[v,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[f,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[f,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,B],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,v],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,v]]},Y=function(e,t){if(typeof e===u&&(t=e,e=o),!(this instanceof Y))return new Y(e,t).getResult();var r=typeof i!==a&&i.navigator?i.navigator:o,n=e||(r&&r.userAgent?r.userAgent:""),y=r&&r.userAgentData?r.userAgentData:o,w=t?z(X,t):X,S=r&&r.userAgent==n;return this.getBrowser=function(){var e,t={};return t[f]=o,t[v]=o,$.call(t,n,w.browser),t[l]=typeof(e=t[v])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:o,S&&r&&r.brave&&typeof r.brave.isBrave==s&&(t[f]="Brave"),t},this.getCPU=function(){var e={};return e[g]=o,$.call(e,n,w.cpu),e},this.getDevice=function(){var e={};return e[p]=o,e[d]=o,e[h]=o,$.call(e,n,w.device),S&&!e[h]&&y&&y.mobile&&(e[h]=m),S&&"Macintosh"==e[d]&&r&&typeof r.standalone!==a&&r.maxTouchPoints&&r.maxTouchPoints>2&&(e[d]="iPad",e[h]=b),e},this.getEngine=function(){var e={};return e[f]=o,e[v]=o,$.call(e,n,w.engine),e},this.getOS=function(){var e={};return e[f]=o,e[v]=o,$.call(e,n,w.os),S&&!e[f]&&y&&"Unknown"!=y.platform&&(e[f]=y.platform.replace(/chrome os/i,B).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===c&&e.length>500?G(e,500):e,this},this.setUA(n),this};Y.VERSION="1.0.37",Y.BROWSER=H([f,v,l]),Y.CPU=H([g]),Y.DEVICE=H([d,p,h,y,m,w,b,S,E]),Y.ENGINE=Y.OS=H([f,v]),typeof t!==a?(e.exports&&(t=e.exports=Y),t.UAParser=Y):r.amdO?o!==(n=(function(){return Y}).call(t,r,t,e))&&(e.exports=n):typeof i!==a&&(i.UAParser=Y);var Z=typeof i!==a&&(i.jQuery||i.Zepto);if(Z&&!Z.ua){var ee=new Y;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var r in t)Z.ua[r]=t[r]}}}("object"==typeof window?window:this)},8293:function(e,t,r){"use strict";
32Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(6713).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1747:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});let n=r(8293);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6713:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return o}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let i=globalThis.AsyncLocalStorage;function o(){return i?new i:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(6713).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5714:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return n.requestAsyncStorage}});let n=r(38);function i(e){let t=n.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(6036)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.