@letscooee/web-sdk 9.3.15 → 9.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var sh=Object.create,xc=Object.defineProperty,ah=Object.defineProperties,ch=Object.getOwnPropertyDescriptor,lh=Object.getOwnPropertyDescriptors,uh=Object.getOwnPropertyNames,tp=Object.getOwnPropertySymbols,ph=Object.getPrototypeOf,np=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,rp=(t,e,r)=>e in t?xc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||={})np.call(e,r)&&rp(t,r,e[r]);if(tp)for(var r of tp(e))fh.call(e,r)&&rp(t,r,e[r]);return t},Z=(t,e)=>ah(t,lh(e)),Gi=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Vi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of uh(e))!np.call(t,i)&&i!==r&&xc(t,i,{get:()=>e[i],enumerable:!(n=ch(e,i))||n.enumerable});return t},Qt=(t,e,r)=>(r=t!=null?sh(ph(t)):{},mh(e||!t||!t.__esModule?xc(r,"default",{value:t,enumerable:!0}):r,t)),tn=Vi((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,v){return function(){return v.apply(h,arguments)}},l=function(){var h=arguments,v=h[0],_,g;for(g=1;g<h.length;g++)for(_ in h[g])!(_ in v)&&h[g].hasOwnProperty(_)&&(v[_]=h[g][_]);return v},u=function(h,v){return{value:h,name:v}};n.TRACE=u(1,"TRACE"),n.DEBUG=u(2,"DEBUG"),n.INFO=u(3,"INFO"),n.TIME=u(4,"TIME"),n.WARN=u(5,"WARN"),n.ERROR=u(8,"ERROR"),n.OFF=u(99,"OFF");var f=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};f.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var v=this.context.filterLevel;return h.value>=v.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,v){i&&this.enabledFor(h)&&i(v,l({level:h},this.context))}};var m=new f({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(m,m.enabledFor),h.trace=o(m,m.trace),h.debug=o(m,m.debug),h.time=o(m,m.time),h.timeEnd=o(m,m.timeEnd),h.info=o(m,m.info),h.warn=o(m,m.warn),h.error=o(m,m.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){m.setLevel(h);for(var v in s)s.hasOwnProperty(v)&&s[v].setLevel(h)},n.getLevel=function(){return m.getLevel()},n.get=function(h){return s[h]||(s[h]=new f(l({name:h},m.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(g,y){y.name&&g.unshift("["+y.name+"]")};var v={},_=function(g,y){Function.prototype.apply.call(g,console,y)};return typeof console>"u"?function(){}:function(g,y){g=Array.prototype.slice.call(g);var C=console.log,O;y.level===n.TIME?(O=(y.name?"["+y.name+"] ":"")+g[0],g[1]==="start"?console.time?console.time(O):v[O]=new Date().getTime():console.timeEnd?console.timeEnd(O):_(C,[O+": "+(new Date().getTime()-v[O])+"ms"])):(y.level===n.WARN&&console.warn?C=console.warn:y.level===n.ERROR&&console.error?C=console.error:y.level===n.INFO&&console.info?C=console.info:y.level===n.DEBUG&&console.debug?C=console.debug:y.level===n.TRACE&&console.trace&&(C=console.trace),h.formatter(g,y),_(C,g))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),Mp=Vi((t,e)=>{"use strict";(function(r,n){"use strict";var i="1.0.40",s="",o="?",l="function",u="undefined",f="object",m="string",h="major",v="model",_="name",g="type",y="vendor",C="version",O="architecture",H="console",R="mobile",k="tablet",V="smarttv",Mt="wearable",fe="embedded",j=500,ct="Amazon",Y="Apple",at="ASUS",Xt="BlackBerry",me="Browser",de="Chrome",xe="Edge",be="Firefox",Ut="Google",De="Huawei",ht="LG",Q="Microsoft",we="Motorola",cr="Opera",jr="Samsung",je="Sharp",en="Sony",Hn="Xiaomi",kn="Zebra",Hi="Facebook",Wi="Chromium OS",ji="Mac OS",Mn=" Browser",Be=function(z,dt){var J={};for(var se in z)dt[se]&&dt[se].length%2===0?J[se]=dt[se].concat(z[se]):J[se]=z[se];return J},$r=function(z){for(var dt={},J=0;J<z.length;J++)dt[z[J].toUpperCase()]=z[J];return dt},is=function(z,dt){return typeof z===m?a(dt).indexOf(a(z))!==-1:!1},a=function(z){return z.toLowerCase()},c=function(z){return typeof z===m?z.replace(/[^\d\.]/g,s).split(".")[0]:n},p=function(z,dt){if(typeof z===m)return z=z.replace(/^\s\s*/,s),typeof dt===u?z:z.substring(0,j)},I=function(z,dt){for(var J=0,se,He,Fe,re,X,Ve;J<dt.length&&!X;){var Ls=dt[J],Yo=dt[J+1];for(se=He=0;se<Ls.length&&!X&&Ls[se];)if(X=Ls[se++].exec(z),X)for(Fe=0;Fe<Yo.length;Fe++)Ve=X[++He],re=Yo[Fe],typeof re===f&&re.length>0?re.length===2?typeof re[1]==l?this[re[0]]=re[1].call(this,Ve):this[re[0]]=re[1]:re.length===3?typeof re[1]===l&&!(re[1].exec&&re[1].test)?this[re[0]]=Ve?re[1].call(this,Ve,re[2]):n:this[re[0]]=Ve?Ve.replace(re[1],re[2]):n:re.length===4&&(this[re[0]]=Ve?re[3].call(this,Ve.replace(re[1],re[2])):n):this[re]=Ve||n;J+=2}},N=function(z,dt){for(var J in dt)if(typeof dt[J]===f&&dt[J].length>0){for(var se=0;se<dt[J].length;se++)if(is(dt[J][se],z))return J===o?n:J}else if(is(dt[J],z))return J===o?n:J;return dt.hasOwnProperty("*")?dt["*"]:z},L={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},W={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"},te={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[_,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[_,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[_,C],[/opios[\/ ]+([\w\.]+)/i],[C,[_,cr+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[_,cr+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[_,cr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[_,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[C,[_,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[_,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[_,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[_,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[_,"UC"+me]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[_,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[_,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[_,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[_,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[_,"Smart Lenovo "+me]],[/(avast|avg)\/([\w\.]+)/i],[[_,/(.+)/,"$1 Secure "+me],C],[/\bfocus\/([\w\.]+)/i],[C,[_,be+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[_,cr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[_,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[_,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[_,cr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[_,"MIUI"+Mn]],[/fxios\/([\w\.-]+)/i],[C,[_,be]],[/\bqihoobrowser\/?([\w\.]*)/i],[C,[_,"360"]],[/\b(qq)\/([\w\.]+)/i],[[_,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[_,/(.+)/,"$1"+Mn],C],[/samsungbrowser\/([\w\.]+)/i],[C,[_,jr+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[C,[_,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[_,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[_,C],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[_],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[C,_],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[_,Hi],C],[/(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,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[_,C],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[_,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[_,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[_,de+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[_,de+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[_,"Android "+me]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[_,C],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[C,[_,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[C,_],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[_,[C,N,L]],[/(webkit|khtml)\/([\w\.]+)/i],[_,C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[_,"Netscape"],C],[/(wolvic|librewolf)\/([\w\.]+)/i],[_,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[_,be+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\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|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[_,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[_,[C,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[O,"amd64"]],[/(ia32(?=;))/i],[[O,a]],[/((?:i[346]|x)86)[;\)]/i],[[O,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[O,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[O,"armhf"]],[/windows (ce|mobile); ppc;/i],[[O,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[O,/ower/,s,a]],[/(sun4\w)[;\)]/i],[[O,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[O,a]]],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],[v,[y,jr],[g,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[v,[y,jr],[g,R]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[v,[y,Y],[g,R]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[v,[y,Y],[g,k]],[/(macintosh);/i],[v,[y,Y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[v,[y,je],[g,R]],[/(?:honor)([-\w ]+)[;\)]/i],[v,[y,"Honor"],[g,R]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[v,[y,De],[g,k]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[v,[y,De],[g,R]],[/\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|pro)?)(?: bui|\))/i],[[v,/_/g," "],[y,Hn],[g,R]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[v,/_/g," "],[y,Hn],[g,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[v,[y,"OPPO"],[g,R]],[/\b(opd2\d{3}a?) bui/i],[v,[y,"OPPO"],[g,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[v,[y,"Vivo"],[g,R]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[v,[y,"Realme"],[g,R]],[/\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],[v,[y,we],[g,R]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[v,[y,we],[g,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[v,[y,ht],[g,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[v,[y,ht],[g,R]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[v,[y,"Lenovo"],[g,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[v,/_/g," "],[y,"Nokia"],[g,R]],[/(pixel c)\b/i],[v,[y,Ut],[g,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[v,[y,Ut],[g,R]],[/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],[v,[y,en],[g,R]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[v,"Xperia Tablet"],[y,en],[g,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[v,[y,"OnePlus"],[g,R]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[v,[y,ct],[g,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[v,/(.+)/g,"Fire Phone $1"],[y,ct],[g,R]],[/(playbook);[-\w\),; ]+(rim)/i],[v,y,[g,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[v,[y,Xt],[g,R]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[v,[y,at],[g,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[v,[y,at],[g,R]],[/(nexus 9)/i],[v,[y,"HTC"],[g,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[v,/_/g," "],[g,R]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[v,[y,"TCL"],[g,k]],[/(itel) ((\w+))/i],[[y,a],v,[g,N,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[v,[y,"Acer"],[g,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[v,[y,"Meizu"],[g,R]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[v,[y,"Ulefone"],[g,R]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[v,[y,"Energizer"],[g,R]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[v,[y,"Cat"],[g,R]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[v,[y,"Smartfren"],[g,R]],[/droid.+; (a(?:015|06[35]|142p?))/i],[v,[y,"Nothing"],[g,R]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[y,v,[g,R]],[/(imo) (tab \w+)/i,/(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],[y,v,[g,k]],[/(surface duo)/i],[v,[y,Q],[g,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[v,[y,"Fairphone"],[g,R]],[/(u304aa)/i],[v,[y,"AT&T"],[g,R]],[/\bsie-(\w*)/i],[v,[y,"Siemens"],[g,R]],[/\b(rct\w+) b/i],[v,[y,"RCA"],[g,k]],[/\b(venue[\d ]{2,7}) b/i],[v,[y,"Dell"],[g,k]],[/\b(q(?:mv|ta)\w+) b/i],[v,[y,"Verizon"],[g,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[v,[y,"Barnes & Noble"],[g,k]],[/\b(tm\d{3}\w+) b/i],[v,[y,"NuVision"],[g,k]],[/\b(k88) b/i],[v,[y,"ZTE"],[g,k]],[/\b(nx\d{3}j) b/i],[v,[y,"ZTE"],[g,R]],[/\b(gen\d{3}) b.+49h/i],[v,[y,"Swiss"],[g,R]],[/\b(zur\d{3}) b/i],[v,[y,"Swiss"],[g,k]],[/\b((zeki)?tb.*\b) b/i],[v,[y,"Zeki"],[g,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[y,"Dragon Touch"],v,[g,k]],[/\b(ns-?\w{0,9}) b/i],[v,[y,"Insignia"],[g,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[v,[y,"NextBook"],[g,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[y,"Voice"],v,[g,R]],[/\b(lvtel\-)?(v1[12]) b/i],[[y,"LvTel"],v,[g,R]],[/\b(ph-1) /i],[v,[y,"Essential"],[g,R]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[v,[y,"Envizen"],[g,k]],[/\b(trio[-\w\. ]+) b/i],[v,[y,"MachSpeed"],[g,k]],[/\btu_(1491) b/i],[v,[y,"Rotor"],[g,k]],[/(shield[\w ]+) b/i],[v,[y,"Nvidia"],[g,k]],[/(sprint) (\w+)/i],[y,v,[g,R]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[y,Q],[g,R]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[y,kn],[g,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[y,kn],[g,R]],[/smart-tv.+(samsung)/i],[y,[g,V]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[y,jr],[g,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,ht],[g,V]],[/(apple) ?tv/i],[y,[v,Y+" TV"],[g,V]],[/crkey/i],[[v,de+"cast"],[y,Ut],[g,V]],[/droid.+aft(\w+)( bui|\))/i],[v,[y,ct],[g,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[v,[y,je],[g,V]],[/(bravia[\w ]+)( bui|\))/i],[v,[y,en],[g,V]],[/(mitv-\w{5}) bui/i],[v,[y,Hn],[g,V]],[/Hbbtv.*(technisat) (.*);/i],[y,v,[g,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,p],[v,p],[g,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,V]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[y,v,[g,H]],[/droid.+; (shield) bui/i],[v,[y,"Nvidia"],[g,H]],[/(playstation [345portablevi]+)/i],[v,[y,en],[g,H]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[v,[y,Q],[g,H]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[v,[y,jr],[g,Mt]],[/((pebble))app/i],[y,v,[g,Mt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[v,[y,Y],[g,Mt]],[/droid.+; (glass) \d/i],[v,[y,Ut],[g,Mt]],[/droid.+; (wt63?0{2,3})\)/i],[v,[y,kn],[g,Mt]],[/droid.+; (glass) \d/i],[v,[y,Ut],[g,Mt]],[/(pico) (4|neo3(?: link|pro)?)/i],[y,v,[g,Mt]],[/; (quest( \d| pro)?)/i],[v,[y,Hi],[g,Mt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[g,fe]],[/(aeobc)\b/i],[v,[y,ct],[g,fe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[v,[g,R]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[v,[g,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,R]],[/(android[-\w\. ]{0,9});.+buil/i],[v,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[_,xe+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[_,C],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[_,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[_,C],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,_]],os:[[/microsoft (windows) (vista|xp)/i],[_,C],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[_,[C,N,W]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,N,W],[_,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[_,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[_,ji],[C,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[C,_],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[_,C],[/\(bb(10);/i],[C,[_,Xt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[C,[_,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[_,be+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[C,[_,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[_,"watchOS"]],[/crkey\/([\d\.]+)/i],[C,[_,de+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[_,Wi],C],[/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],[_,C],[/(sunos) ?([\w\.\d]*)/i],[[_,"Solaris"],C],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[_,C]]},Tt=function(z,dt){if(typeof z===f&&(dt=z,z=n),!(this instanceof Tt))return new Tt(z,dt).getResult();var J=typeof r!==u&&r.navigator?r.navigator:n,se=z||(J&&J.userAgent?J.userAgent:s),He=J&&J.userAgentData?J.userAgentData:n,Fe=dt?Be(te,dt):te,re=J&&J.userAgent==se;return this.getBrowser=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.browser),X[h]=c(X[C]),re&&J&&J.brave&&typeof J.brave.isBrave==l&&(X[_]="Brave"),X},this.getCPU=function(){var X={};return X[O]=n,I.call(X,se,Fe.cpu),X},this.getDevice=function(){var X={};return X[y]=n,X[v]=n,X[g]=n,I.call(X,se,Fe.device),re&&!X[g]&&He&&He.mobile&&(X[g]=R),re&&X[v]=="Macintosh"&&J&&typeof J.standalone!==u&&J.maxTouchPoints&&J.maxTouchPoints>2&&(X[v]="iPad",X[g]=k),X},this.getEngine=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.engine),X},this.getOS=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.os),re&&!X[_]&&He&&He.platform&&He.platform!="Unknown"&&(X[_]=He.platform.replace(/chrome os/i,Wi).replace(/macos/i,ji)),X},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 se},this.setUA=function(X){return se=typeof X===m&&X.length>j?p(X,j):X,this},this.setUA(se),this};Tt.VERSION=i,Tt.BROWSER=$r([_,C,h]),Tt.CPU=$r([O]),Tt.DEVICE=$r([v,y,g,H,R,V,k,Mt,fe]),Tt.ENGINE=Tt.OS=$r([_,C]),typeof t!==u?(typeof e!==u&&e.exports&&(t=e.exports=Tt),t.UAParser=Tt):typeof define===l&&define.amd?define(function(){return Tt}):typeof r!==u&&(r.UAParser=Tt);var Dt=typeof r!==u&&(r.jQuery||r.Zepto);if(Dt&&!Dt.ua){var ce=new Tt;Dt.ua=ce.getResult(),Dt.ua.get=function(){return ce.getUA()},Dt.ua.set=function(z){ce.setUA(z);var dt=ce.getResult();for(var J in dt)Dt.ua[J]=dt[J]}}})(typeof window=="object"?window:t)}),Hp=Vi((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,l,u){function f(v,_){if(!l[v]){if(!o[v]){var g=typeof Gi=="function"&&Gi;if(!_&&g)return g(v,!0);if(m)return m(v,!0);var y=new Error("Cannot find module '"+v+"'");throw y.code="MODULE_NOT_FOUND",y}var C=l[v]={exports:{}};o[v][0].call(C.exports,function(O){var H=o[v][1][O];return f(H||O)},C,C.exports,s,o,l,u)}return l[v].exports}for(var m=typeof Gi=="function"&&Gi,h=0;h<u.length;h++)f(u[h]);return f}({1:[function(s,o,l){(function(u){"use strict";var f=u.MutationObserver||u.WebKitMutationObserver,m;if(f){var h=0,v=new f(O),_=u.document.createTextNode("");v.observe(_,{characterData:!0}),m=function(){_.data=h=++h%2}}else if(!u.setImmediate&&typeof u.MessageChannel<"u"){var g=new u.MessageChannel;g.port1.onmessage=O,m=function(){g.port2.postMessage(0)}}else"document"in u&&"onreadystatechange"in u.document.createElement("script")?m=function(){var R=u.document.createElement("script");R.onreadystatechange=function(){O(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},u.document.documentElement.appendChild(R)}:m=function(){setTimeout(O,0)};var y,C=[];function O(){y=!0;for(var R,k,V=C.length;V;){for(k=C,C=[],R=-1;++R<V;)k[R]();V=C.length}y=!1}o.exports=H;function H(R){C.push(R)===1&&!y&&m()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,l){"use strict";var u=s(1);function f(){}var m={},h=["REJECTED"],v=["FULFILLED"],_=["PENDING"];o.exports=g;function g(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=_,this.queue=[],this.outcome=void 0,j!==f&&H(this,j)}g.prototype.catch=function(j){return this.then(null,j)},g.prototype.then=function(j,ct){if(typeof j!="function"&&this.state===v||typeof ct!="function"&&this.state===h)return this;var Y=new this.constructor(f);if(this.state!==_){var at=this.state===v?j:ct;C(Y,at,this.outcome)}else this.queue.push(new y(Y,j,ct));return Y};function y(j,ct,Y){this.promise=j,typeof ct=="function"&&(this.onFulfilled=ct,this.callFulfilled=this.otherCallFulfilled),typeof Y=="function"&&(this.onRejected=Y,this.callRejected=this.otherCallRejected)}y.prototype.callFulfilled=function(j){m.resolve(this.promise,j)},y.prototype.otherCallFulfilled=function(j){C(this.promise,this.onFulfilled,j)},y.prototype.callRejected=function(j){m.reject(this.promise,j)},y.prototype.otherCallRejected=function(j){C(this.promise,this.onRejected,j)};function C(j,ct,Y){u(function(){var at;try{at=ct(Y)}catch(Xt){return m.reject(j,Xt)}at===j?m.reject(j,new TypeError("Cannot resolve promise with itself")):m.resolve(j,at)})}m.resolve=function(j,ct){var Y=R(O,ct);if(Y.status==="error")return m.reject(j,Y.value);var at=Y.value;if(at)H(j,at);else{j.state=v,j.outcome=ct;for(var Xt=-1,me=j.queue.length;++Xt<me;)j.queue[Xt].callFulfilled(ct)}return j},m.reject=function(j,ct){j.state=h,j.outcome=ct;for(var Y=-1,at=j.queue.length;++Y<at;)j.queue[Y].callRejected(ct);return j};function O(j){var ct=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof ct=="function")return function(){ct.apply(j,arguments)}}function H(j,ct){var Y=!1;function at(xe){Y||(Y=!0,m.reject(j,xe))}function Xt(xe){Y||(Y=!0,m.resolve(j,xe))}function me(){ct(Xt,at)}var de=R(me);de.status==="error"&&at(de.value)}function R(j,ct){var Y={};try{Y.value=j(ct),Y.status="success"}catch(at){Y.status="error",Y.value=at}return Y}g.resolve=k;function k(j){return j instanceof this?j:m.resolve(new this(f),j)}g.reject=V;function V(j){var ct=new this(f);return m.reject(ct,j)}g.all=Mt;function Mt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=j.length,at=!1;if(!Y)return this.resolve([]);for(var Xt=new Array(Y),me=0,de=-1,xe=new this(f);++de<Y;)be(j[de],de);return xe;function be(Ut,De){ct.resolve(Ut).then(ht,function(Q){at||(at=!0,m.reject(xe,Q))});function ht(Q){Xt[De]=Q,++me===Y&&!at&&(at=!0,m.resolve(xe,Xt))}}}g.race=fe;function fe(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=j.length,at=!1;if(!Y)return this.resolve([]);for(var Xt=-1,me=new this(f);++Xt<Y;)de(j[Xt]);return me;function de(xe){ct.resolve(xe).then(function(be){at||(at=!0,m.resolve(me,be))},function(be){at||(at=!0,m.reject(me,be))})}}},{1:1}],3:[function(s,o,l){(function(u){"use strict";typeof u.Promise!="function"&&(u.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,l){"use strict";var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d};function f(d,E){if(!(d instanceof E))throw new TypeError("Cannot call a class as a function")}function m(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=m();function v(){try{if(!h||!h.open)return!1;var d=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!d||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function _(d,E){d=d||[],E=E||{};try{return new Blob(d,E)}catch(D){if(D.name!=="TypeError")throw D;for(var S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,T=new S,x=0;x<d.length;x+=1)T.append(d[x]);return T.getBlob(E.type)}}typeof Promise>"u"&&s(3);var g=Promise;function y(d,E){E&&d.then(function(S){E(null,S)},function(S){E(S)})}function C(d,E,S){typeof E=="function"&&d.then(E),typeof S=="function"&&d.catch(S)}function O(d){return typeof d!="string"&&(console.warn(d+" used as a key, but it is not a string."),d=String(d)),d}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",k=void 0,V={},Mt=Object.prototype.toString,fe="readonly",j="readwrite";function ct(d){for(var E=d.length,S=new ArrayBuffer(E),T=new Uint8Array(S),x=0;x<E;x++)T[x]=d.charCodeAt(x);return S}function Y(d){return new g(function(E){var S=d.transaction(R,j),T=_([""]);S.objectStore(R).put(T,"key"),S.onabort=function(x){x.preventDefault(),x.stopPropagation(),E(!1)},S.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),D=navigator.userAgent.match(/Edge\//);E(D||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function at(d){return typeof k=="boolean"?g.resolve(k):Y(d).then(function(E){return k=E,k})}function Xt(d){var E=V[d.name],S={};S.promise=new g(function(T,x){S.resolve=T,S.reject=x}),E.deferredOperations.push(S),E.dbReady?E.dbReady=E.dbReady.then(function(){return S.promise}):E.dbReady=S.promise}function me(d){var E=V[d.name],S=E.deferredOperations.pop();if(S)return S.resolve(),S.promise}function de(d,E){var S=V[d.name],T=S.deferredOperations.pop();if(T)return T.reject(E),T.promise}function xe(d,E){return new g(function(S,T){if(V[d.name]=V[d.name]||en(),d.db)if(E)Xt(d),d.db.close();else return S(d.db);var x=[d.name];E&&x.push(d.version);var D=h.open.apply(h,x);E&&(D.onupgradeneeded=function(P){var U=D.result;try{U.createObjectStore(d.storeName),P.oldVersion<=1&&U.createObjectStore(R)}catch(F){if(F.name==="ConstraintError")console.warn('The database "'+d.name+'" has been upgraded from version '+P.oldVersion+" to version "+P.newVersion+', but the storage "'+d.storeName+'" already exists.');else throw F}}),D.onerror=function(P){P.preventDefault(),T(D.error)},D.onsuccess=function(){var P=D.result;P.onversionchange=function(U){U.target.close()},S(P),me(d)}})}function be(d){return xe(d,!1)}function Ut(d){return xe(d,!0)}function De(d,E){if(!d.db)return!0;var S=!d.db.objectStoreNames.contains(d.storeName),T=d.version<d.db.version,x=d.version>d.db.version;if(T&&(d.version!==E&&console.warn('The database "'+d.name+`" can't be downgraded from version `+d.db.version+" to version "+d.version+"."),d.version=d.db.version),x||S){if(S){var D=d.db.version+1;D>d.version&&(d.version=D)}return!0}return!1}function ht(d){return new g(function(E,S){var T=new FileReader;T.onerror=S,T.onloadend=function(x){var D=btoa(x.target.result||"");E({__local_forage_encoded_blob:!0,data:D,type:d.type})},T.readAsBinaryString(d)})}function Q(d){var E=ct(atob(d.data));return _([E],{type:d.type})}function we(d){return d&&d.__local_forage_encoded_blob}function cr(d){var E=this,S=E._initReady().then(function(){var T=V[E._dbInfo.name];if(T&&T.dbReady)return T.dbReady});return C(S,d,d),S}function jr(d){Xt(d);for(var E=V[d.name],S=E.forages,T=0;T<S.length;T++){var x=S[T];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return d.db=null,be(d).then(function(D){return d.db=D,De(d)?Ut(d):D}).then(function(D){d.db=E.db=D;for(var P=0;P<S.length;P++)S[P]._dbInfo.db=D}).catch(function(D){throw de(d,D),D})}function je(d,E,S,T){T===void 0&&(T=1);try{var x=d.db.transaction(d.storeName,E);S(null,x)}catch(D){if(T>0&&(!d.db||D.name==="InvalidStateError"||D.name==="NotFoundError"))return g.resolve().then(function(){if(!d.db||D.name==="NotFoundError"&&!d.db.objectStoreNames.contains(d.storeName)&&d.version<=d.db.version)return d.db&&(d.version=d.db.version+1),Ut(d)}).then(function(){return jr(d).then(function(){je(d,E,S,T-1)})}).catch(S);S(D)}}function en(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Hn(d){var E=this,S={db:null};if(d)for(var T in d)S[T]=d[T];var x=V[S.name];x||(x=en(),V[S.name]=x),x.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=cr);var D=[];function P(){return g.resolve()}for(var U=0;U<x.forages.length;U++){var F=x.forages[U];F!==E&&D.push(F._initReady().catch(P))}var $=x.forages.slice(0);return g.all(D).then(function(){return S.db=x.db,be(S)}).then(function(B){return S.db=B,De(S,E._defaultConfig.version)?Ut(S):B}).then(function(B){S.db=x.db=B,E._dbInfo=S;for(var G=0;G<$.length;G++){var gt=$[G];gt!==E&&(gt._dbInfo.db=S.db,gt._dbInfo.version=S.version)}})}function kn(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.get(d);$.onsuccess=function(){var B=$.result;B===void 0&&(B=null),we(B)&&(B=Q(B)),x(B)},$.onerror=function(){D($.error)}}catch(B){D(B)}})}).catch(D)});return y(T,E),T}function Hi(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.openCursor(),B=1;$.onsuccess=function(){var G=$.result;if(G){var gt=G.value;we(gt)&&(gt=Q(gt));var he=d(gt,G.key,B++);he!==void 0?x(he):G.continue()}else x()},$.onerror=function(){D($.error)}}catch(G){D(G)}})}).catch(D)});return y(T,E),T}function Wi(d,E,S){var T=this;d=O(d);var x=new g(function(D,P){var U;T.ready().then(function(){return U=T._dbInfo,Mt.call(E)==="[object Blob]"?at(U.db).then(function(F){return F?E:ht(E)}):E}).then(function(F){je(T._dbInfo,j,function($,B){if($)return P($);try{var G=B.objectStore(T._dbInfo.storeName);F===null&&(F=void 0);var gt=G.put(F,d);B.oncomplete=function(){F===void 0&&(F=null),D(F)},B.onabort=B.onerror=function(){var he=gt.error?gt.error:gt.transaction.error;P(he)}}catch(he){P(he)}})}).catch(P)});return y(x,S),x}function ji(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,j,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.delete(d);U.oncomplete=function(){x()},U.onerror=function(){D($.error)},U.onabort=function(){var B=$.error?$.error:$.transaction.error;D(B)}}catch(B){D(B)}})}).catch(D)});return y(T,E),T}function Mn(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,j,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.clear();P.oncomplete=function(){T()},P.onabort=P.onerror=function(){var $=F.error?F.error:F.transaction.error;x($)}}catch($){x($)}})}).catch(x)});return y(S,d),S}function Be(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,fe,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.count();F.onsuccess=function(){T(F.result)},F.onerror=function(){x(F.error)}}catch($){x($)}})}).catch(x)});return y(S,d),S}function $r(d,E){var S=this,T=new g(function(x,D){if(d<0){x(null);return}S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=!1,B=F.openKeyCursor();B.onsuccess=function(){var G=B.result;if(!G){x(null);return}d===0||$?x(G.key):($=!0,G.advance(d))},B.onerror=function(){D(B.error)}}catch(G){D(G)}})}).catch(D)});return y(T,E),T}function is(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,fe,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.openKeyCursor(),$=[];F.onsuccess=function(){var B=F.result;if(!B){T($);return}$.push(B.key),B.continue()},F.onerror=function(){x(F.error)}}catch(B){x(B)}})}).catch(x)});return y(S,d),S}function a(d,E){E=H.apply(this,arguments);var S=this.config();d=typeof d!="function"&&d||{},d.name||(d.name=d.name||S.name,d.storeName=d.storeName||S.storeName);var T=this,x;if(!d.name)x=g.reject("Invalid arguments");else{var D=d.name===S.name&&T._dbInfo.db,P=D?g.resolve(T._dbInfo.db):be(d).then(function(U){var F=V[d.name],$=F.forages;F.db=U;for(var B=0;B<$.length;B++)$[B]._dbInfo.db=U;return U});d.storeName?x=P.then(function(U){if(U.objectStoreNames.contains(d.storeName)){var F=U.version+1;Xt(d);var $=V[d.name],B=$.forages;U.close();for(var G=0;G<B.length;G++){var gt=B[G];gt._dbInfo.db=null,gt._dbInfo.version=F}var he=new g(function(oe,Ie){var ye=h.open(d.name,F);ye.onerror=function(We){var Ku=ye.result;Ku.close(),Ie(We)},ye.onupgradeneeded=function(){var We=ye.result;We.deleteObjectStore(d.storeName)},ye.onsuccess=function(){var We=ye.result;We.close(),oe(We)}});return he.then(function(oe){$.db=oe;for(var Ie=0;Ie<B.length;Ie++){var ye=B[Ie];ye._dbInfo.db=oe,me(ye._dbInfo)}}).catch(function(oe){throw(de(d,oe)||g.resolve()).catch(function(){}),oe})}}):x=P.then(function(U){Xt(d);var F=V[d.name],$=F.forages;U.close();for(var B=0;B<$.length;B++){var G=$[B];G._dbInfo.db=null}var gt=new g(function(he,oe){var Ie=h.deleteDatabase(d.name);Ie.onerror=function(){var ye=Ie.result;ye&&ye.close(),oe(Ie.error)},Ie.onblocked=function(){console.warn('dropInstance blocked for database "'+d.name+'" until all open connections are closed')},Ie.onsuccess=function(){var ye=Ie.result;ye&&ye.close(),he(ye)}});return gt.then(function(he){F.db=he;for(var oe=0;oe<$.length;oe++){var Ie=$[oe];me(Ie._dbInfo)}}).catch(function(he){throw(de(d,he)||g.resolve()).catch(function(){}),he})})}return y(x,E),x}var c={_driver:"asyncStorage",_initStorage:Hn,_support:v(),iterate:Hi,getItem:kn,setItem:Wi,removeItem:ji,clear:Mn,length:Be,key:$r,keys:is,dropInstance:a};function p(){return typeof openDatabase=="function"}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N="~~local_forage_type~",L=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:",te=W.length,Tt="arbf",Dt="blob",ce="si08",z="ui08",dt="uic8",J="si16",se="si32",He="ur16",Fe="ui32",re="fl32",X="fl64",Ve=te+Tt.length,Ls=Object.prototype.toString;function Yo(d){var E=d.length*.75,S=d.length,T,x=0,D,P,U,F;d[d.length-1]==="="&&(E--,d[d.length-2]==="="&&E--);var $=new ArrayBuffer(E),B=new Uint8Array($);for(T=0;T<S;T+=4)D=I.indexOf(d[T]),P=I.indexOf(d[T+1]),U=I.indexOf(d[T+2]),F=I.indexOf(d[T+3]),B[x++]=D<<2|P>>4,B[x++]=(P&15)<<4|U>>2,B[x++]=(U&3)<<6|F&63;return $}function Ic(d){var E=new Uint8Array(d),S="",T;for(T=0;T<E.length;T+=3)S+=I[E[T]>>2],S+=I[(E[T]&3)<<4|E[T+1]>>4],S+=I[(E[T+1]&15)<<2|E[T+2]>>6],S+=I[E[T+2]&63];return E.length%3===2?S=S.substring(0,S.length-1)+"=":E.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function $d(d,E){var S="";if(d&&(S=Ls.call(d)),d&&(S==="[object ArrayBuffer]"||d.buffer&&Ls.call(d.buffer)==="[object ArrayBuffer]")){var T,x=W;d instanceof ArrayBuffer?(T=d,x+=Tt):(T=d.buffer,S==="[object Int8Array]"?x+=ce:S==="[object Uint8Array]"?x+=z:S==="[object Uint8ClampedArray]"?x+=dt:S==="[object Int16Array]"?x+=J:S==="[object Uint16Array]"?x+=He:S==="[object Int32Array]"?x+=se:S==="[object Uint32Array]"?x+=Fe:S==="[object Float32Array]"?x+=re:S==="[object Float64Array]"?x+=X:E(new Error("Failed to get type for BinaryArray"))),E(x+Ic(T))}else if(S==="[object Blob]"){var D=new FileReader;D.onload=function(){var P=N+d.type+"~"+Ic(this.result);E(W+Dt+P)},D.readAsArrayBuffer(d)}else try{E(JSON.stringify(d))}catch(P){console.error("Couldn't convert value into a JSON string: ",d),E(null,P)}}function Fd(d){if(d.substring(0,te)!==W)return JSON.parse(d);var E=d.substring(Ve),S=d.substring(te,Ve),T;if(S===Dt&&L.test(E)){var x=E.match(L);T=x[1],E=E.substring(x[0].length)}var D=Yo(E);switch(S){case Tt:return D;case Dt:return _([D],{type:T});case ce:return new Int8Array(D);case z:return new Uint8Array(D);case dt:return new Uint8ClampedArray(D);case J:return new Int16Array(D);case He:return new Uint16Array(D);case se:return new Int32Array(D);case Fe:return new Uint32Array(D);case re:return new Float32Array(D);case X:return new Float64Array(D);default:throw new Error("Unkown type: "+S)}}var Tc={serialize:$d,deserialize:Fd,stringToBuffer:Yo,bufferToString:Ic};function eh(d,E,S,T){d.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,T)}function Hd(d){var E=this,S={db:null};if(d)for(var T in d)S[T]=typeof d[T]!="string"?d[T].toString():d[T];var x=new g(function(D,P){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(U){return P(U)}S.db.transaction(function(U){eh(U,S,function(){E._dbInfo=S,D()},function(F,$){P($)})},P)});return S.serializer=Tc,x}function Fn(d,E,S,T,x,D){d.executeSql(S,T,x,function(P,U){U.code===U.SYNTAX_ERR?P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(F,$){$.rows.length?D(F,U):eh(F,E,function(){F.executeSql(S,T,x,D)},D)},D):D(P,U)},D)}function Vd(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT * FROM "+P.storeName+" WHERE key = ? LIMIT 1",[d],function(F,$){var B=$.rows.length?$.rows.item(0).value:null;B&&(B=P.serializer.deserialize(B)),x(B)},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function qd(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT * FROM "+P.storeName,[],function(F,$){for(var B=$.rows,G=B.length,gt=0;gt<G;gt++){var he=B.item(gt),oe=he.value;if(oe&&(oe=P.serializer.deserialize(oe)),oe=d(oe,he.key,gt+1),oe!==void 0){x(oe);return}}x()},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function rh(d,E,S,T){var x=this;d=O(d);var D=new g(function(P,U){x.ready().then(function(){E===void 0&&(E=null);var F=E,$=x._dbInfo;$.serializer.serialize(E,function(B,G){G?U(G):$.db.transaction(function(gt){Fn(gt,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[d,B],function(){P(F)},function(he,oe){U(oe)})},function(gt){if(gt.code===gt.QUOTA_ERR){if(T>0){P(rh.apply(x,[d,F,S,T-1]));return}U(gt)}})})}).catch(U)});return y(D,S),D}function Wd(d,E,S){return rh.apply(this,[d,E,S,1])}function zd(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"DELETE FROM "+P.storeName+" WHERE key = ?",[d],function(){x()},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function Gd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"DELETE FROM "+D.storeName,[],function(){T()},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Kd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"SELECT COUNT(key) as c FROM "+D.storeName,[],function(U,F){var $=F.rows.item(0).c;T($)},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Yd(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT key FROM "+P.storeName+" WHERE id = ? LIMIT 1",[d+1],function(F,$){var B=$.rows.length?$.rows.item(0).key:null;x(B)},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function Jd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"SELECT key FROM "+D.storeName,[],function(U,F){for(var $=[],B=0;B<F.rows.length;B++)$.push(F.rows.item(B).key);T($)},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Xd(d){return new g(function(E,S){d.transaction(function(T){T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,D){for(var P=[],U=0;U<D.rows.length;U++)P.push(D.rows.item(U).name);E({db:d,storeNames:P})},function(x,D){S(D)})},function(T){S(T)})})}function Zd(d,E){E=H.apply(this,arguments);var S=this.config();d=typeof d!="function"&&d||{},d.name||(d.name=d.name||S.name,d.storeName=d.storeName||S.storeName);var T=this,x;return d.name?x=new g(function(D){var P;d.name===S.name?P=T._dbInfo.db:P=openDatabase(d.name,"","",0),d.storeName?D({db:P,storeNames:[d.storeName]}):D(Xd(P))}).then(function(D){return new g(function(P,U){D.db.transaction(function(F){function $(he){return new g(function(oe,Ie){F.executeSql("DROP TABLE IF EXISTS "+he,[],function(){oe()},function(ye,We){Ie(We)})})}for(var B=[],G=0,gt=D.storeNames.length;G<gt;G++)B.push($(D.storeNames[G]));g.all(B).then(function(){P()}).catch(function(he){U(he)})},function(F){U(F)})})}):x=g.reject("Invalid arguments"),y(x,E),x}var Qd={_driver:"webSQLStorage",_initStorage:Hd,_support:p(),iterate:qd,getItem:Vd,setItem:Wd,removeItem:zd,clear:Gd,length:Kd,key:Yd,keys:Jd,dropInstance:Zd};function Hg(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function nh(d,E){var S=d.name+"/";return d.storeName!==E.storeName&&(S+=d.storeName+"/"),S}function Lm(){var d="_localforage_support_test";try{return localStorage.setItem(d,!0),localStorage.removeItem(d),!1}catch{return!0}}function qm(){return!Lm()||localStorage.length>0}function zm(d){var E=this,S={};if(d)for(var T in d)S[T]=d[T];return S.keyPrefix=nh(d,E._defaultConfig),qm()?(E._dbInfo=S,S.serializer=Tc,g.resolve()):g.reject()}function Ym(d){var E=this,S=E.ready().then(function(){for(var T=E._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var D=localStorage.key(x);D.indexOf(T)===0&&localStorage.removeItem(D)}});return y(S,d),S}function kv(d,E){var S=this;d=O(d);var T=S.ready().then(function(){var x=S._dbInfo,D=localStorage.getItem(x.keyPrefix+d);return D&&(D=x.serializer.deserialize(D)),D});return y(T,E),T}function Mv(d,E){var S=this,T=S.ready().then(function(){for(var x=S._dbInfo,D=x.keyPrefix,P=D.length,U=localStorage.length,F=1,$=0;$<U;$++){var B=localStorage.key($);if(B.indexOf(D)===0){var G=localStorage.getItem(B);if(G&&(G=x.serializer.deserialize(G)),G=d(G,B.substring(P),F++),G!==void 0)return G}}});return y(T,E),T}function Uv(d,E){var S=this,T=S.ready().then(function(){var x=S._dbInfo,D;try{D=localStorage.key(d)}catch{D=null}return D&&(D=D.substring(x.keyPrefix.length)),D});return y(T,E),T}function jv(d){var E=this,S=E.ready().then(function(){for(var T=E._dbInfo,x=localStorage.length,D=[],P=0;P<x;P++){var U=localStorage.key(P);U.indexOf(T.keyPrefix)===0&&D.push(U.substring(T.keyPrefix.length))}return D});return y(S,d),S}function Bv(d){var E=this,S=E.keys().then(function(T){return T.length});return y(S,d),S}function $v(d,E){var S=this;d=O(d);var T=S.ready().then(function(){var x=S._dbInfo;localStorage.removeItem(x.keyPrefix+d)});return y(T,E),T}function Fv(d,E,S){var T=this;d=O(d);var x=T.ready().then(function(){E===void 0&&(E=null);var D=E;return new g(function(P,U){var F=T._dbInfo;F.serializer.serialize(E,function($,B){if(B)U(B);else try{localStorage.setItem(F.keyPrefix+d,$),P(D)}catch(G){(G.name==="QuotaExceededError"||G.name==="NS_ERROR_DOM_QUOTA_REACHED")&&U(G),U(G)}})})});return y(x,S),x}function Hv(d,E){if(E=H.apply(this,arguments),d=typeof d!="function"&&d||{},!d.name){var S=this.config();d.name=d.name||S.name,d.storeName=d.storeName||S.storeName}var T=this,x;return d.name?x=new g(function(D){d.storeName?D(nh(d,T._defaultConfig)):D(d.name+"/")}).then(function(D){for(var P=localStorage.length-1;P>=0;P--){var U=localStorage.key(P);U.indexOf(D)===0&&localStorage.removeItem(U)}}):x=g.reject("Invalid arguments"),y(x,E),x}var Vv={_driver:"localStorageWrapper",_initStorage:zm,_support:Hg(),iterate:Mv,getItem:kv,setItem:Fv,removeItem:$v,clear:Ym,length:Bv,key:Uv,keys:jv,dropInstance:Hv},Wv=function(d,E){return d===E||typeof d=="number"&&typeof E=="number"&&isNaN(d)&&isNaN(E)},zv=function(d,E){for(var S=d.length,T=0;T<S;){if(Wv(d[T],E))return!0;T++}return!1},ih=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"},Ga={},oh={},to={INDEXEDDB:c,WEBSQL:Qd,LOCALSTORAGE:Vv},Gv=[to.INDEXEDDB._driver,to.WEBSQL._driver,to.LOCALSTORAGE._driver],Ec=["dropInstance"],Jc=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ec),Ly={description:"",driver:Gv.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function By(d,E){d[E]=function(){var S=arguments;return d.ready().then(function(){return d[E].apply(d,S)})}}function zu(){for(var d=1;d<arguments.length;d++){var E=arguments[d];if(E)for(var S in E)E.hasOwnProperty(S)&&(ih(E[S])?arguments[0][S]=E[S].slice():arguments[0][S]=E[S])}return arguments[0]}var tb=function(){function d(E){f(this,d);for(var S in to)if(to.hasOwnProperty(S)){var T=to[S],x=T._driver;this[S]=x,Ga[x]||this.defineDriver(T)}this._defaultConfig=zu({},Ly),this._config=zu({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return d.prototype.config=function(E){if((typeof E>"u"?"undefined":u(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in E){if(S==="storeName"&&(E[S]=E[S].replace(/\W/g,"_")),S==="version"&&typeof E[S]!="number")return new Error("Database version must be a number.");this._config[S]=E[S]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},d.prototype.defineDriver=function(E,S,T){var x=new g(function(D,P){try{var U=E._driver,F=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){P(F);return}for(var $=Jc.concat("_initStorage"),B=0,G=$.length;B<G;B++){var gt=$[B],he=!zv(Ec,gt);if((he||E[gt])&&typeof E[gt]!="function"){P(F);return}}var oe=function(){for(var ye=function(rb){return function(){var nb=new Error("Method "+rb+" is not implemented by the current driver"),dh=g.reject(nb);return y(dh,arguments[arguments.length-1]),dh}},We=0,Ku=Ec.length;We<Ku;We++){var Yu=Ec[We];E[Yu]||(E[Yu]=ye(Yu))}};oe();var Ie=function(ye){Ga[U]&&console.info("Redefining LocalForage driver: "+U),Ga[U]=E,oh[U]=ye,D()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Ie,P):Ie(!!E._support):Ie(!0)}catch(ye){P(ye)}});return C(x,S,T),x},d.prototype.driver=function(){return this._driver||null},d.prototype.getDriver=function(E,S,T){var x=Ga[E]?g.resolve(Ga[E]):g.reject(new Error("Driver not found."));return C(x,S,T),x},d.prototype.getSerializer=function(E){var S=g.resolve(Tc);return C(S,E),S},d.prototype.ready=function(E){var S=this,T=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return C(T,E,E),T},d.prototype.setDriver=function(E,S,T){var x=this;ih(E)||(E=[E]);var D=this._getSupportedDrivers(E);function P(){x._config.driver=x.driver()}function U(B){return x._extend(B),P(),x._ready=x._initStorage(x._config),x._ready}function F(B){return function(){var G=0;function gt(){for(;G<B.length;){var he=B[G];return G++,x._dbInfo=null,x._ready=null,x.getDriver(he).then(U).catch(gt)}P();var oe=new Error("No available storage method found.");return x._driverSet=g.reject(oe),x._driverSet}return gt()}}var $=this._driverSet!==null?this._driverSet.catch(function(){return g.resolve()}):g.resolve();return this._driverSet=$.then(function(){var B=D[0];return x._dbInfo=null,x._ready=null,x.getDriver(B).then(function(G){x._driver=G._driver,P(),x._wrapLibraryMethodsWithReady(),x._initDriver=F(D)})}).catch(function(){P();var B=new Error("No available storage method found.");return x._driverSet=g.reject(B),x._driverSet}),C(this._driverSet,S,T),this._driverSet},d.prototype.supports=function(E){return!!oh[E]},d.prototype._extend=function(E){zu(this,E)},d.prototype._getSupportedDrivers=function(E){for(var S=[],T=0,x=E.length;T<x;T++){var D=E[T];this.supports(D)&&S.push(D)}return S},d.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,S=Jc.length;E<S;E++)By(this,Jc[E])},d.prototype.createInstance=function(E){return new d(E)},d}(),eb=new tb;o.exports=eb},{3:3}]},{},[4])(4)})}),Sl=Vi(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),dd=Vi((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var l={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(l,o),function(u,f){var m=o.retries,h=o.retryDelay,v=o.retryOn;if(f&&f.retries!==void 0)if(n(f.retries))m=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(n(f.retryDelay)||typeof f.retryDelay=="function")h=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(_,g){var y=function(O){var H=typeof Request<"u"&&u instanceof Request?u.clone():u;s(H,f).then(function(R){if(Array.isArray(v)&&v.indexOf(R.status)===-1)_(R);else if(typeof v=="function")try{return Promise.resolve(v(O,null,R)).then(function(k){k?C(O,null,R):_(R)}).catch(g)}catch(k){g(k)}else O<m?C(O,null,R):_(R)}).catch(function(R){if(typeof v=="function")try{Promise.resolve(v(O,R,null)).then(function(k){k?C(O,R,null):g(R)}).catch(function(k){g(k)})}catch(k){g(k)}else O<m?C(O,R,null):g(R)})};function C(O,H,R){var k=typeof h=="function"?h(O,H,R):h;setTimeout(function(){y(++O)},k)}y(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),ip="9.3.15",A=class Ju{static SDK_VERSION=ip;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static{let e=Ju.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");Ju.SDK_VERSION_CODE=parseInt(e,10)}},Zt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${A.SDK_VERSION}/dist/widget-sdk.min.css`},Rt=Qt(tn()),w=class{static log(...t){Rt.default.info(...t)}static debug(...t){Rt.default.debug(...t)}static error(...t){Rt.default.error(...t)}static warn(...t){Rt.default.warn(...t)}static info(...t){Rt.default.info(...t)}static trace(...t){Rt.default.trace(...t)}static configure(t=A.LOG_PREFIX){Rt.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${A.SDK_VERSION}):`)}});let e=this.getDebugParam();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Rt.default.setLevel(Rt.default[localStorage.cooeeLogLevel]):Rt.default.setLevel(Zt.debug?Rt.default.TRACE:Rt.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let t=`
|
|
1
|
+
"use strict";(()=>{var sh=Object.create,xc=Object.defineProperty,ah=Object.defineProperties,ch=Object.getOwnPropertyDescriptor,lh=Object.getOwnPropertyDescriptors,uh=Object.getOwnPropertyNames,tp=Object.getOwnPropertySymbols,ph=Object.getPrototypeOf,np=Object.prototype.hasOwnProperty,fh=Object.prototype.propertyIsEnumerable,rp=(t,e,r)=>e in t?xc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||={})np.call(e,r)&&rp(t,r,e[r]);if(tp)for(var r of tp(e))fh.call(e,r)&&rp(t,r,e[r]);return t},Z=(t,e)=>ah(t,lh(e)),Gi=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),Vi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of uh(e))!np.call(t,i)&&i!==r&&xc(t,i,{get:()=>e[i],enumerable:!(n=ch(e,i))||n.enumerable});return t},Qt=(t,e,r)=>(r=t!=null?sh(ph(t)):{},mh(e||!t||!t.__esModule?xc(r,"default",{value:t,enumerable:!0}):r,t)),tn=Vi((t,e)=>{"use strict";(function(r){"use strict";var n={};n.VERSION="1.6.1";var i,s={},o=function(h,v){return function(){return v.apply(h,arguments)}},l=function(){var h=arguments,v=h[0],_,g;for(g=1;g<h.length;g++)for(_ in h[g])!(_ in v)&&h[g].hasOwnProperty(_)&&(v[_]=h[g][_]);return v},u=function(h,v){return{value:h,name:v}};n.TRACE=u(1,"TRACE"),n.DEBUG=u(2,"DEBUG"),n.INFO=u(3,"INFO"),n.TIME=u(4,"TIME"),n.WARN=u(5,"WARN"),n.ERROR=u(8,"ERROR"),n.OFF=u(99,"OFF");var f=function(h){this.context=h,this.setLevel(h.filterLevel),this.log=this.info};f.prototype={setLevel:function(h){h&&"value"in h&&(this.context.filterLevel=h)},getLevel:function(){return this.context.filterLevel},enabledFor:function(h){var v=this.context.filterLevel;return h.value>=v.value},trace:function(){this.invoke(n.TRACE,arguments)},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},time:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"start"])},timeEnd:function(h){typeof h=="string"&&h.length>0&&this.invoke(n.TIME,[h,"end"])},invoke:function(h,v){i&&this.enabledFor(h)&&i(v,l({level:h},this.context))}};var m=new f({filterLevel:n.OFF});(function(){var h=n;h.enabledFor=o(m,m.enabledFor),h.trace=o(m,m.trace),h.debug=o(m,m.debug),h.time=o(m,m.time),h.timeEnd=o(m,m.timeEnd),h.info=o(m,m.info),h.warn=o(m,m.warn),h.error=o(m,m.error),h.log=h.info})(),n.setHandler=function(h){i=h},n.setLevel=function(h){m.setLevel(h);for(var v in s)s.hasOwnProperty(v)&&s[v].setLevel(h)},n.getLevel=function(){return m.getLevel()},n.get=function(h){return s[h]||(s[h]=new f(l({name:h},m.context)))},n.createDefaultHandler=function(h){h=h||{},h.formatter=h.formatter||function(g,y){y.name&&g.unshift("["+y.name+"]")};var v={},_=function(g,y){Function.prototype.apply.call(g,console,y)};return typeof console>"u"?function(){}:function(g,y){g=Array.prototype.slice.call(g);var C=console.log,O;y.level===n.TIME?(O=(y.name?"["+y.name+"] ":"")+g[0],g[1]==="start"?console.time?console.time(O):v[O]=new Date().getTime():console.timeEnd?console.timeEnd(O):_(C,[O+": "+(new Date().getTime()-v[O])+"ms"])):(y.level===n.WARN&&console.warn?C=console.warn:y.level===n.ERROR&&console.error?C=console.error:y.level===n.INFO&&console.info?C=console.info:y.level===n.DEBUG&&console.debug?C=console.debug:y.level===n.TRACE&&console.trace&&(C=console.trace),h.formatter(g,y),_(C,g))}},n.useDefaults=function(h){n.setLevel(h&&h.defaultLevel||n.DEBUG),n.setHandler(n.createDefaultHandler(h))},n.setDefaults=n.useDefaults,typeof define=="function"&&define.amd?define(n):typeof e<"u"&&e.exports?e.exports=n:(n._prevLogger=r.Logger,n.noConflict=function(){return r.Logger=n._prevLogger,n},r.Logger=n)})(t)}),Mp=Vi((t,e)=>{"use strict";(function(r,n){"use strict";var i="1.0.40",s="",o="?",l="function",u="undefined",f="object",m="string",h="major",v="model",_="name",g="type",y="vendor",C="version",O="architecture",H="console",R="mobile",k="tablet",V="smarttv",Mt="wearable",fe="embedded",j=500,ct="Amazon",Y="Apple",at="ASUS",Xt="BlackBerry",me="Browser",de="Chrome",xe="Edge",be="Firefox",Ut="Google",De="Huawei",ht="LG",Q="Microsoft",we="Motorola",cr="Opera",jr="Samsung",je="Sharp",en="Sony",Hn="Xiaomi",kn="Zebra",Hi="Facebook",Wi="Chromium OS",ji="Mac OS",Mn=" Browser",Be=function(z,dt){var J={};for(var se in z)dt[se]&&dt[se].length%2===0?J[se]=dt[se].concat(z[se]):J[se]=z[se];return J},$r=function(z){for(var dt={},J=0;J<z.length;J++)dt[z[J].toUpperCase()]=z[J];return dt},is=function(z,dt){return typeof z===m?a(dt).indexOf(a(z))!==-1:!1},a=function(z){return z.toLowerCase()},c=function(z){return typeof z===m?z.replace(/[^\d\.]/g,s).split(".")[0]:n},p=function(z,dt){if(typeof z===m)return z=z.replace(/^\s\s*/,s),typeof dt===u?z:z.substring(0,j)},I=function(z,dt){for(var J=0,se,He,Fe,re,X,Ve;J<dt.length&&!X;){var Ls=dt[J],Yo=dt[J+1];for(se=He=0;se<Ls.length&&!X&&Ls[se];)if(X=Ls[se++].exec(z),X)for(Fe=0;Fe<Yo.length;Fe++)Ve=X[++He],re=Yo[Fe],typeof re===f&&re.length>0?re.length===2?typeof re[1]==l?this[re[0]]=re[1].call(this,Ve):this[re[0]]=re[1]:re.length===3?typeof re[1]===l&&!(re[1].exec&&re[1].test)?this[re[0]]=Ve?re[1].call(this,Ve,re[2]):n:this[re[0]]=Ve?Ve.replace(re[1],re[2]):n:re.length===4&&(this[re[0]]=Ve?re[3].call(this,Ve.replace(re[1],re[2])):n):this[re]=Ve||n;J+=2}},N=function(z,dt){for(var J in dt)if(typeof dt[J]===f&&dt[J].length>0){for(var se=0;se<dt[J].length;se++)if(is(dt[J][se],z))return J===o?n:J}else if(is(dt[J],z))return J===o?n:J;return dt.hasOwnProperty("*")?dt["*"]:z},L={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},W={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"},te={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[C,[_,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[C,[_,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[_,C],[/opios[\/ ]+([\w\.]+)/i],[C,[_,cr+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[C,[_,cr+" GX"]],[/\bopr\/([\w\.]+)/i],[C,[_,cr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[C,[_,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[C,[_,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[_,C],[/quark(?:pc)?\/([-\w\.]+)/i],[C,[_,"Quark"]],[/\bddg\/([\w\.]+)/i],[C,[_,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[C,[_,"UC"+me]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[C,[_,"WeChat"]],[/konqueror\/([\w\.]+)/i],[C,[_,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[C,[_,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[C,[_,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[C,[_,"Smart Lenovo "+me]],[/(avast|avg)\/([\w\.]+)/i],[[_,/(.+)/,"$1 Secure "+me],C],[/\bfocus\/([\w\.]+)/i],[C,[_,be+" Focus"]],[/\bopt\/([\w\.]+)/i],[C,[_,cr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[C,[_,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[C,[_,"Dolphin"]],[/coast\/([\w\.]+)/i],[C,[_,cr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[C,[_,"MIUI"+Mn]],[/fxios\/([\w\.-]+)/i],[C,[_,be]],[/\bqihoobrowser\/?([\w\.]*)/i],[C,[_,"360"]],[/\b(qq)\/([\w\.]+)/i],[[_,/(.+)/,"$1Browser"],C],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[_,/(.+)/,"$1"+Mn],C],[/samsungbrowser\/([\w\.]+)/i],[C,[_,jr+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[C,[_,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[_,"Sogou Mobile"],C],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[_,C],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[_],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[C,_],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[_,Hi],C],[/(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,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[_,C],[/\bgsa\/([\w\.]+) .*safari\//i],[C,[_,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[C,[_,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[C,[_,de+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[_,de+" WebView"],C],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[C,[_,"Android "+me]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[_,C],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[C,[_,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[C,_],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[_,[C,N,L]],[/(webkit|khtml)\/([\w\.]+)/i],[_,C],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[_,"Netscape"],C],[/(wolvic|librewolf)\/([\w\.]+)/i],[_,C],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[C,[_,be+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\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|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[_,[C,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[_,[C,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[O,"amd64"]],[/(ia32(?=;))/i],[[O,a]],[/((?:i[346]|x)86)[;\)]/i],[[O,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[O,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[O,"armhf"]],[/windows (ce|mobile); ppc;/i],[[O,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[O,/ower/,s,a]],[/(sun4\w)[;\)]/i],[[O,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[O,a]]],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],[v,[y,jr],[g,k]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[v,[y,jr],[g,R]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[v,[y,Y],[g,R]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[v,[y,Y],[g,k]],[/(macintosh);/i],[v,[y,Y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[v,[y,je],[g,R]],[/(?:honor)([-\w ]+)[;\)]/i],[v,[y,"Honor"],[g,R]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[v,[y,De],[g,k]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[v,[y,De],[g,R]],[/\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|pro)?)(?: bui|\))/i],[[v,/_/g," "],[y,Hn],[g,R]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[v,/_/g," "],[y,Hn],[g,k]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[v,[y,"OPPO"],[g,R]],[/\b(opd2\d{3}a?) bui/i],[v,[y,"OPPO"],[g,k]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[v,[y,"Vivo"],[g,R]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[v,[y,"Realme"],[g,R]],[/\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],[v,[y,we],[g,R]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[v,[y,we],[g,k]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[v,[y,ht],[g,k]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[v,[y,ht],[g,R]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[v,[y,"Lenovo"],[g,k]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[v,/_/g," "],[y,"Nokia"],[g,R]],[/(pixel c)\b/i],[v,[y,Ut],[g,k]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[v,[y,Ut],[g,R]],[/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],[v,[y,en],[g,R]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[v,"Xperia Tablet"],[y,en],[g,k]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[v,[y,"OnePlus"],[g,R]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[v,[y,ct],[g,k]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[v,/(.+)/g,"Fire Phone $1"],[y,ct],[g,R]],[/(playbook);[-\w\),; ]+(rim)/i],[v,y,[g,k]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[v,[y,Xt],[g,R]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[v,[y,at],[g,k]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[v,[y,at],[g,R]],[/(nexus 9)/i],[v,[y,"HTC"],[g,k]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[v,/_/g," "],[g,R]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[v,[y,"TCL"],[g,k]],[/(itel) ((\w+))/i],[[y,a],v,[g,N,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[v,[y,"Acer"],[g,k]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[v,[y,"Meizu"],[g,R]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[v,[y,"Ulefone"],[g,R]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[v,[y,"Energizer"],[g,R]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[v,[y,"Cat"],[g,R]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[v,[y,"Smartfren"],[g,R]],[/droid.+; (a(?:015|06[35]|142p?))/i],[v,[y,"Nothing"],[g,R]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[y,v,[g,R]],[/(imo) (tab \w+)/i,/(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],[y,v,[g,k]],[/(surface duo)/i],[v,[y,Q],[g,k]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[v,[y,"Fairphone"],[g,R]],[/(u304aa)/i],[v,[y,"AT&T"],[g,R]],[/\bsie-(\w*)/i],[v,[y,"Siemens"],[g,R]],[/\b(rct\w+) b/i],[v,[y,"RCA"],[g,k]],[/\b(venue[\d ]{2,7}) b/i],[v,[y,"Dell"],[g,k]],[/\b(q(?:mv|ta)\w+) b/i],[v,[y,"Verizon"],[g,k]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[v,[y,"Barnes & Noble"],[g,k]],[/\b(tm\d{3}\w+) b/i],[v,[y,"NuVision"],[g,k]],[/\b(k88) b/i],[v,[y,"ZTE"],[g,k]],[/\b(nx\d{3}j) b/i],[v,[y,"ZTE"],[g,R]],[/\b(gen\d{3}) b.+49h/i],[v,[y,"Swiss"],[g,R]],[/\b(zur\d{3}) b/i],[v,[y,"Swiss"],[g,k]],[/\b((zeki)?tb.*\b) b/i],[v,[y,"Zeki"],[g,k]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[y,"Dragon Touch"],v,[g,k]],[/\b(ns-?\w{0,9}) b/i],[v,[y,"Insignia"],[g,k]],[/\b((nxa|next)-?\w{0,9}) b/i],[v,[y,"NextBook"],[g,k]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[y,"Voice"],v,[g,R]],[/\b(lvtel\-)?(v1[12]) b/i],[[y,"LvTel"],v,[g,R]],[/\b(ph-1) /i],[v,[y,"Essential"],[g,R]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[v,[y,"Envizen"],[g,k]],[/\b(trio[-\w\. ]+) b/i],[v,[y,"MachSpeed"],[g,k]],[/\btu_(1491) b/i],[v,[y,"Rotor"],[g,k]],[/(shield[\w ]+) b/i],[v,[y,"Nvidia"],[g,k]],[/(sprint) (\w+)/i],[y,v,[g,R]],[/(kin\.[onetw]{3})/i],[[v,/\./g," "],[y,Q],[g,R]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[v,[y,kn],[g,k]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[v,[y,kn],[g,R]],[/smart-tv.+(samsung)/i],[y,[g,V]],[/hbbtv.+maple;(\d+)/i],[[v,/^/,"SmartTV"],[y,jr],[g,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,ht],[g,V]],[/(apple) ?tv/i],[y,[v,Y+" TV"],[g,V]],[/crkey/i],[[v,de+"cast"],[y,Ut],[g,V]],[/droid.+aft(\w+)( bui|\))/i],[v,[y,ct],[g,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[v,[y,je],[g,V]],[/(bravia[\w ]+)( bui|\))/i],[v,[y,en],[g,V]],[/(mitv-\w{5}) bui/i],[v,[y,Hn],[g,V]],[/Hbbtv.*(technisat) (.*);/i],[y,v,[g,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,p],[v,p],[g,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,V]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[y,v,[g,H]],[/droid.+; (shield) bui/i],[v,[y,"Nvidia"],[g,H]],[/(playstation [345portablevi]+)/i],[v,[y,en],[g,H]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[v,[y,Q],[g,H]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[v,[y,jr],[g,Mt]],[/((pebble))app/i],[y,v,[g,Mt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[v,[y,Y],[g,Mt]],[/droid.+; (glass) \d/i],[v,[y,Ut],[g,Mt]],[/droid.+; (wt63?0{2,3})\)/i],[v,[y,kn],[g,Mt]],[/droid.+; (glass) \d/i],[v,[y,Ut],[g,Mt]],[/(pico) (4|neo3(?: link|pro)?)/i],[y,v,[g,Mt]],[/; (quest( \d| pro)?)/i],[v,[y,Hi],[g,Mt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[g,fe]],[/(aeobc)\b/i],[v,[y,ct],[g,fe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[v,[g,R]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[v,[g,k]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,k]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,R]],[/(android[-\w\. ]{0,9});.+buil/i],[v,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[C,[_,xe+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[_,C],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[_,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[_,C],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[C,_]],os:[[/microsoft (windows) (vista|xp)/i],[_,C],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[_,[C,N,W]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[C,N,W],[_,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[C,/_/g,"."],[_,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[_,ji],[C,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[C,_],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[_,C],[/\(bb(10);/i],[C,[_,Xt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[C,[_,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[C,[_,be+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[C,[_,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[C,[_,"watchOS"]],[/crkey\/([\d\.]+)/i],[C,[_,de+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[_,Wi],C],[/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],[_,C],[/(sunos) ?([\w\.\d]*)/i],[[_,"Solaris"],C],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[_,C]]},Tt=function(z,dt){if(typeof z===f&&(dt=z,z=n),!(this instanceof Tt))return new Tt(z,dt).getResult();var J=typeof r!==u&&r.navigator?r.navigator:n,se=z||(J&&J.userAgent?J.userAgent:s),He=J&&J.userAgentData?J.userAgentData:n,Fe=dt?Be(te,dt):te,re=J&&J.userAgent==se;return this.getBrowser=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.browser),X[h]=c(X[C]),re&&J&&J.brave&&typeof J.brave.isBrave==l&&(X[_]="Brave"),X},this.getCPU=function(){var X={};return X[O]=n,I.call(X,se,Fe.cpu),X},this.getDevice=function(){var X={};return X[y]=n,X[v]=n,X[g]=n,I.call(X,se,Fe.device),re&&!X[g]&&He&&He.mobile&&(X[g]=R),re&&X[v]=="Macintosh"&&J&&typeof J.standalone!==u&&J.maxTouchPoints&&J.maxTouchPoints>2&&(X[v]="iPad",X[g]=k),X},this.getEngine=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.engine),X},this.getOS=function(){var X={};return X[_]=n,X[C]=n,I.call(X,se,Fe.os),re&&!X[_]&&He&&He.platform&&He.platform!="Unknown"&&(X[_]=He.platform.replace(/chrome os/i,Wi).replace(/macos/i,ji)),X},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 se},this.setUA=function(X){return se=typeof X===m&&X.length>j?p(X,j):X,this},this.setUA(se),this};Tt.VERSION=i,Tt.BROWSER=$r([_,C,h]),Tt.CPU=$r([O]),Tt.DEVICE=$r([v,y,g,H,R,V,k,Mt,fe]),Tt.ENGINE=Tt.OS=$r([_,C]),typeof t!==u?(typeof e!==u&&e.exports&&(t=e.exports=Tt),t.UAParser=Tt):typeof define===l&&define.amd?define(function(){return Tt}):typeof r!==u&&(r.UAParser=Tt);var Dt=typeof r!==u&&(r.jQuery||r.Zepto);if(Dt&&!Dt.ua){var ce=new Tt;Dt.ua=ce.getResult(),Dt.ua.get=function(){return ce.getUA()},Dt.ua.set=function(z){ce.setUA(z);var dt=ce.getResult();for(var J in dt)Dt.ua[J]=dt[J]}}})(typeof window=="object"?window:t)}),Hp=Vi((t,e)=>{"use strict";(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=r()}})(function(){var r,n,i;return function s(o,l,u){function f(v,_){if(!l[v]){if(!o[v]){var g=typeof Gi=="function"&&Gi;if(!_&&g)return g(v,!0);if(m)return m(v,!0);var y=new Error("Cannot find module '"+v+"'");throw y.code="MODULE_NOT_FOUND",y}var C=l[v]={exports:{}};o[v][0].call(C.exports,function(O){var H=o[v][1][O];return f(H||O)},C,C.exports,s,o,l,u)}return l[v].exports}for(var m=typeof Gi=="function"&&Gi,h=0;h<u.length;h++)f(u[h]);return f}({1:[function(s,o,l){(function(u){"use strict";var f=u.MutationObserver||u.WebKitMutationObserver,m;if(f){var h=0,v=new f(O),_=u.document.createTextNode("");v.observe(_,{characterData:!0}),m=function(){_.data=h=++h%2}}else if(!u.setImmediate&&typeof u.MessageChannel<"u"){var g=new u.MessageChannel;g.port1.onmessage=O,m=function(){g.port2.postMessage(0)}}else"document"in u&&"onreadystatechange"in u.document.createElement("script")?m=function(){var R=u.document.createElement("script");R.onreadystatechange=function(){O(),R.onreadystatechange=null,R.parentNode.removeChild(R),R=null},u.document.documentElement.appendChild(R)}:m=function(){setTimeout(O,0)};var y,C=[];function O(){y=!0;for(var R,k,V=C.length;V;){for(k=C,C=[],R=-1;++R<V;)k[R]();V=C.length}y=!1}o.exports=H;function H(R){C.push(R)===1&&!y&&m()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(s,o,l){"use strict";var u=s(1);function f(){}var m={},h=["REJECTED"],v=["FULFILLED"],_=["PENDING"];o.exports=g;function g(j){if(typeof j!="function")throw new TypeError("resolver must be a function");this.state=_,this.queue=[],this.outcome=void 0,j!==f&&H(this,j)}g.prototype.catch=function(j){return this.then(null,j)},g.prototype.then=function(j,ct){if(typeof j!="function"&&this.state===v||typeof ct!="function"&&this.state===h)return this;var Y=new this.constructor(f);if(this.state!==_){var at=this.state===v?j:ct;C(Y,at,this.outcome)}else this.queue.push(new y(Y,j,ct));return Y};function y(j,ct,Y){this.promise=j,typeof ct=="function"&&(this.onFulfilled=ct,this.callFulfilled=this.otherCallFulfilled),typeof Y=="function"&&(this.onRejected=Y,this.callRejected=this.otherCallRejected)}y.prototype.callFulfilled=function(j){m.resolve(this.promise,j)},y.prototype.otherCallFulfilled=function(j){C(this.promise,this.onFulfilled,j)},y.prototype.callRejected=function(j){m.reject(this.promise,j)},y.prototype.otherCallRejected=function(j){C(this.promise,this.onRejected,j)};function C(j,ct,Y){u(function(){var at;try{at=ct(Y)}catch(Xt){return m.reject(j,Xt)}at===j?m.reject(j,new TypeError("Cannot resolve promise with itself")):m.resolve(j,at)})}m.resolve=function(j,ct){var Y=R(O,ct);if(Y.status==="error")return m.reject(j,Y.value);var at=Y.value;if(at)H(j,at);else{j.state=v,j.outcome=ct;for(var Xt=-1,me=j.queue.length;++Xt<me;)j.queue[Xt].callFulfilled(ct)}return j},m.reject=function(j,ct){j.state=h,j.outcome=ct;for(var Y=-1,at=j.queue.length;++Y<at;)j.queue[Y].callRejected(ct);return j};function O(j){var ct=j&&j.then;if(j&&(typeof j=="object"||typeof j=="function")&&typeof ct=="function")return function(){ct.apply(j,arguments)}}function H(j,ct){var Y=!1;function at(xe){Y||(Y=!0,m.reject(j,xe))}function Xt(xe){Y||(Y=!0,m.resolve(j,xe))}function me(){ct(Xt,at)}var de=R(me);de.status==="error"&&at(de.value)}function R(j,ct){var Y={};try{Y.value=j(ct),Y.status="success"}catch(at){Y.status="error",Y.value=at}return Y}g.resolve=k;function k(j){return j instanceof this?j:m.resolve(new this(f),j)}g.reject=V;function V(j){var ct=new this(f);return m.reject(ct,j)}g.all=Mt;function Mt(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=j.length,at=!1;if(!Y)return this.resolve([]);for(var Xt=new Array(Y),me=0,de=-1,xe=new this(f);++de<Y;)be(j[de],de);return xe;function be(Ut,De){ct.resolve(Ut).then(ht,function(Q){at||(at=!0,m.reject(xe,Q))});function ht(Q){Xt[De]=Q,++me===Y&&!at&&(at=!0,m.resolve(xe,Xt))}}}g.race=fe;function fe(j){var ct=this;if(Object.prototype.toString.call(j)!=="[object Array]")return this.reject(new TypeError("must be an array"));var Y=j.length,at=!1;if(!Y)return this.resolve([]);for(var Xt=-1,me=new this(f);++Xt<Y;)de(j[Xt]);return me;function de(xe){ct.resolve(xe).then(function(be){at||(at=!0,m.resolve(me,be))},function(be){at||(at=!0,m.reject(me,be))})}}},{1:1}],3:[function(s,o,l){(function(u){"use strict";typeof u.Promise!="function"&&(u.Promise=s(2))}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(s,o,l){"use strict";var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d};function f(d,E){if(!(d instanceof E))throw new TypeError("Cannot call a class as a function")}function m(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}var h=m();function v(){try{if(!h||!h.open)return!1;var d=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),E=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!d||E)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}function _(d,E){d=d||[],E=E||{};try{return new Blob(d,E)}catch(D){if(D.name!=="TypeError")throw D;for(var S=typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder,T=new S,x=0;x<d.length;x+=1)T.append(d[x]);return T.getBlob(E.type)}}typeof Promise>"u"&&s(3);var g=Promise;function y(d,E){E&&d.then(function(S){E(null,S)},function(S){E(S)})}function C(d,E,S){typeof E=="function"&&d.then(E),typeof S=="function"&&d.catch(S)}function O(d){return typeof d!="string"&&(console.warn(d+" used as a key, but it is not a string."),d=String(d)),d}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var R="local-forage-detect-blob-support",k=void 0,V={},Mt=Object.prototype.toString,fe="readonly",j="readwrite";function ct(d){for(var E=d.length,S=new ArrayBuffer(E),T=new Uint8Array(S),x=0;x<E;x++)T[x]=d.charCodeAt(x);return S}function Y(d){return new g(function(E){var S=d.transaction(R,j),T=_([""]);S.objectStore(R).put(T,"key"),S.onabort=function(x){x.preventDefault(),x.stopPropagation(),E(!1)},S.oncomplete=function(){var x=navigator.userAgent.match(/Chrome\/(\d+)/),D=navigator.userAgent.match(/Edge\//);E(D||!x||parseInt(x[1],10)>=43)}}).catch(function(){return!1})}function at(d){return typeof k=="boolean"?g.resolve(k):Y(d).then(function(E){return k=E,k})}function Xt(d){var E=V[d.name],S={};S.promise=new g(function(T,x){S.resolve=T,S.reject=x}),E.deferredOperations.push(S),E.dbReady?E.dbReady=E.dbReady.then(function(){return S.promise}):E.dbReady=S.promise}function me(d){var E=V[d.name],S=E.deferredOperations.pop();if(S)return S.resolve(),S.promise}function de(d,E){var S=V[d.name],T=S.deferredOperations.pop();if(T)return T.reject(E),T.promise}function xe(d,E){return new g(function(S,T){if(V[d.name]=V[d.name]||en(),d.db)if(E)Xt(d),d.db.close();else return S(d.db);var x=[d.name];E&&x.push(d.version);var D=h.open.apply(h,x);E&&(D.onupgradeneeded=function(P){var U=D.result;try{U.createObjectStore(d.storeName),P.oldVersion<=1&&U.createObjectStore(R)}catch(F){if(F.name==="ConstraintError")console.warn('The database "'+d.name+'" has been upgraded from version '+P.oldVersion+" to version "+P.newVersion+', but the storage "'+d.storeName+'" already exists.');else throw F}}),D.onerror=function(P){P.preventDefault(),T(D.error)},D.onsuccess=function(){var P=D.result;P.onversionchange=function(U){U.target.close()},S(P),me(d)}})}function be(d){return xe(d,!1)}function Ut(d){return xe(d,!0)}function De(d,E){if(!d.db)return!0;var S=!d.db.objectStoreNames.contains(d.storeName),T=d.version<d.db.version,x=d.version>d.db.version;if(T&&(d.version!==E&&console.warn('The database "'+d.name+`" can't be downgraded from version `+d.db.version+" to version "+d.version+"."),d.version=d.db.version),x||S){if(S){var D=d.db.version+1;D>d.version&&(d.version=D)}return!0}return!1}function ht(d){return new g(function(E,S){var T=new FileReader;T.onerror=S,T.onloadend=function(x){var D=btoa(x.target.result||"");E({__local_forage_encoded_blob:!0,data:D,type:d.type})},T.readAsBinaryString(d)})}function Q(d){var E=ct(atob(d.data));return _([E],{type:d.type})}function we(d){return d&&d.__local_forage_encoded_blob}function cr(d){var E=this,S=E._initReady().then(function(){var T=V[E._dbInfo.name];if(T&&T.dbReady)return T.dbReady});return C(S,d,d),S}function jr(d){Xt(d);for(var E=V[d.name],S=E.forages,T=0;T<S.length;T++){var x=S[T];x._dbInfo.db&&(x._dbInfo.db.close(),x._dbInfo.db=null)}return d.db=null,be(d).then(function(D){return d.db=D,De(d)?Ut(d):D}).then(function(D){d.db=E.db=D;for(var P=0;P<S.length;P++)S[P]._dbInfo.db=D}).catch(function(D){throw de(d,D),D})}function je(d,E,S,T){T===void 0&&(T=1);try{var x=d.db.transaction(d.storeName,E);S(null,x)}catch(D){if(T>0&&(!d.db||D.name==="InvalidStateError"||D.name==="NotFoundError"))return g.resolve().then(function(){if(!d.db||D.name==="NotFoundError"&&!d.db.objectStoreNames.contains(d.storeName)&&d.version<=d.db.version)return d.db&&(d.version=d.db.version+1),Ut(d)}).then(function(){return jr(d).then(function(){je(d,E,S,T-1)})}).catch(S);S(D)}}function en(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Hn(d){var E=this,S={db:null};if(d)for(var T in d)S[T]=d[T];var x=V[S.name];x||(x=en(),V[S.name]=x),x.forages.push(E),E._initReady||(E._initReady=E.ready,E.ready=cr);var D=[];function P(){return g.resolve()}for(var U=0;U<x.forages.length;U++){var F=x.forages[U];F!==E&&D.push(F._initReady().catch(P))}var $=x.forages.slice(0);return g.all(D).then(function(){return S.db=x.db,be(S)}).then(function(B){return S.db=B,De(S,E._defaultConfig.version)?Ut(S):B}).then(function(B){S.db=x.db=B,E._dbInfo=S;for(var G=0;G<$.length;G++){var gt=$[G];gt!==E&&(gt._dbInfo.db=S.db,gt._dbInfo.version=S.version)}})}function kn(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.get(d);$.onsuccess=function(){var B=$.result;B===void 0&&(B=null),we(B)&&(B=Q(B)),x(B)},$.onerror=function(){D($.error)}}catch(B){D(B)}})}).catch(D)});return y(T,E),T}function Hi(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.openCursor(),B=1;$.onsuccess=function(){var G=$.result;if(G){var gt=G.value;we(gt)&&(gt=Q(gt));var he=d(gt,G.key,B++);he!==void 0?x(he):G.continue()}else x()},$.onerror=function(){D($.error)}}catch(G){D(G)}})}).catch(D)});return y(T,E),T}function Wi(d,E,S){var T=this;d=O(d);var x=new g(function(D,P){var U;T.ready().then(function(){return U=T._dbInfo,Mt.call(E)==="[object Blob]"?at(U.db).then(function(F){return F?E:ht(E)}):E}).then(function(F){je(T._dbInfo,j,function($,B){if($)return P($);try{var G=B.objectStore(T._dbInfo.storeName);F===null&&(F=void 0);var gt=G.put(F,d);B.oncomplete=function(){F===void 0&&(F=null),D(F)},B.onabort=B.onerror=function(){var he=gt.error?gt.error:gt.transaction.error;P(he)}}catch(he){P(he)}})}).catch(P)});return y(x,S),x}function ji(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){je(S._dbInfo,j,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=F.delete(d);U.oncomplete=function(){x()},U.onerror=function(){D($.error)},U.onabort=function(){var B=$.error?$.error:$.transaction.error;D(B)}}catch(B){D(B)}})}).catch(D)});return y(T,E),T}function Mn(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,j,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.clear();P.oncomplete=function(){T()},P.onabort=P.onerror=function(){var $=F.error?F.error:F.transaction.error;x($)}}catch($){x($)}})}).catch(x)});return y(S,d),S}function Be(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,fe,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.count();F.onsuccess=function(){T(F.result)},F.onerror=function(){x(F.error)}}catch($){x($)}})}).catch(x)});return y(S,d),S}function $r(d,E){var S=this,T=new g(function(x,D){if(d<0){x(null);return}S.ready().then(function(){je(S._dbInfo,fe,function(P,U){if(P)return D(P);try{var F=U.objectStore(S._dbInfo.storeName),$=!1,B=F.openKeyCursor();B.onsuccess=function(){var G=B.result;if(!G){x(null);return}d===0||$?x(G.key):($=!0,G.advance(d))},B.onerror=function(){D(B.error)}}catch(G){D(G)}})}).catch(D)});return y(T,E),T}function is(d){var E=this,S=new g(function(T,x){E.ready().then(function(){je(E._dbInfo,fe,function(D,P){if(D)return x(D);try{var U=P.objectStore(E._dbInfo.storeName),F=U.openKeyCursor(),$=[];F.onsuccess=function(){var B=F.result;if(!B){T($);return}$.push(B.key),B.continue()},F.onerror=function(){x(F.error)}}catch(B){x(B)}})}).catch(x)});return y(S,d),S}function a(d,E){E=H.apply(this,arguments);var S=this.config();d=typeof d!="function"&&d||{},d.name||(d.name=d.name||S.name,d.storeName=d.storeName||S.storeName);var T=this,x;if(!d.name)x=g.reject("Invalid arguments");else{var D=d.name===S.name&&T._dbInfo.db,P=D?g.resolve(T._dbInfo.db):be(d).then(function(U){var F=V[d.name],$=F.forages;F.db=U;for(var B=0;B<$.length;B++)$[B]._dbInfo.db=U;return U});d.storeName?x=P.then(function(U){if(U.objectStoreNames.contains(d.storeName)){var F=U.version+1;Xt(d);var $=V[d.name],B=$.forages;U.close();for(var G=0;G<B.length;G++){var gt=B[G];gt._dbInfo.db=null,gt._dbInfo.version=F}var he=new g(function(oe,Ie){var ye=h.open(d.name,F);ye.onerror=function(We){var Ku=ye.result;Ku.close(),Ie(We)},ye.onupgradeneeded=function(){var We=ye.result;We.deleteObjectStore(d.storeName)},ye.onsuccess=function(){var We=ye.result;We.close(),oe(We)}});return he.then(function(oe){$.db=oe;for(var Ie=0;Ie<B.length;Ie++){var ye=B[Ie];ye._dbInfo.db=oe,me(ye._dbInfo)}}).catch(function(oe){throw(de(d,oe)||g.resolve()).catch(function(){}),oe})}}):x=P.then(function(U){Xt(d);var F=V[d.name],$=F.forages;U.close();for(var B=0;B<$.length;B++){var G=$[B];G._dbInfo.db=null}var gt=new g(function(he,oe){var Ie=h.deleteDatabase(d.name);Ie.onerror=function(){var ye=Ie.result;ye&&ye.close(),oe(Ie.error)},Ie.onblocked=function(){console.warn('dropInstance blocked for database "'+d.name+'" until all open connections are closed')},Ie.onsuccess=function(){var ye=Ie.result;ye&&ye.close(),he(ye)}});return gt.then(function(he){F.db=he;for(var oe=0;oe<$.length;oe++){var Ie=$[oe];me(Ie._dbInfo)}}).catch(function(he){throw(de(d,he)||g.resolve()).catch(function(){}),he})})}return y(x,E),x}var c={_driver:"asyncStorage",_initStorage:Hn,_support:v(),iterate:Hi,getItem:kn,setItem:Wi,removeItem:ji,clear:Mn,length:Be,key:$r,keys:is,dropInstance:a};function p(){return typeof openDatabase=="function"}var I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N="~~local_forage_type~",L=/^~~local_forage_type~([^~]+)~/,W="__lfsc__:",te=W.length,Tt="arbf",Dt="blob",ce="si08",z="ui08",dt="uic8",J="si16",se="si32",He="ur16",Fe="ui32",re="fl32",X="fl64",Ve=te+Tt.length,Ls=Object.prototype.toString;function Yo(d){var E=d.length*.75,S=d.length,T,x=0,D,P,U,F;d[d.length-1]==="="&&(E--,d[d.length-2]==="="&&E--);var $=new ArrayBuffer(E),B=new Uint8Array($);for(T=0;T<S;T+=4)D=I.indexOf(d[T]),P=I.indexOf(d[T+1]),U=I.indexOf(d[T+2]),F=I.indexOf(d[T+3]),B[x++]=D<<2|P>>4,B[x++]=(P&15)<<4|U>>2,B[x++]=(U&3)<<6|F&63;return $}function Ic(d){var E=new Uint8Array(d),S="",T;for(T=0;T<E.length;T+=3)S+=I[E[T]>>2],S+=I[(E[T]&3)<<4|E[T+1]>>4],S+=I[(E[T+1]&15)<<2|E[T+2]>>6],S+=I[E[T+2]&63];return E.length%3===2?S=S.substring(0,S.length-1)+"=":E.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function $d(d,E){var S="";if(d&&(S=Ls.call(d)),d&&(S==="[object ArrayBuffer]"||d.buffer&&Ls.call(d.buffer)==="[object ArrayBuffer]")){var T,x=W;d instanceof ArrayBuffer?(T=d,x+=Tt):(T=d.buffer,S==="[object Int8Array]"?x+=ce:S==="[object Uint8Array]"?x+=z:S==="[object Uint8ClampedArray]"?x+=dt:S==="[object Int16Array]"?x+=J:S==="[object Uint16Array]"?x+=He:S==="[object Int32Array]"?x+=se:S==="[object Uint32Array]"?x+=Fe:S==="[object Float32Array]"?x+=re:S==="[object Float64Array]"?x+=X:E(new Error("Failed to get type for BinaryArray"))),E(x+Ic(T))}else if(S==="[object Blob]"){var D=new FileReader;D.onload=function(){var P=N+d.type+"~"+Ic(this.result);E(W+Dt+P)},D.readAsArrayBuffer(d)}else try{E(JSON.stringify(d))}catch(P){console.error("Couldn't convert value into a JSON string: ",d),E(null,P)}}function Fd(d){if(d.substring(0,te)!==W)return JSON.parse(d);var E=d.substring(Ve),S=d.substring(te,Ve),T;if(S===Dt&&L.test(E)){var x=E.match(L);T=x[1],E=E.substring(x[0].length)}var D=Yo(E);switch(S){case Tt:return D;case Dt:return _([D],{type:T});case ce:return new Int8Array(D);case z:return new Uint8Array(D);case dt:return new Uint8ClampedArray(D);case J:return new Int16Array(D);case He:return new Uint16Array(D);case se:return new Int32Array(D);case Fe:return new Uint32Array(D);case re:return new Float32Array(D);case X:return new Float64Array(D);default:throw new Error("Unkown type: "+S)}}var Tc={serialize:$d,deserialize:Fd,stringToBuffer:Yo,bufferToString:Ic};function eh(d,E,S,T){d.executeSql("CREATE TABLE IF NOT EXISTS "+E.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,T)}function Hd(d){var E=this,S={db:null};if(d)for(var T in d)S[T]=typeof d[T]!="string"?d[T].toString():d[T];var x=new g(function(D,P){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(U){return P(U)}S.db.transaction(function(U){eh(U,S,function(){E._dbInfo=S,D()},function(F,$){P($)})},P)});return S.serializer=Tc,x}function Fn(d,E,S,T,x,D){d.executeSql(S,T,x,function(P,U){U.code===U.SYNTAX_ERR?P.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[E.storeName],function(F,$){$.rows.length?D(F,U):eh(F,E,function(){F.executeSql(S,T,x,D)},D)},D):D(P,U)},D)}function Vd(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT * FROM "+P.storeName+" WHERE key = ? LIMIT 1",[d],function(F,$){var B=$.rows.length?$.rows.item(0).value:null;B&&(B=P.serializer.deserialize(B)),x(B)},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function qd(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT * FROM "+P.storeName,[],function(F,$){for(var B=$.rows,G=B.length,gt=0;gt<G;gt++){var he=B.item(gt),oe=he.value;if(oe&&(oe=P.serializer.deserialize(oe)),oe=d(oe,he.key,gt+1),oe!==void 0){x(oe);return}}x()},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function rh(d,E,S,T){var x=this;d=O(d);var D=new g(function(P,U){x.ready().then(function(){E===void 0&&(E=null);var F=E,$=x._dbInfo;$.serializer.serialize(E,function(B,G){G?U(G):$.db.transaction(function(gt){Fn(gt,$,"INSERT OR REPLACE INTO "+$.storeName+" (key, value) VALUES (?, ?)",[d,B],function(){P(F)},function(he,oe){U(oe)})},function(gt){if(gt.code===gt.QUOTA_ERR){if(T>0){P(rh.apply(x,[d,F,S,T-1]));return}U(gt)}})})}).catch(U)});return y(D,S),D}function Wd(d,E,S){return rh.apply(this,[d,E,S,1])}function zd(d,E){var S=this;d=O(d);var T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"DELETE FROM "+P.storeName+" WHERE key = ?",[d],function(){x()},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function Gd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"DELETE FROM "+D.storeName,[],function(){T()},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Kd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"SELECT COUNT(key) as c FROM "+D.storeName,[],function(U,F){var $=F.rows.item(0).c;T($)},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Yd(d,E){var S=this,T=new g(function(x,D){S.ready().then(function(){var P=S._dbInfo;P.db.transaction(function(U){Fn(U,P,"SELECT key FROM "+P.storeName+" WHERE id = ? LIMIT 1",[d+1],function(F,$){var B=$.rows.length?$.rows.item(0).key:null;x(B)},function(F,$){D($)})})}).catch(D)});return y(T,E),T}function Jd(d){var E=this,S=new g(function(T,x){E.ready().then(function(){var D=E._dbInfo;D.db.transaction(function(P){Fn(P,D,"SELECT key FROM "+D.storeName,[],function(U,F){for(var $=[],B=0;B<F.rows.length;B++)$.push(F.rows.item(B).key);T($)},function(U,F){x(F)})})}).catch(x)});return y(S,d),S}function Xd(d){return new g(function(E,S){d.transaction(function(T){T.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(x,D){for(var P=[],U=0;U<D.rows.length;U++)P.push(D.rows.item(U).name);E({db:d,storeNames:P})},function(x,D){S(D)})},function(T){S(T)})})}function Zd(d,E){E=H.apply(this,arguments);var S=this.config();d=typeof d!="function"&&d||{},d.name||(d.name=d.name||S.name,d.storeName=d.storeName||S.storeName);var T=this,x;return d.name?x=new g(function(D){var P;d.name===S.name?P=T._dbInfo.db:P=openDatabase(d.name,"","",0),d.storeName?D({db:P,storeNames:[d.storeName]}):D(Xd(P))}).then(function(D){return new g(function(P,U){D.db.transaction(function(F){function $(he){return new g(function(oe,Ie){F.executeSql("DROP TABLE IF EXISTS "+he,[],function(){oe()},function(ye,We){Ie(We)})})}for(var B=[],G=0,gt=D.storeNames.length;G<gt;G++)B.push($(D.storeNames[G]));g.all(B).then(function(){P()}).catch(function(he){U(he)})},function(F){U(F)})})}):x=g.reject("Invalid arguments"),y(x,E),x}var Qd={_driver:"webSQLStorage",_initStorage:Hd,_support:p(),iterate:qd,getItem:Vd,setItem:Wd,removeItem:zd,clear:Gd,length:Kd,key:Yd,keys:Jd,dropInstance:Zd};function Hg(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}function nh(d,E){var S=d.name+"/";return d.storeName!==E.storeName&&(S+=d.storeName+"/"),S}function Lm(){var d="_localforage_support_test";try{return localStorage.setItem(d,!0),localStorage.removeItem(d),!1}catch{return!0}}function qm(){return!Lm()||localStorage.length>0}function zm(d){var E=this,S={};if(d)for(var T in d)S[T]=d[T];return S.keyPrefix=nh(d,E._defaultConfig),qm()?(E._dbInfo=S,S.serializer=Tc,g.resolve()):g.reject()}function Ym(d){var E=this,S=E.ready().then(function(){for(var T=E._dbInfo.keyPrefix,x=localStorage.length-1;x>=0;x--){var D=localStorage.key(x);D.indexOf(T)===0&&localStorage.removeItem(D)}});return y(S,d),S}function kv(d,E){var S=this;d=O(d);var T=S.ready().then(function(){var x=S._dbInfo,D=localStorage.getItem(x.keyPrefix+d);return D&&(D=x.serializer.deserialize(D)),D});return y(T,E),T}function Mv(d,E){var S=this,T=S.ready().then(function(){for(var x=S._dbInfo,D=x.keyPrefix,P=D.length,U=localStorage.length,F=1,$=0;$<U;$++){var B=localStorage.key($);if(B.indexOf(D)===0){var G=localStorage.getItem(B);if(G&&(G=x.serializer.deserialize(G)),G=d(G,B.substring(P),F++),G!==void 0)return G}}});return y(T,E),T}function Uv(d,E){var S=this,T=S.ready().then(function(){var x=S._dbInfo,D;try{D=localStorage.key(d)}catch{D=null}return D&&(D=D.substring(x.keyPrefix.length)),D});return y(T,E),T}function jv(d){var E=this,S=E.ready().then(function(){for(var T=E._dbInfo,x=localStorage.length,D=[],P=0;P<x;P++){var U=localStorage.key(P);U.indexOf(T.keyPrefix)===0&&D.push(U.substring(T.keyPrefix.length))}return D});return y(S,d),S}function Bv(d){var E=this,S=E.keys().then(function(T){return T.length});return y(S,d),S}function $v(d,E){var S=this;d=O(d);var T=S.ready().then(function(){var x=S._dbInfo;localStorage.removeItem(x.keyPrefix+d)});return y(T,E),T}function Fv(d,E,S){var T=this;d=O(d);var x=T.ready().then(function(){E===void 0&&(E=null);var D=E;return new g(function(P,U){var F=T._dbInfo;F.serializer.serialize(E,function($,B){if(B)U(B);else try{localStorage.setItem(F.keyPrefix+d,$),P(D)}catch(G){(G.name==="QuotaExceededError"||G.name==="NS_ERROR_DOM_QUOTA_REACHED")&&U(G),U(G)}})})});return y(x,S),x}function Hv(d,E){if(E=H.apply(this,arguments),d=typeof d!="function"&&d||{},!d.name){var S=this.config();d.name=d.name||S.name,d.storeName=d.storeName||S.storeName}var T=this,x;return d.name?x=new g(function(D){d.storeName?D(nh(d,T._defaultConfig)):D(d.name+"/")}).then(function(D){for(var P=localStorage.length-1;P>=0;P--){var U=localStorage.key(P);U.indexOf(D)===0&&localStorage.removeItem(U)}}):x=g.reject("Invalid arguments"),y(x,E),x}var Vv={_driver:"localStorageWrapper",_initStorage:zm,_support:Hg(),iterate:Mv,getItem:kv,setItem:Fv,removeItem:$v,clear:Ym,length:Bv,key:Uv,keys:jv,dropInstance:Hv},Wv=function(d,E){return d===E||typeof d=="number"&&typeof E=="number"&&isNaN(d)&&isNaN(E)},zv=function(d,E){for(var S=d.length,T=0;T<S;){if(Wv(d[T],E))return!0;T++}return!1},ih=Array.isArray||function(d){return Object.prototype.toString.call(d)==="[object Array]"},Ga={},oh={},to={INDEXEDDB:c,WEBSQL:Qd,LOCALSTORAGE:Vv},Gv=[to.INDEXEDDB._driver,to.WEBSQL._driver,to.LOCALSTORAGE._driver],Ec=["dropInstance"],Jc=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Ec),Ly={description:"",driver:Gv.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function By(d,E){d[E]=function(){var S=arguments;return d.ready().then(function(){return d[E].apply(d,S)})}}function zu(){for(var d=1;d<arguments.length;d++){var E=arguments[d];if(E)for(var S in E)E.hasOwnProperty(S)&&(ih(E[S])?arguments[0][S]=E[S].slice():arguments[0][S]=E[S])}return arguments[0]}var tb=function(){function d(E){f(this,d);for(var S in to)if(to.hasOwnProperty(S)){var T=to[S],x=T._driver;this[S]=x,Ga[x]||this.defineDriver(T)}this._defaultConfig=zu({},Ly),this._config=zu({},this._defaultConfig,E),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return d.prototype.config=function(E){if((typeof E>"u"?"undefined":u(E))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var S in E){if(S==="storeName"&&(E[S]=E[S].replace(/\W/g,"_")),S==="version"&&typeof E[S]!="number")return new Error("Database version must be a number.");this._config[S]=E[S]}return"driver"in E&&E.driver?this.setDriver(this._config.driver):!0}else return typeof E=="string"?this._config[E]:this._config},d.prototype.defineDriver=function(E,S,T){var x=new g(function(D,P){try{var U=E._driver,F=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!E._driver){P(F);return}for(var $=Jc.concat("_initStorage"),B=0,G=$.length;B<G;B++){var gt=$[B],he=!zv(Ec,gt);if((he||E[gt])&&typeof E[gt]!="function"){P(F);return}}var oe=function(){for(var ye=function(rb){return function(){var nb=new Error("Method "+rb+" is not implemented by the current driver"),dh=g.reject(nb);return y(dh,arguments[arguments.length-1]),dh}},We=0,Ku=Ec.length;We<Ku;We++){var Yu=Ec[We];E[Yu]||(E[Yu]=ye(Yu))}};oe();var Ie=function(ye){Ga[U]&&console.info("Redefining LocalForage driver: "+U),Ga[U]=E,oh[U]=ye,D()};"_support"in E?E._support&&typeof E._support=="function"?E._support().then(Ie,P):Ie(!!E._support):Ie(!0)}catch(ye){P(ye)}});return C(x,S,T),x},d.prototype.driver=function(){return this._driver||null},d.prototype.getDriver=function(E,S,T){var x=Ga[E]?g.resolve(Ga[E]):g.reject(new Error("Driver not found."));return C(x,S,T),x},d.prototype.getSerializer=function(E){var S=g.resolve(Tc);return C(S,E),S},d.prototype.ready=function(E){var S=this,T=S._driverSet.then(function(){return S._ready===null&&(S._ready=S._initDriver()),S._ready});return C(T,E,E),T},d.prototype.setDriver=function(E,S,T){var x=this;ih(E)||(E=[E]);var D=this._getSupportedDrivers(E);function P(){x._config.driver=x.driver()}function U(B){return x._extend(B),P(),x._ready=x._initStorage(x._config),x._ready}function F(B){return function(){var G=0;function gt(){for(;G<B.length;){var he=B[G];return G++,x._dbInfo=null,x._ready=null,x.getDriver(he).then(U).catch(gt)}P();var oe=new Error("No available storage method found.");return x._driverSet=g.reject(oe),x._driverSet}return gt()}}var $=this._driverSet!==null?this._driverSet.catch(function(){return g.resolve()}):g.resolve();return this._driverSet=$.then(function(){var B=D[0];return x._dbInfo=null,x._ready=null,x.getDriver(B).then(function(G){x._driver=G._driver,P(),x._wrapLibraryMethodsWithReady(),x._initDriver=F(D)})}).catch(function(){P();var B=new Error("No available storage method found.");return x._driverSet=g.reject(B),x._driverSet}),C(this._driverSet,S,T),this._driverSet},d.prototype.supports=function(E){return!!oh[E]},d.prototype._extend=function(E){zu(this,E)},d.prototype._getSupportedDrivers=function(E){for(var S=[],T=0,x=E.length;T<x;T++){var D=E[T];this.supports(D)&&S.push(D)}return S},d.prototype._wrapLibraryMethodsWithReady=function(){for(var E=0,S=Jc.length;E<S;E++)By(this,Jc[E])},d.prototype.createInstance=function(E){return new d(E)},d}(),eb=new tb;o.exports=eb},{3:3}]},{},[4])(4)})}),Sl=Vi(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URLBuilder=void 0;var e=function(){function r(n){try{this.base=new URL(n),this.params=new URLSearchParams(this.base.search.slice(1))}catch(i){console.error("Un-parsable URL",i)}}return r.prototype.appendQueryParam=function(n,i){this.params.append(n,i?i.toString():"")},r.prototype.clearQueryParams=function(){return this.params=new URLSearchParams,this},r.prototype.deleteQueryParam=function(n){this.params.delete(n)},r.prototype.getBase=function(){return this.base},r.prototype.getPath=function(){return this.base.pathname},r.prototype.getHostname=function(){return this.base.hostname},r.prototype.getParams=function(){return this.params},r.prototype.getQueryParam=function(n){if(!this.params)return"";var i=this.params.get(n);return!i||i==="undefined"||i==="null"?void 0:i},r.prototype.getQueryString=function(){return this.params.toString()},r.prototype.setPath=function(n){return this.base.pathname=n,this},r.prototype.setQueryParam=function(n,i){return this.params.set(n,i?i.toString():""),this},r.prototype.setQueryString=function(n){if(n)return n[0]==="?"&&(n=n.slice(1)),this.params=new URLSearchParams(n),this},r.prototype.toString=function(){var n=this.params.toString();return n===""?this.base.search="":this.base.search="?"+n,this.base.toString()},r}();t.URLBuilder=e}),dd=Vi((t,e)=>{"use strict";(function(r,n){typeof t=="object"&&typeof e<"u"?e.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self,r.fetchRetry=n())})(t,function(){"use strict";var r=function(s,o){if(o=o||{},typeof s!="function")throw new i("fetch must be a function");if(typeof o!="object")throw new i("defaults must be an object");if(o.retries!==void 0&&!n(o.retries))throw new i("retries must be a positive integer");if(o.retryDelay!==void 0&&!n(o.retryDelay)&&typeof o.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(o.retryOn!==void 0&&!Array.isArray(o.retryOn)&&typeof o.retryOn!="function")throw new i("retryOn property expects an array or function");var l={retries:3,retryDelay:1e3,retryOn:[]};return o=Object.assign(l,o),function(u,f){var m=o.retries,h=o.retryDelay,v=o.retryOn;if(f&&f.retries!==void 0)if(n(f.retries))m=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(n(f.retryDelay)||typeof f.retryDelay=="function")h=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(_,g){var y=function(O){var H=typeof Request<"u"&&u instanceof Request?u.clone():u;s(H,f).then(function(R){if(Array.isArray(v)&&v.indexOf(R.status)===-1)_(R);else if(typeof v=="function")try{return Promise.resolve(v(O,null,R)).then(function(k){k?C(O,null,R):_(R)}).catch(g)}catch(k){g(k)}else O<m?C(O,null,R):_(R)}).catch(function(R){if(typeof v=="function")try{Promise.resolve(v(O,R,null)).then(function(k){k?C(O,R,null):g(R)}).catch(function(k){g(k)})}catch(k){g(k)}else O<m?C(O,R,null):g(R)})};function C(O,H,R){var k=typeof h=="function"?h(O,H,R):h;setTimeout(function(){y(++O)},k)}y(0)})}};function n(s){return Number.isInteger(s)&&s>=0}function i(s){this.name="ArgumentError",this.message=s}return r})}),ip="9.3.16",A=class Ju{static SDK_VERSION=ip;static SDK_VERSION_CODE;static SDK="WEB";static LOG_PREFIX="CooeeSDK";static COOEE="cooee";static SESSION_STORAGE_SCROLL_ID="sleid";static IDLE_TIME_IN_SECONDS=30*60;static IN_APP_WRAPPER_NAME="cooee-wrapper";static IN_APP_CONTAINER_NAME="cooee-container";static IN_APP_DEFAULT_PADDING=15;static EVENT_SCREEN_VIEW="CE Screen View";static EVENT_APP_BACKGROUND="CE App Background";static EVENT_TRIGGER_DISPLAYED="CE Trigger Displayed";static EVENT_CAMPAIGN_HOLDOUT="CE Campaign Holdout";static EVENT_CAMPAIGN_REJECTED="CE Campaign Rejected";static EVENT_CAMPAIGN_FAILED="CE Campaign Failed";static EVENT_TRIGGER_CLOSED="CE Trigger Closed";static EVENT_SCROLL="CE Scroll";static EVENT_TRIGGER_CLICKED="CE Trigger Clicked";static EVENT_FORM_SUBMITTED="CE Form Submitted";static EVENT_ADD_TO_CART="Add To Cart";static EVENT_REMOVE_FROM_CART="Remove From Cart";static EVENT_VIEW_ITEM="View Item";static EVENT_VIEW_CART="View Cart";static EVENT_VIEW_COLLECTION="View Collection";static EVENT_BUY_NOW_CLICKED="Buy Now Clicked";static EVENT_CHECKOUT_STARTED="Checkout Started";static EVENT_REVIEW_CLICKED="Review Clicked";static EVENT_ITEM_THUMBNAIL_CLICKED="Item Thumbnail Clicked";static JS_LOAD_WHITELIST_EVENTS=[this.EVENT_VIEW_ITEM,this.EVENT_VIEW_CART,this.EVENT_VIEW_COLLECTION];static HASH_INITIATE_CHECKOUT="initiate-checkout";static HASH_OPEN_CART_DRAWER="open-cart-drawer";static CTA_EVENT="letscooee:outbound:cta";static ADD_BUNDLE_CTA_INBOUND_EVENT="letscooee:inbound:cta:add-bundle";static CTA_OPEN_CART_EVENT="letscooee:outbound:open-cart";static POPUP_ACTIVITY_EVENT="letscooee:outbound:popup-activities";static THIRD_PARTY_CHECKOUT_EVENT="letscooee:outbound:third-party-initiate-checkout";static CAMPAIGN_DISPLAYED_ACTIVITY="DISPLAYED";static CAMPAIGN_CLICKED_ACTIVITY="CLICKED";static CAMPAIGN_CLOSED_ACTIVITY="CLOSED";static BLACKLISTED_PAGE_NAMES=["collection","product","cart"];static API_CALL_MAX_ATTEMPTS=3;static API_CALL_RETRY_DELAY=1e3;static PLACEHOLDER_IMAGE="https://cdn.global.letscooee.com/images/placeholders/product.png";static CART_UPDATE_BROADCAST="CART_UPDATE";static GRAPHQL_VERSION="2024-10";static GRAPHQL_API_PATH=`/api/${this.GRAPHQL_VERSION}/graphql.json`;static SHADOW_SPLITTER=":shadow";static CAMPAIGN_ATTRIBUTE="_letscooee_campaign";static CONTENT_ATTRIBUTE="_letscooee_content";static VIA="_via";static{let e=Ju.SDK_VERSION.split(".").map(r=>r.padStart(2,"0")).join("");Ju.SDK_VERSION_CODE=parseInt(e,10)}},Zt={apiURL:"https://api.sdk.letscooee.com",debug:!1,mode:"production",styleURL:`https://cdn.jsdelivr.net/npm/@letscooee/web-sdk@${A.SDK_VERSION}/dist/widget-sdk.min.css`},Rt=Qt(tn()),w=class{static log(...t){Rt.default.info(...t)}static debug(...t){Rt.default.debug(...t)}static error(...t){Rt.default.error(...t)}static warn(...t){Rt.default.warn(...t)}static info(...t){Rt.default.info(...t)}static trace(...t){Rt.default.trace(...t)}static configure(t=A.LOG_PREFIX){Rt.default.useDefaults({formatter:function(r){r.unshift(`${t} (v${A.SDK_VERSION}):`)}});let e=this.getDebugParam();(e==="1"||e==="on")&&(localStorage.cooeeLogLevel="TRACE"),localStorage.cooeeLogLevel?Rt.default.setLevel(Rt.default[localStorage.cooeeLogLevel]):Rt.default.setLevel(Zt.debug?Rt.default.TRACE:Rt.default.OFF)}static getDebugParam(){return new URL(location.href).searchParams?.get("cooee-debug")}static logBrand(){let t=`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
font-size: 14px;
|
|
4
4
|
background: linear-gradient(90deg, #d52dc8 25%, #2179e2 82%);
|
|
@@ -18,7 +18,7 @@ Cooee SDK: v${A.SDK_VERSION}`,console.group("%c Elevate your ecommerce experienc
|
|
|
18
18
|
`),s=0;s<i.length;s++)i[s].length&&(s>0||!r)&&(i[s]=n+i[s]);return i.join(`
|
|
19
19
|
`)};yt.prototype.renderPartial=function(t,e,r,n){if(r){var i=this.getConfigTags(n),s=Kc(r)?r(t[1]):r[t[1]];if(s!=null){var o=t[6],l=t[5],u=t[4],f=s;l==0&&u&&(f=this.indentPartial(s,u,o));var m=this.parse(f,i);return this.renderTokens(m,e,r,f,n)}}};yt.prototype.unescapedValue=function(t,e){var r=e.lookup(t[1]);if(r!=null)return r};yt.prototype.escapedValue=function(t,e,r){var n=this.getConfigEscape(r)||kt.escape,i=e.lookup(t[1]);if(i!=null)return typeof i=="number"&&n===kt.escape?String(i):n(i)};yt.prototype.rawValue=function(t){return t[1]};yt.prototype.getConfigTags=function(t){return qn(t)?t:t&&typeof t=="object"?t.tags:void 0};yt.prototype.getConfigEscape=function(t){if(t&&typeof t=="object"&&!qn(t))return t.escape};var kt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){Zi.templateCache=t},get templateCache(){return Zi.templateCache}},Zi=new yt;kt.clearCache=function(){return Zi.clearCache()};kt.parse=function(t,e){return Zi.parse(t,e)};kt.render=function(t,e,r,n){if(typeof t!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+Nh(t)+'" was given as the first argument for mustache#render(template, view, partials)');return Zi.render(t,e,r,n)};kt.escape=Mh;kt.Scanner=eo;kt.Context=Yn;kt.Writer=yt;var vt=kt,kp=Qt(Mp()),At=class Un{static DOCUMENT_STANDARD_MODE="CSS1Compat";static _instance;parentContainer;scalingFactor=1;doc=document;parser=new kp.default;constructor(){}static get(){return Un._instance||(Un._instance=new Un),Un._instance}getUAParser(){return this.parser}getWidth(){return this.parentContainer&&this.parentContainer!==document.body?this.parentContainer.clientWidth:document.compatMode===Un.DOCUMENT_STANDARD_MODE?document.documentElement.clientWidth:window.innerWidth}getHeight(){return this.isParentNotBody()?this.parentContainer.clientHeight:document.compatMode===Un.DOCUMENT_STANDARD_MODE?document.documentElement.clientHeight:window.innerHeight}isMobile(){return this.parser.getDevice().type==="mobile"}calculateScalingFactor(e){let r=e.max,n=e.cont.w,i=e.cont.h,s=e.spc,o=Un.get().getWidth(),l=Un.get().getHeight();r&&(o=o?Math.min(o,r):r,l=l?Math.min(l,r):r),l&&(o-=s.getHorizontal(),l-=s.getVertical(),o/l<n/i?this.scalingFactor=o/n:this.scalingFactor=l/i,this.scalingFactor=Math.min(this.scalingFactor,1))}getScalingFactor(){return this.scalingFactor}createElement(e){return this.doc.createElement(e)}appendChild(e,r){e.appendChild(r)}setStyles(e,r){Object.assign(e.style,r)}setStyle(e,r,n){if(r){if(!n){e.style.removeProperty(r);return}e.style.setProperty(r,n,"important")}}setAttribute(e,r,n){e.setAttribute(r,n)}removeInApp(e){let r=document.querySelector(`.${e.rootClassName}`);r&&r.parentElement.removeChild(r)}setParentContainer(e){this.parentContainer=e,this.parentContainer&&this.isParentNotBody()&&this.setStyle(this.parentContainer,"position","relative")}isParentNotBody(){return this.parentContainer!==document.body}},ie=class{static ID="id";static SESSION_LANDING_PAGE="landing";static SESSION_LAST_USED_TIME="lastUsedTime";static SESSION_SYNCED="synced";static APP_CONFIG="conf";static DEVICE_ID="did";static SDK_TOKEN="token";static FIRST_SEEN="firstSeen";static SESSION_NUMBER="sessionNumber";static GA_CLIENT_ID="gacid";static CURRENT_CART="cart"},Xc=Qt(Hp());function Kn(t){return Xc.default.createInstance({name:"lc",storeName:t,driver:Xc.default.LOCALSTORAGE})}var Vr=class{static storage;static async get(t,e){return await this.storage?.getItem(t)??e}static set(t,e){return this.storage?.setItem(t,e)}static remove(t){return this.storage?.removeItem(t)}static clear(){return this.storage?.clear()}static getForage(){return this.storage}},et=class extends Vr{static storeName="ses";static{this.storage=Kn(this.storeName)}},Ne=class extends Vr{static storeName="usr";static{this.storage=Kn(this.storeName)}},lt=class{id;mID;vID;vName;imageURL;name;link;quantity;price;constructor(t){this.id=t.id,this.mID=t.mID,this.vID=t.vID,this.vName=t.vName,this.imageURL=t.imageURL,this.name=t.name,this.link=t.link,this.quantity=t.quantity,this.price=t.price}},le=class{isCartDirty=!0;cartEngagements;isGoKwikPopupOpen;previewIDs;previewVariant;pageName;moneyFormat;jsLoadTime=new Date;shopCurrencyCode;inInactive=!1;lastEnterActive=new Date;lastEnterInactive=null;currentItem;_currencyCode;get currencyCode(){return this._currencyCode}set currencyCode(t){this._currencyCode=t}static get(){return window.CooeeSDK.runtimeData}isInactive(){return this.inInactive}async setInactive(){return this.inInactive?0:(this.inInactive=!0,this.lastEnterInactive=new Date,Math.max((this.lastEnterInactive.getTime()-this.lastEnterActive.getTime())/1e3,0))}setActive(){return this.inInactive?(this.inInactive=!1,this.lastEnterActive=new Date,Math.max((this.lastEnterActive.getTime()-this.lastEnterInactive.getTime())/1e3,0)):0}isFirstActive(){return this.lastEnterInactive==null}getCurrentItem(){return this.currentItem}setCurrentItem(t){this.currentItem=new lt(t)}},Ae=class{static COOEE_URL_PREFIX="?from=cooee";static isShopify(){return!!window.Shopify}static getShopName(){if(this.isShopify())return window.Shopify.shop?.split(".")?.[0]}static getPageName(){if(!this.isShopify())return;let t=new URL(window.location.href).pathname.slice(1).split("/"),e=t[0];if(e==="")return"home";if(e==="collections")return t[2]==="products"?"product":"collection";if(e==="products")return"product";if(e==="cart")return"cart";if(location.href.includes("thank_you"))return"thank_you"}static getProductSlug(t){let e=(t.includes("://")?new URL(t).pathname:t).match(/\/products\/([^/]+?)(?:\.html)?$/);return e?e[1]:null}static getRootPrefix(){return window.Shopify?.routes?.root??"/"}static getCartURL(t){return this.getRootPrefix()+t+this.COOEE_URL_PREFIX}},Jn=class{isLocked=!1;queue=[];async acquire(){if(this.isLocked)await new Promise(t=>this.queue.push(t));else{this.isLocked=!0;return}}release(){if(this.queue.length>0){let t=this.queue.shift();t&&t()}else this.isLocked=!1}},ge=class ep{static CURRENT;token;items;total_price;original_total_price;currency;item_count;attributes;lock=new Jn;constructor(){}static getCurrent(){return this.CURRENT||(this.CURRENT=new ep),this.CURRENT}async getNormalisedCart(e){await this.fetchCartFromShopify(e);let r=this.convertToCooeeCart();return e&&await Ne.set(ie.CURRENT_CART,r),r}async addCooeeAttributes(){await this.lock.acquire();let e=await et.get(ie.ID),r=await Ne.get(ie.DEVICE_ID);if(this.attributes?.letscooee_did===r&&this.attributes?.letscooee_sid===e){w.debug("Not calling Shopify update.js API.","Current attributes:",this.attributes),this.lock.release();return}let n={letscooee_did:r,letscooee_sid:e,__letscooee_time:new Date().toLocaleString()};w.debug("Updating Shopify cart with attributes:",n);let i=Ae.getCartURL("cart/update.js"),s=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({attributes:n})})).json();w.debug("Updated cart attributes",JSON.stringify(s)),this.update(s),this.lock.release()}update(e){return this.token=e.token,this.items=e.items,this.total_price=e.total_price,this.original_total_price=e.original_total_price,this.currency=e.currency,this.item_count=e.item_count,this.attributes=e.attributes,le.get().currencyCode=this.currency,w.log("Updated ShopifyCart",this),this}toString(){return`ShopifyCart(token: ${this.token}, itemCount: ${this.item_count})`}convertToCooeeCart(){return{amount:this.total_price/100,originalAmount:this.original_total_price/100,currency:this.currency,itemCount:this.item_count,items:this.normaliseItems(this.items),token:this.token}}normaliseItems(e){if(!e)return w.error("No item received to be sent"),[];Array.isArray(e)||(e=[e]);let r=[];for(let n of e){if(!n.id||!n.title){w.warn("Invalid item received",n);continue}let i={name:n.title,quantity:+n.quantity||1,mID:n.product_id?.toString(),vID:n.id.toString(),price:+n.price/100||0,properties:n.properties},s=n.selling_plan_allocation?.selling_plan;if(!s){r.push(i);continue}i.sellingPlanAllocation={sellingPlan:{fixedSellingPlan:s.fixed_selling_plan,id:s.id,name:s.name,recurringDeliveries:s.recurring_deliveries}},r.push(i)}return r}async fetchCartFromShopify(e){if(!e&&this.token){w.debug("Not fetching cart");return}w.debug("Fetching cart");let r=Ae.getCartURL("cart.js"),n=await(await fetch(r)).json();this.update(n)}},os=class{static format(t,e){let r=/{{\s*(\w+)\s*}}/;return e.replace(r,(n,i)=>{switch(i){case"amount":return this.formatWithDelimiters(t,2);case"amount_no_decimals":return this.formatWithDelimiters(t,0);case"amount_with_comma_separator":return this.formatWithDelimiters(t,2,".",",");case"amount_no_decimals_with_comma_separator":return this.formatWithDelimiters(t,0,".",",");case"amount_with_apostrophe_separator":return this.formatWithDelimiters(t,2,"'",".");case"amount_no_decimals_with_space_separator":return this.formatWithDelimiters(t,0," ");case"amount_with_space_separator":return this.formatWithDelimiters(t,2," ",",");case"amount_with_period_and_space_separator":return this.formatWithDelimiters(t,2," ",".");default:return n}})}static formatWithDelimiters(t,e=2,r=",",n="."){if(isNaN(t)||t==null)return"0";let i=(t/100).toFixed(e).split("."),s=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),o=i[1]?n+i[1]:"";return s+o}},Ft=class{static ISO_WITHOUT_MS_REGEX=new RegExp(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/);static isObject(t){return typeof t=="object"&&!Array.isArray(t)&&t!==null}static parseToAny(t){try{return JSON.parse(t.toString())}catch{}return t.toString().match(this.ISO_WITHOUT_MS_REGEX)?new Date(t.toString()):t}static async sleep(t){return new Promise(e=>setTimeout(e,t))}static hasKeys(t){return t?Object.keys(t).length>=1:!1}static convertObjectToArray(t,e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&t[n]!=null&&r.push({[n]:t[n]}),r),[])}static removeNullUndefinedKeys(t){return Object.keys(t).reduce((e,r)=>(t[r]!==null&&t[r]!==void 0&&(e[r]=t[r]),e),{})}static stringify(t){return JSON.stringify(t,function(e,r){return r===void 0?null:r})}},ne=class{static tz;static isValidURL(t){try{return new URL(t)}catch{return}}static isNull(t){return!t||t==="null"||t==="undefined"}static removeFromArray(t,e){let r=t.indexOf(e);return r===-1?!1:(t.splice(r,1),!0)}static formatCurrency(t,e){if(t==0&&e)return"Free";let r=le.get(),n=Oe.get(),i=r.shopCurrencyCode??n.currency,s=r.currencyCode,o=n.money?.format??r.moneyFormat,l;return o&&i===s?l=os.format(t*100,o):(l=new Intl.NumberFormat(this.getLang(),{style:"currency",currency:s,minimumFractionDigits:0,maximumFractionDigits:2}).format(t),l=l.replace("\u20B9","Rs. "),n.money?.showCurrency&&s!=="INR"&&(l=l.concat(` ${s}`))),l}static formatNumber(t){return new Intl.NumberFormat(this.getLang(),{notation:"compact"}).format(t)}static getLang(){return navigator.languages!==void 0?navigator.languages[0].split("-")[0]:navigator.language??"en"}static getTimezone(){if(this.tz)return this.tz;try{return this.tz=Intl.DateTimeFormat().resolvedOptions().timeZone,this.tz}catch{return""}}static documentReady(t){document.readyState!=="loading"?t():document.addEventListener("DOMContentLoaded",t)}static onDocumentLoaded(t){document.readyState==="complete"?t():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t()})}static showSnackbar(t){let e=document.createElement("span");e.id="snackbar",e.innerText=t,document.body.appendChild(e),e.className="show",setTimeout(()=>{e.classList.remove("show"),document.body.removeChild(e)},3e3)}static async retrySelectorForElements(t,e=10,r=document){let n=0,i=document.querySelectorAll("nonexistent-tag");for(;n<e;){let s=Math.min(100*2**n,5e3);if(await Ft.sleep(s),i=r.querySelectorAll(t),i.length)return w.debug(`Attempt ${n+1}: ${i.length} elements found with ${t}`),i;w.debug(`Attempt ${n+1}: Elements not found with ${t}. Retrying after ${s}ms.`),n++}return w.warn(`Max attempts reached. Element not found with ${t}.`),i}static async retrySelector(t,e=10,r=document){return(await this.retrySelectorForElements(t,e,r)).item(0)}static async getCartAttributes(){let t=await Ne.get(ie.DEVICE_ID),e=await et.get(ie.ID,"");return[{key:"letscooee_did",value:t},{key:"letscooee_sid",value:e},{key:"__letscooee_time",value:new Date().toLocaleString()},{key:"__letscooee_via",value:"Buy Now"}]}};function Xn(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!1,writable:!1,value:r})}var ss=class{url;alt;constructor(t){t.alt&&(this.alt=t.alt),this.url=t.url}},as=class{d;cmp;effective;constructor(t={}){this.d=t.d,this.cmp=t.cmp,this.effective=t.d}},Qc=class{id;mID;name;groupID;groupName;isSelected;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.name=t.name,this.groupID=t.groupID,this.groupName=t.groupName,this.isSelected=t.isSelected??!1}},dr=class{mID;name;imgs;link;price;sku;isAvailable;quantity;sellingPlans;selectedSellingPlan;constructor(t){t=t??{},this.mID=t.mID,this.name=t.name,this.imgs=t.imgs?.map(e=>new ss(e))??[],this.link=t.link,this.price=new as(t.price),this.sku=t.sku,this.isAvailable=t.isAvailable,this.quantity=t.quantity,t.sellingPlans?.length&&(this.selectedSellingPlan=er(void 0)),this.sellingPlans=t.sellingPlans?.map(e=>{let r=new Qc(e);return r.isSelected&&(this.selectedSellingPlan.value=r),r})}getOneImage(){return this.imgs[0]?.url}changeSellingPlan(t){this.selectedSellingPlan.value=t}},xt=class{id;mID;name;status;ctg;imgs;videos;portraitVideos;vars;desc;sDesc;link;slug;quantity;category;meta;reviews;selectedOrFirstVariant;selected=er(!0);constructor(t){this.update(t),this.selectedOrFirstVariant=er(this.selectedVariant)}get imageURL(){return this.imgs?.[0]?.url}get secondaryImageURL(){return this.imgs?.[1]?.url}get getVariantImages(){return this.selectedOrFirstVariant.value.imgs}get variantImage(){return this.getVariantImages[0]?.url}get variantSecondaryImage(){return this.getVariantImages[1]?.url}get selectedVariant(){return this.vars.find(t=>t.isAvailable)??this.vars[0]}set variants(t){this.vars=t,this.selectedOrFirstVariant.value=this.selectedVariant}update(t){return this.id=t.id,this.mID=t.mID,this.name=t.name,this.status=t.status,this.ctg=t.ctg,this.imgs=t.imgs,this.desc=t.desc,this.sDesc=t.sDesc,this.link=t.link,this.slug=t.slug,this.quantity=t.quantity,this.meta=t.meta,this.category=t.category,this.videos=t.videos,this.reviews=t.reviews,this.portraitVideos=t.videos?.filter(e=>e.orientation==="PORTRAIT"),t.vars&&(this.vars=t.vars.map(e=>new dr(e))),this}toEmbed(t){return t=t??this.selectedOrFirstVariant.value,new lt({id:this.id,mID:this.mID,vID:t.mID,vName:t.name,name:this.name,link:this.link,slug:this.slug,price:t.price.d,imageURL:t.getOneImage()??this.imgs?.[0].url})}},cs=class{id;mID;handle;title;imageURL;constructor(t){t??={},this.id=t.id,this.mID=t.mID,this.handle=t.handle,this.title=t.title,this.imageURL=t.imageURL}},Zc=class{enabled;constructor(t){this.enabled=t.enabled}},el=class extends Zc{max;min;constructor(t){t??={},super(t),this.min=t.min,this.max=t.max}},ls=class{productQuantity;constructor(t){t??={},this.productQuantity=new el(t.productQuantity)}},nn=class{s;g;i;constructor(t){t.s&&(this.s=new Ue(t.s)),t.g&&(this.g=new ro(t.g)),this.i=t.i}get solid(){return this.s}get glossy(){return this.g}get img(){return this.i}},no="a-f\\d",Vh=`#?[${no}]{3}[${no}]?`,zh=`#?[${no}]{6}([${no}]{2})?`,Yh=new RegExp(`[^#${no}]`,"gi"),qh=new RegExp(`^${Vh}$|^${zh}$`,"i");function tl(t,e={}){if(typeof t!="string"||Yh.test(t)||!qh.test(t))throw new TypeError("Expected a valid hex string");t=t.replace(/^#/,"");let r=1;t.length===8&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),t.length===4&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=Number.parseInt(t,16),i=n>>16,s=n>>8&255,o=n&255,l=typeof e.alpha=="number"?e.alpha:r;if(e.format==="array")return[i,s,o,l];if(e.format==="css"){let u=l===1?"":` / ${Number((l*100).toFixed(2))}%`;return`rgb(${i} ${s} ${o}${u})`}return{red:i,green:s,blue:o,alpha:l}}var Ue=class{h;a=100;g;constructor(t){t??={},this.h=t.h,this.a=t.a,this.g=t.g}get hex(){return this.h}get grad(){return this.g}get rgba(){if(!this.hex)return"";try{return tl(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}}getAlpha(){return(this.a??100)/100}},on=class{s;r;w;c;constructor(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new Ue(t.c))}get radius(){return this.r}get width(){return this.w}get color(){return this.c}get style(){return $p[this.s??1]}},$p=(t=>(t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED",t))($p||{}),ro=class op{static DEFAULT_FALLBACK=new Ue({h:"#000000",a:50});r;c;fb;constructor(e){this.r=e.r,e.c&&(this.c=new Ue(e.c)),e.fb&&(this.fb=new Ue(e.fb))}get radius(){return this.r}get color(){return this.c}get fallback(){return this.fb??op.DEFAULT_FALLBACK}},io=class{blur;spr;clr;x;y;constructor(t){t=t??{},this.blur=t.blur??0,this.spr=t.spr??0,this.x=t.x??0,this.y=t.y??0,this.clr=new Ue(t.clr)}getStyle(t){return`${this.x*t}px ${this.y*t}px ${this.blur*t}px ${this.spr*t}px ${this.clr.rgba}`}},Ar=class{pl;pr;pt;pb;ml;mr;mt;mb;cent;constructor(t){t=t??{},this.pl=t.pl??0,this.pr=t.pr??0,this.pt=t.pt??0,this.pb=t.pb??0,this.ml=t.ml??0,this.mr=t.mr??0,this.mt=t.mt??0,this.mb=t.mb??0,this.cent=t.cent??!1}getHorizontal(){return this.pl+this.pr}getVertical(){return this.pt+this.pb}getPaddingCSS(){return`${this.pt}px ${this.pr}px ${this.pb}px ${this.pl}px`}},sn=class{rot;constructor(t){t?.rot&&(this.rot=t.rot)}get rotate(){return this.rot}},Ot=class{t;bg;br;clc;shd;spc;trf;a;w;h;x;y;constructor(t){this.t=t.t,t.bg&&(this.bg=new nn(t.bg)),t.br&&(this.br=new on(t.br)),t.shd&&(this.shd=new io(t.shd)),t.spc&&(this.spc=new Ar(t.spc)),this.trf=new sn(t.trf),this.clc=t.clc,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.a=t.a}get alpha(){return this.a??100}get type(){return this.t}get typeAsString(){return Pe[this.t]}get click(){return this.clc}},Pe=(t=>(t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.FLEXBOX=4]="FLEXBOX",t[t.MULTI_COLUMN=5]="MULTI_COLUMN",t[t.CHECKBOX=6]="CHECKBOX",t[t.PRODUCTS=11]="PRODUCTS",t[t.PRODUCT=12]="PRODUCT",t[t.PRODUCT_IMAGE=13]="PRODUCT_IMAGE",t[t.PRODUCT_TITLE=14]="PRODUCT_TITLE",t[t.PRODUCT_VARIATIONS=15]="PRODUCT_VARIATIONS",t[t.PRODUCT_VARIATIONS_SELLING_PLANS=16]="PRODUCT_VARIATIONS_SELLING_PLANS",t[t.PRODUCT_BUTTON=18]="PRODUCT_BUTTON",t[t.PRODUCT_RATING=19]="PRODUCT_RATING",t[t.EMAIL_INPUT=51]="EMAIL_INPUT",t[t.PHONE_INPUT=52]="PHONE_INPUT",t[t.COUNTDOWN_TIMER=61]="COUNTDOWN_TIMER",t[t.CAROUSEL=62]="CAROUSEL",t[t.SHAPE=100]="SHAPE",t))(Pe||{}),an=class extends Ot{constructor(t){super(t)}},Or=class extends Ot{src;constructor(t){super(t),this.src=t.src}},Qn=(t=>(t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY",t))(Qn||{}),us=class{name;fonts;constructor(t){t=t??{},t.name&&(t.name=t.name!=="Arial"?t.name:""),this.name=t.name,this.fonts=t.fonts?.map(e=>new rl(e))}},rl=class{style;url;constructor(t){t=t??{},this.style=t.style,this.url=t.url}getFontDescriptor(){return{style:this.style===2||this.style===4?"italic":"normal",weight:this.style===4||this.style===3?"700":"400"}}getURL(){return`url('${this.url}') format('truetype')`}},st=class{fw;fs;fam;fmly;lh=1.2;ls;s;tc;ta;td;tdc;constructor(t){this.update(t)}get alignment(){return Qn[this.ta]}get letterSpacing(){return this.ls?this.ls+"px":"normal"}update(t){t=t??{},t.lh&&(this.lh=t.lh),t.tdc&&(this.tdc=new Ue(t.tdc)),this.td=t.td,this.fs=t.s??t.fs??60,this.tc=new Ue(t.tc),this.ta=t.ta??1,this.fw=t.fw??400,this.ls=t.ls??0,this.tc.h??="#000000",this.fam=new us(t.fam??t.fmly)}resize(t){this.s*=t,this.ls*=t}},hr=class extends Ot{typo;constructor(t){super(t);let e=b(b({},t.f),t.typo);t.alg&&(e.ta=t.alg),t.c&&(e.tc=t.c),this.typo=new st(e)}get color(){return this.typography.tc}get typography(){return this.typo}},zr=class extends hr{prs;constructor(t){super(t),this.prs=t.prs}get parts(){return this.prs}},ps=class extends Ot{o;constructor(t){super(t),this.o=t.o??5,this.w=this.w??1080,this.h=this.h??1920}getOrigin(){return this.o}},Zn=class{dd;hh;mm;ss;date;constructor(t){t??={},this.dd=t.dd??0,this.hh=t.hh??0,this.mm=t.mm??0,this.ss=t.ss??0,this.date=t.date?new Date(t.date):void 0}start(t,e){let r=new Date;t===2?(r.setSeconds(r.getSeconds()+this.ss),r.setMinutes(r.getMinutes()+this.mm),r.setHours(r.getHours()+this.hh),r.setDate(r.getDate()+this.dd)):r=this.date??new Date;let n=window.setInterval(()=>{let i=new Date().getTime(),s=r.getTime()-i;if(s<1){clearInterval(n);return}let o=Math.floor(s/(1e3*60*60*24)),l=Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),u=Math.floor(s%(1e3*60*60)/(1e3*60)),f=Math.floor(s%(1e3*60)/1e3);e({days:o,hours:l,minutes:u,seconds:f})},1e3);return n}},ei=class extends hr{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t),this.gap=t.gap,this.timerType=t.type,this.timer=new Zn(t.timer),this.show=t.show??{day:!0,hour:!0,minute:!0,second:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},fs=class{txt;c;constructor(t){t??={},this.txt=t.txt,this.c=new Ue(t.c??{})}get text(){return this.txt}get color(){return this.c}},Yr=class extends hr{ph;constructor(t){super(t),this.ph=new fs(t.ph)}get placeholderText(){return this.ph.text}get placeholderColor(){return this.ph.color.rgba}},ti=class extends Yr{constructor(t){t??={},super(t)}},ri=class extends Yr{},ni=class extends Yr{},ii=class extends Or{},cn=(t=>(t[t.LOW=1]="LOW",t[t.MEDIUM=2]="MEDIUM",t[t.HIGH=3]="HIGH",t))(cn||{}),ms=class{en;ex;constructor(t){t=t??{},this.en=t.en,this.ex=t.ex}getEnterAnimation(){switch(this.en){case 2:return[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}];case 3:return[{transform:"translateY(100%)"},{transform:"translateY(0%)"}];case 4:return[{transform:"translateX(-100%)"},{transform:"translateX(0%)"}];case 5:return[{transform:"translateX(100%)"},{transform:"translateX(0%)"}];case 6:return[{transform:"translate(-100%, -100%)"},{transform:"translate(0%, 0%)"}];case 7:return[{transform:"translate(100%, -100%)"},{transform:"translate(0%, 0%)"}];case 8:return[{transform:"translate(-100%, 100%)"},{transform:"translate(0%, 0%)"}];case 9:return[{transform:"translate(100%, 100%)"},{transform:"translate(0%, 0%)"}];case 10:return[{transform:"scale(0.1)"},{transform:"scale(1)"}];default:return[]}}getExitAnimation(){switch(this.ex){case 2:return[{transform:"translateY(0%)"},{transform:"translateY(-100%)"}];case 3:return[{transform:"translateY(0%)"},{transform:"translateY(100%)"}];case 4:return[{transform:"translateX(0%)"},{transform:"translateX(-100%)"}];case 5:return[{transform:"translateX(0%)"},{transform:"translateX(100%)"}];case 6:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, -100%)"}];case 7:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, -100%)"}];case 8:return[{transform:"translate(0%, 0%)"},{transform:"translate(-100%, 100%)"}];case 9:return[{transform:"translate(0%, 0%)"},{transform:"translate(100%, 100%)"}];case 10:return[{transform:"scale(1)"},{transform:"scale(0)"}];default:return[]}}},oo=class extends Ot{gvt;max;cover;anim;embedded;position;constructor(t){t=t??{},super(t),this.gvt=t.gvt??5,this.max=t.max,this.cover=t.cover??!0,this.anim=new ms(t.anim),this.embedded=t.embedded,this.position=t.position??1,this.spc||(this.spc=new Ar({pl:A.IN_APP_DEFAULT_PADDING,pr:A.IN_APP_DEFAULT_PADDING,pt:A.IN_APP_DEFAULT_PADDING,pb:A.IN_APP_DEFAULT_PADDING}))}isEmbedded(){return this.position===2&&!!this.embedded}getEmbeddedSelector(){return`.letscooee-engagement.container-${this.embedded}`}},ds=class extends oo{cont;elems=[];mob;constructor(t){t=t??{},super(t),this.cont=new ps(t.cont),this.mob=new oo(t.mob),this.bg||(this.bg=this.cont.bg,delete this.cont.bg),t.elems.forEach(e=>{e.t===1?this.elems.push(new Or(e)):e.t===2?this.elems.push(new zr(e)):e.t===3?this.elems.push(new zr(e)):e.t===100?this.elems.push(new an(e)):e.t===51?this.elems.push(new ri(e)):e.t===52?this.elems.push(new ni(e)):e.t===61?this.elems.push(new ei(e)):e.t===15||e.t===16?this.elems.push(new ti(e)):e.t===13&&this.elems.push(new ii(e))})}getStylesForWrapper(){if(this.cover)return{};let t;return this.gvt===1?t={top:0,left:0}:this.gvt===2?t={top:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===3?t={top:0,right:0}:this.gvt===6?t={top:"50%",right:0,transform:"translateY(-50%)"}:this.gvt===9?t={bottom:0,right:0}:this.gvt===8?t={bottom:0,left:"50%",transform:"translateX(-50%)"}:this.gvt===7?t={bottom:0,left:0}:this.gvt===4?t={top:"50%",left:0,transform:"translateY(-50%)"}:t={top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"},t.overflow="visible",t}getFlexStylesForContainer(){let t={display:"flex",flexDirection:"row"},e,r;return this.gvt===1?(e="flex-start",r="flex-start"):this.gvt===2?(e="center",r="flex-start"):this.gvt===3?(e="flex-end",r="flex-start"):this.gvt===4?(e="flex-start",r="center"):this.gvt===6?(e="flex-end",r="center"):this.gvt===7?(e="flex-start",r="flex-end"):this.gvt===8?(e="center",r="flex-end"):this.gvt===9?(e="flex-end",r="flex-end"):(e="center",r="center"),t.alignItems=r,t.justifyContent=e,t.overflow="visible",t}overrideForMobileView(){this.max=this.mob.max??this.max,this.cover=this.mob.cover??this.cover,this.gvt=this.mob.gvt??this.gvt,this.bg=this.mob.bg??this.bg,this.spc=this.mob.spc??this.spc,this.anim=this.mob.anim??this.anim,this.position=this.mob.position??this.position,this.embedded=this.mob.embedded??this.embedded}},oi=class{gap;dir;wrap;jc;ai;scroll;constructor(t){t??={},this.gap=t.gap??0,this.dir=t.dir??"row",this.wrap=t.wrap??"nowrap",this.jc=t.jc??"flex-start",this.ai=t.ai??"flex-start",this.scroll=t.scroll}},hs=class{of;disp;pos;top;bottom;left;right;zIndex;constructor(t){t??={},this.of=t.of,this.disp=t.disp,this.pos=t.pos,this.top=t.top,this.bottom=t.bottom,this.left=t.left,this.right=t.right,this.zIndex=t.zIndex}},gs=class{w;h;maxW;maxH;minW;minH;constructor(t){t??={},this.w=t.w??"100%",this.h=t.h??"auto",this.maxW=t.maxW,this.maxH=t.maxH,this.minW=t.minW,this.minH=t.minH}},ys=class{size;bg;br;spc;typo;lout;flex;constructor(t){t??={},this.spc=new Ar(t.spc),t.size&&(this.size=new gs(t.size)),t.bg&&(this.bg=new nn(t.bg)),t.br&&(this.br=new on(t.br)),t.typo&&(this.typo=new st(t.typo)),t.lout&&(this.lout=new hs(t.lout)),t.flex&&(this.flex=new oi(t.flex))}},si=class{sm;lg;constructor(t){t??={},this.sm=new ys(t.sm),this.lg=new ys(t.lg)}},tt=class{t;style;hide;when;clc;constructor(t,e){e??={},this.t=t,this.style=new si(e.style),this.hide=e.hide,e.when?.op&&(this.when=e.when),e.clc&&(this.clc=e.clc)}get stringType(){return Pe[this.t]}},ze=class extends tt{text;constructor(t,e){t?.style?.lg?.typo?.s&&delete t.style.lg.typo.s,t?.style?.sm?.typo?.s&&delete t.style.sm.typo.s,super(e??2,t),t??={},this.text=t.text}},ln=class extends ze{constructor(t,e){super(t,e??3)}},ai=class extends tt{value;constructor(t){super(6,t),t??={},this.value=t.value}},ci=class extends ze{constructor(t=15,e){super(e,t)}},vs=class extends tt{c;iconSize;showSingleStar;fullStar;halfStart;constructor(t){super(19,t),t??={},this.c=new Ue(t.c),this.iconSize=t.iconSize??24,this.showSingleStar=t.showSingleStar??!1,this.fullStar=t.fullStar,this.halfStart=t.halfStart}},jp=Qt(tn()),nl=class{enabled;type;color;constructor(t){t??={},this.enabled=t.enabled,this.type=t.type,this.color=new Ue(t.color)}},il=class{size;enabled;color;constructor(t){t??={},this.enabled=t.enabled,this.size=t.size,this.color=new Ue(t.color)}},so=class{navigation;pagination;autoplay;maxInRow;gap;slidesPerView;constructor(t){t??={},this.navigation=new il(t.navigation),this.pagination=new nl(t.pagination),this.autoplay=t.autoplay,this.slidesPerView=t.slidesPerView??1,this.maxInRow=t.maxInRow??t.slidesPerView??4,this.gap=t.gap??0}},_s=class extends tt{conf;slide;formData;values;allowedTypes;constructor(t){super(62,t),t&&this.update(t)}update(t){t??={},this.slide=Pt.getParsedElement(t.slide),this.formData=t.formData,this.values=t.values,this.conf=new so(t.conf),this.allowedTypes=t.allowedTypes}},Es=class extends ze{gap;timer;timerType;horizontal;lblPos;show;constructor(t){t??={},super(t,61),this.gap=t.gap,this.timerType=t.type,this.timer=new Zn(t.timer),this.show=t.show??{days:!0,hours:!0,minutes:!0,seconds:!0},this.horizontal=t.horizontal,this.lblPos=t.lblPos}},qr=class extends tt{elems;constructor(t){super(4,t),this.update(t)}update(t){t??={},this.elems??=[],t.elems?.forEach(e=>{let r=Pt.getParsedElement(e);r&&this.elems.push(r)})}},un=class extends tt{src;sm;lg;constructor(t,e){super(e??1,t),t&&this.update(t)}update(t){this.src=t.src,this.sm=t.sm,this.lg=t.lg}},Pt=class Fp{static getParsedElements(e){let r=[];return e?.forEach(n=>{let i=Fp.getParsedElement(n);i&&r.push(i)}),r}static getParsedElement(e){switch(e.t){case 2:return new ze(e);case 3:return new ln(e);case 6:return new ai(e);case 11:return new Ss(e);case 12:return new gr(e);case 61:return new Es(e);case 4:return new qr(e);case 1:return new un(e);case 13:return new un(e,13);case 14:return new ze(e,14);case 15:case 16:return new ci(e.t,e);case 18:return new ln(e,18);case 62:return new _s(e);case 19:return new vs(e);default:jp.default.error("Unknown element type",e.t);return}}static parseAlignmentToJustifyContent(e){switch(e){case 1:return"center";case 2:return"flex-end";case 0:return"flex-start";default:return"flex-start"}}},gr=class extends tt{img;title;desc;price;compareAt;btn;variantDD;show;symbol;cBox;elems;noLinks;constructor(t){if(t??={},super(12,t),this.show=t.show,this.elems=Pt.getParsedElements(t.elems),this.noLinks=t.noLinks,!this.elems.length){t.cBox&&this.elems.push(new ai(t.cBox)),this.elems.push(new un(t.img,13));let e=new ze(t.title,14);e.hide=!t.show?.title,e.text="{{ product.name }}",this.elems.push(e);let r=new ze(t.price);r.text="{{ product.price }}",r.hide=!t.show?.price;let n=new ze(t.compareAt);n.text="{{ product.compare_price }}",n.hide=!t.show?.price,t.compareAt||(n.style=new si(r.style),n.style.lg.typo=new st(Z(b({},n.style.lg.typo),{td:"line-through"})),n.style.sm.typo=new st(Z(b({},n.style.sm.typo),{td:"line-through"})));let i=new qr({style:{lg:{spc:{mb:10},flex:{dir:"row",gap:10,ai:"center",jc:Pt.parseAlignmentToJustifyContent(r.style.lg.typo?.ta)}}}});i.elems.push(n),i.elems.push(r),this.elems.push(i);let s=new ci(15,t.variantDD);if(s.hide=!t.show?.variantDD,this.elems.push(s),t.btn){let o=new ln(t.btn,18);o.hide=!t.show?.btn,this.elems.push(o)}}t.symbol&&(this.symbol=new ze(t.symbol))}},Ss=class extends tt{conf;prod;constructor(t){super(11,t),t??={},this.conf=new ol(t.conf),this.prod=new gr(t.prod)}},bs=class extends so{disp;maxItems;constructor(t){t??={},super(t),this.disp=t.disp,this.maxItems=t.maxItems}},ol=class{lg;sm;constructor(t){t??={},this.lg=new bs(t.lg),this.sm=new bs(t.sm)}},ws=class extends qr{constructor(t){super(t)}},li=class{cont;elems=[];constructor(t){t=t??{},this.cont=new ws(t.cont),t.elems?.forEach(e=>{this.addRawElement(e)})}addRawElement(t){let e=Pt.getParsedElement(t);return e&&this.elems.push(e),e}},sl=class{minValue;rewardType;label;reachingText;reachedText;discount;items;calculatedAlignment;constructor(t){this.minValue=t.minValue,this.rewardType=t.rewardType,this.label=t.label,this.reachingText=t.reachingText,this.reachedText=t.reachedText,this.discount=t.discount,this.items=t.items?.map(e=>new lt(e))}},Is=class{layout;milestones;constructor(t){this.layout=t.layout??Cc.ICONS,this.milestones=t.milestones?.map(e=>new sl(e))??[]}},Ts=class{applyDiscountOnMinimum;constructor(t){this.applyDiscountOnMinimum=t.applyDiscountOnMinimum}},al=class{engagementID;shortID;contentType;delay;onsiteDeliveryType;objective;redirectBehaviour;constructor(t){this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.delay=t.delay??0,this.redirectBehaviour=t.redirectBehaviour,this.onsiteDeliveryType=t.onsiteDeliveryType,this.objective=t.objective}isAnySplit(){return this.isABTesting()||this.isExclusionTesting()}isExclusionTesting(){return this.contentType===zi.EXCLUSION}isABTesting(){return this.contentType===zi.ABTESTING}isSingleContent(){return this.contentType===zi.SINGLE}},Lt=class bd extends al{static SWIPER_ELEMENTS=new Set([11,62]);nudgeID;contentID;variation;ian;widget;discount;placement;promotionType;contentSource;manipulation;klaviyoFormID;hasMultiplePlacement;skipSubscribedItems;progressBarConfig;bundleConfig;previewType;occurred;id;currency;props;items;nonMutableItems;embeddedItems;bundleFrom;collections;customerData;discountData=er({});constructor(e){super(e),this.id=e.id,this.nudgeID=e.nudgeID,this.currency=le.get().currencyCode??"USD",this.contentID=e.contentID,this.variation=e.variation,e.widget&&(this.widget=new li(e.widget)),this.previewType=e.previewType,this.occurred=e.occurred??new Date,this.props=e.props,this.embeddedItems=e.embeddedItems?.map(r=>new lt(r)),this.items=e.items?.map(r=>new xt(r))??[],this.nonMutableItems=e.items?.map(r=>new xt(r))??[],this.collections=e.collections?.map(r=>new cs(r))??[],this.discount=e.discount,this.placement=e.placement,this.customerData=e.customerData,this.ian=e.ian?this.processPopup(e.ian):void 0,this.promotionType=e.promotionType,this.manipulation=new ls(e.manipulation),this.contentSource=e.contentSource,this.klaviyoFormID=e.klaviyoFormID,this.hasMultiplePlacement=e.hasMultiplePlacement,this.skipSubscribedItems=e.skipSubscribedItems,e.progressBarConfig&&(this.progressBarConfig=new Is(e.progressBarConfig)),e.bundleConfig&&(this.bundleConfig=new Ts(e.bundleConfig)),e.bundleFrom&&(this.bundleFrom=new xt(e.bundleFrom))}shouldDelay(){return this.delay>0}sentryContext(){return{id:this.id,shortID:this.shortID,currency:this.currency,contentType:this.contentType,objective:this.objective,onsiteDeliveryType:this.onsiteDeliveryType,engagementID:this.engagementID,contentID:this.contentID,nudgeID:this.nudgeID,variation:this.variation}}getDelaySeconds(){let e=new Date().getTime()-this.occurred.getTime();return this.delay*1e3-e}isBundle(){return this.objective===ur.BUNDLE_AND_UPSELL}isCartEmbed(){return this.onsiteDeliveryType===Yi.CART_EMBED}isPageEmbed(){return this.onsiteDeliveryType===Yi.PAGE_EMBED}isProgressBar(){return this.objective===ur.PROGRESS_BAR}isSubscriptionUpsell(){return this.objective===ur.SUBSCRIPTION_UPSELL}isCartRecovery(){return this.objective===ur.CART_RECOVERY}isProductPromotion(){return this.objective===ur.PRODUCT_PROMOTION}isProductPromoted(){return this.isProductPromotion()||this.isBundle()||this.isCartRecovery()}isBYOB(){return this.objective===ur.BYOB}isShoppableVideo(){return this.objective===ur.SHOPPABLE_VIDEO}processPopup(e){let r=JSON.stringify(e),n=this.items[0],i={},s={};if(n){let u=n.selectedOrFirstVariant.value;i={name:n.name,id:n.mID,link:n.link,vID:u.mID,image:n.variantImage,price:ne.formatCurrency(u.price.d),comparePrice:ne.formatCurrency(u.price.cmp),quantity:n.quantity},s={quantity:u.quantity}}let o={productCount:ge.getCurrent().item_count},l=vt.render(r,{product:i,variant:s,cart:o,discount:this.discount,customer:this.customerData});return n&&(l=l.replace(new RegExp(A.PLACEHOLDER_IMAGE,"gi"),n.variantImage??n.imageURL)),new ds(JSON.parse(l))}calculateDiscountData(e,r){let n=jn.sum(e,s=>s.selectedOrFirstVariant.value.price.d),i={actualPrice:n,discountAmount:0,discountPercentage:0,discountedPrice:n};if(!e?.length||!r||!this.discount?.type){this.discountData.value=this.formatCurrencyAndNumber(i);return}if([pr.UNIQUE_FLAT_ITEMS,pr.STATIC].includes(this.discount.type)&&this.discount.values?.length)i.discountPercentage=this.discount.values[0],i.discountAmount=i.actualPrice*i.discountPercentage/100;else if(this.discount.type===pr.UNIQUE_FIXED_ITEMS&&this.discount.values?.length)i.discountAmount=i.actualPrice-this.discount.values[0],i.discountPercentage=i.discountAmount/i.actualPrice*100;else if(this.discount.type===pr.UNIQUE_CHEAPEST_ITEM_FREE){e.sort((o,l)=>l.selectedOrFirstVariant.value.price.d-o.selectedOrFirstVariant.value.price.d);let s=e[e.length-1];s.selectedOrFirstVariant.value.price.effective=0,i.discountAmount=s.selectedOrFirstVariant.value.price.d,i.discountPercentage=i.discountAmount/i.actualPrice*100}i.discountedPrice=i.actualPrice-i.discountAmount,this.discountData.value=this.formatCurrencyAndNumber(i)}getPrivateAttributesForLineItem(){return Oe.get().skipItemAttribute?{}:{[A.VIA]:"Cooee",[A.CAMPAIGN_ATTRIBUTE]:this.shortID,[A.CONTENT_ATTRIBUTE]:this.contentID}}getKVFormatPrivateAttributesForLineItem(){return Oe.get().skipItemAttribute?[]:[{key:A.VIA,value:"Cooee"},{key:A.CAMPAIGN_ATTRIBUTE,value:this.shortID},{key:A.CONTENT_ATTRIBUTE,value:this.contentID}]}isBundleDiscount(){return[pr.UNIQUE_FIXED_ITEMS,pr.UNIQUE_FLAT_ITEMS].includes(this.discount.type)}isBundleOnCartDrawer(){return this.onsiteDeliveryType===Yi.CART_EMBED&&this.objective===ur.BUNDLE_AND_UPSELL}hasSwiperElement(){let e=this.widget?.elems.find(n=>bd.SWIPER_ELEMENTS.has(n.t));if(!e)return!1;if(e.t===62)return!0;let r=At.get().isMobile()?"sm":"lg";return e.conf[r].disp===2}toString(){return`Engagement(id=${this.shortID})`}formatCurrencyAndNumber(e){if(!e)return{};let r={discountPercentage:ne.formatNumber(e.discountPercentage??0),discountCode:this.discount?.code};return["actualPrice","discountAmount","discountedPrice"].map(n=>{r[n]=ne.formatCurrency(e[n])}),r}};function Jh(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Xh=tg,Qh=ng,Zh=sg,vr=[],$t=[],eg=typeof Uint8Array<"u"?Uint8Array:Array,cl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(pn=0,Wp=cl.length;pn<Wp;++pn)vr[pn]=cl[pn],$t[cl.charCodeAt(pn)]=pn;var pn,Wp;$t[45]=62;$t[95]=63;function sf(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function tg(t){var e=sf(t),r=e[0],n=e[1];return(r+n)*3/4-n}function rg(t,e,r){return(e+r)*3/4-r}function ng(t){var e,r=sf(t),n=r[0],i=r[1],s=new eg(rg(t,n,i)),o=0,l=i>0?n-4:n,u;for(u=0;u<l;u+=4)e=$t[t.charCodeAt(u)]<<18|$t[t.charCodeAt(u+1)]<<12|$t[t.charCodeAt(u+2)]<<6|$t[t.charCodeAt(u+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=$t[t.charCodeAt(u)]<<2|$t[t.charCodeAt(u+1)]>>4,s[o++]=e&255),i===1&&(e=$t[t.charCodeAt(u)]<<10|$t[t.charCodeAt(u+1)]<<4|$t[t.charCodeAt(u+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function ig(t){return vr[t>>18&63]+vr[t>>12&63]+vr[t>>6&63]+vr[t&63]}function og(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(ig(n));return i.join("")}function sg(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,l=r-n;o<l;o+=s)i.push(og(t,o,o+s>l?l:o+s));return n===1?(e=t[r-1],i.push(vr[e>>2]+vr[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(vr[e>>10]+vr[e>>4&63]+vr[e<<2&63]+"=")),i.join("")}var ll={byteLength:Xh,toByteArray:Qh,fromByteArray:Zh},ag=function(t,e,r,n,i){var s,o,l=i*8-n-1,u=(1<<l)-1,f=u>>1,m=-7,h=r?i-1:0,v=r?-1:1,_=t[e+h];for(h+=v,s=_&(1<<-m)-1,_>>=-m,m+=l;m>0;s=s*256+t[e+h],h+=v,m-=8);for(o=s&(1<<-m)-1,s>>=-m,m+=n;m>0;o=o*256+t[e+h],h+=v,m-=8);if(s===0)s=1-f;else{if(s===u)return o?NaN:(_?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-f}return(_?-1:1)*o*Math.pow(2,s-n)},cg=function(t,e,r,n,i,s){var o,l,u,f=s*8-i-1,m=(1<<f)-1,h=m>>1,v=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:s-1,g=n?1:-1,y=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,o=m):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+h>=1?e+=v/u:e+=v*Math.pow(2,1-h),e*u>=2&&(o++,u/=2),o+h>=m?(l=0,o=m):o+h>=1?(l=(e*u-1)*Math.pow(2,i),o=o+h):(l=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+_]=l&255,_+=g,l/=256,i-=8);for(o=o<<i|l,f+=i;f>0;t[r+_]=o&255,_+=g,o/=256,f-=8);t[r+_-g]|=y*128},ui={read:ag,write:cg},Ds=Jh(function(t,e){var r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=o,e.SlowBuffer=O,e.INSPECT_MAX_BYTES=50;var n=2147483647;e.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=i(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function i(){try{var a=new Uint8Array(1),c={foo:function(){return 42}};return Object.setPrototypeOf(c,Uint8Array.prototype),Object.setPrototypeOf(a,c),a.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function s(a){if(a>n)throw new RangeError('The value "'+a+'" is invalid for option "size"');var c=new Uint8Array(a);return Object.setPrototypeOf(c,o.prototype),c}function o(a,c,p){if(typeof a=="number"){if(typeof c=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return m(a)}return l(a,c,p)}o.poolSize=8192;function l(a,c,p){if(typeof a=="string")return h(a,c);if(ArrayBuffer.isView(a))return _(a);if(a==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a));if(Be(a,ArrayBuffer)||a&&Be(a.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(a,SharedArrayBuffer)||a&&Be(a.buffer,SharedArrayBuffer)))return g(a,c,p);if(typeof a=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var I=a.valueOf&&a.valueOf();if(I!=null&&I!==a)return o.from(I,c,p);var N=y(a);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof a[Symbol.toPrimitive]=="function")return o.from(a[Symbol.toPrimitive]("string"),c,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(a))}o.from=function(a,c,p){return l(a,c,p)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function u(a){if(typeof a!="number")throw new TypeError('"size" argument must be of type number');if(a<0)throw new RangeError('The value "'+a+'" is invalid for option "size"')}function f(a,c,p){return u(a),a<=0?s(a):c!==void 0?typeof p=="string"?s(a).fill(c,p):s(a).fill(c):s(a)}o.alloc=function(a,c,p){return f(a,c,p)};function m(a){return u(a),s(a<0?0:C(a)|0)}o.allocUnsafe=function(a){return m(a)},o.allocUnsafeSlow=function(a){return m(a)};function h(a,c){if((typeof c!="string"||c==="")&&(c="utf8"),!o.isEncoding(c))throw new TypeError("Unknown encoding: "+c);var p=H(a,c)|0,I=s(p),N=I.write(a,c);return N!==p&&(I=I.slice(0,N)),I}function v(a){for(var c=a.length<0?0:C(a.length)|0,p=s(c),I=0;I<c;I+=1)p[I]=a[I]&255;return p}function _(a){if(Be(a,Uint8Array)){var c=new Uint8Array(a);return g(c.buffer,c.byteOffset,c.byteLength)}return v(a)}function g(a,c,p){if(c<0||a.byteLength<c)throw new RangeError('"offset" is outside of buffer bounds');if(a.byteLength<c+(p||0))throw new RangeError('"length" is outside of buffer bounds');var I;return c===void 0&&p===void 0?I=new Uint8Array(a):p===void 0?I=new Uint8Array(a,c):I=new Uint8Array(a,c,p),Object.setPrototypeOf(I,o.prototype),I}function y(a){if(o.isBuffer(a)){var c=C(a.length)|0,p=s(c);return p.length===0||a.copy(p,0,0,c),p}if(a.length!==void 0)return typeof a.length!="number"||$r(a.length)?s(0):v(a);if(a.type==="Buffer"&&Array.isArray(a.data))return v(a.data)}function C(a){if(a>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return a|0}function O(a){return+a!=a&&(a=0),o.alloc(+a)}o.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==o.prototype},o.compare=function(a,c){if(Be(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),Be(c,Uint8Array)&&(c=o.from(c,c.offset,c.byteLength)),!o.isBuffer(a)||!o.isBuffer(c))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===c)return 0;for(var p=a.length,I=c.length,N=0,L=Math.min(p,I);N<L;++N)if(a[N]!==c[N]){p=a[N],I=c[N];break}return p<I?-1:I<p?1:0},o.isEncoding=function(a){switch(String(a).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}},o.concat=function(a,c){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return o.alloc(0);var p;if(c===void 0)for(c=0,p=0;p<a.length;++p)c+=a[p].length;var I=o.allocUnsafe(c),N=0;for(p=0;p<a.length;++p){var L=a[p];if(Be(L,Uint8Array))N+L.length>I.length?o.from(L).copy(I,N):Uint8Array.prototype.set.call(I,L,N);else if(o.isBuffer(L))L.copy(I,N);else throw new TypeError('"list" argument must be an Array of Buffers');N+=L.length}return I};function H(a,c){if(o.isBuffer(a))return a.length;if(ArrayBuffer.isView(a)||Be(a,ArrayBuffer))return a.byteLength;if(typeof a!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(a));var p=a.length,I=arguments.length>2&&arguments[2]===!0;if(!I&&p===0)return 0;for(var N=!1;;)switch(c){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return kn(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p*2;case"hex":return p>>>1;case"base64":return ji(a).length;default:if(N)return I?-1:kn(a).length;c=(""+c).toLowerCase(),N=!0}}o.byteLength=H;function R(a,c,p){var I=!1;if((c===void 0||c<0)&&(c=0),c>this.length||((p===void 0||p>this.length)&&(p=this.length),p<=0)||(p>>>=0,c>>>=0,p<=c))return"";for(a||(a="utf8");;)switch(a){case"hex":return De(this,c,p);case"utf8":case"utf-8":return me(this,c,p);case"ascii":return be(this,c,p);case"latin1":case"binary":return Ut(this,c,p);case"base64":return Xt(this,c,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ht(this,c,p);default:if(I)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),I=!0}}o.prototype._isBuffer=!0;function k(a,c,p){var I=a[c];a[c]=a[p],a[p]=I}o.prototype.swap16=function(){var a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var c=0;c<a;c+=2)k(this,c,c+1);return this},o.prototype.swap32=function(){var a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var c=0;c<a;c+=4)k(this,c,c+3),k(this,c+1,c+2);return this},o.prototype.swap64=function(){var a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var c=0;c<a;c+=8)k(this,c,c+7),k(this,c+1,c+6),k(this,c+2,c+5),k(this,c+3,c+4);return this},o.prototype.toString=function(){var a=this.length;return a===0?"":arguments.length===0?me(this,0,a):R.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(a){if(!o.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:o.compare(this,a)===0},o.prototype.inspect=function(){var a="",c=e.INSPECT_MAX_BYTES;return a=this.toString("hex",0,c).replace(/(.{2})/g,"$1 ").trim(),this.length>c&&(a+=" ... "),"<Buffer "+a+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(a,c,p,I,N){if(Be(a,Uint8Array)&&(a=o.from(a,a.offset,a.byteLength)),!o.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(a));if(c===void 0&&(c=0),p===void 0&&(p=a?a.length:0),I===void 0&&(I=0),N===void 0&&(N=this.length),c<0||p>a.length||I<0||N>this.length)throw new RangeError("out of range index");if(I>=N&&c>=p)return 0;if(I>=N)return-1;if(c>=p)return 1;if(c>>>=0,p>>>=0,I>>>=0,N>>>=0,this===a)return 0;for(var L=N-I,W=p-c,te=Math.min(L,W),Tt=this.slice(I,N),Dt=a.slice(c,p),ce=0;ce<te;++ce)if(Tt[ce]!==Dt[ce]){L=Tt[ce],W=Dt[ce];break}return L<W?-1:W<L?1:0};function V(a,c,p,I,N){if(a.length===0)return-1;if(typeof p=="string"?(I=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),p=+p,$r(p)&&(p=N?0:a.length-1),p<0&&(p=a.length+p),p>=a.length){if(N)return-1;p=a.length-1}else if(p<0)if(N)p=0;else return-1;if(typeof c=="string"&&(c=o.from(c,I)),o.isBuffer(c))return c.length===0?-1:Mt(a,c,p,I,N);if(typeof c=="number")return c=c&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(a,c,p):Uint8Array.prototype.lastIndexOf.call(a,c,p):Mt(a,[c],p,I,N);throw new TypeError("val must be string, number or Buffer")}function Mt(a,c,p,I,N){var L=1,W=a.length,te=c.length;if(I!==void 0&&(I=String(I).toLowerCase(),I==="ucs2"||I==="ucs-2"||I==="utf16le"||I==="utf-16le")){if(a.length<2||c.length<2)return-1;L=2,W/=2,te/=2,p/=2}function Tt(J,se){return L===1?J[se]:J.readUInt16BE(se*L)}var Dt;if(N){var ce=-1;for(Dt=p;Dt<W;Dt++)if(Tt(a,Dt)===Tt(c,ce===-1?0:Dt-ce)){if(ce===-1&&(ce=Dt),Dt-ce+1===te)return ce*L}else ce!==-1&&(Dt-=Dt-ce),ce=-1}else for(p+te>W&&(p=W-te),Dt=p;Dt>=0;Dt--){for(var z=!0,dt=0;dt<te;dt++)if(Tt(a,Dt+dt)!==Tt(c,dt)){z=!1;break}if(z)return Dt}return-1}o.prototype.includes=function(a,c,p){return this.indexOf(a,c,p)!==-1},o.prototype.indexOf=function(a,c,p){return V(this,a,c,p,!0)},o.prototype.lastIndexOf=function(a,c,p){return V(this,a,c,p,!1)};function fe(a,c,p,I){p=Number(p)||0;var N=a.length-p;I?(I=Number(I),I>N&&(I=N)):I=N;var L=c.length;I>L/2&&(I=L/2);for(var W=0;W<I;++W){var te=parseInt(c.substr(W*2,2),16);if($r(te))return W;a[p+W]=te}return W}function j(a,c,p,I){return Mn(kn(c,a.length-p),a,p,I)}function ct(a,c,p,I){return Mn(Hi(c),a,p,I)}function Y(a,c,p,I){return Mn(ji(c),a,p,I)}function at(a,c,p,I){return Mn(Wi(c,a.length-p),a,p,I)}o.prototype.write=function(a,c,p,I){if(c===void 0)I="utf8",p=this.length,c=0;else if(p===void 0&&typeof c=="string")I=c,p=this.length,c=0;else if(isFinite(c))c=c>>>0,isFinite(p)?(p=p>>>0,I===void 0&&(I="utf8")):(I=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var N=this.length-c;if((p===void 0||p>N)&&(p=N),a.length>0&&(p<0||c<0)||c>this.length)throw new RangeError("Attempt to write outside buffer bounds");I||(I="utf8");for(var L=!1;;)switch(I){case"hex":return fe(this,a,c,p);case"utf8":case"utf-8":return j(this,a,c,p);case"ascii":case"latin1":case"binary":return ct(this,a,c,p);case"base64":return Y(this,a,c,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,a,c,p);default:if(L)throw new TypeError("Unknown encoding: "+I);I=(""+I).toLowerCase(),L=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Xt(a,c,p){return c===0&&p===a.length?ll.fromByteArray(a):ll.fromByteArray(a.slice(c,p))}function me(a,c,p){p=Math.min(a.length,p);for(var I=[],N=c;N<p;){var L=a[N],W=null,te=L>239?4:L>223?3:L>191?2:1;if(N+te<=p){var Tt,Dt,ce,z;switch(te){case 1:L<128&&(W=L);break;case 2:Tt=a[N+1],(Tt&192)===128&&(z=(L&31)<<6|Tt&63,z>127&&(W=z));break;case 3:Tt=a[N+1],Dt=a[N+2],(Tt&192)===128&&(Dt&192)===128&&(z=(L&15)<<12|(Tt&63)<<6|Dt&63,z>2047&&(z<55296||z>57343)&&(W=z));break;case 4:Tt=a[N+1],Dt=a[N+2],ce=a[N+3],(Tt&192)===128&&(Dt&192)===128&&(ce&192)===128&&(z=(L&15)<<18|(Tt&63)<<12|(Dt&63)<<6|ce&63,z>65535&&z<1114112&&(W=z))}}W===null?(W=65533,te=1):W>65535&&(W-=65536,I.push(W>>>10&1023|55296),W=56320|W&1023),I.push(W),N+=te}return xe(I)}var de=4096;function xe(a){var c=a.length;if(c<=de)return String.fromCharCode.apply(String,a);for(var p="",I=0;I<c;)p+=String.fromCharCode.apply(String,a.slice(I,I+=de));return p}function be(a,c,p){var I="";p=Math.min(a.length,p);for(var N=c;N<p;++N)I+=String.fromCharCode(a[N]&127);return I}function Ut(a,c,p){var I="";p=Math.min(a.length,p);for(var N=c;N<p;++N)I+=String.fromCharCode(a[N]);return I}function De(a,c,p){var I=a.length;(!c||c<0)&&(c=0),(!p||p<0||p>I)&&(p=I);for(var N="",L=c;L<p;++L)N+=is[a[L]];return N}function ht(a,c,p){for(var I=a.slice(c,p),N="",L=0;L<I.length-1;L+=2)N+=String.fromCharCode(I[L]+I[L+1]*256);return N}o.prototype.slice=function(a,c){var p=this.length;a=~~a,c=c===void 0?p:~~c,a<0?(a+=p,a<0&&(a=0)):a>p&&(a=p),c<0?(c+=p,c<0&&(c=0)):c>p&&(c=p),c<a&&(c=a);var I=this.subarray(a,c);return Object.setPrototypeOf(I,o.prototype),I};function Q(a,c,p){if(a%1!==0||a<0)throw new RangeError("offset is not uint");if(a+c>p)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(a,c,p){a=a>>>0,c=c>>>0,p||Q(a,c,this.length);for(var I=this[a],N=1,L=0;++L<c&&(N*=256);)I+=this[a+L]*N;return I},o.prototype.readUintBE=o.prototype.readUIntBE=function(a,c,p){a=a>>>0,c=c>>>0,p||Q(a,c,this.length);for(var I=this[a+--c],N=1;c>0&&(N*=256);)I+=this[a+--c]*N;return I},o.prototype.readUint8=o.prototype.readUInt8=function(a,c){return a=a>>>0,c||Q(a,1,this.length),this[a]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(a,c){return a=a>>>0,c||Q(a,2,this.length),this[a]|this[a+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(a,c){return a=a>>>0,c||Q(a,2,this.length),this[a]<<8|this[a+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},o.prototype.readIntLE=function(a,c,p){a=a>>>0,c=c>>>0,p||Q(a,c,this.length);for(var I=this[a],N=1,L=0;++L<c&&(N*=256);)I+=this[a+L]*N;return N*=128,I>=N&&(I-=Math.pow(2,8*c)),I},o.prototype.readIntBE=function(a,c,p){a=a>>>0,c=c>>>0,p||Q(a,c,this.length);for(var I=c,N=1,L=this[a+--I];I>0&&(N*=256);)L+=this[a+--I]*N;return N*=128,L>=N&&(L-=Math.pow(2,8*c)),L},o.prototype.readInt8=function(a,c){return a=a>>>0,c||Q(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},o.prototype.readInt16LE=function(a,c){a=a>>>0,c||Q(a,2,this.length);var p=this[a]|this[a+1]<<8;return p&32768?p|4294901760:p},o.prototype.readInt16BE=function(a,c){a=a>>>0,c||Q(a,2,this.length);var p=this[a+1]|this[a]<<8;return p&32768?p|4294901760:p},o.prototype.readInt32LE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},o.prototype.readInt32BE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},o.prototype.readFloatLE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),ui.read(this,a,!0,23,4)},o.prototype.readFloatBE=function(a,c){return a=a>>>0,c||Q(a,4,this.length),ui.read(this,a,!1,23,4)},o.prototype.readDoubleLE=function(a,c){return a=a>>>0,c||Q(a,8,this.length),ui.read(this,a,!0,52,8)},o.prototype.readDoubleBE=function(a,c){return a=a>>>0,c||Q(a,8,this.length),ui.read(this,a,!1,52,8)};function we(a,c,p,I,N,L){if(!o.isBuffer(a))throw new TypeError('"buffer" argument must be a Buffer instance');if(c>N||c<L)throw new RangeError('"value" argument is out of bounds');if(p+I>a.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(a,c,p,I){if(a=+a,c=c>>>0,p=p>>>0,!I){var N=Math.pow(2,8*p)-1;we(this,a,c,p,N,0)}var L=1,W=0;for(this[c]=a&255;++W<p&&(L*=256);)this[c+W]=a/L&255;return c+p},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(a,c,p,I){if(a=+a,c=c>>>0,p=p>>>0,!I){var N=Math.pow(2,8*p)-1;we(this,a,c,p,N,0)}var L=p-1,W=1;for(this[c+L]=a&255;--L>=0&&(W*=256);)this[c+L]=a/W&255;return c+p},o.prototype.writeUint8=o.prototype.writeUInt8=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,1,255,0),this[c]=a&255,c+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,2,65535,0),this[c]=a&255,this[c+1]=a>>>8,c+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,2,65535,0),this[c]=a>>>8,this[c+1]=a&255,c+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,4,4294967295,0),this[c+3]=a>>>24,this[c+2]=a>>>16,this[c+1]=a>>>8,this[c]=a&255,c+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,4,4294967295,0),this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255,c+4},o.prototype.writeIntLE=function(a,c,p,I){if(a=+a,c=c>>>0,!I){var N=Math.pow(2,8*p-1);we(this,a,c,p,N-1,-N)}var L=0,W=1,te=0;for(this[c]=a&255;++L<p&&(W*=256);)a<0&&te===0&&this[c+L-1]!==0&&(te=1),this[c+L]=(a/W>>0)-te&255;return c+p},o.prototype.writeIntBE=function(a,c,p,I){if(a=+a,c=c>>>0,!I){var N=Math.pow(2,8*p-1);we(this,a,c,p,N-1,-N)}var L=p-1,W=1,te=0;for(this[c+L]=a&255;--L>=0&&(W*=256);)a<0&&te===0&&this[c+L+1]!==0&&(te=1),this[c+L]=(a/W>>0)-te&255;return c+p},o.prototype.writeInt8=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,1,127,-128),a<0&&(a=255+a+1),this[c]=a&255,c+1},o.prototype.writeInt16LE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,2,32767,-32768),this[c]=a&255,this[c+1]=a>>>8,c+2},o.prototype.writeInt16BE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,2,32767,-32768),this[c]=a>>>8,this[c+1]=a&255,c+2},o.prototype.writeInt32LE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,4,2147483647,-2147483648),this[c]=a&255,this[c+1]=a>>>8,this[c+2]=a>>>16,this[c+3]=a>>>24,c+4},o.prototype.writeInt32BE=function(a,c,p){return a=+a,c=c>>>0,p||we(this,a,c,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[c]=a>>>24,this[c+1]=a>>>16,this[c+2]=a>>>8,this[c+3]=a&255,c+4};function cr(a,c,p,I,N,L){if(p+I>a.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function jr(a,c,p,I,N){return c=+c,p=p>>>0,N||cr(a,c,p,4),ui.write(a,c,p,I,23,4),p+4}o.prototype.writeFloatLE=function(a,c,p){return jr(this,a,c,!0,p)},o.prototype.writeFloatBE=function(a,c,p){return jr(this,a,c,!1,p)};function je(a,c,p,I,N){return c=+c,p=p>>>0,N||cr(a,c,p,8),ui.write(a,c,p,I,52,8),p+8}o.prototype.writeDoubleLE=function(a,c,p){return je(this,a,c,!0,p)},o.prototype.writeDoubleBE=function(a,c,p){return je(this,a,c,!1,p)},o.prototype.copy=function(a,c,p,I){if(!o.isBuffer(a))throw new TypeError("argument should be a Buffer");if(p||(p=0),!I&&I!==0&&(I=this.length),c>=a.length&&(c=a.length),c||(c=0),I>0&&I<p&&(I=p),I===p||a.length===0||this.length===0)return 0;if(c<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("sourceEnd out of bounds");I>this.length&&(I=this.length),a.length-c<I-p&&(I=a.length-c+p);var N=I-p;return this===a&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(c,p,I):Uint8Array.prototype.set.call(a,this.subarray(p,I),c),N},o.prototype.fill=function(a,c,p,I){if(typeof a=="string"){if(typeof c=="string"?(I=c,c=0,p=this.length):typeof p=="string"&&(I=p,p=this.length),I!==void 0&&typeof I!="string")throw new TypeError("encoding must be a string");if(typeof I=="string"&&!o.isEncoding(I))throw new TypeError("Unknown encoding: "+I);if(a.length===1){var N=a.charCodeAt(0);(I==="utf8"&&N<128||I==="latin1")&&(a=N)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(c<0||this.length<c||this.length<p)throw new RangeError("Out of range index");if(p<=c)return this;c=c>>>0,p=p===void 0?this.length:p>>>0,a||(a=0);var L;if(typeof a=="number")for(L=c;L<p;++L)this[L]=a;else{var W=o.isBuffer(a)?a:o.from(a,I),te=W.length;if(te===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(L=0;L<p-c;++L)this[L+c]=W[L%te]}return this};var en=/[^+/0-9A-Za-z-_]/g;function Hn(a){if(a=a.split("=")[0],a=a.trim().replace(en,""),a.length<2)return"";for(;a.length%4!==0;)a=a+"=";return a}function kn(a,c){c=c||1/0;for(var p,I=a.length,N=null,L=[],W=0;W<I;++W){if(p=a.charCodeAt(W),p>55295&&p<57344){if(!N){if(p>56319){(c-=3)>-1&&L.push(239,191,189);continue}else if(W+1===I){(c-=3)>-1&&L.push(239,191,189);continue}N=p;continue}if(p<56320){(c-=3)>-1&&L.push(239,191,189),N=p;continue}p=(N-55296<<10|p-56320)+65536}else N&&(c-=3)>-1&&L.push(239,191,189);if(N=null,p<128){if((c-=1)<0)break;L.push(p)}else if(p<2048){if((c-=2)<0)break;L.push(p>>6|192,p&63|128)}else if(p<65536){if((c-=3)<0)break;L.push(p>>12|224,p>>6&63|128,p&63|128)}else if(p<1114112){if((c-=4)<0)break;L.push(p>>18|240,p>>12&63|128,p>>6&63|128,p&63|128)}else throw new Error("Invalid code point")}return L}function Hi(a){for(var c=[],p=0;p<a.length;++p)c.push(a.charCodeAt(p)&255);return c}function Wi(a,c){for(var p,I,N,L=[],W=0;W<a.length&&!((c-=2)<0);++W)p=a.charCodeAt(W),I=p>>8,N=p%256,L.push(N),L.push(I);return L}function ji(a){return ll.toByteArray(Hn(a))}function Mn(a,c,p,I){for(var N=0;N<I&&!(N+p>=c.length||N>=a.length);++N)c[N+p]=a[N];return N}function Be(a,c){return a instanceof c||a!=null&&a.constructor!=null&&a.constructor.name!=null&&a.constructor.name===c.name}function $r(a){return a!==a}var is=function(){for(var a="0123456789abcdef",c=new Array(256),p=0;p<16;++p)for(var I=p*16,N=0;N<16;++N)c[I+N]=a[p]+a[N];return c}()}),Ee=Ds.Buffer;Ds.SlowBuffer;Ds.INSPECT_MAX_BYTES;Ds.kMaxLength;var dl=function(t,e){return dl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},dl(t,e)};function Rs(t,e){dl(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var mn=function(t){Rs(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),e}(Error),$e=function(t){Rs(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),e}(TypeError);function xs(t){return t&&t.Math==Math&&t}function af(){return xs(typeof globalThis=="object"&&globalThis)||xs(typeof window=="object"&&window)||xs(typeof self=="object"&&self)||xs(typeof global=="object"&&global)||Function("return this")()}function lg(){var t=af();return typeof t.navigator=="object"&&t.navigator.product==="ReactNative"}var ug=function(t){var e=lg()?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(e);for(var r=Ee.alloc(t),n=0;n<t;++n)r[n]=Math.floor(Math.random()*256);return r},pg=function(){{if(typeof window<"u"){var t=window.crypto||window.msCrypto;if(t&&t.getRandomValues)return function(e){return t.getRandomValues(Ee.alloc(e))}}return typeof global<"u"&&global.crypto&&global.crypto.getRandomValues?function(e){return global.crypto.getRandomValues(Ee.alloc(e))}:ug}},cf=pg();function fg(t){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(t))}function gl(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}function mg(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function dg(t){return uo(t)&&Object.prototype.toString.call(t)==="[object Date]"}function uo(t){return typeof t=="object"&&t!==null}function Ns(t,e){var r=!1;function n(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return r||(console.warn(e),r=!0),t.apply(this,i)}return n}function Cs(t){if(ArrayBuffer.isView(t))return Ee.from(t.buffer,t.byteOffset,t.byteLength);if(fg(t))return Ee.from(t);throw new $e("Must use either Buffer or TypedArray")}var hg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,lf=function(t){return typeof t=="string"&&hg.test(t)},hl=function(t){if(!lf(t))throw new $e('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var e=t.replace(/-/g,"");return Ee.from(e,"hex")},Gp=function(t,e){return e===void 0&&(e=!0),e?t.toString("hex",0,4)+"-"+t.toString("hex",4,6)+"-"+t.toString("hex",6,8)+"-"+t.toString("hex",8,10)+"-"+t.toString("hex",10,16):t.toString("hex")},mI=Math.pow(2,63)-1,dI=-Math.pow(2,63),gg=Math.pow(2,53),yg=-Math.pow(2,53),uf=4,dn=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(e!=null&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!(e instanceof ArrayBuffer)&&!Array.isArray(e))throw new $e("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=r??t.BSON_BINARY_SUBTYPE_DEFAULT,e==null?(this.buffer=Ee.alloc(t.BUFFER_SIZE),this.position=0):(typeof e=="string"?this.buffer=Ee.from(e,"binary"):Array.isArray(e)?this.buffer=Ee.from(e):this.buffer=Cs(e),this.position=this.buffer.byteLength)}return t.prototype.put=function(e){if(typeof e=="string"&&e.length!==1)throw new $e("only accepts single character String");if(typeof e!="number"&&e.length!==1)throw new $e("only accepts single character Uint8Array or Array");var r;if(typeof e=="string"?r=e.charCodeAt(0):typeof e=="number"?r=e:r=e[0],r<0||r>255)throw new $e("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=Ee.alloc(t.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},t.prototype.write=function(e,r){if(r=typeof r=="number"?r:this.position,this.buffer.length<r+e.length){var n=Ee.alloc(this.buffer.length+e.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n}ArrayBuffer.isView(e)?(this.buffer.set(Cs(e),r),this.position=r+e.byteLength>this.position?r+e.length:this.position):typeof e=="string"&&(this.buffer.write(e,r,e.length,"binary"),this.position=r+e.length>this.position?r+e.length:this.position)},t.prototype.read=function(e,r){return r=r&&r>0?r:this.position,this.buffer.slice(e,e+r)},t.prototype.value=function(e){return e=!!e,e&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},t.prototype.length=function(){return this.position},t.prototype.toJSON=function(){return this.buffer.toString("base64")},t.prototype.toString=function(e){return this.buffer.toString(e)},t.prototype.toExtendedJSON=function(e){e=e||{};var r=this.buffer.toString("base64"),n=Number(this.sub_type).toString(16);return e.legacy?{$binary:r,$type:n.length===1?"0"+n:n}:{$binary:{base64:r,subType:n.length===1?"0"+n:n}}},t.prototype.toUUID=function(){if(this.sub_type===t.SUBTYPE_UUID)return new Vp(this.buffer.slice(0,this.position));throw new mn('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(t.SUBTYPE_UUID,'" is currently supported.'))},t.fromExtendedJSON=function(e,r){r=r||{};var n,i;if("$binary"in e?r.legacy&&typeof e.$binary=="string"&&"$type"in e?(i=e.$type?parseInt(e.$type,16):0,n=Ee.from(e.$binary,"base64")):typeof e.$binary!="string"&&(i=e.$binary.subType?parseInt(e.$binary.subType,16):0,n=Ee.from(e.$binary.base64,"base64")):"$uuid"in e&&(i=4,n=hl(e.$uuid)),!n)throw new $e("Unexpected Binary Extended JSON format ".concat(JSON.stringify(e)));return i===uf?new Vp(n):new t(n,i)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},t.BSON_BINARY_SUBTYPE_DEFAULT=0,t.BUFFER_SIZE=256,t.SUBTYPE_DEFAULT=0,t.SUBTYPE_FUNCTION=1,t.SUBTYPE_BYTE_ARRAY=2,t.SUBTYPE_UUID_OLD=3,t.SUBTYPE_UUID=4,t.SUBTYPE_MD5=5,t.SUBTYPE_ENCRYPTED=6,t.SUBTYPE_COLUMN=7,t.SUBTYPE_USER_DEFINED=128,t}();Object.defineProperty(dn.prototype,"_bsontype",{value:"Binary"});var ul=16,Vp=function(t){Rs(e,t);function e(r){var n=this,i,s;if(r==null)i=e.generate();else if(r instanceof e)i=Ee.from(r.buffer),s=r.__id;else if(ArrayBuffer.isView(r)&&r.byteLength===ul)i=Cs(r);else if(typeof r=="string")i=hl(r);else throw new $e("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");return n=t.call(this,i,uf)||this,n.__id=s,n}return Object.defineProperty(e.prototype,"id",{get:function(){return this.buffer},set:function(r){this.buffer=r,e.cacheHexString&&(this.__id=Gp(r))},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(r){if(r===void 0&&(r=!0),e.cacheHexString&&this.__id)return this.__id;var n=Gp(this.id,r);return e.cacheHexString&&(this.__id=n),n},e.prototype.toString=function(r){return r?this.id.toString(r):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(r){if(!r)return!1;if(r instanceof e)return r.id.equals(this.id);try{return new e(r).id.equals(this.id)}catch{return!1}},e.prototype.toBinary=function(){return new dn(this.id,dn.SUBTYPE_UUID)},e.generate=function(){var r=cf(ul);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ee.from(r)},e.isValid=function(r){return r?r instanceof e?!0:typeof r=="string"?lf(r):gl(r)?r.length!==ul?!1:(r[6]&240)===64&&(r[8]&128)===128:!1:!1},e.createFromHexString=function(r){var n=hl(r);return new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},e}(dn),As=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);this.code=e,this.scope=r}return t.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},t.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},t.fromExtendedJSON=function(e){return new t(e.$code,e.$scope)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},t}();Object.defineProperty(As.prototype,"_bsontype",{value:"Code"});function vg(t){return uo(t)&&t.$id!=null&&typeof t.$ref=="string"&&(t.$db==null||typeof t.$db=="string")}var co=function(){function t(e,r,n,i){if(!(this instanceof t))return new t(e,r,n,i);var s=e.split(".");s.length===2&&(n=s.shift(),e=s.shift()),this.collection=e,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(t.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(e.$db=this.db),e},t.prototype.toExtendedJSON=function(e){e=e||{};var r={$ref:this.collection,$id:this.oid};return e.legacy||(this.db&&(r.$db=this.db),r=Object.assign(r,this.fields)),r},t.fromExtendedJSON=function(e){var r=Object.assign({},e);return delete r.$ref,delete r.$id,delete r.$db,new t(e.$ref,e.$id,e.$db,r)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.oid===void 0||this.oid.toString===void 0?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},t}();Object.defineProperty(co.prototype,"_bsontype",{value:"DBRef"});var Ht=void 0;try{Ht=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}var zp=65536,_g=1<<24,fi=zp*zp,pf=fi*fi,Yp=pf/2,qp={},Kp={},K=function(){function t(e,r,n){if(e===void 0&&(e=0),!(this instanceof t))return new t(e,r,n);typeof e=="bigint"?Object.assign(this,t.fromBigInt(e,!!r)):typeof e=="string"?Object.assign(this,t.fromString(e,!!r)):(this.low=e|0,this.high=r|0,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return t.fromBits=function(e,r,n){return new t(e,r,n)},t.fromInt=function(e,r){var n,i,s;return r?(e>>>=0,(s=0<=e&&e<256)&&(i=Kp[e],i)?i:(n=t.fromBits(e,(e|0)<0?-1:0,!0),s&&(Kp[e]=n),n)):(e|=0,(s=-128<=e&&e<128)&&(i=qp[e],i)?i:(n=t.fromBits(e,e<0?-1:0,!1),s&&(qp[e]=n),n))},t.fromNumber=function(e,r){if(isNaN(e))return r?t.UZERO:t.ZERO;if(r){if(e<0)return t.UZERO;if(e>=pf)return t.MAX_UNSIGNED_VALUE}else{if(e<=-Yp)return t.MIN_VALUE;if(e+1>=Yp)return t.MAX_VALUE}return e<0?t.fromNumber(-e,r).neg():t.fromBits(e%fi|0,e/fi|0,r)},t.fromBigInt=function(e,r){return t.fromString(e.toString(),r)},t.fromString=function(e,r,n){if(e.length===0)throw Error("empty string");if(e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t.ZERO;if(typeof r=="number"?(n=r,r=!1):r=!!r,n=n||10,n<2||36<n)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(i===0)return t.fromString(e.substring(1),r,n).neg();for(var s=t.fromNumber(Math.pow(n,8)),o=t.ZERO,l=0;l<e.length;l+=8){var u=Math.min(8,e.length-l),f=parseInt(e.substring(l,l+u),n);if(u<8){var m=t.fromNumber(Math.pow(n,u));o=o.mul(m).add(t.fromNumber(f))}else o=o.mul(s),o=o.add(t.fromNumber(f))}return o.unsigned=r,o},t.fromBytes=function(e,r,n){return n?t.fromBytesLE(e,r):t.fromBytesBE(e,r)},t.fromBytesLE=function(e,r){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)},t.fromBytesBE=function(e,r){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)},t.isLong=function(e){return uo(e)&&e.__isLong__===!0},t.fromValue=function(e,r){return typeof e=="number"?t.fromNumber(e,r):typeof e=="string"?t.fromString(e,r):t.fromBits(e.low,e.high,typeof r=="boolean"?r:e.unsigned)},t.prototype.add=function(e){t.isLong(e)||(e=t.fromValue(e));var r=this.high>>>16,n=this.high&65535,i=this.low>>>16,s=this.low&65535,o=e.high>>>16,l=e.high&65535,u=e.low>>>16,f=e.low&65535,m=0,h=0,v=0,_=0;return _+=s+f,v+=_>>>16,_&=65535,v+=i+u,h+=v>>>16,v&=65535,h+=n+l,m+=h>>>16,h&=65535,m+=r+o,m&=65535,t.fromBits(v<<16|_,m<<16|h,this.unsigned)},t.prototype.and=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low&e.low,this.high&e.high,this.unsigned)},t.prototype.compare=function(e){if(t.isLong(e)||(e=t.fromValue(e)),this.eq(e))return 0;var r=this.isNegative(),n=e.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},t.prototype.comp=function(e){return this.compare(e)},t.prototype.divide=function(e){if(t.isLong(e)||(e=t.fromValue(e)),e.isZero())throw Error("division by zero");if(Ht){if(!this.unsigned&&this.high===-2147483648&&e.low===-1&&e.high===-1)return this;var r=(this.unsigned?Ht.div_u:Ht.div_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,Ht.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?t.UZERO:t.ZERO;var n,i,s;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return t.UZERO;if(e.gt(this.shru(1)))return t.UONE;s=t.UZERO}else{if(this.eq(t.MIN_VALUE)){if(e.eq(t.ONE)||e.eq(t.NEG_ONE))return t.MIN_VALUE;if(e.eq(t.MIN_VALUE))return t.ONE;var o=this.shr(1);return n=o.div(e).shl(1),n.eq(t.ZERO)?e.isNegative()?t.ONE:t.NEG_ONE:(i=this.sub(e.mul(n)),s=n.add(i.div(e)),s)}else if(e.eq(t.MIN_VALUE))return this.unsigned?t.UZERO:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();s=t.ZERO}for(i=this;i.gte(e);){n=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var l=Math.ceil(Math.log(n)/Math.LN2),u=l<=48?1:Math.pow(2,l-48),f=t.fromNumber(n),m=f.mul(e);m.isNegative()||m.gt(i);)n-=u,f=t.fromNumber(n,this.unsigned),m=f.mul(e);f.isZero()&&(f=t.ONE),s=s.add(f),i=i.sub(m)}return s},t.prototype.div=function(e){return this.divide(e)},t.prototype.equals=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.unsigned!==e.unsigned&&this.high>>>31===1&&e.high>>>31===1?!1:this.high===e.high&&this.low===e.low},t.prototype.eq=function(e){return this.equals(e)},t.prototype.getHighBits=function(){return this.high},t.prototype.getHighBitsUnsigned=function(){return this.high>>>0},t.prototype.getLowBits=function(){return this.low},t.prototype.getLowBitsUnsigned=function(){return this.low>>>0},t.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(t.MIN_VALUE)?64:this.neg().getNumBitsAbs();var e=this.high!==0?this.high:this.low,r;for(r=31;r>0&&(e&1<<r)===0;r--);return this.high!==0?r+33:r+1},t.prototype.greaterThan=function(e){return this.comp(e)>0},t.prototype.gt=function(e){return this.greaterThan(e)},t.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},t.prototype.gte=function(e){return this.greaterThanOrEqual(e)},t.prototype.ge=function(e){return this.greaterThanOrEqual(e)},t.prototype.isEven=function(){return(this.low&1)===0},t.prototype.isNegative=function(){return!this.unsigned&&this.high<0},t.prototype.isOdd=function(){return(this.low&1)===1},t.prototype.isPositive=function(){return this.unsigned||this.high>=0},t.prototype.isZero=function(){return this.high===0&&this.low===0},t.prototype.lessThan=function(e){return this.comp(e)<0},t.prototype.lt=function(e){return this.lessThan(e)},t.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},t.prototype.lte=function(e){return this.lessThanOrEqual(e)},t.prototype.modulo=function(e){if(t.isLong(e)||(e=t.fromValue(e)),Ht){var r=(this.unsigned?Ht.rem_u:Ht.rem_s)(this.low,this.high,e.low,e.high);return t.fromBits(r,Ht.get_high(),this.unsigned)}return this.sub(this.div(e).mul(e))},t.prototype.mod=function(e){return this.modulo(e)},t.prototype.rem=function(e){return this.modulo(e)},t.prototype.multiply=function(e){if(this.isZero())return t.ZERO;if(t.isLong(e)||(e=t.fromValue(e)),Ht){var r=Ht.mul(this.low,this.high,e.low,e.high);return t.fromBits(r,Ht.get_high(),this.unsigned)}if(e.isZero())return t.ZERO;if(this.eq(t.MIN_VALUE))return e.isOdd()?t.MIN_VALUE:t.ZERO;if(e.eq(t.MIN_VALUE))return this.isOdd()?t.MIN_VALUE:t.ZERO;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(t.TWO_PWR_24)&&e.lt(t.TWO_PWR_24))return t.fromNumber(this.toNumber()*e.toNumber(),this.unsigned);var n=this.high>>>16,i=this.high&65535,s=this.low>>>16,o=this.low&65535,l=e.high>>>16,u=e.high&65535,f=e.low>>>16,m=e.low&65535,h=0,v=0,_=0,g=0;return g+=o*m,_+=g>>>16,g&=65535,_+=s*m,v+=_>>>16,_&=65535,_+=o*f,v+=_>>>16,_&=65535,v+=i*m,h+=v>>>16,v&=65535,v+=s*f,h+=v>>>16,v&=65535,v+=o*u,h+=v>>>16,v&=65535,h+=n*m+i*f+s*u+o*l,h&=65535,t.fromBits(_<<16|g,h<<16|v,this.unsigned)},t.prototype.mul=function(e){return this.multiply(e)},t.prototype.negate=function(){return!this.unsigned&&this.eq(t.MIN_VALUE)?t.MIN_VALUE:this.not().add(t.ONE)},t.prototype.neg=function(){return this.negate()},t.prototype.not=function(){return t.fromBits(~this.low,~this.high,this.unsigned)},t.prototype.notEquals=function(e){return!this.equals(e)},t.prototype.neq=function(e){return this.notEquals(e)},t.prototype.ne=function(e){return this.notEquals(e)},t.prototype.or=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low|e.low,this.high|e.high,this.unsigned)},t.prototype.shiftLeft=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):t.fromBits(0,this.low<<e-32,this.unsigned)},t.prototype.shl=function(e){return this.shiftLeft(e)},t.prototype.shiftRight=function(e){return t.isLong(e)&&(e=e.toInt()),(e&=63)===0?this:e<32?t.fromBits(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):t.fromBits(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},t.prototype.shr=function(e){return this.shiftRight(e)},t.prototype.shiftRightUnsigned=function(e){if(t.isLong(e)&&(e=e.toInt()),e&=63,e===0)return this;var r=this.high;if(e<32){var n=this.low;return t.fromBits(n>>>e|r<<32-e,r>>>e,this.unsigned)}else return e===32?t.fromBits(r,0,this.unsigned):t.fromBits(r>>>e-32,0,this.unsigned)},t.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},t.prototype.shru=function(e){return this.shiftRightUnsigned(e)},t.prototype.subtract=function(e){return t.isLong(e)||(e=t.fromValue(e)),this.add(e.neg())},t.prototype.sub=function(e){return this.subtract(e)},t.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},t.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*fi+(this.low>>>0):this.high*fi+(this.low>>>0)},t.prototype.toBigInt=function(){return BigInt(this.toString())},t.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},t.prototype.toBytesLE=function(){var e=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,e&255,e>>>8&255,e>>>16&255,e>>>24]},t.prototype.toBytesBE=function(){var e=this.high,r=this.low;return[e>>>24,e>>>16&255,e>>>8&255,e&255,r>>>24,r>>>16&255,r>>>8&255,r&255]},t.prototype.toSigned=function(){return this.unsigned?t.fromBits(this.low,this.high,!1):this},t.prototype.toString=function(e){if(e=e||10,e<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(t.MIN_VALUE)){var r=t.fromNumber(e),n=this.div(r),i=n.mul(r).sub(this);return n.toString(e)+i.toInt().toString(e)}else return"-"+this.neg().toString(e);for(var s=t.fromNumber(Math.pow(e,6),this.unsigned),o=this,l="";;){var u=o.div(s),f=o.sub(u.mul(s)).toInt()>>>0,m=f.toString(e);if(o=u,o.isZero())return m+l;for(;m.length<6;)m="0"+m;l=""+m+l}},t.prototype.toUnsigned=function(){return this.unsigned?this:t.fromBits(this.low,this.high,!0)},t.prototype.xor=function(e){return t.isLong(e)||(e=t.fromValue(e)),t.fromBits(this.low^e.low,this.high^e.high,this.unsigned)},t.prototype.eqz=function(){return this.isZero()},t.prototype.le=function(e){return this.lessThanOrEqual(e)},t.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},t.fromExtendedJSON=function(e,r){var n=t.fromString(e.$numberLong);return r&&r.relaxed?n.toNumber():n},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},t.TWO_PWR_24=t.fromInt(_g),t.MAX_UNSIGNED_VALUE=t.fromBits(-1,-1,!0),t.ZERO=t.fromInt(0),t.UZERO=t.fromInt(0,!0),t.ONE=t.fromInt(1),t.UONE=t.fromInt(1,!0),t.NEG_ONE=t.fromInt(-1),t.MAX_VALUE=t.fromBits(-1,2147483647,!1),t.MIN_VALUE=t.fromBits(0,-2147483648,!1),t}();Object.defineProperty(K.prototype,"__isLong__",{value:!0});Object.defineProperty(K.prototype,"_bsontype",{value:"Long"});var Eg=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Sg=/^(\+|-)?(Infinity|inf)$/i,bg=/^(\+|-)?NaN$/i,ao=6111,pl=-6176,Jp=6176,wg=34,fl=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Xp=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Qp=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ig=/^([-+])?(\d+)?$/,Tg=31,Zp=16383,xg=30,Cg=31;function ef(t){return!isNaN(parseInt(t,10))}function Dg(t){var e=K.fromNumber(1e9),r=K.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:r};for(var n=0;n<=3;n++)r=r.shiftLeft(32),r=r.add(new K(t.parts[n],0)),t.parts[n]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}function Rg(t,e){if(!t&&!e)return{high:K.fromNumber(0),low:K.fromNumber(0)};var r=t.shiftRightUnsigned(32),n=new K(t.getLowBits(),0),i=e.shiftRightUnsigned(32),s=new K(e.getLowBits(),0),o=r.multiply(i),l=r.multiply(s),u=n.multiply(i),f=n.multiply(s);return o=o.add(l.shiftRightUnsigned(32)),l=new K(l.getLowBits(),0).add(u).add(f.shiftRightUnsigned(32)),o=o.add(l.shiftRightUnsigned(32)),f=l.shiftLeft(32).add(new K(f.getLowBits(),0)),{high:o,low:f}}function Ng(t,e){var r=t.high>>>0,n=e.high>>>0;if(r<n)return!0;if(r===n){var i=t.low>>>0,s=e.low>>>0;if(i<s)return!0}return!1}function pi(t,e){throw new $e('"'.concat(t,'" is not a valid Decimal128 string - ').concat(e))}var yl=function(){function t(e){if(!(this instanceof t))return new t(e);if(typeof e=="string")this.bytes=t.fromString(e).bytes;else if(gl(e)){if(e.byteLength!==16)throw new $e("Decimal128 must take a Buffer of 16 bytes");this.bytes=e}else throw new $e("Decimal128 must take a Buffer or string")}return t.fromString=function(e){var r=!1,n=!1,i=!1,s=0,o=0,l=0,u=0,f=0,m=[0],h=0,v=0,_=0,g=0,y=0,C=0,O=new K(0,0),H=new K(0,0),R=0,k=0;if(e.length>=7e3)throw new $e(""+e+" not a valid Decimal128 string");var V=e.match(Eg),Mt=e.match(Sg),fe=e.match(bg);if(!V&&!Mt&&!fe||e.length===0)throw new $e(""+e+" not a valid Decimal128 string");if(V){var j=V[2],ct=V[4],Y=V[5],at=V[6];ct&&at===void 0&&pi(e,"missing exponent power"),ct&&j===void 0&&pi(e,"missing exponent base"),ct===void 0&&(Y||at)&&pi(e,"missing e before exponent")}if((e[k]==="+"||e[k]==="-")&&(r=e[k++]==="-"),!ef(e[k])&&e[k]!=="."){if(e[k]==="i"||e[k]==="I")return new t(Ee.from(r?Xp:Qp));if(e[k]==="N")return new t(Ee.from(fl))}for(;ef(e[k])||e[k]===".";){if(e[k]==="."){n&&pi(e,"contains multiple periods"),n=!0,k=k+1;continue}h<34&&(e[k]!=="0"||i)&&(i||(f=o),i=!0,m[v++]=parseInt(e[k],10),h=h+1),i&&(l=l+1),n&&(u=u+1),o=o+1,k=k+1}if(n&&!o)throw new $e(""+e+" not a valid Decimal128 string");if(e[k]==="e"||e[k]==="E"){var Xt=e.substr(++k).match(Ig);if(!Xt||!Xt[2])return new t(Ee.from(fl));y=parseInt(Xt[0],10),k=k+Xt[0].length}if(e[k])return new t(Ee.from(fl));if(_=0,!h)_=0,g=0,m[0]=0,l=1,h=1,s=0;else if(g=h-1,s=l,s!==1)for(;m[f+s-1]===0;)s=s-1;for(y<=u&&u-y>16384?y=pl:y=y-u;y>ao;){if(g=g+1,g-_>wg){var me=m.join("");if(me.match(/^0+$/)){y=ao;break}pi(e,"overflow")}y=y-1}for(;y<pl||h<l;){if(g===0&&s<h){y=pl,s=0;break}if(h<l?l=l-1:g=g-1,y<ao)y=y+1;else{var me=m.join("");if(me.match(/^0+$/)){y=ao;break}pi(e,"overflow")}}if(g-_+1<s){var de=o;n&&(f=f+1,de=de+1),r&&(f=f+1,de=de+1);var xe=parseInt(e[f+g+1],10),be=0;if(xe>=5&&(be=1,xe===5)){for(be=m[g]%2===1?1:0,C=f+g+2;C<de;C++)if(parseInt(e[C],10)){be=1;break}}if(be){for(var Ut=g;Ut>=0;Ut--)if(++m[Ut]>9&&(m[Ut]=0,Ut===0))if(y<ao)y=y+1,m[Ut]=1;else return new t(Ee.from(r?Xp:Qp))}}if(O=K.fromNumber(0),H=K.fromNumber(0),s===0)O=K.fromNumber(0),H=K.fromNumber(0);else if(g-_<17){var Ut=_;for(H=K.fromNumber(m[Ut++]),O=new K(0,0);Ut<=g;Ut++)H=H.multiply(K.fromNumber(10)),H=H.add(K.fromNumber(m[Ut]))}else{var Ut=_;for(O=K.fromNumber(m[Ut++]);Ut<=g-17;Ut++)O=O.multiply(K.fromNumber(10)),O=O.add(K.fromNumber(m[Ut]));for(H=K.fromNumber(m[Ut++]);Ut<=g;Ut++)H=H.multiply(K.fromNumber(10)),H=H.add(K.fromNumber(m[Ut]))}var De=Rg(O,K.fromString("100000000000000000"));De.low=De.low.add(H),Ng(De.low,H)&&(De.high=De.high.add(K.fromNumber(1))),R=y+Jp;var ht={low:K.fromNumber(0),high:K.fromNumber(0)};De.high.shiftRightUnsigned(49).and(K.fromNumber(1)).equals(K.fromNumber(1))?(ht.high=ht.high.or(K.fromNumber(3).shiftLeft(61)),ht.high=ht.high.or(K.fromNumber(R).and(K.fromNumber(16383).shiftLeft(47))),ht.high=ht.high.or(De.high.and(K.fromNumber(0x7fffffffffff)))):(ht.high=ht.high.or(K.fromNumber(R&16383).shiftLeft(49)),ht.high=ht.high.or(De.high.and(K.fromNumber(562949953421311)))),ht.low=De.low,r&&(ht.high=ht.high.or(K.fromString("9223372036854775808")));var Q=Ee.alloc(16);return k=0,Q[k++]=ht.low.low&255,Q[k++]=ht.low.low>>8&255,Q[k++]=ht.low.low>>16&255,Q[k++]=ht.low.low>>24&255,Q[k++]=ht.low.high&255,Q[k++]=ht.low.high>>8&255,Q[k++]=ht.low.high>>16&255,Q[k++]=ht.low.high>>24&255,Q[k++]=ht.high.low&255,Q[k++]=ht.high.low>>8&255,Q[k++]=ht.high.low>>16&255,Q[k++]=ht.high.low>>24&255,Q[k++]=ht.high.high&255,Q[k++]=ht.high.high>>8&255,Q[k++]=ht.high.high>>16&255,Q[k++]=ht.high.high>>24&255,new t(Q)},t.prototype.toString=function(){for(var e,r=0,n=new Array(36),i=0;i<n.length;i++)n[i]=0;var s=0,o=!1,l,u={parts:[0,0,0,0]},f,m,h=[];s=0;var v=this.bytes,_=v[s++]|v[s++]<<8|v[s++]<<16|v[s++]<<24,g=v[s++]|v[s++]<<8|v[s++]<<16|v[s++]<<24,y=v[s++]|v[s++]<<8|v[s++]<<16|v[s++]<<24,C=v[s++]|v[s++]<<8|v[s++]<<16|v[s++]<<24;s=0;var O={low:new K(_,g),high:new K(y,C)};O.high.lessThan(K.ZERO)&&h.push("-");var H=C>>26&Tg;if(H>>3===3){if(H===xg)return h.join("")+"Infinity";if(H===Cg)return"NaN";e=C>>15&Zp,l=8+(C>>14&1)}else l=C>>14&7,e=C>>17&Zp;var R=e-Jp;if(u.parts[0]=(C&16383)+((l&15)<<14),u.parts[1]=y,u.parts[2]=g,u.parts[3]=_,u.parts[0]===0&&u.parts[1]===0&&u.parts[2]===0&&u.parts[3]===0)o=!0;else for(m=3;m>=0;m--){var k=0,V=Dg(u);if(u=V.quotient,k=V.rem.low,!!k)for(f=8;f>=0;f--)n[m*9+f]=k%10,k=Math.floor(k/10)}if(o)r=1,n[s]=0;else for(r=36;!n[s];)r=r-1,s=s+1;var Mt=r-1+R;if(Mt>=34||Mt<=-7||R>0){if(r>34)return h.push("".concat(0)),R>0?h.push("E+".concat(R)):R<0&&h.push("E".concat(R)),h.join("");h.push("".concat(n[s++])),r=r-1,r&&h.push(".");for(var i=0;i<r;i++)h.push("".concat(n[s++]));h.push("E"),Mt>0?h.push("+".concat(Mt)):h.push("".concat(Mt))}else if(R>=0)for(var i=0;i<r;i++)h.push("".concat(n[s++]));else{var fe=r+R;if(fe>0)for(var i=0;i<fe;i++)h.push("".concat(n[s++]));else h.push("0");for(h.push(".");fe++<0;)h.push("0");for(var i=0;i<r-Math.max(fe-1,0);i++)h.push("".concat(n[s++]))}return h.join("")},t.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},t.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},t.fromExtendedJSON=function(e){return t.fromString(e.$numberDecimal)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},t}();Object.defineProperty(yl.prototype,"_bsontype",{value:"Decimal128"});var Os=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e}return t.prototype.valueOf=function(){return this.value},t.prototype.toJSON=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},t.fromExtendedJSON=function(e,r){var n=parseFloat(e.$numberDouble);return r&&r.relaxed?n:new t(n)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},t}();Object.defineProperty(Os.prototype,"_bsontype",{value:"Double"});var Ps=function(){function t(e){if(!(this instanceof t))return new t(e);e instanceof Number&&(e=e.valueOf()),this.value=+e|0}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(e){return this.value.toString(e)},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},t.fromExtendedJSON=function(e,r){return r&&r.relaxed?parseInt(e.$numberInt,10):new t(e.$numberInt)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},t}();Object.defineProperty(Ps.prototype,"_bsontype",{value:"Int32"});var vl=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$maxKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MaxKey()"},t}();Object.defineProperty(vl.prototype,"_bsontype",{value:"MaxKey"});var _l=function(){function t(){if(!(this instanceof t))return new t}return t.prototype.toExtendedJSON=function(){return{$minKey:1}},t.fromExtendedJSON=function(){return new t},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new MinKey()"},t}();Object.defineProperty(_l.prototype,"_bsontype",{value:"MinKey"});var Ag=new RegExp("^[0-9a-fA-F]{24}$"),fn=null,yr=Symbol("id"),Je=function(){function t(e){if(!(this instanceof t))return new t(e);var r;if(typeof e=="object"&&e&&"id"in e){if(typeof e.id!="string"&&!ArrayBuffer.isView(e.id))throw new $e("Argument passed in must have an id that is of type string or Buffer");"toHexString"in e&&typeof e.toHexString=="function"?r=Ee.from(e.toHexString(),"hex"):r=e.id}else r=e;if(r==null||typeof r=="number")this[yr]=t.generate(typeof r=="number"?r:void 0);else if(ArrayBuffer.isView(r)&&r.byteLength===12)this[yr]=r instanceof Ee?r:Cs(r);else if(typeof r=="string")if(r.length===12){var n=Ee.from(r);if(n.byteLength===12)this[yr]=n;else throw new $e("Argument passed in must be a string of 12 bytes")}else if(r.length===24&&Ag.test(r))this[yr]=Ee.from(r,"hex");else throw new $e("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");else throw new $e("Argument passed in does not match the accepted types");t.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(t.prototype,"id",{get:function(){return this[yr]},set:function(e){this[yr]=e,t.cacheHexString&&(this.__id=e.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(){if(t.cacheHexString&&this.__id)return this.__id;var e=this.id.toString("hex");return t.cacheHexString&&!this.__id&&(this.__id=e),e},t.getInc=function(){return t.index=(t.index+1)%16777215},t.generate=function(e){typeof e!="number"&&(e=Math.floor(Date.now()/1e3));var r=t.getInc(),n=Ee.alloc(12);return n.writeUInt32BE(e,0),fn===null&&(fn=cf(5)),n[4]=fn[0],n[5]=fn[1],n[6]=fn[2],n[7]=fn[3],n[8]=fn[4],n[11]=r&255,n[10]=r>>8&255,n[9]=r>>16&255,n},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(e==null)return!1;if(e instanceof t)return this[yr][11]===e[yr][11]&&this[yr].equals(e[yr]);if(typeof e=="string"&&t.isValid(e)&&e.length===12&&gl(this.id))return e===Ee.prototype.toString.call(this.id,"latin1");if(typeof e=="string"&&t.isValid(e)&&e.length===24)return e.toLowerCase()===this.toHexString();if(typeof e=="string"&&t.isValid(e)&&e.length===12)return Ee.from(e).equals(this.id);if(typeof e=="object"&&"toHexString"in e&&typeof e.toHexString=="function"){var r=e.toHexString(),n=this.toHexString().toLowerCase();return typeof r=="string"&&r.toLowerCase()===n}return!1},t.prototype.getTimestamp=function(){var e=new Date,r=this.id.readUInt32BE(0);return e.setTime(Math.floor(r)*1e3),e},t.createPk=function(){return new t},t.createFromTime=function(e){var r=Ee.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(e,0),new t(r)},t.createFromHexString=function(e){if(typeof e>"u"||e!=null&&e.length!==24)throw new $e("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new t(Ee.from(e,"hex"))},t.isValid=function(e){if(e==null)return!1;try{return new t(e),!0}catch{return!1}},t.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},t.fromExtendedJSON=function(e){return new t(e.$oid)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},t.index=Math.floor(Math.random()*16777215),t}();Object.defineProperty(Je.prototype,"generate",{value:Ns(function(t){return Je.generate(t)},"Please use the static `ObjectId.generate(time)` instead")});Object.defineProperty(Je.prototype,"getInc",{value:Ns(function(){return Je.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Je.prototype,"get_inc",{value:Ns(function(){return Je.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Je,"get_inc",{value:Ns(function(){return Je.getInc()},"Please use the static `ObjectId.getInc()` instead")});Object.defineProperty(Je.prototype,"_bsontype",{value:"ObjectID"});function Og(t){return t.split("").sort().join("")}var lo=function(){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this.pattern=e,this.options=Og(r??""),this.pattern.indexOf("\0")!==-1)throw new mn("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(this.options.indexOf("\0")!==-1)throw new mn("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if(!(this.options[n]==="i"||this.options[n]==="m"||this.options[n]==="x"||this.options[n]==="l"||this.options[n]==="s"||this.options[n]==="u"))throw new mn("The regular expression option [".concat(this.options[n],"] is not supported"))}return t.parseOptions=function(e){return e?e.split("").sort().join(""):""},t.prototype.toExtendedJSON=function(e){return e=e||{},e.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},t.fromExtendedJSON=function(e){if("$regex"in e)if(typeof e.$regex!="string"){if(e.$regex._bsontype==="BSONRegExp")return e}else return new t(e.$regex,t.parseOptions(e.$options));if("$regularExpression"in e)return new t(e.$regularExpression.pattern,t.parseOptions(e.$regularExpression.options));throw new $e("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(e)))},t}();Object.defineProperty(lo.prototype,"_bsontype",{value:"BSONRegExp"});var El=function(){function t(e){if(!(this instanceof t))return new t(e);this.value=e}return t.prototype.valueOf=function(){return this.value},t.prototype.toString=function(){return this.value},t.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},t.prototype.toJSON=function(){return this.value},t.prototype.toExtendedJSON=function(){return{$symbol:this.value}},t.fromExtendedJSON=function(e){return new t(e.$symbol)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t}();Object.defineProperty(El.prototype,"_bsontype",{value:"Symbol"});var Pg=K,ff=function(t){Rs(e,t);function e(r,n){var i=this;return i instanceof e?(K.isLong(r)?i=t.call(this,r.low,r.high,!0)||this:uo(r)&&typeof r.t<"u"&&typeof r.i<"u"?i=t.call(this,r.i,r.t,!0)||this:i=t.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new e(r,n)}return e.prototype.toJSON=function(){return{$timestamp:this.toString()}},e.fromInt=function(r){return new e(K.fromInt(r,!0))},e.fromNumber=function(r){return new e(K.fromNumber(r,!0))},e.fromBits=function(r,n){return new e(r,n)},e.fromString=function(r,n){return new e(K.fromString(r,!0,n))},e.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},e.fromExtendedJSON=function(r){return new e(r.$timestamp)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},e.MAX_VALUE=K.MAX_UNSIGNED_VALUE,e}(Pg);function Lg(t){return uo(t)&&Reflect.has(t,"_bsontype")&&typeof t._bsontype=="string"}var mf=2147483647,df=-2147483648,hf=9223372036854776e3,gf=-9223372036854776e3,Bg={$oid:Je,$binary:dn,$uuid:dn,$symbol:El,$numberInt:Ps,$numberDecimal:yl,$numberDouble:Os,$numberLong:K,$minKey:_l,$maxKey:vl,$regex:lo,$regularExpression:lo,$timestamp:ff};function yf(t,e){if(e===void 0&&(e={}),typeof t=="number"){if(e.relaxed||e.legacy)return t;if(Math.floor(t)===t){if(t>=df&&t<=mf)return new Ps(t);if(t>=gf&&t<=hf)return K.fromNumber(t)}return new Os(t)}if(t==null||typeof t!="object")return t;if(t.$undefined)return null;for(var r=Object.keys(t).filter(function(h){return h.startsWith("$")&&t[h]!=null}),n=0;n<r.length;n++){var i=Bg[r[n]];if(i)return i.fromExtendedJSON(t,e)}if(t.$date!=null){var s=t.$date,o=new Date;return e.legacy?typeof s=="number"?o.setTime(s):typeof s=="string"&&o.setTime(Date.parse(s)):typeof s=="string"?o.setTime(Date.parse(s)):K.isLong(s)?o.setTime(s.toNumber()):typeof s=="number"&&e.relaxed&&o.setTime(s),o}if(t.$code!=null){var l=Object.assign({},t);return t.$scope&&(l.$scope=yf(t.$scope)),As.fromExtendedJSON(t)}if(vg(t)||t.$dbPointer){var u=t.$ref?t:t.$dbPointer;if(u instanceof co)return u;var f=Object.keys(u).filter(function(h){return h.startsWith("$")}),m=!0;if(f.forEach(function(h){["$ref","$id","$db"].indexOf(h)===-1&&(m=!1)}),m)return co.fromExtendedJSON(u)}return t}function Ug(t,e){return t.map(function(r,n){e.seenObjects.push({propertyName:"index ".concat(n),obj:null});try{return Kr(r,e)}finally{e.seenObjects.pop()}})}function tf(t){var e=t.toISOString();return t.getUTCMilliseconds()!==0?e:e.slice(0,-5)+"Z"}function Kr(t,e){if((typeof t=="object"||typeof t=="function")&&t!==null){var r=e.seenObjects.findIndex(function(O){return O.obj===t});if(r!==-1){var n=e.seenObjects.map(function(O){return O.propertyName}),i=n.slice(0,r).map(function(O){return"".concat(O," -> ")}).join(""),s=n[r],o=" -> "+n.slice(r+1,n.length-1).map(function(O){return"".concat(O," -> ")}).join(""),l=n[n.length-1],u=" ".repeat(i.length+s.length/2),f="-".repeat(o.length+(s.length+l.length)/2-1);throw new $e(`Converting circular structure to EJSON:
|
|
20
20
|
`+" ".concat(i).concat(s).concat(o).concat(l,`
|
|
21
|
-
`)+" ".concat(u,"\\").concat(f,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Ug(t,e);if(t===void 0)return null;if(t instanceof Date||dg(t)){var m=t.getTime(),h=m>-1&&m<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:tf(t)}:e.relaxed&&h?{$date:tf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var v=t>=df&&t<=mf,_=t>=gf&&t<=hf;if(v)return{$numberInt:t.toString()};if(_)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||mg(t)){var g=t.flags;if(g===void 0){var y=t.toString().match(/[gimuy]*$/);y&&(g=y[0])}var C=new lo(t.source,g);return C.toExtendedJSON(e)}return t!=null&&typeof t=="object"?kg(t,e):t}var Mg={Binary:function(t){return new dn(t.value(),t.sub_type)},Code:function(t){return new As(t.code,t.scope)},DBRef:function(t){return new co(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new yl(t.bytes)},Double:function(t){return new Os(t.value)},Int32:function(t){return new Ps(t.value)},Long:function(t){return K.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new vl},MinKey:function(){return new _l},ObjectID:function(t){return new Je(t)},ObjectId:function(t){return new Je(t)},BSONRegExp:function(t){return new lo(t.pattern,t.options)},Symbol:function(t){return new El(t.value)},Timestamp:function(t){return ff.fromBits(t.low,t.high)}};function kg(t,e){if(t==null||typeof t!="object")throw new mn("not an object instance");var r=t._bsontype;if(typeof r>"u"){var n={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var s=Kr(t[i],e);i==="__proto__"?Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[i]=s}finally{e.seenObjects.pop()}}return n}else if(Lg(t)){var o=t;if(typeof o.toExtendedJSON!="function"){var l=Mg[t._bsontype];if(!l)throw new $e("Unrecognized or invalid _bsontype: "+t._bsontype);o=l(o)}return r==="Code"&&o.scope?o=new As(o.code,Kr(o.scope,e)):r==="DBRef"&&o.oid&&(o=new co(Kr(o.collection,e),Kr(o.oid,e),Kr(o.db,e),Kr(o.fields,e))),o.toExtendedJSON(e)}else throw new mn("_bsontype must be a string, but was: "+typeof r)}var rf;(function(t){function e(s,o){var l=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof l.relaxed=="boolean"&&(l.strict=!l.relaxed),typeof l.strict=="boolean"&&(l.relaxed=!l.strict),JSON.parse(s,function(u,f){if(u.indexOf("\0")!==-1)throw new mn("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return yf(f,l)})}t.parse=e;function r(s,o,l,u){l!=null&&typeof l=="object"&&(u=l,l=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(u=o,o=void 0,l=0);var f=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),m=Kr(s,f);return JSON.stringify(m,o,l)}t.stringify=r;function n(s,o){return o=o||{},JSON.parse(r(s,o))}t.serialize=n;function i(s,o){return o=o||{},e(JSON.stringify(s),o)}t.deserialize=i})(rf||(rf={}));var nf,of=af();of.Map?nf=of.Map:nf=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var r=0;r<e.length;r++)if(e[r]!=null){var n=e[r],i=n[0],s=n[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var r=this._values[e];return r==null?!1:(delete this._values[e],this._keys.splice(r.i,1),!0)},t.prototype.entries=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?[n,e._values[n].v]:void 0,done:n===void 0}}}},t.prototype.forEach=function(e,r){r=r||this;for(var n=0;n<this._keys.length;n++){var i=this._keys[n];e.call(r,this._values[i].v,i,r)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?n:void 0,done:n===void 0}}}},t.prototype.set=function(e,r){return this._values[e]?(this._values[e].v=r,this):(this._keys.push(e),this._values[e]={v:r,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?e._values[n].v:void 0,done:n===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var hI=K.fromNumber(gg),gI=K.fromNumber(yg),ml=new Uint8Array(8),yI=new DataView(ml.buffer,ml.byteOffset,ml.byteLength),Fg=1024*1024*17,vI=Ee.alloc(Fg),mi=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}},ve=class{constructor(t,e={},r,n){this.name=t,this.properties=e,this.id=n?new Je(n):new Je,this.occurred=new Date,r&&(this.trigger=new mi(r)),this.newEvent=!n}trigger;items;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber},ut=class{static injectScriptURL(t,e){if(!t)return;let r=document.createElement("script");r.id=e??"",r.src=t,r.defer=!0,t.includes("localhost")&&(r.type="module"),document.head.appendChild(r)}static injectRawScript(t){if(!t)return;let e=document.createElement("script");e.id="cooee-app-script",e.innerHTML=t,document.head.appendChild(e)}static injectRawCSS(t,e=document.head){if(!t)return;let r=document.createElement("style");r.textContent=t,e.appendChild(r)}static injectStylesheet(t,e=document.head){if(!t)return;let r=document.createElement("link");r.rel="stylesheet",r.href=t,e.appendChild(r)}},ue=class{static storage=new Map;static get(t){return this.storage.has(t)||this.storage.set(t,t.getInstance()),this.storage.get(t)}},vf=Qt(Sl()),po=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let t;try{t=new vf.URLBuilder(location.href)}catch{return{}}let e={};this.UTM_PARAMS.forEach(n=>{let i=t.getQueryParam(n);i&&(e[n]=i)});let r={};return Object.keys(this.TW_PARAMS).forEach(n=>{let i=t.getQueryParam(this.TW_PARAMS[n]);i&&(r[n]=i)}),b(b({},r),e)}},_r=class wd{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(e){this.name=e.name,this.path=e.path,this.qs=e.qs,this.referrer=e.referrer,this.utmSource=e.utmSource||e.utm_source,this.utmMedium=e.utmMedium||e.utm_medium,this.utmCampaign=e.utmCampaign||e.utm_campaign,this.utmId=e.utmId||e.utm_id,this.utmTerm=e.utmTerm||e.utm_term,this.utmContent=e.utmContent||e.utm_content}static parseFromCurrent(){let e=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new wd(b({origin:location.origin,path:e,qs:location.search,referrer:po.getReferrer(),name:le.get().pageName},po.getUTMParams()))}};function ae(t){return typeof t=="function"}function Bs(t){let e=t(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Us=Bs(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
|
|
21
|
+
`)+" ".concat(u,"\\").concat(f,"/"))}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return Ug(t,e);if(t===void 0)return null;if(t instanceof Date||dg(t)){var m=t.getTime(),h=m>-1&&m<2534023188e5;return e.legacy?e.relaxed&&h?{$date:t.getTime()}:{$date:tf(t)}:e.relaxed&&h?{$date:tf(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(typeof t=="number"&&(!e.relaxed||!isFinite(t))){if(Math.floor(t)===t){var v=t>=df&&t<=mf,_=t>=gf&&t<=hf;if(v)return{$numberInt:t.toString()};if(_)return{$numberLong:t.toString()}}return{$numberDouble:t.toString()}}if(t instanceof RegExp||mg(t)){var g=t.flags;if(g===void 0){var y=t.toString().match(/[gimuy]*$/);y&&(g=y[0])}var C=new lo(t.source,g);return C.toExtendedJSON(e)}return t!=null&&typeof t=="object"?kg(t,e):t}var Mg={Binary:function(t){return new dn(t.value(),t.sub_type)},Code:function(t){return new As(t.code,t.scope)},DBRef:function(t){return new co(t.collection||t.namespace,t.oid,t.db,t.fields)},Decimal128:function(t){return new yl(t.bytes)},Double:function(t){return new Os(t.value)},Int32:function(t){return new Ps(t.value)},Long:function(t){return K.fromBits(t.low!=null?t.low:t.low_,t.low!=null?t.high:t.high_,t.low!=null?t.unsigned:t.unsigned_)},MaxKey:function(){return new vl},MinKey:function(){return new _l},ObjectID:function(t){return new Je(t)},ObjectId:function(t){return new Je(t)},BSONRegExp:function(t){return new lo(t.pattern,t.options)},Symbol:function(t){return new El(t.value)},Timestamp:function(t){return ff.fromBits(t.low,t.high)}};function kg(t,e){if(t==null||typeof t!="object")throw new mn("not an object instance");var r=t._bsontype;if(typeof r>"u"){var n={};for(var i in t){e.seenObjects.push({propertyName:i,obj:null});try{var s=Kr(t[i],e);i==="__proto__"?Object.defineProperty(n,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[i]=s}finally{e.seenObjects.pop()}}return n}else if(Lg(t)){var o=t;if(typeof o.toExtendedJSON!="function"){var l=Mg[t._bsontype];if(!l)throw new $e("Unrecognized or invalid _bsontype: "+t._bsontype);o=l(o)}return r==="Code"&&o.scope?o=new As(o.code,Kr(o.scope,e)):r==="DBRef"&&o.oid&&(o=new co(Kr(o.collection,e),Kr(o.oid,e),Kr(o.db,e),Kr(o.fields,e))),o.toExtendedJSON(e)}else throw new mn("_bsontype must be a string, but was: "+typeof r)}var rf;(function(t){function e(s,o){var l=Object.assign({},{relaxed:!0,legacy:!1},o);return typeof l.relaxed=="boolean"&&(l.strict=!l.relaxed),typeof l.strict=="boolean"&&(l.relaxed=!l.strict),JSON.parse(s,function(u,f){if(u.indexOf("\0")!==-1)throw new mn("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(u)));return yf(f,l)})}t.parse=e;function r(s,o,l,u){l!=null&&typeof l=="object"&&(u=l,l=0),o!=null&&typeof o=="object"&&!Array.isArray(o)&&(u=o,o=void 0,l=0);var f=Object.assign({relaxed:!0,legacy:!1},u,{seenObjects:[{propertyName:"(root)",obj:null}]}),m=Kr(s,f);return JSON.stringify(m,o,l)}t.stringify=r;function n(s,o){return o=o||{},JSON.parse(r(s,o))}t.serialize=n;function i(s,o){return o=o||{},e(JSON.stringify(s),o)}t.deserialize=i})(rf||(rf={}));var nf,of=af();of.Map?nf=of.Map:nf=function(){function t(e){e===void 0&&(e=[]),this._keys=[],this._values={};for(var r=0;r<e.length;r++)if(e[r]!=null){var n=e[r],i=n[0],s=n[1];this._keys.push(i),this._values[i]={v:s,i:this._keys.length-1}}}return t.prototype.clear=function(){this._keys=[],this._values={}},t.prototype.delete=function(e){var r=this._values[e];return r==null?!1:(delete this._values[e],this._keys.splice(r.i,1),!0)},t.prototype.entries=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?[n,e._values[n].v]:void 0,done:n===void 0}}}},t.prototype.forEach=function(e,r){r=r||this;for(var n=0;n<this._keys.length;n++){var i=this._keys[n];e.call(r,this._values[i].v,i,r)}},t.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},t.prototype.has=function(e){return this._values[e]!=null},t.prototype.keys=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?n:void 0,done:n===void 0}}}},t.prototype.set=function(e,r){return this._values[e]?(this._values[e].v=r,this):(this._keys.push(e),this._values[e]={v:r,i:this._keys.length-1},this)},t.prototype.values=function(){var e=this,r=0;return{next:function(){var n=e._keys[r++];return{value:n!==void 0?e._values[n].v:void 0,done:n===void 0}}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),t}();var hI=K.fromNumber(gg),gI=K.fromNumber(yg),ml=new Uint8Array(8),yI=new DataView(ml.buffer,ml.byteOffset,ml.byteLength),Fg=1024*1024*17,vI=Ee.alloc(Fg),mi=class{triggerID;nudgeID;engagementID;contentID;shortID;contentType;variation;props;objective;onsiteDeliveryType;holdout;constructor(t){t=t||{},this.triggerID=t.id||t.triggerID,this.nudgeID=t.nudgeID,this.shortID=t.shortID,this.contentType=t.contentType,this.engagementID=t.engagementID,this.contentID=t.contentID,this.variation=t.variation,this.props=t.props,this.objective=t.objective,this.onsiteDeliveryType=t.onsiteDeliveryType,this.holdout=t.holdout}},ve=class{constructor(t,e={},r,n){this.name=t,this.properties=e,this.id=n?new Je(n):new Je,this.occurred=new Date,r&&(this.trigger=new mi(r)),this.newEvent=!n}trigger;items;id;newEvent;cart;currentItem;deviceProps;landingPage;occurred;page;sessionID;sessionNumber},ut=class{static injectScriptURL(t,e){if(!t)return;let r=document.createElement("script");r.id=e??"",r.src=t,r.defer=!0,t.includes("localhost")&&(r.type="module"),document.head.appendChild(r)}static injectRawScript(t){if(!t)return;let e=document.createElement("script");e.id="cooee-app-script",e.innerHTML=t,document.head.appendChild(e)}static injectRawCSS(t,e=document.head){if(!t)return;let r=document.createElement("style");r.textContent=t,e.appendChild(r)}static injectStylesheet(t,e=document.head){if(!t)return;let r=document.createElement("link");r.rel="stylesheet",r.href=t,t==="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"&&(r.crossOrigin="anonymous",r.onload=n=>{let i=n.currentTarget?.sheet?.cssRules;if(i){for(let s of i)if(s.type==CSSRule.FONT_FACE_RULE){let o=t.split("/"),l=o.slice(0,o.length-1).join("/"),u=s.cssText;u=u.replace(/url\s*\(\s*['"]?(?!((\/)|((?:https?:)?\/\/)|(?:data:?:)))([^'")]+)['"]?\s*\)/g,`url("${l}/$4")`);let f=document.createElement("style");f.appendChild(document.createTextNode(u)),document.head.appendChild(f)}}}),e.appendChild(r)}},ue=class{static storage=new Map;static get(t){return this.storage.has(t)||this.storage.set(t,t.getInstance()),this.storage.get(t)}},vf=Qt(Sl()),po=class{static UTM_PARAMS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id"];static TW_PARAMS={utm_source:"tw_source",utm_campaign:"tw_campaign"};static getReferrer(){if(document.referrer)return document.referrer.replace(location.origin,"")}static getUTMParams(){let t;try{t=new vf.URLBuilder(location.href)}catch{return{}}let e={};this.UTM_PARAMS.forEach(n=>{let i=t.getQueryParam(n);i&&(e[n]=i)});let r={};return Object.keys(this.TW_PARAMS).forEach(n=>{let i=t.getQueryParam(this.TW_PARAMS[n]);i&&(r[n]=i)}),b(b({},r),e)}},_r=class wd{origin;path;qs;name;referrer;utmSource;utmMedium;utmCampaign;utmId;utmTerm;utmContent;constructor(e){this.name=e.name,this.path=e.path,this.qs=e.qs,this.referrer=e.referrer,this.utmSource=e.utmSource||e.utm_source,this.utmMedium=e.utmMedium||e.utm_medium,this.utmCampaign=e.utmCampaign||e.utm_campaign,this.utmId=e.utmId||e.utm_id,this.utmTerm=e.utmTerm||e.utm_term,this.utmContent=e.utmContent||e.utm_content}static parseFromCurrent(){let e=location.pathname==="/"?location.pathname:location.pathname.replace(/\/+$/,"");return new wd(b({origin:location.origin,path:e,qs:location.search,referrer:po.getReferrer(),name:le.get().pageName},po.getUTMParams()))}};function ae(t){return typeof t=="function"}function Bs(t){let e=t(r=>{Error.call(r),r.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Us=Bs(t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:
|
|
22
22
|
${e.map((r,n)=>`${n+1}) ${r.toString()}`).join(`
|
|
23
23
|
`)}`:"",this.name="UnsubscriptionError",this.errors=e});function hn(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var jt=class Xu{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let s of r)s.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(ae(n))try{n()}catch(s){e=s instanceof Us?s.errors:[s]}let{_finalizers:i}=this;if(i){this._finalizers=null;for(let s of i)try{_f(s)}catch(o){e=e??[],o instanceof Us?e=[...e,...o.errors]:e.push(o)}}if(e)throw new Us(e)}}add(e){var r;if(e&&e!==this)if(this.closed)_f(e);else{if(e instanceof Xu){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&hn(r,e)}remove(e){let{_finalizers:r}=this;r&&hn(r,e),e instanceof Xu&&e._removeParent(this)}};jt.EMPTY=(()=>{let t=new jt;return t.closed=!0,t})();var bl=jt.EMPTY;function Ms(t){return t instanceof jt||t&&"closed"in t&&ae(t.remove)&&ae(t.add)&&ae(t.unsubscribe)}function _f(t){ae(t)?t():t.unsubscribe()}var tr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},di={setTimeout(t,e,...r){let{delegate:n}=di;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=di;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ks(t){di.setTimeout(()=>{let{onUnhandledError:e}=tr;if(e)e(t);else throw t})}function wl(){}var Ef=Il("C",void 0,void 0);function Sf(t){return Il("E",void 0,t)}function bf(t){return Il("N",t,void 0)}function Il(t,e,r){return{kind:t,value:e,error:r}}var gn=null;function hi(t){if(tr.useDeprecatedSynchronousErrorHandling){let e=!gn;if(e&&(gn={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=gn;if(gn=null,r)throw n}}else t()}function wf(t){tr.useDeprecatedSynchronousErrorHandling&&gn&&(gn.errorThrown=!0,gn.error=t)}var yn=class extends jt{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,Ms(t)&&t.add(this)):this.destination=Wg}static create(t,e,r){return new gi(t,e,r)}next(t){this.isStopped?xl(bf(t),this):this._next(t)}error(t){this.isStopped?xl(Sf(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?xl(Ef,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},$g=Function.prototype.bind;function Tl(t,e){return $g.call(t,e)}var Cl=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(r){Fs(r)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(r){Fs(r)}else Fs(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){Fs(e)}}},gi=class extends yn{constructor(t,e,r){super();let n;if(ae(t)||!t)n={next:t??void 0,error:e??void 0,complete:r??void 0};else{let i;this&&tr.useDeprecatedNextContext?(i=Object.create(t),i.unsubscribe=()=>this.unsubscribe(),n={next:t.next&&Tl(t.next,i),error:t.error&&Tl(t.error,i),complete:t.complete&&Tl(t.complete,i)}):n=t}this.destination=new Cl(n)}};function Fs(t){tr.useDeprecatedSynchronousErrorHandling?wf(t):ks(t)}function jg(t){throw t}function xl(t,e){let{onStoppedNotification:r}=tr;r&&di.setTimeout(()=>r(t,e))}var Wg={closed:!0,next:wl,error:jg,complete:wl},yi=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Hs(t){return t}function If(t){return t.length===0?Hs:t.length===1?t[0]:function(e){return t.reduce((r,n)=>n(r),e)}}var rt=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,i){let s=Vg(r)?r:new gi(r,n,i);return hi(()=>{let{operator:o,source:l}=this;s.add(o?o.call(s,l):l?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=Tf(n),new n((i,s)=>{let o=new gi({next:l=>{try{r(l)}catch(u){s(u),o.unsubscribe()}},error:s,complete:i});this.subscribe(o)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[yi](){return this}pipe(...r){return If(r)(this)}toPromise(r){return r=Tf(r),new r((n,i)=>{let s;this.subscribe(o=>s=o,o=>i(o),()=>n(s))})}}return t.create=e=>new t(e),t})();function Tf(t){var e;return(e=t??tr.Promise)!==null&&e!==void 0?e:Promise}function Gg(t){return t&&ae(t.next)&&ae(t.error)&&ae(t.complete)}function Vg(t){return t&&t instanceof yn||Gg(t)&&Ms(t)}function zg(t){return ae(t?.lift)}function Wt(t){return e=>{if(zg(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Pr(t,e,r,n,i){return new Dl(t,e,r,n,i)}var Dl=class extends yn{constructor(t,e,r,n,i,s){super(t),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=e?function(o){try{e(o)}catch(l){t.error(l)}}:super._next,this._error=n?function(o){try{n(o)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(o){t.error(o)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}},xf=Bs(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),_t=(()=>{class t extends rt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new $s(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new xf}next(r){hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){hi(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:i,observers:s}=this;return n||i?bl:(this.currentObservers=null,s.push(r),new jt(()=>{this.currentObservers=null,hn(s,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:i,isStopped:s}=this;n?r.error(i):s&&r.complete()}asObservable(){let r=new rt;return r.source=this,r}}return t.create=(e,r)=>new $s(e,r),t})(),$s=class extends _t{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.next)===null||r===void 0||r.call(e,t)}error(t){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.error)===null||r===void 0||r.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,r;return(r=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&r!==void 0?r:bl}},fo=class extends _t{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:r}=this;if(t)throw e;return this._throwIfClosed(),r}next(t){super.next(this._value=t)}},mo={now(){return(mo.delegate||Date).now()},delegate:void 0},ho=class extends _t{constructor(t=1/0,e=1/0,r=mo){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=r,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:r,_infiniteTimeWindow:n,_timestampProvider:i,_windowTime:s}=this;e||(r.push(t),!n&&r.push(i.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:r,_buffer:n}=this,i=n.slice();for(let s=0;s<i.length&&!t.closed;s+=r?1:2)t.next(i[s]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:r,_infiniteTimeWindow:n}=this,i=(n?1:2)*t;if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){let s=e.now(),o=0;for(let l=1;l<r.length&&r[l]<=s;l+=2)o=l;o&&r.splice(0,o+1)}}},js=class extends jt{constructor(t,e){super()}schedule(t,e=0){return this}},go={setInterval(t,e,...r){let{delegate:n}=go;return n?.setInterval?n.setInterval(t,e,...r):setInterval(t,e,...r)},clearInterval(t){let{delegate:e}=go;return(e?.clearInterval||clearInterval)(t)},delegate:void 0},Ws=class extends js{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var r;if(this.closed)return this;this.state=t;let n=this.id,i=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=(r=this.id)!==null&&r!==void 0?r:this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,r=0){return go.setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,e,r=0){if(r!=null&&this.delay===r&&this.pending===!1)return e;e!=null&&go.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let r=this._execute(t,e);if(r)return r;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r=!1,n;try{this.work(t)}catch(i){r=!0,n=i||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:r}=e;this.work=this.state=this.scheduler=null,this.pending=!1,hn(r,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},vi=class Id{constructor(e,r=Id.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};vi.now=mo.now;var Gs=class extends vi{constructor(t,e=vi.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let r;this._active=!0;do if(r=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,r){for(;t=e.shift();)t.unsubscribe();throw r}}},Cf=new Gs(Ws);function Df(t){return t&&ae(t.schedule)}function Yg(t){return t[t.length-1]}function Vs(t){return Df(Yg(t))?t.pop():void 0}function Nf(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function l(m){try{f(n.next(m))}catch(h){o(h)}}function u(m){try{f(n.throw(m))}catch(h){o(h)}}function f(m){m.done?s(m.value):i(m.value).then(l,u)}f((n=n.apply(t,e||[])).next())})}function Rf(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vn(t){return this instanceof vn?(this.v=t,this):new vn(t)}function Af(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(_){return function(g){return Promise.resolve(g).then(_,h)}}function l(_,g){n[_]&&(i[_]=function(y){return new Promise(function(C,O){s.push([_,y,C,O])>1||u(_,y)})},g&&(i[_]=g(i[_])))}function u(_,g){try{f(n[_](g))}catch(y){v(s[0][3],y)}}function f(_){_.value instanceof vn?Promise.resolve(_.value.v).then(m,h):v(s[0][2],_)}function m(_){u("next",_)}function h(_){u("throw",_)}function v(_,g){_(g),s.shift(),s.length&&u(s[0][0],s[0][1])}}function Of(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof Rf=="function"?Rf(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(l,u){o=t[s](o),i(l,u,o.done,o.value)})}}function i(s,o,l,u){Promise.resolve(u).then(function(f){s({value:f,done:l})},o)}}var _i=t=>t&&typeof t.length=="number"&&typeof t!="function";function zs(t){return ae(t?.then)}function Ys(t){return ae(t[yi])}function qs(t){return Symbol.asyncIterator&&ae(t?.[Symbol.asyncIterator])}function Ks(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function qg(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Js=qg();function Xs(t){return ae(t?.[Js])}function Qs(t){return Af(this,arguments,function*(){let e=t.getReader();try{for(;;){let{value:r,done:n}=yield vn(e.read());if(n)return yield vn(void 0);yield yield vn(r)}}finally{e.releaseLock()}})}function Zs(t){return ae(t?.getReader)}function Gt(t){if(t instanceof rt)return t;if(t!=null){if(Ys(t))return Kg(t);if(_i(t))return Jg(t);if(zs(t))return Xg(t);if(qs(t))return Pf(t);if(Xs(t))return Qg(t);if(Zs(t))return Zg(t)}throw Ks(t)}function Kg(t){return new rt(e=>{let r=t[yi]();if(ae(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Jg(t){return new rt(e=>{for(let r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function Xg(t){return new rt(e=>{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,ks)})}function Qg(t){return new rt(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function Pf(t){return new rt(e=>{ey(t,e).catch(r=>e.error(r))})}function Zg(t){return Pf(Qs(t))}function ey(t,e){var r,n,i,s;return Nf(this,void 0,void 0,function*(){try{for(r=Of(t);n=yield r.next(),!n.done;){let o=n.value;if(e.next(o),e.closed)return}}catch(o){i={error:o}}finally{try{n&&!n.done&&(s=r.return)&&(yield s.call(r))}finally{if(i)throw i.error}}e.complete()})}function Vt(t,e,r,n=0,i=!1){let s=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(s),!i)return s}function ea(t,e=0){return Wt((r,n)=>{r.subscribe(Pr(n,i=>Vt(n,t,()=>n.next(i),e),()=>Vt(n,t,()=>n.complete(),e),i=>Vt(n,t,()=>n.error(i),e)))})}function ta(t,e=0){return Wt((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function Lf(t,e){return Gt(t).pipe(ta(e),ea(e))}function Bf(t,e){return Gt(t).pipe(ta(e),ea(e))}function Uf(t,e){return new rt(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function Mf(t,e){return new rt(r=>{let n;return Vt(r,e,()=>{n=t[Js](),Vt(r,e,()=>{let i,s;try{({value:i,done:s}=n.next())}catch(o){r.error(o);return}s?r.complete():r.next(i)},0,!0)}),()=>ae(n?.return)&&n.return()})}function ra(t,e){if(!t)throw new Error("Iterable cannot be null");return new rt(r=>{Vt(r,e,()=>{let n=t[Symbol.asyncIterator]();Vt(r,e,()=>{n.next().then(i=>{i.done?r.complete():r.next(i.value)})},0,!0)})})}function kf(t,e){return ra(Qs(t),e)}function Ff(t,e){if(t!=null){if(Ys(t))return Lf(t,e);if(_i(t))return Uf(t,e);if(zs(t))return Bf(t,e);if(qs(t))return ra(t,e);if(Xs(t))return Mf(t,e);if(Zs(t))return kf(t,e)}throw Ks(t)}function Hf(t,e){return e?Ff(t,e):Gt(t)}function _n(t,e){return Wt((r,n)=>{let i=0;r.subscribe(Pr(n,s=>{n.next(t.call(e,s,i++))}))})}var{isArray:ty}=Array;function ry(t,e){return ty(e)?t(...e):t(e)}function $f(t){return _n(e=>ry(t,e))}function jf(t,e,r,n,i,s,o,l){let u=[],f=0,m=0,h=!1,v=()=>{h&&!u.length&&!f&&e.complete()},_=y=>f<n?g(y):u.push(y),g=y=>{s&&e.next(y),f++;let C=!1;Gt(r(y,m++)).subscribe(Pr(e,O=>{i?.(O),s?_(O):e.next(O)},()=>{C=!0},void 0,()=>{if(C)try{for(f--;u.length&&f<n;){let O=u.shift();o?Vt(e,o,()=>g(O)):g(O)}v()}catch(O){e.error(O)}}))};return t.subscribe(Pr(e,_,()=>{h=!0,v()})),()=>{l?.()}}function yo(t,e,r=1/0){return ae(e)?yo((n,i)=>_n((s,o)=>e(n,s,i,o))(Gt(t(n,i))),r):(typeof e=="number"&&(r=e),Wt((n,i)=>jf(n,i,t,r)))}function Wf(t=1/0){return yo(Hs,t)}function Gf(){return Wf(1)}function Rl(...t){return Gf()(Hf(t,Vs(t)))}var ny=["addListener","removeListener"],iy=["addEventListener","removeEventListener"],oy=["on","off"];function En(t,e,r,n){if(ae(r)&&(n=r,r=void 0),n)return En(t,e,r).pipe($f(n));let[i,s]=cy(t)?iy.map(o=>l=>t[o](e,l,r)):sy(t)?ny.map(Vf(t,e)):ay(t)?oy.map(Vf(t,e)):[];if(!i&&_i(t))return yo(o=>En(o,e,r))(Gt(t));if(!i)throw new TypeError("Invalid event target");return new rt(o=>{let l=(...u)=>o.next(1<u.length?u:u[0]);return i(l),()=>s(l)})}function Vf(t,e){return r=>n=>t[r](e,n)}function sy(t){return ae(t.addListener)&&ae(t.removeListener)}function ay(t){return ae(t.on)&&ae(t.off)}function cy(t){return ae(t.addEventListener)&&ae(t.removeEventListener)}function rr(t,e=Cf){return Wt((r,n)=>{let i=null,s=null,o=null,l=()=>{if(i){i.unsubscribe(),i=null;let f=s;s=null,n.next(f)}};function u(){let f=o+t,m=e.now();if(m<f){i=this.schedule(void 0,f-m),n.add(i);return}l()}r.subscribe(Pr(n,f=>{s=f,o=e.now(),i||(i=e.schedule(u,t),n.add(i))},()=>{l(),n.complete()},void 0,()=>{s=i=null}))})}function Nl(...t){let e=Vs(t);return Wt((r,n)=>{(e?Rl(t,r,e):Rl(t,r)).subscribe(n)})}var ly=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/5\\.0\\s[a-z\\.-]+$|^mozilla/\\d\\.\\d \\(compatible;?\\)$|^mozilla/\\d\\.\\d \\w*$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|adscanner/|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|cookiehubscan|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|images|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|jsjcw_scanner|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|reputation|resolver|retriever|rexx;|rigor|rss\\b|scanner\\.|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|trace|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|zgrab",uy=/bot|crawl|http|lighthouse|scan|search|spider/i,vo;function py(){if(vo instanceof RegExp)return vo;try{vo=new RegExp(ly,"i")}catch{vo=uy}return vo}function zf(t){return!!t&&py().test(t)}var Yf=Object.prototype.toString;function Sn(t){switch(Yf.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Er(t,Error)}}function Ei(t,e){return Yf.call(t)===`[object ${e}]`}function na(t){return Ei(t,"ErrorEvent")}function ia(t){return Ei(t,"DOMError")}function Al(t){return Ei(t,"DOMException")}function Et(t){return Ei(t,"String")}function Si(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function bn(t){return t===null||Si(t)||typeof t!="object"&&typeof t!="function"}function nr(t){return Ei(t,"Object")}function wn(t){return typeof Event<"u"&&Er(t,Event)}function Ol(t){return typeof Element<"u"&&Er(t,Element)}function Pl(t){return Ei(t,"RegExp")}function Lr(t){return!!(t&&t.then&&typeof t.then=="function")}function Ll(t){return nr(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Er(t,e){try{return t instanceof e}catch{return!1}}function _o(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function Sr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function oa(t,e){if(!Array.isArray(t))return"";let r=[];for(let n=0;n<t.length;n++){let i=t[n];try{_o(i)?r.push("[VueViewModel]"):r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}function qf(t,e,r=!1){return Et(t)?Pl(e)?e.test(t):Et(e)?r?t===e:t.includes(e):!1:!1}function bi(t,e=[],r=!1){return e.some(n=>qf(t,n,r))}function Ul(t,e,r=250,n,i,s,o){if(!s.exception||!s.exception.values||!o||!Er(o.originalException,Error))return;let l=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;l&&(s.exception.values=fy(Bl(t,e,i,o.originalException,n,s.exception.values,l,0),r))}function Bl(t,e,r,n,i,s,o,l){if(s.length>=r+1)return s;let u=[...s];if(Er(n[i],Error)){Kf(o,l);let f=t(e,n[i]),m=u.length;Jf(f,i,m,l),u=Bl(t,e,r,n[i],i,[f,...u],f,m)}return Array.isArray(n.errors)&&n.errors.forEach((f,m)=>{if(Er(f,Error)){Kf(o,l);let h=t(e,f),v=u.length;Jf(h,`errors[${m}]`,v,l),u=Bl(t,e,r,f,i,[h,...u],h,v)}}),u}function Kf(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(b(b({},t.mechanism),t.type==="AggregateError"&&{is_exception_group:!0}),{exception_id:e})}function Jf(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism=Z(b({},t.mechanism),{type:"chained",source:e,exception_id:r,parent_id:n})}function fy(t,e){return t.map(r=>(r.value&&(r.value=Sr(r.value,e)),r))}var zt="8.18.0",ee=globalThis;function wi(t,e,r){let n=r||ee,i=n.__SENTRY__=n.__SENTRY__||{},s=i[zt]=i[zt]||{};return s[t]||(s[t]=e())}var Ml=ee,my=80;function Eo(t,e={}){if(!t)return"<unknown>";try{let r=t,n=5,i=[],s=0,o=0,l=" > ",u=l.length,f,m=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||my;for(;r&&s++<n&&(f=dy(r,m),!(f==="html"||s>1&&o+i.length*u+f.length>=h));)i.push(f),o+=f.length,r=r.parentNode;return i.reverse().join(l)}catch{return"<unknown>"}}function dy(t,e){let r=t,n=[];if(!r||!r.tagName)return"";if(Ml.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());let i=e&&e.length?e.filter(o=>r.getAttribute(o)).map(o=>[o,r.getAttribute(o)]):null;if(i&&i.length)i.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{r.id&&n.push(`#${r.id}`);let o=r.className;if(o&&Et(o)){let l=o.split(/\s+/);for(let u of l)n.push(`.${u}`)}}let s=["aria-label","type","name","title","alt"];for(let o of s){let l=r.getAttribute(o);l&&n.push(`[${o}="${l}"]`)}return n.join("")}function kl(){try{return Ml.document.location.href}catch{return""}}function Fl(t){if(!Ml.HTMLElement)return null;let e=t,r=5;for(let n=0;n<r;n++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}var br=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,hy="Sentry Logger ",So=["debug","info","warn","error","log","assert","trace"],Ii={};function Ti(t){if(!("console"in ee))return t();let e=ee.console,r={},n=Object.keys(Ii);n.forEach(i=>{let s=Ii[i];r[i]=e[i],e[i]=s});try{return t()}finally{n.forEach(i=>{e[i]=r[i]})}}function gy(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return br?So.forEach(r=>{e[r]=(...n)=>{t&&Ti(()=>{ee.console[r](`${hy}[${r}]:`,...n)})}}):So.forEach(r=>{e[r]=()=>{}}),e}var q=gy(),yy=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function vy(t){return t==="http"||t==="https"}function wr(t,e=!1){let{host:r,path:n,pass:i,port:s,projectId:o,protocol:l,publicKey:u}=t;return`${l}://${u}${e&&i?`:${i}`:""}@${r}${s?`:${s}`:""}/${n&&`${n}/`}${o}`}function Xf(t){let e=yy.exec(t);if(!e){Ti(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}let[r,n,i="",s="",o="",l=""]=e.slice(1),u="",f=l,m=f.split("/");if(m.length>1&&(u=m.slice(0,-1).join("/"),f=m.pop()),f){let h=f.match(/^\d+/);h&&(f=h[0])}return Qf({host:s,pass:i,path:u,projectId:f,port:o,protocol:r,publicKey:n})}function Qf(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function _y(t){if(!br)return!0;let{port:e,projectId:r,protocol:n}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(q.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:r.match(/^\d+$/)?vy(n)?e&&isNaN(parseInt(e,10))?(q.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(q.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(q.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function sa(t){let e=typeof t=="string"?Xf(t):Qf(t);if(!(!e||!_y(e)))return e}var pt=class extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}};function Le(t,e,r){if(!(e in t))return;let n=t[e],i=r(n);typeof i=="function"&&aa(i,n),t[e]=i}function St(t,e,r){try{Object.defineProperty(t,e,{value:r,writable:!0,configurable:!0})}catch{br&&q.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function aa(t,e){try{let r=e.prototype||{};t.prototype=e.prototype=r,St(t,"__sentry_original__",e)}catch{}}function In(t){return t.__sentry_original__}function $l(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function ca(t){if(Sn(t))return b({message:t.message,name:t.name,stack:t.stack},em(t));if(wn(t)){let e=b({type:t.type,target:Zf(t.target),currentTarget:Zf(t.currentTarget)},em(t));return typeof CustomEvent<"u"&&Er(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Zf(t){try{return Ol(t)?Eo(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function em(t){if(typeof t=="object"&&t!==null){let e={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}else return{}}function jl(t,e=40){let r=Object.keys(ca(t));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=e)return Sr(n,e);for(let i=r.length;i>0;i--){let s=r.slice(0,i).join(", ");if(!(s.length>e))return i===r.length?s:Sr(s,e)}return""}function Xe(t){return Hl(t,new Map)}function Hl(t,e){if(Ey(t)){let r=e.get(t);if(r!==void 0)return r;let n={};e.set(t,n);for(let i of Object.keys(t))typeof t[i]<"u"&&(n[i]=Hl(t[i],e));return n}if(Array.isArray(t)){let r=e.get(t);if(r!==void 0)return r;let n=[];return e.set(t,n),t.forEach(i=>{n.push(Hl(i,e))}),n}return t}function Ey(t){if(!nr(t))return!1;try{let e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}var Ir="?",tm=/\(error: (.*)\)/,rm=/captureMessage|captureException/;function Gl(...t){let e=t.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,i=0)=>{let s=[],o=r.split(`
|
|
24
24
|
`);for(let l=n;l<o.length;l++){let u=o[l];if(u.length>1024)continue;let f=tm.test(u)?u.replace(tm,"$1"):u;if(!f.match(/\S*Error: /)){for(let m of e){let h=m(f);if(h){s.push(h);break}}if(s.length>=50+i)break}}return nm(s.slice(i))}}function nm(t){if(!t.length)return[];let e=Array.from(t);return/sentryWrapped/.test(la(e).function||"")&&e.pop(),e.reverse(),rm.test(la(e).function||"")&&(e.pop(),rm.test(la(e).function||"")&&e.pop()),e.slice(0,50).map(r=>Z(b({},r),{filename:r.filename||la(e).filename,function:r.function||Ir}))}function la(t){return t[t.length-1]||{}}var Wl="<anonymous>";function Yt(t){try{return!t||typeof t!="function"?Wl:t.name||Wl}catch{return Wl}}function ua(t){let e=t.exception;if(e){let r=[];try{return e.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}var pa={},im={};function bt(t,e){pa[t]=pa[t]||[],pa[t].push(e)}function wt(t,e){im[t]||(e(),im[t]=!0)}function Qe(t,e){let r=t&&pa[t];if(r)for(let n of r)try{n(e)}catch(i){br&&q.error(`Error while triggering instrumentation handler.
|