@letscooee/web-sdk 0.0.6 → 0.0.7

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,2 +1,2 @@
1
1
  /*! For license information please see sdk-preview.min.js.LICENSE.txt */
2
- !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),n=u.index=parseInt(16777215*Math.random(),10),r=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",n=0;n<24;)e+=String.fromCharCode(c[t.charCodeAt(n++)]<<4|c[t.charCodeAt(n++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=n=(n+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,r>>8&255,255&r,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,n){var r;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",y="console",v="mobile",g="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2==0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var n,r,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(n=r=0;n<h.length&&!u;)if(u=h[n++].exec(t))for(i=0;i<f.length;i++)l=u[++r],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===c&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(E.has(e[n][r],t))return"?"===n?o:n}else if(E.has(e[n],t))return"?"===n?o:n;return t}},_={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,g]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,g]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,g]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,g]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,g]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,g]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,g]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,g]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,g]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,g]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,g]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,g]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,g]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,g]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,g]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,g]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,g]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,g]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,g]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,g]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,g]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,g]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,g]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,g]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,g]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,g]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,g]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,g]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,g]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,g]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,g]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,y]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,y]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,y]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,g]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var n=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,n,r.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,n,r.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,n,r.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(t){return n=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(n),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:y,MOBILE:v,SMARTTV:w,TABLET:g,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(r=function(){return I}.call(e,n,e,t))===o||(t.exports=r);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var n in e)x.ua[n]=e[n]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.6"}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};!function(){"use strict";n.d(r,{default:function(){return Qt}});var t=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=n(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER_ID="atid",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},i=function(){function n(){}return n.l=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.log.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n.e=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.error.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n.w=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];console.warn.apply(console,e([t.LOG_PREFIX,":"],n,!1))},n}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let n=1;8===(t=t.replace(/^#/,"")).length&&(n=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(n=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const r=Number.parseInt(t,16),i=r>>16,o=r>>8&255,c=255&r,u="number"==typeof e.alpha?e.alpha:n;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var d,b,y=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(e){return t.call(this,e)||this}return y(e,t),e}(f),g=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(e){var n=t.call(this,e)||this;return n.src=e.src,n}return g(e,t),e}(f),m=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=function(t){function e(e){var n=t.call(this,e)||this;return n.alg=d.START,n.prs=e.prs,n.alg=e.alg,e.f&&(n.f=e.f),e.c&&(n.c=new u(e.c)),n}return m(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(f);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(d||(d={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var E=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(t){function e(e){return t.call(this,e)||this}return E(e,t),e}(f),_=function(t){var e=this;this.elems=[],this.cont=new T(t.cont),t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new w(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new S(t)):t.t===p.SHAPE&&e.elems.push(new v(t))}))},A=function(t){this.duration=0,this.id=t.id,this.duration=t.duration,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new _(t.ian)},I=function(){function t(){}return t.getString=function(e,n){return t.LOCAL_STORAGE.getItem(e)||n},t.setString=function(e,n){n||(n=""),t.LOCAL_STORAGE.setItem(e,n)},t.getNumber=function(e,n){return+t.getString(e,"")||n},t.setNumber=function(e,n){t.setString(e,n.toString())},t.getBoolean=function(t,e){var n=this.LOCAL_STORAGE.getItem(t);return n?JSON.parse(n):e},t.setBoolean=function(e,n){t.setString(e,JSON.stringify(n))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),x=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,n){e&&(n?t.style.setProperty(e,n):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,n){t.setAttribute(e,n)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),O=n(238),k=n.n(O),N=n(489),C=n.n(N),D=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,I.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),P=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!I.getString(t.STORAGE_SESSION_ID,""))return!0;var e=I.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(C())).toHexString(),I.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),I.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,I.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(D.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var t={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Ht.getInstance().concludeSession(t),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,I.remove(t.STORAGE_SESSION_ID),I.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(I.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=I.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=I.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return I.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),R=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},M=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},L=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},H=function(){function e(){this.runtimeData=D.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,n,r,i){return M(this,void 0,void 0,(function(){var o;return L(this,(function(s){switch(s.label){case 0:return n.startsWith("http")||(n=t.API_URL+n),[4,fetch(n,{method:e,body:JSON.stringify(r),headers:i})];case 1:if(!(o=s.sent()).ok)throw o;return[2,o.json()]}}))}))},e.prototype.registerDevice=function(t){return M(this,void 0,void 0,(function(){return L(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/event/track",t,e).then((function(e){i.l("Sent",t.name),e.triggerData&&(new Yt).render(e.triggerData)})).catch((function(t){i.e("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.l("Updated user profile")})).catch((function(t){i.e("Error saving user profile",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.l("Conclude Session",t)})).catch((function(t){i.e(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),G=function(e,n,r,i){this.appID=e,this.appSecret=n,this.uuid=r,this.props=i,this.sdk=t.SDK},j=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},B=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},U=function(){function t(){this.parser=new(k()),this.result={}}return t.prototype.get=function(){return j(this,void 0,void 0,(function(){var t;return B(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,n=t.offsetWidth*e;return document.body.removeChild(t),n},t.prototype.getLocation=function(){return j(this,void 0,void 0,(function(){var t=this;return B(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(n){t.result.coords=[n.coords.latitude,n.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return j(this,void 0,void 0,(function(){var t;return B(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),F=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},z=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},V=function(){function e(){this.apiService=H.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!I.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return F(this,void 0,void 0,(function(){return z(this,(function(e){return this.sdkToken=I.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.l("No SDK token found in local storage"),this.userID=I.getString(t.STORAGE_USER_ID,""),this.userID||i.l("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.l("SDK Token:",this.sdkToken),i.l("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return F(this,void 0,void 0,(function(){return z(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.l("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return F(this,void 0,void 0,(function(){var t,e,n,r;return z(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return n=o.sent(),i.l("Register Device Response",n),this.saveUserDataInStorage(n),[3,5];case 4:throw r=o.sent(),i.e(r),r;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),I.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),I.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return F(this,void 0,void 0,(function(){var t;return z(this,(function(e){switch(e.label){case 0:return[4,(new U).get()];case 1:return t=e.sent(),[2,new G(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=I.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(C())).toHexString(),I.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),W=function(t,e){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function q(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function K(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function X(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}function J(t){return"function"==typeof t}function Z(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var Y=Z((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Q(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var tt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=K(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(J(c))try{c()}catch(t){i=t instanceof Y?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=K(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{rt(h)}catch(t){i=null!=i?i:[],t instanceof Y?i=X(X([],$(i)),$(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new Y(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)rt(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Q(e,t)},t.prototype.remove=function(e){var n=this._teardowns;n&&Q(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),et=tt.EMPTY;function nt(t){return t instanceof tt||t&&"closed"in t&&J(t.remove)&&J(t.add)&&J(t.unsubscribe)}function rt(t){J(t)?t():t.unsubscribe()}var it=null,ot=null,st=void 0,at=!1,ct=!1,ut={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ut.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,X([],$(t)))},clearTimeout:function(t){var e=ut.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function lt(t){ut.setTimeout((function(){if(!it)throw t;it(t)}))}function pt(){}var ht=ft("C",void 0,void 0);function ft(t,e,n){return{kind:t,value:e,error:n}}var dt=null;function bt(t){if(at){var e=!dt;if(e&&(dt={errorThrown:!1,error:null}),t(),e){var n=dt,r=n.errorThrown,i=n.error;if(dt=null,r)throw i}}else t()}function yt(t){at&&dt&&(dt.errorThrown=!0,dt.error=t)}var vt=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,nt(e)&&e.add(n)):n.destination=Et,n}return q(e,t),e.create=function(t,e,n){return new gt(t,e,n)},e.prototype.next=function(t){this.isStopped?St(function(t){return ft("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?St(ft("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?St(ht,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(tt),gt=function(t){function e(e,n,r){var i,o=t.call(this)||this;if(J(e))i=e;else if(e){var s;i=e.next,n=e.error,r=e.complete,o&&ct?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),n=null==n?void 0:n.bind(s),r=null==r?void 0:r.bind(s)}return o.destination={next:i?wt(i):pt,error:wt(null!=n?n:mt),complete:r?wt(r):pt},o}return q(e,t),e}(vt);function wt(t,e){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{t.apply(void 0,X([],$(e)))}catch(t){at?yt(t):lt(t)}}}function mt(t){throw t}function St(t,e){var n=ot;n&&ut.setTimeout((function(){return n(t,e)}))}var Et={closed:!0,next:pt,error:mt,complete:pt},Tt="function"==typeof Symbol&&Symbol.observable||"@@observable";function _t(t){return t}function At(t){return 0===t.length?_t:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var It=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof vt||function(t){return t&&J(t.next)&&J(t.error)&&J(t.complete)}(r)&&nt(r)?t:new gt(t,e,n);return bt((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=xt(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),null==i||i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[Tt]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return At(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=xt(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function xt(t){var e;return null!==(e=null!=t?t:st)&&void 0!==e?e:Promise}var Ot,kt=Z((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Nt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return q(e,t),e.prototype.lift=function(t){var e=new Ct(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new kt},e.prototype.next=function(t){var e=this;bt((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=K(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;bt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;bt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=e.hasError,r=e.isStopped,i=e.observers;return n||r?et:(i.push(t),new tt((function(){return Q(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new It;return t.source=this,t},e.create=function(t,e){return new Ct(t,e)},e}(It),Ct=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return q(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:et},e}(Nt),Dt={now:function(){return(Dt.delegate||Date).now()},delegate:void 0},Pt=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=Dt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return q(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}},e}(Nt),Rt=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))},Mt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},Lt=function(){function e(){this.sessionManager=P.getInstance(),this.safeHttpCallService=Ht.getInstance(),this.userAuthService=V.getInstance()}return e.prototype.init=function(t,n){var r=this;this.userAuthService.init(t,n).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){r.init(t,n)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),I.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(I.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!I.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(I.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Installed",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Rt(this,void 0,void 0,(function(){var t,e;return Mt(this,(function(n){switch(n.label){case 0:return t=new R("CE Web Launched",{}),e=t,[4,(new U).get()];case 1:return e.deviceProps=n.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Pt(1),e}(),Ht=function(){function t(){this.sessionManager=P.getInstance(),this.httpApiService=H.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;Lt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(Ot||(Ot={}));var Gt=function(){function e(t){this.action=t,this.apiService=Ht.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new Xt).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===Ot.Location&&this.promptLocationPermission(),t===Ot.Push&&this.promptPushNotificationPermission(),t===Ot.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){if(this.action.close){(new $t).removeInApp();var e=I.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:I.getString(t.STORAGE_ACTIVE_TRIGGER_ID,""),"Close Behaviour":"CTA",Duration:((new Date).getTime()-e)/1e3};this.apiService.sendEvent(new R("CE Trigger Closed",n)),I.remove(t.STORAGE_TRIGGER_START_TIME),I.remove(t.STORAGE_ACTIVE_TRIGGER_ID)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.w("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):i.w("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,r=function(){var t,e,n;return function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(r){switch(r.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=r.sent(),[4,this.checkPermission("geolocation")];case 2:return e=r.sent(),n=Notification.permission,[2,{camera:t,location:e,notification:n}]}}))},new((n=void 0)||(n=Promise))((function(i,o){function s(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}));var t,e,n,r},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),jt=function(){function e(e,n){var r,i;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(r=document.documentElement.clientWidth)<(i=document.documentElement.clientHeight)?r/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):i/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),this.parentHTMLEl=e,this.inappElement=n,this.renderer=new x,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new Gt(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var n=this.inappHTMLEl;this.inappElement instanceof T&&(n=n.parentElement);var r="";if((null===(t=(new(k())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(r="-webkit-"),e.glossy)this.renderer.setStyle(n,r+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",n);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(n,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(n,"background",i),this.renderer.setStyle(n,"background-size","cover"),e.img.a&&this.renderer.setStyle(n,r+"backdrop-filter","opacity("+e.img.a+")")}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var n="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(n+=", "+t.c3),t.c4&&(n+=", "+t.c4),t.c5&&(n+=", "+t.c5);var r=n+=")";this.renderer.setStyle(this.inappHTMLEl,e,r)}},e.prototype.processColourBlock=function(t,e,n){void 0===e&&(e="color"),void 0===n&&(n=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(n,e,t.rgba))},e}(),Bt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(t){function e(e,n){return t.call(this,e,n)||this}return Bt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var n,r=[];e.u&&r.push("underline"),e.st&&r.push("line-through"),r.length||r.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",r.join(" ")),this.renderer.setStyle(t,"color",null!==(n=e.c)&&void 0!==n?n:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=d[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(jt),Ft=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Ft(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var n,r,i=e.renderer.createElement("span");i.innerHTML=null===(r=null===(n=t.txt)||void 0===n?void 0:n.toString())||void 0===r?void 0:r.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(Ut),Vt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("div"),r.insertElement(),r}return Vt(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(jt),qt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Kt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappHTMLEl=r.renderer.createElement("img"),r.insertElement(),r}return qt(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(jt),$t=function(){function e(){this.renderer=new x}return e.prototype.render=function(){this.removeInApp();var e=this.renderer.createElement("div");return e.id=t.IN_APP_CONTAINER_NAME,e.classList.add(t.IN_APP_CONTAINER_NAME),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.setStyle(e,"display","flex"),this.renderer.setStyle(e,"justify-content","center"),this.renderer.setStyle(e,"align-items","center"),this.renderer.appendChild(document.body,e),e},e.prototype.removeInApp=function(){var e=document.getElementById(t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),Xt=function(){function e(){this.renderer=new x}return e.prototype.render=function(e){var n=this.renderer.getElementById(t.IN_APP_CONTAINER_NAME),r=this.createIFrameContainer();return this.createIFrameElement(r,e),this.createAnchorElement(n,r),this.renderer.appendChild(n,r),r},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var n=this.renderer.createElement("iframe");return this.renderer.setStyle(n,"width","100%"),this.renderer.setStyle(n,"height","100%"),this.renderer.setAttribute(n,"src",e),this.renderer.setAttribute(n,"frameBorder","0"),this.renderer.appendChild(t,n),n},e.prototype.createAnchorElement=function(t,e){var n=this.renderer.createElement("a");return this.renderer.setStyle(n,"position","absolute"),this.renderer.setStyle(n,"top","0px"),this.renderer.setStyle(n,"right","0px"),n.href="#",n.innerHTML="Close",n.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,n),n},e}(),Jt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.inappElement.w=1080,r.inappElement.h=1920,r}return Jt(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),this},e}(Wt),Yt=function(){function e(){this.rootContainer=(new $t).render()}return e.prototype.render=function(e){e=new A(e),this.ian=e.ian;try{this.renderContainer(),I.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),I.setString(t.STORAGE_ACTIVE_TRIGGER_ID,e.id)}catch(t){i.e(t)}},e.prototype.renderElement=function(t,e){e instanceof S?new zt(t,e).render():e instanceof w?new Kt(t,e).render():e instanceof v?new Wt(t,e).render():i.e("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,n=this,r=null===(t=this.ian)||void 0===t?void 0:t.cont;if(r){var i=new Zt(this.rootContainer,r).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){n.renderElement(i,t)}))}},e}(),Qt=Yt}(),CooeePreview=r.default}();
2
+ !function(){var t={489:function(t){for(var e=Math.floor(16777215*Math.random()),r=u.index=parseInt(16777215*Math.random(),10),n=("undefined"==typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,i=function(t){return!(null==t||!t.constructor||"function"!=typeof t.constructor.isBuffer||!t.constructor.isBuffer(t))},o=[],s=0;s<256;s++)o[s]=(s<=15?"0":"")+s.toString(16);var a=new RegExp("^[0-9a-fA-F]{24}$"),c=[];for(s=0;s<10;)c[48+s]=s++;for(;s<16;)c[55+s]=c[87+s]=s++;function u(t){if(!(this instanceof u))return new u(t);if(t&&(t instanceof u||"ObjectID"===t._bsontype))return t;if(this._bsontype="ObjectID",null!=t&&"number"!=typeof t){var e=u.isValid(t);if(!e&&null!=t)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");if(e&&"string"==typeof t&&24===t.length)return u.createFromHexString(t);if(null==t||12!==t.length){if(null!=t&&"function"==typeof t.toHexString)return t;throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}this.id=t}else this.id=this.generate(t)}t.exports=u,u.default=u,u.createFromTime=function(t){return new u((8,(8===(e=(e=t=parseInt(t,10)%4294967295).toString(16)).length?e:"00000000".substring(e.length,8)+e)+"0000000000000000"));var e},u.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var e="",r=0;r<24;)e+=String.fromCharCode(c[t.charCodeAt(r++)]<<4|c[t.charCodeAt(r++)]);return new u(e)},u.isValid=function(t){return null!=t&&("number"==typeof t||("string"==typeof t?12===t.length||24===t.length&&a.test(t):t instanceof u||!!i(t)||"function"==typeof t.toHexString&&(t.id instanceof _Buffer||"string"==typeof t.id)&&(12===t.id.length||24===t.id.length&&a.test(t.id))))},u.prototype={constructor:u,toHexString:function(){if(!this.id||!this.id.length)throw new Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(i(this.id))return this.id.toString("hex");for(var t="",e=0;e<this.id.length;e++)t+=o[this.id.charCodeAt(e)];return t},equals:function(t){return t instanceof u?this.toString()===t.toString():"string"==typeof t&&u.isValid(t)&&12===t.length&&i(this.id)?t===this.id.toString("binary"):"string"==typeof t&&u.isValid(t)&&24===t.length?t.toLowerCase()===this.toHexString():"string"==typeof t&&u.isValid(t)&&12===t.length?t===this.id:!(null==t||!(t instanceof u||t.toHexString))&&t.toHexString()===this.toHexString()},getTimestamp:function(){var t,e=new Date;return t=i(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,e.setTime(1e3*Math.floor(t)),e},generate:function(t){"number"!=typeof t&&(t=~~(Date.now()/1e3)),t=parseInt(t,10)%4294967295;var i=r=(r+1)%16777215;return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t,e>>16&255,e>>8&255,255&e,n>>8&255,255&n,i>>16&255,i>>8&255,255&i)}};var l=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";u.prototype[l]=function(){return"ObjectID("+this+")"},u.prototype.toJSON=u.prototype.toHexString,u.prototype.toString=u.prototype.toHexString},238:function(t,e,r){var n;!function(i,o){"use strict";var s="function",a="undefined",c="object",u="string",l="model",p="name",h="type",f="vendor",d="version",b="architecture",g="console",v="mobile",y="tablet",w="smarttv",m="wearable",S="embedded",E={extend:function(t,e){var r={};for(var n in t)e[n]&&e[n].length%2==0?r[n]=e[n].concat(t[n]):r[n]=t[n];return r},has:function(t,e){return typeof t===u&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===u?t.replace(/[^\d\.]/g,"").split(".")[0]:o},trim:function(t,e){return t=t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof e===a?t:t.substring(0,255)}},T={rgx:function(t,e){for(var r,n,i,a,u,l,p=0;p<e.length&&!u;){var h=e[p],f=e[p+1];for(r=n=0;r<h.length&&!u;)if(u=h[r++].exec(t))for(i=0;i<f.length;i++)l=u[++n],typeof(a=f[i])===c&&a.length>0?2==a.length?typeof a[1]==s?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3==a.length?typeof a[1]!==s||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):o:this[a[0]]=l?a[1].call(this,l,a[2]):o:4==a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):o):this[a]=l||o;p+=2}},str:function(t,e){for(var r in e)if(typeof e[r]===c&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(E.has(e[r][n],t))return"?"===r?o:r}else if(E.has(e[r],t))return"?"===r?o:r;return t}},_={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{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"}}}},A={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[d,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[d,[p,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[p,d],[/opios[\/\s]+([\w\.]+)/i],[d,[p,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[d,[p,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[p,d],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[d,[p,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[d,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[d,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[d,[p,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[d,[p,"IE"]],[/yabrowser\/([\w\.]+)/i],[d,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure Browser"],d],[/focus\/([\w\.]+)/i],[d,[p,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[d,[p,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[d,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[d,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[d,[p,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[d,[p,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[d,[p,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[p,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 Browser"],d],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],d],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[p,d],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[p],[/;fbav\/([\w\.]+);/i],[d,[p,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[p,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[p,d],[/\bgsa\/([\w\.]+)\s.*safari\//i],[d,[p,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[d,[p,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[p,"Chrome WebView"],d],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[d,[p,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[p,d],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[d,[p,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[d,p],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[p,[d,T.str,_.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[p,d],[/(navigator|netscape)\/([\w\.-]+)/i],[[p,"Netscape"],d],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[d,[p,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[p,d]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[b,"amd64"]],[/(ia32(?=;))/i],[[b,E.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[b,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[b,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[b,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[b,/ower/,"",E.lowerize]],[/(sun4\w)[;\)]/i],[[b,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b,E.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[l,[f,"Samsung"],[h,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[l,[f,"Samsung"],[h,v]],[/\((ip(?:hone|od)[\s\w]*);/i],[l,[f,"Apple"],[h,v]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[f,"Apple"],[h,y]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[l,[f,"Huawei"],[h,y]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[l,[f,"Huawei"],[h,v]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[l,/_/g," "],[f,"Xiaomi"],[h,v]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[l,/_/g," "],[f,"Xiaomi"],[h,y]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[l,[f,"OPPO"],[h,v]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[l,[f,"Vivo"],[h,v]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[l,[f,"Realme"],[h,v]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[l,[f,"Motorola"],[h,v]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[l,[f,"Motorola"],[h,y]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[l,[f,"LG"],[h,y]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[l,[f,"LG"],[h,v]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[l,[f,"Lenovo"],[h,y]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[l,/_/g," "],[f,"Nokia"],[h,v]],[/droid.+;\s(pixel\sc)[\s)]/i],[l,[f,"Google"],[h,y]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[l,[f,"Google"],[h,v]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[f,"Sony"],[h,v]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[l,"Xperia Tablet"],[f,"Sony"],[h,y]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[l,[f,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[l,[f,"Amazon"],[h,y]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[l,"Fire Phone"],[f,"Amazon"],[h,v]],[/\((playbook);[\w\s\),;-]+(rim)/i],[l,f,[h,y]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[l,[f,"BlackBerry"],[h,v]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[l,[f,"ASUS"],[h,y]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[l,[f,"ASUS"],[h,v]],[/(nexus\s9)/i],[l,[f,"HTC"],[h,y]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[f,[l,/_/g," "],[h,v]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[l,[f,"Acer"],[h,y]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[l,[f,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[f,l,[h,v]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[f,l,[h,y]],[/\s(surface\sduo)\s/i],[l,[f,"Microsoft"],[h,y]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[l,[f,"Fairphone"],[h,v]],[/\s(u304aa)\sbuild/i],[l,[f,"AT&T"],[h,v]],[/sie-(\w*)/i],[l,[f,"Siemens"],[h,v]],[/[;\/]\s?(rct\w+)\sbuild/i],[l,[f,"RCA"],[h,y]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[l,[f,"Dell"],[h,y]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[l,[f,"Verizon"],[h,y]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[l,[f,"Barnes & Noble"],[h,y]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[l,[f,"NuVision"],[h,y]],[/;\s(k88)\sbuild/i],[l,[f,"ZTE"],[h,y]],[/;\s(nx\d{3}j)\sbuild/i],[l,[f,"ZTE"],[h,v]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[l,[f,"Swiss"],[h,v]],[/[;\/]\s?(zur\d{3})\sbuild/i],[l,[f,"Swiss"],[h,y]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[l,[f,"Zeki"],[h,y]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[f,"Dragon Touch"],l,[h,y]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[l,[f,"Insignia"],[h,y]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[l,[f,"NextBook"],[h,y]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[f,"Voice"],l,[h,v]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[f,"LvTel"],l,[h,v]],[/;\s(ph-1)\s/i],[l,[f,"Essential"],[h,v]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[l,[f,"Envizen"],[h,y]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[l,[f,"MachSpeed"],[h,y]],[/[;\/]\s?tu_(1491)\sbuild/i],[l,[f,"Rotor"],[h,y]],[/(shield[\w\s]+)\sbuild/i],[l,[f,"Nvidia"],[h,y]],[/(sprint)\s(\w+)/i],[f,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[f,"Microsoft"],[h,v]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[f,"Zebra"],[h,y]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[f,"Zebra"],[h,v]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[f,l,[h,g]],[/droid.+;\s(shield)\sbuild/i],[l,[f,"Nvidia"],[h,g]],[/(playstation\s[345portablevi]+)/i],[l,[f,"Sony"],[h,g]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[l,[f,"Microsoft"],[h,g]],[/smart-tv.+(samsung)/i],[f,[h,w]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[f,"Samsung"],[h,w]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[f,"LG"],[h,w]],[/(apple)\s?tv/i],[f,[l,"Apple TV"],[h,w]],[/crkey/i],[[l,"Chromecast"],[f,"Google"],[h,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[l,[f,"Amazon"],[h,w]],[/\(dtv[\);].+(aquos)/i],[l,[f,"Sharp"],[h,w]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[f,E.trim],[l,E.trim],[h,w]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[h,w]],[/((pebble))app\/[\d\.]+\s/i],[f,l,[h,m]],[/droid.+;\s(glass)\s\d/i],[l,[f,"Google"],[h,m]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[l,[f,"Zebra"],[h,m]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[f,[h,S]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[l,[h,v]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[l,[h,y]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[h,E.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[l,[f,"Generic"]],[/(phone)/i],[[h,v]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[d,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[d,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[p,d],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[d,p]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[p,d],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[p,[d,T.str,_.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[p,"Windows"],[d,T.str,_.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[d,/_/g,"."],[p,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[p,"Mac OS"],[d,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[p,d],[/\(bb(10);/i],[d,[p,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[d,[p,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[p,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[d,[p,"webOS"]],[/crkey\/([\d\.]+)/i],[d,[p,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[p,"Chromium OS"],d],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[p,d],[/(sunos)\s?([\w\.\d]*)/i],[[p,"Solaris"],d],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[p,d]]},I=function(t,e){if("object"==typeof t&&(e=t,t=o),!(this instanceof I))return new I(t,e).getResult();var r=t||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),n=e?E.extend(A,e):A;return this.getBrowser=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.browser),t.major=E.major(t.version),t},this.getCPU=function(){var t={architecture:o};return T.rgx.call(t,r,n.cpu),t},this.getDevice=function(){var t={vendor:o,model:o,type:o};return T.rgx.call(t,r,n.device),t},this.getEngine=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.engine),t},this.getOS=function(){var t={name:o,version:o};return T.rgx.call(t,r,n.os),t},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(t){return r=typeof t===u&&t.length>255?E.trim(t,255):t,this},this.setUA(r),this};I.VERSION="0.7.28",I.BROWSER={NAME:p,MAJOR:"major",VERSION:d},I.CPU={ARCHITECTURE:b},I.DEVICE={MODEL:l,VENDOR:f,TYPE:h,CONSOLE:g,MOBILE:v,SMARTTV:w,TABLET:y,WEARABLE:m,EMBEDDED:S},I.ENGINE={NAME:p,VERSION:d},I.OS={NAME:p,VERSION:d},typeof e!==a?(t.exports&&(e=t.exports=I),e.UAParser=I):(n=function(){return I}.call(e,r,e,t))===o||(t.exports=n);var x=void 0!==i&&(i.jQuery||i.Zepto);if(x&&!x.ua){var O=new I;x.ua=O.getResult(),x.ua.get=function(){return O.getUA()},x.ua.set=function(t){O.setUA(t);var e=O.getResult();for(var r in e)x.ua[r]=e[r]}}}("object"==typeof window?window:this)},306:function(t){"use strict";t.exports={i8:"0.0.7"}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var n={};!function(){"use strict";r.d(n,{default:function(){return re}});var t=function(){function t(){}var e;return t.API_URL="https://api.sdk.letscooee.com",t.SDK_VERSION=r(306).i8,t.SDK_DEBUG=!1,t.SDK="WEB",t.LOG_PREFIX="CooeeSDK",t.CANVAS_WIDTH=1080,t.CANVAS_HEIGHT=1920,t.STORAGE_USER_ID="uid",t.STORAGE_SDK_TOKEN="st",t.STORAGE_DEVICE_UUID="uuid",t.STORAGE_SESSION_ID="sid",t.STORAGE_SESSION_NUMBER="sn",t.STORAGE_SESSION_START_TIME="sst",t.STORAGE_SESSION_START_EVENT_SENT="sses",t.STORAGE_FIRST_TIME_LAUNCH="ifl",t.STORAGE_LAST_ACTIVE="la",t.STORAGE_TRIGGER_START_TIME="tst",t.STORAGE_ACTIVE_TRIGGER="at",t.STORAGE_ACTIVE_TRIGGERS="ats",t.IDLE_TIME_IN_SECONDS=1800,t.IN_APP_CONTAINER_NAME="cooee-wrapper",e=t.SDK_VERSION.split(".").map((function(t){return t.padStart(2,"0")})).join(""),t.SDK_VERSION_CODE=parseInt(e,10),t}(),e=function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},i=function(){function r(){}return r.log=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.log.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.error=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.error.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r.warning=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];console.warn.apply(console,e([t.LOG_PREFIX,":"],r,!1))},r}(),o=function(){function t(t){t.s&&(this.s=new u(t.s)),t.g&&(this.g=new h(t.g)),this.i=t.i}return Object.defineProperty(t.prototype,"solid",{get:function(){return this.s},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glossy",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"img",{get:function(){return this.i},enumerable:!1,configurable:!0}),t}();const s=new RegExp("[^#a-f\\d]","gi"),a=new RegExp("^#?[a-f\\d]{3}[a-f\\d]?$|^#?[a-f\\d]{6}([a-f\\d]{2})?$","i");var c,u=function(){function t(t){this.a=100,this.h=t.h,this.a=t.a,this.g=t.g}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.h},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grad",{get:function(){return this.g},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){if(!this.hex)return"";try{return function(t,e={}){if("string"!=typeof t||s.test(t)||!a.test(t))throw new TypeError("Expected a valid hex string");let r=1;8===(t=t.replace(/^#/,"")).length&&(r=Number.parseInt(t.slice(6,8),16)/255,t=t.slice(0,6)),4===t.length&&(r=Number.parseInt(t.slice(3,4).repeat(2),16)/255,t=t.slice(0,3)),3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);const n=Number.parseInt(t,16),i=n>>16,o=n>>8&255,c=255&n,u="number"==typeof e.alpha?e.alpha:r;return"array"===e.format?[i,o,c,u]:"css"===e.format?`rgb(${i} ${o} ${c}${1===u?"":` / ${Number((100*u).toFixed(2))}%`})`:{red:i,green:o,blue:c,alpha:u}}(this.hex,{format:"css",alpha:this.getAlpha()})}catch(t){return console.error("Invalid hex",t),"#000000"}},enumerable:!1,configurable:!0}),t.prototype.getAlpha=function(){var t;return(null!==(t=this.a)&&void 0!==t?t:100)/100},t}(),l=function(){function t(t){this.s=t.s,this.r=t.r,this.w=t.w,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.w},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){var t;return c[null!==(t=this.s)&&void 0!==t?t:c.SOLID]},enumerable:!1,configurable:!0}),t}();!function(t){t[t.SOLID=1]="SOLID",t[t.DASHED=2]="DASHED"}(c||(c={}));var p,h=function(){function t(t){this.r=t.r,t.c&&(this.c=new u(t.c))}return Object.defineProperty(t.prototype,"radius",{get:function(){return this.r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),t}(),f=(Object.defineProperty(function(){}.prototype,"rotate",{get:function(){return this.rot},enumerable:!1,configurable:!0}),function(){function t(t){this.t=t.t,t.bg&&(this.bg=new o(t.bg)),t.br&&(this.br=new l(t.br)),this.clc=t.clc,this.shd=t.shd,this.spc=t.spc,this.trf=t.trf,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y}return Object.defineProperty(t.prototype,"type",{get:function(){return this.t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeAsString",{get:function(){return p[this.t]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"click",{get:function(){return this.clc},enumerable:!1,configurable:!0}),t}());!function(t){t[t.IMAGE=1]="IMAGE",t[t.TEXT=2]="TEXT",t[t.BUTTON=3]="BUTTON",t[t.SHAPE=100]="SHAPE"}(p||(p={}));var d,b,g=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v=function(t){function e(e){return t.call(this,e)||this}return g(e,t),e}(f),y=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),w=function(t){function e(e){var r=t.call(this,e)||this;return r.src=e.src,r}return y(e,t),e}(f),m=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S=function(t){function e(e){var r=t.call(this,e)||this;return r.alg=d.START,r.prs=e.prs,r.alg=e.alg,e.f&&(r.f=e.f),e.c&&(r.c=new u(e.c)),r}return m(e,t),Object.defineProperty(e.prototype,"parts",{get:function(){return this.prs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){return this.c},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.f},enumerable:!1,configurable:!0}),e}(f);!function(t){t[t.START=0]="START",t[t.CENTER=1]="CENTER",t[t.END=2]="END",t[t.JUSTIFY=3]="JUSTIFY"}(d||(d={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.SUPER=1]="SUPER",t[t.SUB=2]="SUB"}(b||(b={}));var E,T=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),_=function(t){function e(e){var r,n=t.call(this,e)||this;return n.o=null!==(r=e.o)&&void 0!==r?r:E.C,n}return T(e,t),e.prototype.getStyles=function(){var t;return(t=this.o===E.NW?{top:0,left:0}:this.o===E.N?{top:0,left:"50%",transform:"translateX(-50%)"}:this.o===E.NE?{top:0,right:0}:this.o===E.E?{top:"50%",left:0,transform:"translateY(-50%)"}:this.o===E.SE?{bottom:0,right:0}:this.o===E.S?{bottom:0,left:"50%",transform:"translateX(-50%)"}:this.o===E.SW?{bottom:0,left:0}:this.o===E.W?{top:"50%",left:0,transform:"translateY(-50%)"}:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"}).position="absolute",t},e}(f);!function(t){t[t.NW=1]="NW",t[t.N=2]="N",t[t.NE=3]="NE",t[t.W=4]="W",t[t.C=5]="C",t[t.E=6]="E",t[t.SW=7]="SW",t[t.S=8]="S",t[t.SE=9]="SE"}(E||(E={}));var A=function(t){var e=this;this.elems=[],this.cont=new _(t.cont),t.elems.forEach((function(t){t.t===p.IMAGE?e.elems.push(new w(t)):t.t===p.TEXT||t.t===p.BUTTON?e.elems.push(new S(t)):t.t===p.SHAPE&&e.elems.push(new v(t))}))},I=function(t){this.expireAt=(new Date).getTime(),this.id=t.id,this.expireAt=t.expireAt,this.version=t.version,this.engagementID=t.engagementID,this.internal=t.internal,this.pn=t.pn,this.ian=new A(t.ian)},x=function(){function t(){}return t.getString=function(e,r){return t.LOCAL_STORAGE.getItem(e)||r},t.setString=function(e,r){r||(r=""),t.LOCAL_STORAGE.setItem(e,r)},t.getNumber=function(e,r){return+t.getString(e,"")||r},t.setNumber=function(e,r){t.setString(e,r.toString())},t.getBoolean=function(t,e){var r=this.LOCAL_STORAGE.getItem(t);return r?JSON.parse(r):e},t.setBoolean=function(e,r){t.setString(e,JSON.stringify(r))},t.getObject=function(e){try{return JSON.parse(t.getString(e,""))}catch(t){return null}},t.setObject=function(e,r){t.setString(e,JSON.stringify(r))},t.remove=function(e){t.LOCAL_STORAGE.removeItem(e)},t.LOCAL_STORAGE=window.localStorage,t}(),O=function(){function t(){this.doc=document}return t.prototype.getWidth=function(){return document.documentElement.clientWidth},t.prototype.getHeight=function(){return document.documentElement.clientHeight},t.prototype.createElement=function(t){return this.doc.createElement(t)},t.prototype.appendChild=function(t,e){t.appendChild(e)},t.prototype.setStyle=function(t,e,r){e&&(r?t.style.setProperty(e,r):t.style.removeProperty(e))},t.prototype.setAttribute=function(t,e,r){t.setAttribute(e,r)},t.prototype.getElementById=function(t){return this.doc.getElementById(t)},t}(),N=r(238),k=r.n(N),C=r(489),D=r.n(C),R=function(){function e(){this.inInactive=!0,this.lastEnterActive=new Date,this.lastEnterInactive=null,this.isDebug=!1}return e.getInstance=function(){return this.INSTANCE},e.prototype.getWebAppVersion=function(){var t;return null!==(t=this.webAppVersion)&&void 0!==t?t:"0.0.1+1"},e.prototype.setWebAppVersion=function(t){this.webAppVersion=t},e.prototype.isDebugWebApp=function(){return this.isDebug},e.prototype.setDebugWebApp=function(t){this.isDebug=t},e.prototype.isInactive=function(){return this.inInactive},e.prototype.setInactive=function(){this.inInactive=!0,this.lastEnterInactive=new Date,x.setNumber(t.STORAGE_LAST_ACTIVE,this.lastEnterInactive.getTime())},e.prototype.setActive=function(){this.inInactive=!1,this.lastEnterActive=new Date},e.prototype.isFirstActive=function(){return null==this.lastEnterInactive},e.prototype.getLastEnterInactive=function(){return this.lastEnterInactive},e.prototype.getTimeForActiveInSeconds=function(){var t,e;return((null===(t=this.lastEnterInactive)||void 0===t?void 0:t.getTime())-(null===(e=this.lastEnterActive)||void 0===e?void 0:e.getTime()))/1e3},e.prototype.getTimeForInactiveInSeconds=function(){return null==this.lastEnterInactive?0:((new Date).getTime()-this.lastEnterInactive.getTime())/1e3},e.INSTANCE=new e,e}(),P=function(){function e(){}return e.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new e),this.INSTANCE},e.prototype.getCurrentSessionID=function(){return this.currentSessionID||null},e.prototype.isNewSessionRequired=function(){if(!x.getString(t.STORAGE_SESSION_ID,""))return!0;var e=x.getNumber(t.STORAGE_SESSION_START_TIME,0);return((new Date).getTime()-e)/1e3>t.IDLE_TIME_IN_SECONDS},e.prototype.checkForNewSession=function(){this.isNewSessionRequired()?this.startNewSession():this.initializeSessionFromStorage()},e.prototype.startNewSession=function(){this.currentSessionID||(x.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1),this.currentSessionStartTime=new Date,this.currentSessionID=(new(D())).toHexString(),x.setNumber(t.STORAGE_SESSION_START_TIME,this.currentSessionStartTime.getTime()),x.setString(t.STORAGE_SESSION_ID,this.currentSessionID),this.bumpSessionNumber())},e.prototype.bumpSessionNumber=function(){this.currentSessionNumber=x.getNumber(t.STORAGE_SESSION_NUMBER,0),this.currentSessionNumber+=1,x.setNumber(t.STORAGE_SESSION_NUMBER,this.currentSessionNumber)},e.prototype.getCurrentSessionNumber=function(){return this.currentSessionNumber||0},e.prototype.getTotalDurationInSeconds=function(){if(R.getInstance().isFirstActive())throw new Error("This is the first time in foreground after launch");return(this.getLastActive()-this.currentSessionStartTime.getTime())/1e3},e.prototype.conclude=function(){var e={sessionID:this.currentSessionID,occurred:new Date,duration:this.getTotalDurationInSeconds()};Bt.getInstance().concludeSession(e),x.remove(t.STORAGE_ACTIVE_TRIGGER),this.destroySession()},e.prototype.destroySession=function(){this.currentSessionID=void 0,this.currentSessionNumber=void 0,this.currentSessionStartTime=void 0,x.remove(t.STORAGE_SESSION_ID),x.remove(t.STORAGE_SESSION_START_TIME)},e.prototype.initializeSessionFromStorage=function(){this.currentSessionStartTime=new Date(x.getNumber(t.STORAGE_SESSION_START_TIME,0)),this.currentSessionID=x.getString(t.STORAGE_SESSION_ID,""),this.currentSessionNumber=x.getNumber(t.STORAGE_SESSION_NUMBER,0)},e.prototype.getLastActive=function(){return x.getNumber(t.STORAGE_LAST_ACTIVE,0)},e}(),M=function(t,e){void 0===e&&(e={}),this.name=t,this.properties=e,this.sessionID=null,this.screenName=null,this.deviceProps=null,this.sessionNumber=0,this.activeTriggers=[],this.occurred=(new Date).toISOString()},L=function(){function t(t){this.triggerID=t.id,this.engagementID=t.engagementID,this.expireAt=t.expireAt,this.isExpired&&(this.expired=this.isExpired)}return Object.defineProperty(t.prototype,"isExpired",{get:function(){return this.expireAt<(new Date).getTime()},enumerable:!1,configurable:!0}),t}(),G=function(){function e(){}return e.storeActiveTrigger=function(e){var r=x.getObject(t.STORAGE_ACTIVE_TRIGGERS);r||(r=[]);var n=new L(e);n.isExpired||r.push(n),x.setObject(t.STORAGE_ACTIVE_TRIGGER,n),x.setObject(t.STORAGE_ACTIVE_TRIGGERS,r)},e.getActiveTriggers=function(){var e=x.getObject(t.STORAGE_ACTIVE_TRIGGERS);return e?(e.forEach((function(t,e,r){new L(t).isExpired&&r.splice(e,1)})),x.setObject(t.STORAGE_ACTIVE_TRIGGERS,e),e):[]},e}(),H=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},j=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},B=function(){function e(){this.runtimeData=R.getInstance(),this.apiToken="",this.userID=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.doHTTP=function(e,r,n,i){return H(this,void 0,void 0,(function(){var o,s;return j(this,(function(a){switch(a.label){case 0:return r.startsWith("http")||(r=t.API_URL+r),!("keepalive"in new Request(""))&&JSON.stringify(n).includes("CE App Background")?((o=new XMLHttpRequest).open("POST",r,!1),i.forEach((function(t,e){o.setRequestHeader(e,t)})),o.send(JSON.stringify(n)),[2,o.response.json()]):[4,fetch(r,{method:e,body:JSON.stringify(n),headers:i,keepalive:!0})];case 1:if(!(s=a.sent()).ok)throw s;return[2,s.json()]}}))}))},e.prototype.registerDevice=function(t){return H(this,void 0,void 0,(function(){return j(this,(function(e){return[2,this.doHTTP("POST","/v1/device/validate",t,this.getDefaultHeaders())]}))}))},e.prototype.sendEvent=function(e){var r=this.getDefaultHeaders();r.append("x-sdk-token",this.apiToken),e.activeTriggers=G.getActiveTriggers();var n=x.getObject(t.STORAGE_ACTIVE_TRIGGER);n&&(e.trigger=n),this.doHTTP("POST","/v1/event/track",e,r).then((function(t){i.log("Sent",e.name),t.triggerData&&(new ee).render(t.triggerData)})).catch((function(t){i.error("Error sending event",t)}))},e.prototype.updateUserData=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("PUT","/v1/user/update",t,e).then((function(){i.log("Updated user profile")})).catch((function(t){i.error("Error saving user profile",t)}))},e.prototype.concludeSession=function(t){var e=this.getDefaultHeaders();e.append("x-sdk-token",this.apiToken),this.doHTTP("POST","/v1/session/conclude",t,e).then((function(t){i.log("Conclude Session",t)})).catch((function(t){i.error(t)}))},e.prototype.getDefaultHeaders=function(){var e=new Headers;return e.set("sdk-version",t.SDK_VERSION),e.set("sdk-version-code",t.SDK_VERSION_CODE.toString()),e.set("app-version",this.runtimeData.getWebAppVersion()),e.set("user-id",this.userID),t.SDK_DEBUG&&e.set("sdk-debug",String(1)),this.runtimeData.isDebugWebApp()&&e.set("app-debug",String(1)),e},e.prototype.setAPIToken=function(t){this.apiToken=null!=t?t:""},e.prototype.setUserId=function(t){this.userID=null!=t?t:""},e.INSTANCE=new e,e}(),U=function(e,r,n,i){this.appID=e,this.appSecret=r,this.uuid=n,this.props=i,this.sdk=t.SDK},F=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},V=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},z=function(){function t(){this.parser=new(k()),this.result={}}return t.prototype.get=function(){return F(this,void 0,void 0,(function(){var t;return V(this,(function(e){switch(e.label){case 0:return t=this.result,this.getDeviceMemory(),this.getNetworkType(),this.getOrientation(),[4,this.getBatteryInfo()];case 1:return e.sent(),[4,this.getLocation()];case 2:return e.sent(),t.locale=navigator.language,t.display={w:screen.width,h:screen.height,pd:screen.pixelDepth,dpi:this.getDPI()},t.win={ow:window.outerWidth,oh:window.outerHeight,iw:window.innerWidth,ih:window.innerHeight,dpr:window.devicePixelRatio},t.browser={name:this.parser.getBrowser().name,ver:this.parser.getBrowser().version},t.device={model:this.parser.getDevice().model,type:this.parser.getDevice().type,vendor:this.parser.getDevice().vendor},t.os={name:this.parser.getOS().name,ver:this.parser.getOS().version},[2,t]}}))}))},t.prototype.getDeviceMemory=function(){var t=navigator;if(t.deviceMemory){var e=t.deviceMemory;this.result.mem={tot:1024*e}}},t.prototype.getNetworkType=function(){var t=navigator,e=t.connection||t.mozConnection||t.webkitConnection;(null==e?void 0:e.effectiveType)&&(this.result.net={type:e.effectiveType})},t.prototype.getOrientation=function(){var t,e=null===(t=screen.orientation)||void 0===t?void 0:t.type;e&&(this.result.orientation=e)},t.prototype.getDPI=function(){var t=document.createElement("div");t.setAttribute("style","height: 1in; left: -100%; position: absolute; top: -100%; width: 1in;"),document.body.appendChild(t);var e=window.devicePixelRatio||1,r=t.offsetWidth*e;return document.body.removeChild(t),r},t.prototype.getLocation=function(){return F(this,void 0,void 0,(function(){var t=this;return V(this,(function(e){switch(e.label){case 0:return navigator.geolocation&&navigator.permissions?[4,navigator.permissions.query({name:"geolocation"})]:[2];case 1:return"granted"!=e.sent().state?[2]:[2,new Promise((function(e){navigator.geolocation.getCurrentPosition((function(r){t.result.coords=[r.coords.latitude,r.coords.longitude],e()}),(function(){return e()}))}))]}}))}))},t.prototype.getBatteryInfo=function(){return F(this,void 0,void 0,(function(){var t;return V(this,(function(e){switch(e.label){case 0:if(!("getBattery"in navigator))return[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.getBattery()];case 2:return t=e.sent(),this.result.bat={l:100*t.level,c:t.charging},[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}}))}))},t}(),W=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},q=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},K=function(){function e(){this.apiService=B.getInstance(),this.sdkToken="",this.userID="",this.appID="",this.appSecret=""}return e.getInstance=function(){return this.INSTANCE},e.prototype.init=function(t,e){return this.appID=t,this.appSecret=e,this.acquireSDKToken()},e.prototype.hasToken=function(){return!!x.getString(t.STORAGE_SDK_TOKEN,"")},e.prototype.getUserID=function(){return this.userID},e.prototype.populateUserDataFromStorage=function(){return W(this,void 0,void 0,(function(){return q(this,(function(e){return this.sdkToken=x.getString(t.STORAGE_SDK_TOKEN,""),this.sdkToken||i.log("No SDK token found in local storage"),this.userID=x.getString(t.STORAGE_USER_ID,""),this.userID||i.log("No user ID found in local storage"),this.updateAPIClient(),[2]}))}))},e.prototype.updateAPIClient=function(){i.log("SDK Token:",this.sdkToken),i.log("User ID:",this.userID),this.apiService.setAPIToken(this.sdkToken),this.apiService.setUserId(this.userID)},e.prototype.acquireSDKToken=function(){return W(this,void 0,void 0,(function(){return q(this,(function(t){return this.hasToken()?[2,this.populateUserDataFromStorage()]:(i.log("Attempt to acquire SDK token"),[2,this.getSDKTokenFromServer()])}))}))},e.prototype.getSDKTokenFromServer=function(){return W(this,void 0,void 0,(function(){var t,e,r,n;return q(this,(function(o){switch(o.label){case 0:return[4,this.getUserAuthRequest()];case 1:t=o.sent(),e=this.apiService.registerDevice(t),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,e];case 3:return r=o.sent(),i.log("Register Device Response",r),this.saveUserDataInStorage(r),[3,5];case 4:throw n=o.sent(),i.error(n),n;case 5:return[2]}}))}))},e.prototype.saveUserDataInStorage=function(e){this.sdkToken=e.sdkToken,this.userID=e.id,this.updateAPIClient(),x.setString(t.STORAGE_SDK_TOKEN,this.sdkToken),x.setString(t.STORAGE_USER_ID,this.userID)},e.prototype.getUserAuthRequest=function(){return W(this,void 0,void 0,(function(){var t;return q(this,(function(e){switch(e.label){case 0:return[4,(new z).get()];case 1:return t=e.sent(),[2,new U(this.appID,this.appSecret,this.getOrCreateUUID(),t)]}}))}))},e.prototype.getOrCreateUUID=function(){var e=x.getString(t.STORAGE_DEVICE_UUID,"");return e||(e=(new(D())).toHexString(),x.setString(t.STORAGE_DEVICE_UUID,e)),e},e.INSTANCE=new e,e}(),X=function(t,e){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function $(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function J(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)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 Y(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function Z(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t}function Q(t){return"function"==typeof t}function tt(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}Object.create,Object.create;var et=tt((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function rt(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var nt=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._teardowns=null}var e;return t.prototype.unsubscribe=function(){var t,e,r,n,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=J(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(Q(c))try{c()}catch(t){i=t instanceof et?t.errors:[t]}var u=this._teardowns;if(u){this._teardowns=null;try{for(var l=J(u),p=l.next();!p.done;p=l.next()){var h=p.value;try{st(h)}catch(t){i=null!=i?i:[],t instanceof et?i=Z(Z([],Y(i)),Y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{p&&!p.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new et(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)st(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=null!==(r=this._teardowns)&&void 0!==r?r:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&rt(e,t)},t.prototype.remove=function(e){var r=this._teardowns;r&&rt(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),it=nt.EMPTY;function ot(t){return t instanceof nt||t&&"closed"in t&&Q(t.remove)&&Q(t.add)&&Q(t.unsubscribe)}function st(t){Q(t)?t():t.unsubscribe()}var at=null,ct=null,ut=void 0,lt=!1,pt=!1,ht={setTimeout:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ht.delegate;return((null==r?void 0:r.setTimeout)||setTimeout).apply(void 0,Z([],Y(t)))},clearTimeout:function(t){var e=ht.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ft(t){ht.setTimeout((function(){if(!at)throw t;at(t)}))}function dt(){}var bt=gt("C",void 0,void 0);function gt(t,e,r){return{kind:t,value:e,error:r}}var vt=null;function yt(t){if(lt){var e=!vt;if(e&&(vt={errorThrown:!1,error:null}),t(),e){var r=vt,n=r.errorThrown,i=r.error;if(vt=null,n)throw i}}else t()}function wt(t){lt&&vt&&(vt.errorThrown=!0,vt.error=t)}var mt=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,ot(e)&&e.add(r)):r.destination=At,r}return $(e,t),e.create=function(t,e,r){return new St(t,e,r)},e.prototype.next=function(t){this.isStopped?_t(function(t){return gt("N",t,void 0)}(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?_t(gt("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?_t(bt,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(nt),St=function(t){function e(e,r,n){var i,o=t.call(this)||this;if(Q(e))i=e;else if(e){var s;i=e.next,r=e.error,n=e.complete,o&&pt?(s=Object.create(e)).unsubscribe=function(){return o.unsubscribe()}:s=e,i=null==i?void 0:i.bind(s),r=null==r?void 0:r.bind(s),n=null==n?void 0:n.bind(s)}return o.destination={next:i?Et(i):dt,error:Et(null!=r?r:Tt),complete:n?Et(n):dt},o}return $(e,t),e}(mt);function Et(t,e){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{t.apply(void 0,Z([],Y(e)))}catch(t){lt?wt(t):ft(t)}}}function Tt(t){throw t}function _t(t,e){var r=ct;r&&ht.setTimeout((function(){return r(t,e)}))}var At={closed:!0,next:dt,error:Tt,complete:dt},It="function"==typeof Symbol&&Symbol.observable||"@@observable";function xt(t){return t}function Ot(t){return 0===t.length?xt:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Nt=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n,i=this,o=(n=t)&&n instanceof mt||function(t){return t&&Q(t.next)&&Q(t.error)&&Q(t.complete)}(n)&&ot(n)?t:new St(t,e,r);return yt((function(){var t=i,e=t.operator,r=t.source;o.add(e?e.call(o,r):r?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=kt(e))((function(e,n){var i;i=r.subscribe((function(e){try{t(e)}catch(t){n(t),null==i||i.unsubscribe()}}),n,e)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[It]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ot(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=kt(t))((function(t,r){var n;e.subscribe((function(t){return n=t}),(function(t){return r(t)}),(function(){return t(n)}))}))},t.create=function(e){return new t(e)},t}();function kt(t){var e;return null!==(e=null!=t?t:ut)&&void 0!==e?e:Promise}var Ct,Dt=tt((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Rt=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return $(e,t),e.prototype.lift=function(t){var e=new Pt(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new Dt},e.prototype.next=function(t){var e=this;yt((function(){var r,n;if(e._throwIfClosed(),!e.isStopped){var i=e.observers.slice();try{for(var o=J(i),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){r={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}}))},e.prototype.error=function(t){var e=this;yt((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}}))},e.prototype.complete=function(){var t=this;yt((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=e.hasError,n=e.isStopped,i=e.observers;return r||n?it:(i.push(t),new nt((function(){return rt(i,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,r=e.hasError,n=e.thrownError,i=e.isStopped;r?t.error(n):i&&t.complete()},e.prototype.asObservable=function(){var t=new Nt;return t.source=this,t},e.create=function(t,e){return new Pt(t,e)},e}(Nt),Pt=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return $(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:it},e}(Rt),Mt={now:function(){return(Mt.delegate||Date).now()},delegate:void 0},Lt=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=Mt);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return $(e,t),e.prototype.next=function(e){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,r=t._timestampProvider,n=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,c=1;c<n.length&&n[c]<=s;c+=2)a=c;a&&n.splice(0,a+1)}},e}(Rt),Gt=function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}))},Ht=function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},jt=function(){function e(){this.sessionManager=P.getInstance(),this.safeHttpCallService=Bt.getInstance(),this.userAuthService=K.getInstance()}return e.prototype.init=function(t,r){var n=this;this.userAuthService.init(t,r).then((function(){e.replaySubject.next(!0),e.replaySubject.complete()})).catch((function(){setTimeout((function(){n.init(t,r)}),3e4)})),this.execute()},e.prototype.execute=function(){this.sessionManager.checkForNewSession(),x.getBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!1)||(x.setBoolean(t.STORAGE_SESSION_START_EVENT_SENT,!0),this.isAppFirstTimeLaunch()?this.sendFirstLaunchEvent():this.sendSuccessiveLaunchEvent())},e.prototype.isAppFirstTimeLaunch=function(){return!!x.getBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!0)&&(x.setBoolean(t.STORAGE_FIRST_TIME_LAUNCH,!1),!0)},e.prototype.sendFirstLaunchEvent=function(){return Gt(this,void 0,void 0,(function(){var t,e;return Ht(this,(function(r){switch(r.label){case 0:return t=new M("CE App Installed",{}),e=t,[4,(new z).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.prototype.sendSuccessiveLaunchEvent=function(){return Gt(this,void 0,void 0,(function(){var t,e;return Ht(this,(function(r){switch(r.label){case 0:return t=new M("CE App Launched",{}),e=t,[4,(new z).get()];case 1:return e.deviceProps=r.sent(),this.safeHttpCallService.sendEvent(t),[2]}}))}))},e.replaySubject=new Lt(1),e}(),Bt=function(){function t(){this.sessionManager=P.getInstance(),this.httpApiService=B.getInstance()}return t.getInstance=function(){return this.INSTANCE||(this.INSTANCE=new t),this.INSTANCE},t.prototype.sendEvent=function(t){var e=this;jt.replaySubject.subscribe((function(){e.addEventVariable(t),e.httpApiService.sendEvent(t)}))},t.prototype.updateProfile=function(t){var e=this;jt.replaySubject.subscribe((function(){e.httpApiService.updateUserData(t)}))},t.prototype.concludeSession=function(t){var e=this;jt.replaySubject.subscribe((function(){e.httpApiService.concludeSession(t)}))},t.prototype.addEventVariable=function(t){t.screenName=location.pathname,t.properties.path=location.pathname,t.sessionID=this.sessionManager.getCurrentSessionID(),t.sessionNumber=this.sessionManager.getCurrentSessionNumber()},t}();!function(t){t.Location="LOCATION",t.Push="PUSH",t.Camera="CAMERA"}(Ct||(Ct={}));var Ut=function(){function e(t){this.action=t,this.apiService=Bt.getInstance()}return e.prototype.execute=function(){this.externalAction(),this.iabAction(),this.upAction(),this.kvAction(),this.prompt(),this.closeAction(),this.shareAction()},e.prototype.externalAction=function(){var t;this.action.ext&&(null===(t=window.open(this.action.ext.u,"_blank"))||void 0===t||t.focus())},e.prototype.iabAction=function(){this.action.iab&&(new Zt).render(this.action.iab.u)},e.prototype.upAction=function(){this.action.up&&this.apiService.updateProfile(this.action.up)},e.prototype.kvAction=function(){this.action.kv&&document.dispatchEvent(new CustomEvent("onCooeeCTA",{detail:this.action.kv}))},e.prototype.prompt=function(){var t=this.action.prompt;t&&(t===Ct.Location&&this.promptLocationPermission(),t===Ct.Push&&this.promptPushNotificationPermission(),t===Ct.Camera&&this.promptCameraPermission())},e.prototype.closeAction=function(){var e;if(this.action.close){(new Yt).removeInApp();var r=x.getNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),n={triggerID:null===(e=x.getObject(t.STORAGE_ACTIVE_TRIGGER))||void 0===e?void 0:e.triggerID,"Close Behaviour":"CTA",Duration:((new Date).getTime()-r)/1e3};this.apiService.sendEvent(new M("CE Trigger Closed",n)),x.remove(t.STORAGE_TRIGGER_START_TIME)}},e.prototype.shareAction=function(){this.action.share&&(navigator.share?navigator.share({text:this.action.share.text,title:"Share"}).then((function(t){return console.log(t)})).catch((function(t){return console.error(t)})):i.warning("Navigator.share is not compatible with this browser"))},e.prototype.promptLocationPermission=function(){var t=this;navigator.geolocation&&navigator.permissions&&navigator.geolocation.getCurrentPosition((function(e){t.apiService.updateProfile({coords:[e.coords.latitude,e.coords.longitude]}),t.sendPermissionData()}))},e.prototype.promptPushNotificationPermission=function(){var t=this;"Notification"in window?"default"===Notification.permission?Notification.requestPermission().then((function(){t.sendPermissionData()})):this.apiService.updateProfile({pnPerm:Notification.permission}):i.warning("This browser does not support desktop notification")},e.prototype.promptCameraPermission=function(){var t=this;navigator.mediaDevices&&navigator.mediaDevices.getUserMedia({video:!0}).finally((function(){t.sendPermissionData()}))},e.prototype.checkPermission=function(t){return navigator.permissions.query({name:t}).then((function(t){return t.state.toString()}))},e.prototype.checkAllPermission=function(){return t=this,e=void 0,n=function(){var t,e,r;return function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(n){switch(n.label){case 0:return[4,this.checkPermission("camera")];case 1:return t=n.sent(),[4,this.checkPermission("geolocation")];case 2:return e=n.sent(),r=Notification.permission,[2,{camera:t,location:e,notification:r}]}}))},new((r=void 0)||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n},e.prototype.sendPermissionData=function(){var t=this;this.checkAllPermission().then((function(e){t.apiService.updateProfile({perm:e})}))},e}(),Ft=function(){function e(e,r){var n,i,o;this.screenWidth=0,this.screenHeight=0,this.scalingFactor=(i=document.documentElement.clientWidth,o=document.documentElement.clientHeight,n=i<o?i/Math.min(t.CANVAS_WIDTH,t.CANVAS_HEIGHT):o/Math.max(t.CANVAS_WIDTH,t.CANVAS_HEIGHT),Math.min(n,1)),this.parentHTMLEl=e,this.inappElement=r,this.renderer=new O,this.screenWidth=this.renderer.getWidth(),this.screenHeight=this.renderer.getHeight()}return e.prototype.getHTMLElement=function(){return this.inappHTMLEl},e.prototype.insertElement=function(){this.renderer.appendChild(this.parentHTMLEl,this.inappHTMLEl)},e.prototype.processCommonBlocks=function(){this.processWidthAndHeight(),this.processPositionBlock(),this.processBorderBlock(),this.processBackgroundBlock(),this.processSpaceBlock(),this.processTransformBlock(),this.registerAction(),this.renderer.setStyle(this.inappHTMLEl,"overflow","visible"),this.renderer.setStyle(this.inappHTMLEl,"outline","none")},e.prototype.processWidthAndHeight=function(){this.renderer.setStyle(this.inappHTMLEl,"box-sizing","border-box"),this.inappElement.w&&this.renderer.setStyle(this.inappHTMLEl,"width",this.getSizePx(this.inappElement.w)),this.inappElement.h&&this.renderer.setStyle(this.inappHTMLEl,"height",this.getSizePx(this.inappElement.h))},e.prototype.getSizePx=function(t){return t*this.scalingFactor+"px"},e.prototype.processPositionBlock=function(){this.inappElement.x&&(this.renderer.setStyle(this.inappHTMLEl,"position","absolute"),this.inappElement.x&&this.renderer.setStyle(this.inappHTMLEl,"top",this.getSizePx(this.inappElement.y)),this.inappElement.y&&this.renderer.setStyle(this.inappHTMLEl,"left",this.getSizePx(this.inappElement.x)))},e.prototype.processBorderBlock=function(){var t,e=this.inappElement.br;e&&(e.radius&&e.radius>0&&this.renderer.setStyle(this.inappHTMLEl,"border-radius",this.getSizePx(e.radius)),e.width&&e.width>0&&(this.renderer.setStyle(this.inappHTMLEl,"border-width",this.getSizePx(e.width)),this.renderer.setStyle(this.inappHTMLEl,"border-style",null===(t=e.style)||void 0===t?void 0:t.toLowerCase()),e.color?this.processColourBlock(e.color,"border-color"):this.renderer.setStyle(this.inappHTMLEl,"border-color","black")))},e.prototype.processSpaceBlock=function(){var t=this.inappElement.spc;t&&(t.p&&this.renderer.setStyle(this.inappHTMLEl,"padding",this.getSizePx(t.p)),t.pt&&this.renderer.setStyle(this.inappHTMLEl,"padding-top",this.getSizePx(t.pt)),t.pb&&this.renderer.setStyle(this.inappHTMLEl,"padding-bottom",this.getSizePx(t.pb)),t.pl&&this.renderer.setStyle(this.inappHTMLEl,"padding-left",this.getSizePx(t.pl)),t.pr&&this.renderer.setStyle(this.inappHTMLEl,"padding-right",this.getSizePx(t.pr)),this.renderer.setStyle(this.inappHTMLEl,"margin","0 !important"))},e.prototype.processTransformBlock=function(){var t=this.inappElement.trf;t&&t.rotate&&this.renderer.setStyle(this.inappHTMLEl,"transform","rotate("+t.rotate+"deg)")},e.prototype.registerAction=function(){var t=this.inappElement.clc;t&&this.inappHTMLEl.addEventListener("click",(function(){new Ut(t).execute()}))},e.prototype.processBackgroundBlock=function(){var t,e=this.inappElement.bg;if(e){var r=this.inappHTMLEl;this.inappElement instanceof _&&(r=r.parentElement);var n="";if((null===(t=(new(k())).getBrowser().name)||void 0===t?void 0:t.toLowerCase().includes("safari"))&&(n="-webkit-"),e.glossy)this.renderer.setStyle(r,n+"backdrop-filter","blur("+e.glossy.radius+"px)"),e.glossy.color&&this.processColourBlock(e.glossy.color,"background",r);else if(e.solid)e.solid.grad?this.processGradient(e.solid.grad,"background"):e.solid.hex&&this.renderer.setStyle(r,"background",e.solid.rgba);else if(e.img){if(!e.img.src)return;var i='url("'+e.img.src+'") no-repeat center';this.renderer.setStyle(r,"background",i),this.renderer.setStyle(r,"background-size","cover"),e.img.a&&this.renderer.setStyle(r,n+"backdrop-filter","opacity("+e.img.a+")")}}},e.prototype.processGradient=function(t,e){if("LINEAR"===t.type){var r="linear-gradient("+t.ang+"deg, "+t.c1+", "+t.c2;t.c3&&(r+=", "+t.c3),t.c4&&(r+=", "+t.c4),t.c5&&(r+=", "+t.c5);var n=r+=")";this.renderer.setStyle(this.inappHTMLEl,e,n)}},e.prototype.processColourBlock=function(t,e,r){void 0===e&&(e="color"),void 0===r&&(r=this.inappHTMLEl),t&&(t.grad?this.processGradient(t.grad,e):t.hex&&this.renderer.setStyle(r,e,t.rgba))},e}(),Vt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zt=function(t){function e(e,r){return t.call(this,e,r)||this}return Vt(e,t),e.prototype.processCommonBlocks=function(){t.prototype.processCommonBlocks.call(this),this.processFontBlock(),this.processColourBlock(this.inappElement.color),this.processAlignment()},e.prototype.processFontBlock=function(){var t=this.inappElement.font;t&&(this.renderer.setStyle(this.inappHTMLEl,"font-size",this.getSizePx(t.s)),this.renderer.setStyle(this.inappHTMLEl,"font-family",t.ff),this.renderer.setStyle(this.inappHTMLEl,"line-height",t.lh))},e.prototype.processPart=function(t,e){var r,n=[];e.u&&n.push("underline"),e.st&&n.push("line-through"),n.length||n.push("normal"),this.renderer.setStyle(t,"font-weight",e.b?"bold":"normal"),this.renderer.setStyle(t,"font-style",e.i?"italic":"normal"),this.renderer.setStyle(t,"text-decoration",n.join(" ")),this.renderer.setStyle(t,"color",null!==(r=e.c)&&void 0!==r?r:"inherit")},e.prototype.processAlignment=function(){var t,e=null===(t=d[this.inappElement.alg])||void 0===t?void 0:t.toLowerCase();e||(e="start"),this.renderer.setStyle(this.inappHTMLEl,"text-align",e)},e}(Ft),Wt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return Wt(e,t),e.prototype.render=function(){var t,e=this;null===(t=this.inappElement.parts)||void 0===t||t.forEach((function(t){var r,n,i=e.renderer.createElement("span");i.innerHTML=null===(n=null===(r=t.txt)||void 0===r?void 0:r.toString())||void 0===n?void 0:n.replace(/\n/g,"<br />"),e.processPart(i,t),e.renderer.appendChild(e.inappHTMLEl,i)})),this.processCommonBlocks()},e}(zt),Kt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Xt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n}return Kt(e,t),e.prototype.render=function(){this.processCommonBlocks()},e}(Ft),$t=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("img"),n.insertElement(),n}return $t(e,t),e.prototype.render=function(){this.renderer.setAttribute(this.inappHTMLEl,"src",this.inappElement.src),this.renderer.setStyle(this.inappHTMLEl,"max-width","100%"),this.renderer.setStyle(this.inappHTMLEl,"max-height","100%"),this.renderer.setStyle(this.inappHTMLEl,"display","block"),this.renderer.setStyle(this.inappHTMLEl,"margin","0 auto"),this.processCommonBlocks()},e}(Ft),Yt=function(){function e(){this.renderer=new O}return e.prototype.render=function(){this.removeInApp();var e=this.renderer.createElement("div");return e.id=t.IN_APP_CONTAINER_NAME,e.classList.add(t.IN_APP_CONTAINER_NAME),this.renderer.setStyle(e,"z-index","10000000"),this.renderer.setStyle(e,"position","fixed"),this.renderer.setStyle(e,"top","0"),this.renderer.setStyle(e,"left","0"),this.renderer.setStyle(e,"width","100%"),this.renderer.setStyle(e,"height","100%"),this.renderer.appendChild(document.body,e),e},e.prototype.removeInApp=function(){var e=document.getElementById(t.IN_APP_CONTAINER_NAME);e&&e.parentElement.removeChild(e)},e}(),Zt=function(){function e(){this.renderer=new O}return e.prototype.render=function(e){var r=this.renderer.getElementById(t.IN_APP_CONTAINER_NAME),n=this.createIFrameContainer();return this.createIFrameElement(n,e),this.createAnchorElement(r,n),this.renderer.appendChild(r,n),n},e.prototype.createIFrameContainer=function(){var t=this.renderer.createElement("div");return this.renderer.setAttribute(t,"class","iframe-container"),this.renderer.setAttribute(t,"id","iframe-container"),this.renderer.setStyle(t,"width","100%"),this.renderer.setStyle(t,"height","100%"),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"top","0px"),this.renderer.setStyle(t,"left","0px"),t},e.prototype.createIFrameElement=function(t,e){var r=this.renderer.createElement("iframe");return this.renderer.setStyle(r,"width","100%"),this.renderer.setStyle(r,"height","100%"),this.renderer.setAttribute(r,"src",e),this.renderer.setAttribute(r,"frameBorder","0"),this.renderer.appendChild(t,r),r},e.prototype.createAnchorElement=function(t,e){var r=this.renderer.createElement("a");return this.renderer.setStyle(r,"position","absolute"),this.renderer.setStyle(r,"top","0px"),this.renderer.setStyle(r,"right","0px"),r.href="#",r.innerHTML="Close",r.onclick=function(){t.removeChild(e)},this.renderer.appendChild(e,r),r},e}(),Qt=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),te=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.inappHTMLEl=n.renderer.createElement("div"),n.insertElement(),n.inappElement.w=1080,n.inappElement.h=1920,n}return Qt(e,t),e.prototype.render=function(){return this.processCommonBlocks(),this.renderer.setStyle(this.inappHTMLEl,"position","relative"),Object.assign(this.inappHTMLEl.style,this.inappElement.getStyles()),this},e}(Ft),ee=function(){function e(){this.rootContainer=(new Yt).render()}return e.prototype.render=function(e){e=new I(e),this.ian=e.ian;try{this.renderContainer();var r=new M("CE Trigger Displayed",{triggerID:e.id});Bt.getInstance().sendEvent(r),x.setNumber(t.STORAGE_TRIGGER_START_TIME,(new Date).getTime()),G.storeActiveTrigger(e)}catch(t){i.error(t)}},e.prototype.renderElement=function(t,e){e instanceof S?new qt(t,e).render():e instanceof w?new Jt(t,e).render():e instanceof v?new Xt(t,e).render():i.error("Unsupported element type- "+e.type)},e.prototype.renderContainer=function(){var t,e,r=this,n=null===(t=this.ian)||void 0===t?void 0:t.cont;if(n){var i=new te(this.rootContainer,n).render().getHTMLElement();null===(e=this.ian.elems)||void 0===e||e.forEach((function(t){r.renderElement(i,t)}))}},e}(),re=ee}(),CooeePreview=n.default}();