CINXE.COM

Rebates, Cash Back, Discount Coupons, Online Coupons

<!DOCTYPE html> <html lang="en"> <head> <script src='/rmsgjs/soj2.js?cache'></script> <script src="/rmsgjs/soj2.js?async" async></script> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=0"> <meta name="session.id" content="aaa7qVwrcBHoRhglissnz"> <meta property="fb.graph.version" content="v13.0" /> <meta property="fb.oauth.url" content="https://www.facebook.com/v13.0/dialog/oauth?" /> <meta property="my_r_auth_redirect_url" content="https://us.account.rakuten.com/gateway/logout?clientId=ebates_com_prod&post_logout_uri=https%3A%2F%2Fwww.rakuten.com%2Findex.htm%3Flogout%3Dtrue" /> <title>Rebates, Cash Back, Discount Coupons, Online Coupons</title> <meta name="robots" content="index, follow" /> <meta name="referrer" content="origin"> <meta name="description" content="Rakuten - rebates, cash back and coupons, for every purchase you make from our online shopping portal." /> <meta name="keywords" content="Rebates, Cash Back, Discount Coupons, Online Coupons, Online Rebates, Online Cash Back, Online Shopping, Online Stores, cyber monday" /> <meta property="fb:app_id" content="214330088590858" /> <meta property="fb.app.redirect.url" content="https://www.rakuten.com/fbOAuth2callback.htm" /> <meta property="google:app_id" content="51014805214-s1t91c6udh7lki36s5vh9l9867oavm54.apps.googleusercontent.com"> <meta property="og:type" content="website" /> <meta property="og:site_name" content="Rakuten" /> <meta property="og:title" content="Earn Cash Back at stores you &#x1f49c;" /> <meta property="og:description" content="Join Rakuten for free and get a $10 Welcome Bonus." /> <meta property="og:locale" content="en_US" /> <meta property="og:image" content="https://static.ebates.com/img/campaign/9244/221024-55570-opengraph-q4-facebook-1200x628-v5.png" /> <meta property="og:url" content="https://www.rakuten.com/browser-not-supported.htm" /> <meta property="article:publisher" content="https://www.facebook.com/Rakuten" /> <meta name="twitter:card" content="app" /> <meta name="twitter:site" content="@Rakuten" /> <meta name="twitter:site:id" content="@Rakuten" /> <meta name="twitter:url" content="https://www.rakuten.com/browser-not-supported.htm"/> <meta name="twitter:creator" content="@Rakuten" /> <meta name="twitter:title" content="Earn Cash Back at stores you &#x1f49c;" /> <meta name="twitter:description" content="I love getting Cash Back and think you will too! Tap to join Rakuten for free and get a $10 Welcome Bonus:" /> <meta name="twitter:image" content="https://static.ebates.com/img/campaign/9244/221024-55570-opengraph-q4-twitter-1024x512-v5.png" /> <meta name="twitter:app:country" content="US" /> <meta name="twitter:app:name:iphone" content="Ebates" /> <meta name="twitter:app:id:iphone" content="723134859" /> <meta name="twitter:app:url:iphone" content="ebates:///" /> <meta name="twitter:app:name:ipad" content="Ebates" /> <meta name="twitter:app:id:ipad" content="723134859" /> <meta name="twitter:app:url:ipad" content="ebates:///" /> <meta name="twitter:app:name:googleplay" content="Ebates" /> <meta name="twitter:app:id:googleplay" content="com.ebates" /> <meta name="twitter:app:url:googleplay" content="ebates:///" /> <meta name="appleClientId" content="com.ebates.EbatesMobile.signInWithApple.prod" /> <link rel="canonical" href="https://www.rakuten.com/browser-not-supported.htm" /> <link rel="alternate" hreflang="en" href="https://www.rakuten.com/browser-not-supported.htm" /> <meta property="al:ios:url" content="ebates:///" /> <meta property="al:ios:app_store_id" content="723134859" /> <meta property="al:ios:app_name" content="Ebates" /> <meta property="al:iphone:url" content="ebates:///" /> <meta property="al:iphone:app_store_id" content="723134859" /> <meta property="al:iphone:app_name" content="Ebates" /> <meta property="al:ipad:url" content="ebates:///" /> <meta property="al:ipad:app_store_id" content="723134859" /> <meta property="al:ipad:app_name" content="Ebates" /> <meta property="al:android:url" content="ebates:///" /> <meta property="al:android:package" content="com.ebates" /> <meta property="al:android:app_name" content="Ebates" /> <meta property="al:web:url" content="https://www.rakuten.com/browser-not-supported.htm" /> <link rel="stylesheet" type="text/css" href="/dist/static/rev/scss/ebates-rebrand-36c40504ae.css" /> <style>.h-search .user{z-index:9999;}</style> <style> body{transition:opacity .2s;} .op0{opacity:0;} </style> <link rel="icon" type="image/png" href="https://static.ebates.com/static/images/favicons-r/v1/favicon-16x16.png" sizes="16x16" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/favicon-16x16.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/favicon-16x16-darkmode.png"> <link rel="icon" type="image/png" sizes="32x32" href="https://static.ebates.com/static/images/favicons-r/v1/favicon-32x32.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/favicon-32x32.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/favicon-32x32-darkmode.png"> <link rel="icon" type="image/png" href="https://static.ebates.com/static/images/favicons-r/v1/favicon-57x57.png" sizes="57x57" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/favicon-57x57.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/favicon-57x57-darkmode.png"> <link rel="icon" type="image/png" href="https://static.ebates.com/static/images/favicons-r/v1/favicon-72x72.png" sizes="72x72" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/favicon-72x72.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/favicon-72x72-darkmode.png"> <link rel="icon" type="image/png" href="https://static.ebates.com/static/images/favicons-r/v1/favicon-76x76.png" sizes="76x76" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/favicon-76x76.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/favicon-76x76-darkmode.png"> <link rel="apple-touch-icon" href="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192-darkmode.png"> <link rel="apple-touch-icon-precomposed" href="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192-darkmode.png"> <link rel="apple-touch-icon" sizes="57x57" href="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-57x57-darkmode.png"> <link rel="apple-touch-icon" sizes="72x72" href="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-72x72-darkmode.png"> <link rel="apple-touch-icon" sizes="76x76" href="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-76x76-darkmode.png"> <link rel="apple-touch-icon" sizes="114x114" href="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-114x114-darkmode.png"><link rel="apple-touch-icon" sizes="120x120" href="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-120x120-darkmode.png"> <link rel="apple-touch-icon" sizes="144x144" href="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144-darkmode.png"> <link rel="apple-touch-icon" sizes="152x152" href="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-152x152-darkmode.png"> <link rel="apple-touch-icon" sizes="180x180" href="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="180x180" href="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-180x180-darkmode.png"> <link rel="apple-touch-icon" sizes="192x192" href="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192-darkmode.png"> <link rel="apple-touch-icon-precomposed" sizes="192x192" href="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-type="favicon" data-light="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192.png" data-dark="https://static.ebates.com/static/images/favicons-r/v1/icon-192x192-darkmode.png"> <meta name="msapplication-TileColor" content="#FFFFFF"> <meta name="msapplication-TileImage" content="https://static.ebates.com/static/images/favicons-r/v1/icon-144x144.png"> <script> window.addEventListener('DOMContentLoaded', function () { var colorSchemeList = window.matchMedia('(prefers-color-scheme: dark)'); var setColorScheme = e => { if (e.matches) { // Dark mode var favicon = document.querySelectorAll('link[data-type="favicon"]'); var i = favicon.length; while (i--) { favicon[i].setAttribute('href', favicon[i].dataset.dark); } } else { // Light Mode var favicon = document.querySelectorAll('link[data-type="favicon"]'); var i = favicon.length; while (i--) { favicon[i].setAttribute("href", favicon[i].dataset.light); } } } setColorScheme(colorSchemeList); colorSchemeList.addListener(setColorScheme); }); </script> <script>!function(e){var n="https://s.go-mpulse.net/boomerang/";if("False"=="True")e.BOOMR_config=e.BOOMR_config||{},e.BOOMR_config.PageParams=e.BOOMR_config.PageParams||{},e.BOOMR_config.PageParams.pci=!0,n="https://s2.go-mpulse.net/boomerang/";if(window.BOOMR_API_key="54KFS-CS4FL-8NDR3-XGWC2-WDXJC",function(){function e(){if(!o){var e=document.createElement("script");e.id="boomr-scr-as",e.src=window.BOOMR.url,e.async=!0,i.parentNode.appendChild(e),o=!0}}function t(e){o=!0;var n,t,a,r,d=document,O=window;if(window.BOOMR.snippetMethod=e?"if":"i",t=function(e,n){var t=d.createElement("script");t.id=n||"boomr-if-as",t.src=window.BOOMR.url,BOOMR_lstart=(new Date).getTime(),e=e||d.body,e.appendChild(t)},!window.addEventListener&&window.attachEvent&&navigator.userAgent.match(/MSIE [67]\./))return window.BOOMR.snippetMethod="s",void t(i.parentNode,"boomr-async");a=document.createElement("IFRAME"),a.src="about:blank",a.title="",a.role="presentation",a.loading="eager",r=(a.frameElement||a).style,r.width=0,r.height=0,r.border=0,r.display="none",i.parentNode.appendChild(a);try{O=a.contentWindow,d=O.document.open()}catch(_){n=document.domain,a.src="javascript:var d=document.open();d.domain='"+n+"';void(0);",O=a.contentWindow,d=O.document.open()}if(n)d._boomrl=function(){this.domain=n,t()},d.write("<bo"+"dy onload='document._boomrl();'>");else if(O._boomrl=function(){t()},O.addEventListener)O.addEventListener("load",O._boomrl,!1);else if(O.attachEvent)O.attachEvent("onload",O._boomrl);d.close()}function a(e){window.BOOMR_onload=e&&e.timeStamp||(new Date).getTime()}if(!window.BOOMR||!window.BOOMR.version&&!window.BOOMR.snippetExecuted){window.BOOMR=window.BOOMR||{},window.BOOMR.snippetStart=(new Date).getTime(),window.BOOMR.snippetExecuted=!0,window.BOOMR.snippetVersion=12,window.BOOMR.url=n+"54KFS-CS4FL-8NDR3-XGWC2-WDXJC";var i=document.currentScript||document.getElementsByTagName("script")[0],o=!1,r=document.createElement("link");if(r.relList&&"function"==typeof r.relList.supports&&r.relList.supports("preload")&&"as"in r)window.BOOMR.snippetMethod="p",r.href=window.BOOMR.url,r.rel="preload",r.as="script",r.addEventListener("load",e),r.addEventListener("error",function(){t(!0)}),setTimeout(function(){if(!o)t(!0)},3e3),BOOMR_lstart=(new Date).getTime(),i.parentNode.appendChild(r);else t(!1);if(window.addEventListener)window.addEventListener("load",a,!1);else if(window.attachEvent)window.attachEvent("onload",a)}}(),"".length>0)if(e&&"performance"in e&&e.performance&&"function"==typeof e.performance.setResourceTimingBufferSize)e.performance.setResourceTimingBufferSize();!function(){if(BOOMR=e.BOOMR||{},BOOMR.plugins=BOOMR.plugins||{},!BOOMR.plugins.AK){var n=""=="true"?1:0,t="",a="bdpnbeqxzkebqz2efnma-f-5436f8bb7-clientnsv4-s.akamaihd.net",i="false"=="true"?2:1,o={"ak.v":"39","ak.cp":"816145","ak.ai":parseInt("208016",10),"ak.ol":"0","ak.cr":3,"ak.ipv":4,"ak.proto":"http/1.1","ak.rid":"85e69ef4","ak.r":47863,"ak.a2":n,"ak.m":"a","ak.n":"essl","ak.bpcip":"8.222.208.0","ak.cport":58214,"ak.gh":"23.54.158.76","ak.quicv":"","ak.tlsv":"tls1.2","ak.0rtt":"","ak.0rtt.ed":"","ak.csrc":"-","ak.acc":"bbr","ak.t":"1732520792","ak.ak":"hOBiQwZUYzCg5VSAfCLimQ==Vxboo5uJ0G0vIZUhb0lIuz4LVkTfAy2QwHk8SGbuyRyryKfcPXrX5IvTE/XLZxASe+PPYcLRhDdAyMfOT4lhoqiRtLM1Qv29pIDmRYbmvaLi6ynuy8jjW54bsVyVPoDUlreSDr2yW0joBhukwI/Alw4DSNmUNf8n4WyFbQzea+KjByGkGK7UQQ5p+wMKTl7RY/0agh2MTAHhJJsOs65+7jSFTRV9g/o38yjlMYxAzz37lW7wrCN5gGmedYiMcWNgcrFA0kUUFIaQ5QZ2DyRJvyDguxaOhM8Oj6W/RgcDwdW9obZoKSRbhmPcUAx8Y7KmDKvspSU6sBP3YdwOTYHMYuQy2tE9Q9KT+wLCUUvyWan/EOagueivEI9lfJkLixdx3Wh+x3ymolk/mZ1x9jmXWO+j6bexIZfwFOYyWxQEX+w=","ak.pv":"1477","ak.dpoabenc":"","ak.tf":i};if(""!==t)o["ak.ruds"]=t;var r={i:!1,av:function(n){var t="http.initiator";if(n&&(!n[t]||"spa_hard"===n[t]))o["ak.feo"]=void 0!==e.aFeoApplied?1:0,BOOMR.addVar(o)},rv:function(){var e=["ak.bpcip","ak.cport","ak.cr","ak.csrc","ak.gh","ak.ipv","ak.m","ak.n","ak.ol","ak.proto","ak.quicv","ak.tlsv","ak.0rtt","ak.0rtt.ed","ak.r","ak.acc","ak.t","ak.tf"];BOOMR.removeVar(e)}};BOOMR.plugins.AK={akVars:o,akDNSPreFetchDomain:a,init:function(){if(!r.i){var e=BOOMR.subscribe;e("before_beacon",r.av,null,null),e("onbeacon",r.rv,null,null),r.i=!0}return this},is_complete:function(){return!0}}}}()}(window);</script></head> <body class="op0 phase-2 new-ui"> <style> .h-search { border-bottom: none; height: 0px;} .f-200{font-size: 200px;} .content-blk{max-width: 600px; margin:0 auto;} @media only screen and (max-width: 600px) { .content-blk .h-search .logo3 { float: none; margin: 0 auto; } } </style> <div class="blk-reg over-0 pad content-blk pad-32-lr" data-screen-name="Global Navigation"> <div class="h-search"> <div class="logo3 pad-10-t" data-screen-name="Header Logo"> <a href="#" class="logo-link track-click-event" data-event="Logo" data-navigation-id="23293"><span class="iblk svg-eb-logo3"></span></a> </div> </div> </div> <div class="pad-32-lr content-blk"> <div class="pad-80-t pad-55-b bg-w center"> <div class="mar-48-t mar-32-b"> <img src="https://static.ebates.com//static/images/404/warning.png" alt="Warning" height="200"> </div> <h1 class="section-heading f-22 lh-28 center f-sec">Your browser is no longer supported</h1> <div class="pad-20 pad-16-t f-16 lh-20 f-sec">Please update your current browser or get a new one! <br> Some suggestions: <a href="https://www.microsoft.com/en-us/edge" alt="Edge">Edge</a>, <a href="https://www.google.com/chrome/" alt="Chrome">Chrome</a>, <a href="https://www.mozilla.org/en-US/firefox/new/" alt="Firefox">Firefox</a> </div> </div> </div> <script src="/rmsgjs/soj2.js?async" async></script> <script defer src="/global_files/js/jquery/jquery-1.10.3.min.js"></script> <script> var ebates = ebates || {}; ebates.src = { overlays: {skinny: '/dist/static/rev/overlays/skinny/skinny-2bbb696217.js'}, store: { overlay: '/stores/store_landing/overlay/js/validate.1.1.6.min.js', btn_overlay:'/dist/static/rev/button/store_landing_overlay-0c7e65f493.js', }, suggest: { stores: '/dist/static/rev/search/eba_suggest-fc0a4ae617.js', generic: '/dist/static/rev/search/generic-51c26f732d.js', hotels: '/dist/static/rev/global/js/eba/suggest-af3f9c76c7.js' }, carousel: '/dist/static/rev/global/js/eba/carousel-2ffab8aefc.js', msg: '/account/global_files/js/notifications.1.0.1.min.js', sorter: '/global_files/js/eba/sort/sort.1.0.4.min.js', sf: '/dist/static/rev/global/js/eba/sf-9768d356de.js', abp: '/dist/static/rev/global/js/blocking-45eb9cd696.js', emailCorrector: { mailcheck: '/dist/static/rev/global/js/kicksend-mailcheck/mailcheck-00ff88a434.js', loader: '/dist/static/rev/global/js/kicksend-mailcheck/loader-3a832a4e30.js' }, button: '/dist/static/rev/button/button-e1dffdcbcd.js', modal: '/dist/static/rev/global/plugins/modal/eb-mod-a538c1ee26.js', form: { factory: '/dist/static/rev/overlays/global/form-factory-c2bda70484.js', strings: {en: '/dist/static/rev/overlays/global/form-strings-en-4065fb2570.js' }, recaptcha: '/dist/static/rev/overlays/global/re-captcha-b8a13a8312.js', captcha: '/static/js/overlays/global/captcha.1.0.0.min.js', fb: '/dist/static/rev/overlays/global/fb-620f24fa3c.js', google: '/dist/static/rev/overlays/global/google_client-b0f00f9412.js', passwordMeter: '/dist/static/rev/plugins/pwd_strengthmeter/pwd_strength-c560d80215.js', passwordValidator: '/dist/static/rev/overlays/global/password_strongth_validation-359a361aa9.js' }, expander: '/dist/static/rev/global/js/eba/expander_v1-2418877479.js', expander2: '/dist/static/rev/global/js/eba/expander_v2-cf3d7aa5e6.js', css: { modal: '/dist/static/rev/scss/styles/local/modals/eb-mod-ebc286ca02.css', skinny: '/dist/static/rev/overlays/global/susi-605c07ef7b.css', hotelsSu: '/dist/static/rev/overlays/hotels/su-112a5e5d7f.css', gswSi: '/dist/static/rev/scss/styles/local/home/landing_pages/nba-bbfd6b3c60.css', accountRecovery : '/dist/static/rev/scss/styles/local/account/account-recovery-bc1e3e9f34.css', mwAccountRecovery : '/dist/static/rev/scss/styles/local/account/mw_account_recovery-d895e9bc86.css', addAddress : '/dist/static/rev/scss/styles/local/account/add-address-9be9bccd8e.css', mwAddAddress : '/dist/static/rev/scss/styles/local/account/mw-add-address-f7b828adb0.css', addressModal: '/dist/static/rev/scss/styles/local/account/address-modal-5156a01433.css', doubleAuth: '/dist/static/rev/scss/ebates-double-auth-f2e18a7a9a.css', }, safari_11: '/dist/static/rev/global/js/safari_11-dfcbe7a134.js', safari_11_mw: '/dist/static/rev/global/js/safari_11_mw-265af944dd.js', swipe: '/mobile_web/_/js/jquery.detectswipe.2.1.1.a.min.js', accountRecovery: '/dist/static/rev/account/account-recovery-ad85744453.js', doubleAuth: '/dist/static/rev/account/double-auth-f903d57987.js', addAddress: '/dist/static/rev/account/add-address-ea08d76586.js', signout: '/dist/static/rev/overlays/global/signout_csrf-656b3e5f5c.js', addressModal: '/dist/static/rev/account/address-modal-00ccd9be91.js', authMicrositeSdk: '/dist/static/rev/auth/auth-microsite-sdk-dbd37772b4.js' }; </script><script defer src="/dist/static/rev/global/js/eba/ebates-main-eb41c1a8a1.js"></script> <script> var ebates = ebates || {}; ebates.user = ebates.user || {}; ebates.user.loggedIn = 'false' === 'true' ? true : false; ebates.user.id_last_digit = ''; ebates.user.guid = ''; ebates.user.rsid = '0'; ebates.user.status = 'FIRST_VISIT'; ebates.user.lifecycleStage = ''; ebates.user.isRakutenCardLaunched = 'true'; ebates.user.encryptedId = ''; ebates.user.isDataSharingAllowed = true; ebates.user.bonuses = {}; ebates.user.isAddress = 'false'; ebates.user.paymentMethodId = ''; ebates.page = {}; ebates.page.type = 'IE-Not-Supported'; ebates.page.subtype = ''; ebates.page.tabId = ''; ebates.rakutenmode = ebates.rakutenmode || { 'currentBrandName' : 'Rakuten' }; ebates.csrf = 'rnuiwJjUdLCUKD663caVfHBmrokdx0rt6WZNWSnU5A-lcWS3iTByGD3ncO6RjPkTHZxhy1kpUuDaFHdgyIMjNBE-U0_Moc2GyJzEoEu_oR1P1iouPOOMjCZeI5c_CHvQYeySCnFwhz-qJBkSodn173asP6k'; ebates.session = {id: "aaa7qVwrcBHoRhglissnz"}; ebates.session.creationTime = '1732520792404'; ebates.stats = ebates.stats || {}; ebates.stats.timeout = 500; ebates.stats.parentNavId = '0'; ebates.stats.timeDelta = Date.now() - new Date(1732520792411); ebates.stats.device = 'NO' === 'YES' && 'T' || 'NO' === 'YES' && 'M' || 'D'; ebates.stats.externalUrl = 'https://comev.ecbsn.com/index.php'; ebates.stats.assetHost = '//static.ebates.com'; ebates.stats.host = 'www.rakuten.com'; ebates.ratPageMap = { 'interstitial': { 'pgt':'shop_item','pgn':"redirect/store" }, 'store': { 'pgt':'shop_item','pgn':'store' }, 'category':{ 'pgt':'category','pgn':'category' }, 'search': { 'pgt':'search','pgn':'search', 'store': {'pgn':'Store Search'}, 'coupon': {'pgn':'Coupon Search'}} } ebates.rat = { pgn: "other", pgt: 'top', pgl: 'NO' === 'YES' && 'TB' || 'NO' === 'YES' && 'SP' || 'PC', ssc: ebates.page.type === 'interstitial' ? location.pathname.replace('-xfas','').replace('/','').replace('_','/') : '', itemid: '', igenre: '', price: '' } if(ebates.page.type && typeof ebates.ratPageMap[ebates.page.type] !== 'undefined' && location.pathname != '/travel-vacations'){ ebates.rat.pgn = ebates.ratPageMap[ebates.page.type]['pgn']; } </script> <script> var _LTracker = _LTracker || []; !function(){ var initDtdg = function() { window.ddLogsQueue = []; window.addEventListener('error', function(e) { if(e.message && e.filename) { if(!window.DD_LOGS){ window.ddLogsQueue.push({ message: e.message, filename: e.filename }); } } }, false); $(document).on('loggly-error', function(e, data) { window.DD_LOGS && window.DD_LOGS.logger && window.DD_LOGS.logger.error(data.category,{ service: 'rr-browser', filename: data.exception }); }); ebates.js.require('https://www.datadoghq-browser-agent.com/datadog-logs-us.js', function () { window.DD_LOGS && DD_LOGS.init({ clientToken: 'pub6d4331aa5a828f7272055a57e6aa2d41', forwardErrorsToLogs: true, sampleRate: 100 }); window.DD_LOGS && DD_LOGS.addLoggerGlobalContext('service','rr-browser'); setTimeout(function () { window._LTracker.forEach(function (e,i,a) { var dataObj = e.ebates || {}; dataObj.service = 'rr-browser'; dataObj.filename = e.exception.message; window.DD_LOGS.logger.error(e.category, dataObj); }); _LTracker = {}; _LTracker.push = function(data){ var dataObj = data.ebates || {}; dataObj.service = 'rr-browser'; dataObj.filename = data.exception.message; window.DD_LOGS.logger.error(data.category,dataObj); }; window.ddLogsQueue.forEach(function (e,i,a) { window.DD_LOGS.logger.error(e.message,{ service: 'rr-browser', filename: e.filename }); }); },100); }); }; document.readyState !== 'loading' ? initDtdg() : window.addEventListener('DOMContentLoaded', initDtdg); }(); </script> <script> ebates.segment = {}; ebates.segment.settings = { apiKey: 'vLFussC4XChxcOvzEXgApiBtItELHGtW', amplitudeApiKey: '8d61aca7f1e91fe688d8c3d819182c81', branch_key: 'key_live_nhRF9ZTJhyZsHIsSdN1u6aheurlZgNKr', 'Branch Metrics': '62859005486aad05012d4da0', apiHost: 'events.engager.ecbsn.com/v1' }; "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function e(e,n,r){return r={path:n,exports:{},require:function(e,n){return t((void 0===n||null===n)&&r.path)}},e(r,r.exports),r.exports}function t(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}function n(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fe(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function i(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":_typeof(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a}function o(e,t){return function(n,r){t(n,r,e)}}function a(e,t,n,r,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?r.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var v in r)h[v]="access"===v?{}:r[v];for(var v in r.access)h.access[v]=r.access[v];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var y=(0,n[p])("accessor"===u?{get:d.get,set:d.set}:d[c],h);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!==(void 0===y?"undefined":_typeof(y)))throw new TypeError("Object expected");(s=a(y.get))&&(d.get=s),(s=a(y.set))&&(d.set=s),(s=a(y.init))&&i.unshift(s)}else(s=a(y))&&("field"===u?i.unshift(s):d[c]=s)}l&&Object.defineProperty(l,r.name,d),f=!0}function s(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0}function u(e){return"symbol"===(void 0===e?"undefined":_typeof(e))?e:"".concat(e)}function c(e,t,n){return"symbol"===(void 0===t?"undefined":_typeof(t))&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function l(e,t){if("object"===("undefined"==typeof Reflect?"undefined":_typeof(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())})}function f(e,t){function n(e){return function(t){return r([e,t])}}function r(n){if(i)throw new TypeError("Generator is already executing.");for(;u&&(u=0,n[0]&&(s=0)),s;)try{if(i=1,o&&(a=2&n[0]?o.return:n[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,n[1])).done)return a;switch(o=0,a&&(n=[2&n[0],a.value]),n[0]){case 0:case 1:a=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(a=s.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){s.label=n[1];break}if(6===n[0]&&s.label<a[1]){s.label=a[1],a=n;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(n);break}a[2]&&s.ops.pop(),s.trys.pop();continue}n=t.call(e,s)}catch(e){n=[6,e],o=0}finally{i=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var i,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=n(0),u.throw=n(1),u.return=n(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u}function p(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||he(t,e,n)}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function g(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}function m(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function b(e,t,n){function r(e){return function(t){return Promise.resolve(t).then(e,u)}}function i(e,t){d[e]&&(l[e]=function(t){return new Promise(function(n,r){f.push([e,t,n,r])>1||o(e,t)})},t&&(l[e]=t(l[e])))}function o(e,t){try{a(d[e](t))}catch(e){c(f[0][3],e)}}function a(e){e.value instanceof _?Promise.resolve(e.value.v).then(s,u):c(f[0][2],e)}function s(e){o("next",e)}function u(e){o("throw",e)}function c(e,t){e(t),f.shift(),f.length&&o(f[0][0],f[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,d=n.apply(e,t||[]),f=[];return l=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),i("next"),i("throw"),i("return",r),l[Symbol.asyncIterator]=function(){return this},l}function w(e){function t(t,i){n[t]=e[t]?function(n){return(r=!r)?{value:_(e[t](n)),done:!1}:i?i(n):n}:i}var n,r;return n={},t("next"),t("throw",function(e){throw e}),t("return"),n[Symbol.iterator]=function(){return this},n}function P(e){function t(t){r[t]=e[t]&&function(r){return new Promise(function(i,o){r=e[t](r),n(i,o,r.done,r.value)})}}function n(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof h?h(e):e[Symbol.iterator](),r={},t("next"),t("throw"),t("return"),r[Symbol.asyncIterator]=function(){return this},r)}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=ye(e),r=0;r<n.length;r++)"default"!==n[r]&&he(t,e,n[r]);return ve(t,e),t}function O(e){return e&&e.__esModule?e:{default:e}}function k(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function j(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function I(e,t){if(null===t||"object"!==(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function A(e,t,n){if(null!==t&&void 0!==t){if("object"!==(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}function M(e){function t(t){e.error=e.hasError?new ge(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}function n(){for(;r=e.stack.pop();)try{if(!r.async&&1===i)return i=0,e.stack.push(r),Promise.resolve().then(n);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(o).then(n,function(e){return t(e),n()})}else i|=1}catch(e){t(e)}if(1===i)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}var r,i=0;return n()}function E(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^.\/]+?)?)\.([cm]?)ts$/i,function(e,n,r,i,o){return n?t?".jsx":".js":!r||i&&o?r+i+"."+o.toLowerCase()+"js":e}):e}function C(e,t){return t=t||{},new Promise(function(n,r){var i=new XMLHttpRequest,o=[],a=[],s={},u=function e(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return a},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){o.push(t=t.toLowerCase()),a.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),n(u())},i.onerror=r,i.withCredentials="include"==t.credentials,t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}function T(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,a=t.length,s=e;o<a&&"__proto__"!=(i=""+t[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_typeof(r=s[i])===(void 0===t?"undefined":_typeof(t))?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}function D(e){return"string"==typeof e}function F(e){return"number"==typeof e}function N(e){return"function"==typeof e}function R(e){return void 0!==e&&null!==e}function L(e){return"object"===Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function U(e){var t=function(e){var t,n,r;return null!==(r=null!==(n=null!==(t=e.userId)&&void 0!==t?t:e.anonymousId)&&void 0!==n?n:e.groupId)&&void 0!==r?r:e.previousId}(e);if(!R(t))throw new Ae(".userId/anonymousId/previousId/groupId",Ce);if(!D(t))throw new Ae(".userId/anonymousId/previousId/groupId",Me)}function B(e){if(!R(e))throw new Ae("Event",Ce);if("object"!==(void 0===e?"undefined":_typeof(e)))throw new Ae("Event",Ee)}function q(e){if(!D(e.type))throw new Ae(".type",Me)}function V(e){if(!D(e.event))throw new Ae(".event",Me)}function z(e){if(!L(e.properties))throw new Ae(".properties",Ee)}function K(e){if(!L(e.traits))throw new Ae(".traits",Ee)}function H(e){if(!D(e.messageId))throw new Ae(".messageId",Me)}function G(e){B(e),q(e),H(e),"track"===e.type&&(V(e),z(e)),["group","identify"].includes(e.type)&&K(e)}function W(e,t){return new Promise(function(n,r){var i=setTimeout(function(){r(Error("Promise timed out"))},t);e.then(function(e){return clearTimeout(i),n(e)}).catch(r)})}function Q(e){return new Promise(function(t){return setTimeout(t,e)})}function J(e,t,n){var r=function(){try{return Promise.resolve(t(e))}catch(e){return Promise.reject(e)}};return Q(n).then(function(){return W(r(),1e3)}).catch(function(t){null===e||void 0===e||e.log("warn","Callback Error",{error:t}),null===e||void 0===e||e.stats.increment("callback_error")}).then(function(){return e})}function Y(e){var t=Math.random()+1,n=e.minTimeout,r=void 0===n?500:n,i=e.factor,o=void 0===i?2:i,a=e.attempt,s=e.maxTimeout,u=void 0===s?1/0:s;return Math.min(t*r*Math.pow(o,a),u)}function $(){var e,t=0,n="";if(!le||Be+16>256){for(le=Array(t=256);t--;)le[t]=256*Math.random()|0;t=Be=0}for(;t<16;t++)e=le[Be+t],n+=6==t?qe[15&e|64]:8==t?qe[63&e|128]:qe[e],1&t&&t>1&&t<11&&(n+="-");return Be++,n}function Z(e,t){var n={};return e.forEach(function(e){var r,i=void 0;if("string"==typeof t){var o=e[t];i="string"!=typeof o?JSON.stringify(o):o}else t instanceof Function&&(i=t(e));void 0!==i&&(n[i]=m(m([],null!==(r=n[i])&&void 0!==r?r:[],!0),[e],!1))}),n}function X(e){return d(this,void 0,void 0,function(){var t;return f(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e()];case 1:return[2,n.sent()];case 2:return t=n.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function ee(e,t){e.log("debug","plugin",{plugin:t.name});var n=(new Date).getTime(),r=t[e.event.type];return void 0===r?Promise.resolve(e):X(function(){return r.apply(t,[e])}).then(function(e){var r=(new Date).getTime()-n;return e.stats.gauge("plugin_time",r,["plugin:".concat(t.name)]),e}).catch(function(n){if(n instanceof We&&"middleware_cancellation"===n.type)throw n;return n instanceof We?(e.log("warn",n.type,{plugin:t.name,error:n}),n):(e.log("error","plugin Error",{plugin:t.name,error:n}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),n)})}function te(e,t){return ee(e,t).then(function(t){if(t instanceof Qe)return t;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(t)})}function ne(e,t,n,r){return d(this,void 0,void 0,function(){var i,o;return f(this,function(a){switch(a.label){case 0:return n.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=a.sent(),a.label=4;case 4:return(null===r||void 0===r?void 0:r.callback)?[4,J(o,r.callback,Ze(i,r.timeout))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return(null===r||void 0===r?void 0:r.debug)&&o.flush(),[2,o]}})})}function re(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}function ie(e){return"[object Date]"===xn.call(e)}function oe(e){return"[object Number]"===xn.call(e)}function ae(e){return e<315576e5?1e3*e:e}function se(e,t){return void 0===t&&(t=!0),e&&"object"===(void 0===e?"undefined":_typeof(e))?ue(e,t):Array.isArray(e)?ce(e,t):pn.is(e,t)?pn.parse(e):e}function ue(e,t){return Object.keys(e).forEach(function(n){e[n]=se(e[n],t)}),e}function ce(e,t){return e.forEach(function(n,r){e[r]=se(n,t)}),e}for(var le,de="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},fe=function(e,t){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},pe=function(){return pe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pe.apply(this,arguments)},he=(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&("get"in i?t.__esModule:!i.writable&&!i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),ve=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},ye=function(e){return(ye=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)},ge="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r},me={__extends:n,__assign:pe,__rest:r,__decorate:i,__param:o,__esDecorate:a,__runInitializers:s,__propKey:u,__setFunctionName:c,__metadata:l,__awaiter:d,__generator:f,__createBinding:he,__exportStar:p,__values:h,__read:v,__spread:y,__spreadArrays:g,__spreadArray:m,__await:_,__asyncGenerator:b,__asyncDelegator:w,__asyncValues:P,__makeTemplateObject:x,__importStar:S,__importDefault:O,__classPrivateFieldGet:k,__classPrivateFieldSet:j,__classPrivateFieldIn:I,__addDisposableResource:A,__disposeResources:M,__rewriteRelativeImportExtension:E},_e=e(function(e,t){function n(){return"undefined"!=typeof process&&process.env?process.env:{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getProcessEnv=void 0,t.getProcessEnv=n}),be=e(function(e,t){function n(){return window[o]}function r(e){o=e}function i(e){window[o]=e}Object.defineProperty(t,"__esModule",{value:!0}),t.setGlobalAnalytics=t.setGlobalAnalyticsKey=t.getGlobalAnalytics=void 0;var o="analytics";t.getGlobalAnalytics=n,t.setGlobalAnalyticsKey=r,t.setGlobalAnalytics=i}),we=e(function(e,t){function n(){if(void 0!==window.analyticsWriteKey)return window.analyticsWriteKey!==["__","WRITE","_","KEY","__"].join("")?window.analyticsWriteKey:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.embeddedWriteKey=void 0;try{window.analyticsWriteKey="__WRITE_KEY__"}catch(e){}t.embeddedWriteKey=n}),Pe=be,xe=we,Se=e(function(e,t){function n(){for(var e,t,n,r=null!==(e=(0,xe.embeddedWriteKey)())&&void 0!==e?e:null===(t=(0,Pe.getGlobalAnalytics)())||void 0===t?void 0:t._writeKey,o=Array.prototype.slice.call(document.querySelectorAll("script")),a=void 0,s=0,u=o;s<u.length;s++){var c=u[s],l=null!==(n=c.getAttribute("src"))&&void 0!==n?n:"",d=i.exec(l);if(d&&d[1]){a=l;break}}return a?a.replace("analytics.min.js","analytics.classic.js"):"https://cdn.segment.com/analytics.js/v1/".concat(r,"/analytics.classic.js")}Object.defineProperty(t,"__esModule",{value:!0}),t.getLegacyAJSPath=t.getNextIntegrationsURL=t.getCDN=t.setGlobalCDNUrl=void 0;var r,i=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,o=function(){var e;return Array.prototype.slice.call(document.querySelectorAll("script")).forEach(function(t){var n,r=null!==(n=t.getAttribute("src"))&&void 0!==n?n:"",o=i.exec(r);o&&o[1]&&(e=o[1])}),e},a=function(){var e;return null!==r&&void 0!==r?r:null===(e=(0,Pe.getGlobalAnalytics)())||void 0===e?void 0:e._cdn},s=function(e){var t=(0,Pe.getGlobalAnalytics)();t&&(t._cdn=e),r=e};t.setGlobalCDNUrl=s;var u=function(){var e=a();if(e)return e;var t=o();return t||"https://cdn.segment.com"};t.getCDN=u;var c=function(){return"".concat((0,t.getCDN)(),"/next-integrations")};t.getNextIntegrationsURL=c,t.getLegacyAJSPath=n}),Oe=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobal=void 0;var n=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==de?de:null};t.getGlobal=n}),ke=Oe,je=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=void 0;var n=me.__importDefault(C),r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,ke.getGlobal)();return(r&&r.fetch||n.default).apply(void 0,e)};t.fetch=r}),Ie=function(e,t){return Object.keys(e).filter(function(n){return t(n,e[n])}).reduce(function(t,n){return t[n]=e[n],t},{})},Ae=function(e){function t(t,n){var r=e.call(this,"".concat(t," ").concat(n))||this;return r.field=t,r}return n(t,e),t}(Error),Me="is not a string",Ee="is not an object",Ce="is nil",Te=function(){function e(e){var t,n;this.settings=e,this.createMessageId=e.createMessageId,this.onEventMethodCall=null!==(t=e.onEventMethodCall)&&void 0!==t?t:function(){},this.onFinishedEvent=null!==(n=e.onFinishedEvent)&&void 0!==n?n:function(){}}return e}(),De=function(){function e(e){this.settings=new Te(e)}return e.prototype.track=function(e,t,n,r){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize(pe(pe({},this.baseEvent()),{event:e,type:"track",properties:null!==t&&void 0!==t?t:{},options:pe({},n),integrations:pe({},r)}))},e.prototype.page=function(e,t,n,r,i){var o;this.settings.onEventMethodCall({type:"page",options:r});var a={type:"page",properties:pe({},n),options:pe({},r),integrations:pe({},i)};return null!==e&&(a.category=e,a.properties=null!==(o=a.properties)&&void 0!==o?o:{},a.properties.category=e),null!==t&&(a.name=t),this.normalize(pe(pe({},this.baseEvent()),a))},e.prototype.screen=function(e,t,n,r,i){this.settings.onEventMethodCall({type:"screen",options:r});var o={type:"screen",properties:pe({},n),options:pe({},r),integrations:pe({},i)};return null!==e&&(o.category=e),null!==t&&(o.name=t),this.normalize(pe(pe({},this.baseEvent()),o))},e.prototype.identify=function(e,t,n,r){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize(pe(pe({},this.baseEvent()),{type:"identify",userId:e,traits:null!==t&&void 0!==t?t:{},options:pe({},n),integrations:r}))},e.prototype.group=function(e,t,n,r){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize(pe(pe({},this.baseEvent()),{type:"group",traits:null!==t&&void 0!==t?t:{},options:pe({},n),integrations:pe({},r),groupId:e}))},e.prototype.alias=function(e,t,n,r){this.settings.onEventMethodCall({type:"alias",options:n});var i={userId:e,type:"alias",options:pe({},n),integrations:pe({},r)};return null!==t&&(i.previousId=t),void 0===e?this.normalize(pe(pe({},i),this.baseEvent())):this.normalize(pe(pe({},this.baseEvent()),i))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(e){var t,n=["userId","anonymousId","timestamp","messageId"];delete e.integrations;var r=Object.keys(e),i=null!==(t=e.context)&&void 0!==t?t:{},o={};return r.forEach(function(t){"context"!==t&&(n.includes(t)?T(o,t,e[t]):T(i,t,e[t]))}),[i,o]},e.prototype.normalize=function(e){var t,n,i=Object.keys(null!==(t=e.integrations)&&void 0!==t?t:{}).reduce(function(t,n){var r,i;return pe(pe({},t),(r={},r[n]=Boolean(null===(i=e.integrations)||void 0===i?void 0:i[n]),r))},{});e.options=Ie(e.options||{},function(e,t){return void 0!==t});var o=pe(pe({},i),null===(n=e.options)||void 0===n?void 0:n.integrations),a=e.options?this.context(e.options):[],s=a[0],u=a[1],c=e.options,l=r(e,["options"]),d=pe(pe(pe(pe({timestamp:new Date},l),{context:s,integrations:o}),u),{messageId:c.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),G(d),d},e}(),Fe=function(){var e,t,n=!1,r=new Promise(function(r,i){e=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n=!0,r.apply(void 0,e)},t=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n=!0,i.apply(void 0,e)}});return{resolve:e,reject:t,promise:r,isSettled:function(){return n}}},Ne=function(){function e(e){var t;this.callbacks={},this.warned=!1,this.maxListeners=null!==(t=null===e||void 0===e?void 0:e.maxListeners)&&void 0!==t?t:10}return e.prototype.warnIfPossibleMemoryLeak=function(e){this.warned||this.maxListeners&&this.callbacks[e].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(e)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(e,t){return this.callbacks[e]?(this.callbacks[e].push(t),this.warnIfPossibleMemoryLeak(e)):this.callbacks[e]=[t],this},e.prototype.once=function(e,t){var n=this,r=function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(e,r),t.apply(n,i)};return this.on(e,r),this},e.prototype.off=function(e,t){var n,r=null!==(n=this.callbacks[e])&&void 0!==n?n:[],i=r.filter(function(e){return e!==t});return this.callbacks[e]=i,this},e.prototype.emit=function(e){for(var t,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return(null!==(t=this.callbacks[e])&&void 0!==t?t:[]).forEach(function(e){e.apply(n,r)}),this},e}(),Re=Object.freeze({__proto__:null,createDeferred:Fe,Emitter:Ne}),Le="onRemoveFromFuture",Ue=function(e){function t(t,n,r){var i=e.call(this)||this;return i.future=[],i.maxAttempts=t,i.queue=n,i.seen=null!==r&&void 0!==r?r:{},i}return n(t,e),t.prototype.push=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.map(function(t){return!(e.updateAttempts(t)>e.maxAttempts||e.includes(t))&&(e.queue.push(t),!0)});return this.queue=this.queue.sort(function(t,n){return e.getAttempts(t)-e.getAttempts(n)}),r},t.prototype.pushWithBackoff=function(e,t){var n=this;if(void 0===t&&(t=0),0==t&&0===this.getAttempts(e))return this.push(e)[0];var r=this.updateAttempts(e);if(r>this.maxAttempts||this.includes(e))return!1;var i=Y({attempt:r-1});return t>0&&i<t&&(i=t),setTimeout(function(){n.queue.push(e),n.future=n.future.filter(function(t){return t.id!==e.id}),n.emit(Le)},i),this.future.push(e),!0},t.prototype.getAttempts=function(e){var t;return null!==(t=this.seen[e.id])&&void 0!==t?t:0},t.prototype.updateAttempts=function(e){return this.seen[e.id]=this.getAttempts(e)+1,this.getAttempts(e)},t.prototype.includes=function(e){return this.queue.includes(e)||this.future.includes(e)||Boolean(this.queue.find(function(t){return t.id===e.id}))||Boolean(this.future.find(function(t){return t.id===e.id}))},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(Ne),Be=256,qe=[];Be--;)qe[Be]=(Be+256).toString(16).substring(1);var Ve=Object.freeze({__proto__:null,v4:$}),ze=function(){function e(){this._logs=[]}return e.prototype.log=function(e,t,n){var r=new Date;this._logs.push({level:e,message:t,time:r,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var e=this._logs.reduce(function(e,t){var n,r,i,o=pe(pe({},t),{json:JSON.stringify(t.extras,null," "),extras:t.extras});delete o.time;var a=null!==(i=null===(r=t.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return e[a]&&(a="".concat(a,"-").concat(Math.random())),pe(pe({},e),(n={},n[a]=o,n))},{});console.table?console.table(e):console.log(e)}else this.logs.forEach(function(e){var t=e.level,n=e.message,r=e.extras;"info"===t||"debug"===t?console.log(n,null!==r&&void 0!==r?r:""):console[t](n,null!==r&&void 0!==r?r:"")});this._logs=[]},e}(),Ke=function(e){return{gauge:"g",counter:"c"}[e]},He=function(){function e(){this.metrics=[]}return e.prototype.increment=function(e,t,n){void 0===t&&(t=1),this.metrics.push({metric:e,value:t,tags:null!==n&&void 0!==n?n:[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(e,t,n){this.metrics.push({metric:e,value:t,tags:null!==n&&void 0!==n?n:[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var e=this.metrics.map(function(e){return pe(pe({},e),{tags:e.tags.join(",")})});console.table?console.table(e):console.log(e),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(e){return{m:e.metric,v:e.value,t:e.tags,k:Ke(e.type),e:e.timestamp}})},e}(),Ge=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(He),We=function(){function e(e){var t,n,r;this.retry=null===(t=e.retry)||void 0===t||t,this.type=null!==(n=e.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=e.reason)&&void 0!==r?r:""}return e}(),Qe=function(){function e(e,t,n,r){void 0===t&&(t=$()),void 0===n&&(n=new Ge),void 0===r&&(r=new ze),this.attempts=0,this.event=e,this._id=t,this.logger=r,this.stats=n}return e.system=function(){},e.prototype.isSame=function(e){return e.id===this.id},e.prototype.cancel=function(e){if(e)throw e;throw new We({reason:"Context Cancel"})},e.prototype.log=function(e,t,n){this.logger.log(e,t,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(e,t){var n;if("integrations"===e.split(".")[0]){var r=e.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return T(this.event,e,t),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(e){this._failedDelivery=e},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}(),Je=function(e){return"object"===(void 0===e?"undefined":_typeof(e))&&null!==e&&"then"in e&&"function"==typeof e.then},Ye=function(){var e,t,n=0;return{done:function(){return e},run:function(r){var i=r();return Je(i)&&(1==++n&&(e=new Promise(function(e){return t=e})),i.finally(function(){return 0==--n&&t()})),i}}},$e=function(e){function t(t){var n=e.call(this)||this;return n.criticalTasks=Ye(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=t,n.queue.on(Le,function(){n.scheduleFlush(0)}),n}return n(t,e),t.prototype.register=function(e,t,n){return d(this,void 0,void 0,function(){var r,i,o=this;return f(this,function(a){switch(a.label){case 0:return this.plugins.push(t),(r=function(n){o.failedInitializations.push(t.name),o.emit("initialization_failure",t),console.warn(t.name,n),e.log("warn","Failed to load destination",{plugin:t.name,error:n}),o.plugins=o.plugins.filter(function(e){return e!==t})},"destination"!==t.type||"Segment.io"===t.name)?[3,1]:(t.load(e,n).catch(r),[3,4]);case 1:return a.trys.push([1,3,,4]),[4,t.load(e,n)];case 2:return a.sent(),[3,4];case 3:return i=a.sent(),r(i),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(e,t,n){return d(this,void 0,void 0,function(){var r;return f(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.unload?[4,Promise.resolve(t.unload(e,n))]:[3,2];case 1:i.sent(),i.label=2;case 2:return this.plugins=this.plugins.filter(function(e){return e.name!==t.name}),[3,4];case 3:return r=i.sent(),e.log("warn","Failed to unload destination",{plugin:t.name,error:r}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(e){return d(this,void 0,void 0,function(){var t;return f(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.push(e),t=this.subscribeToDelivery(e),this.scheduleFlush(0),[2,t]})})},t.prototype.subscribeToDelivery=function(e){return d(this,void 0,void 0,function(){var t=this;return f(this,function(n){return[2,new Promise(function(n){var r=function r(i,o){i.isSame(e)&&(t.off("flush",r),n(o?i:i))};t.on("flush",r)})]})})},t.prototype.dispatchSingle=function(e){return d(this,void 0,void 0,function(){var t=this;return f(this,function(n){return e.log("debug","Dispatching"),e.stats.increment("message_dispatched"),this.queue.updateAttempts(e),e.attempts=1,[2,this.deliver(e).catch(function(n){return t.enqueuRetry(n,e)?t.subscribeToDelivery(e):(e.setFailedDelivery({reason:n}),e)})]})})},t.prototype.isEmpty=function(){return 0===this.queue.length},t.prototype.scheduleFlush=function(e){var t=this;void 0===e&&(e=500),this.flushing||(this.flushing=!0,setTimeout(function(){t.flush().then(function(){setTimeout(function(){t.flushing=!1,t.queue.length&&t.scheduleFlush(0)},0)})},e))},t.prototype.deliver=function(e){return d(this,void 0,void 0,function(){var t,n,r,i;return f(this,function(o){switch(o.label){case 0:return[4,this.criticalTasks.done()];case 1:o.sent(),t=Date.now(),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,this.flushOne(e)];case 3:return e=o.sent(),n=Date.now()-t,this.emit("delivery_success",e),e.stats.gauge("delivered",n),e.log("debug","Delivered",e.event),[2,e];case 4:throw r=o.sent(),i=r,e.log("error","Failed to deliver",i),this.emit("delivery_failure",e,i),e.stats.increment("delivery_failed"),r;case 5:return[2]}})})},t.prototype.enqueuRetry=function(e,t){return!(e instanceof We&&!e.retry)&&this.queue.pushWithBackoff(t)},t.prototype.flush=function(){return d(this,void 0,void 0,function(){var e,t,n;return f(this,function(r){switch(r.label){case 0:if(0===this.queue.length)return[2,[]];if(!(e=this.queue.pop()))return[2,[]];e.attempts=this.queue.getAttempts(e),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.deliver(e)];case 2:return e=r.sent(),this.emit("flush",e,!0),[3,4];case 3:return t=r.sent(),n=this.enqueuRetry(t,e),n||(e.setFailedDelivery({reason:t}),this.emit("flush",e,!1)),[2,[]];case 4:return[2,[e]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(e){var t=this.plugins.filter(function(t){var n,r,i;if("destination"!==t.type&&"Segment.io"!==t.name)return!0;var o=void 0;return null===(n=t.alternativeNames)||void 0===n||n.forEach(function(t){void 0!==e[t]&&(o=e[t])}),null!==(i=null!==(r=e[t.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Segment.io"===t.name||e.All)}),n=Z(t,"type"),r=n.before,i=void 0===r?[]:r,o=n.enrichment,a=void 0===o?[]:o,s=n.destination,u=void 0===s?[]:s,c=n.after;return{before:i,enrichment:a,destinations:u,after:void 0===c?[]:c}},t.prototype.flushOne=function(e){var t,n;return d(this,void 0,void 0,function(){var r,i,o,a,s,u,c,l,d,p,c,h,v,y,g;return f(this,function(f){switch(f.label){case 0:if(!this.isReady())throw new Error("Not ready");e.attempts>1&&this.emit("delivery_retry",e),r=this.availableExtensions(null!==(t=e.event.integrations)&&void 0!==t?t:{}),i=r.before,o=r.enrichment,a=0,s=i,f.label=1;case 1:return a<s.length?(u=s[a],[4,te(e,u)]):[3,4];case 2:c=f.sent(),c instanceof Qe&&(e=c),this.emit("message_enriched",e,u),f.label=3;case 3:return a++,[3,1];case 4:l=0,d=o,f.label=5;case 5:return l<d.length?(p=d[l],[4,ee(e,p)]):[3,8];case 6:c=f.sent(),c instanceof Qe&&(e=c),this.emit("message_enriched",e,p),f.label=7;case 7:return l++,[3,5];case 8:return h=this.availableExtensions(null!==(n=e.event.integrations)&&void 0!==n?n:{}),v=h.destinations,y=h.after,[4,new Promise(function(t,n){setTimeout(function(){var r=v.map(function(t){return ee(e,t)});Promise.all(r).then(t).catch(n)},0)})];case 9:return f.sent(),e.stats.increment("message_delivered"),this.emit("message_delivered",e),g=y.map(function(t){return ee(e,t)}),[4,Promise.all(g)];case 10:return f.sent(),[2,e]}})})},t}(Ne),Ze=function(e,t){var n=Date.now()-e;return Math.max((null!==t&&void 0!==t?t:300)-n,0)},Xe=Object.freeze({__proto__:null,backoff:Y,CoreLogger:ze,CoreEventFactory:De,pTimeout:W,sleep:Q,invokeCallback:J,ON_REMOVE_FROM_FUTURE:Le,PriorityQueue:Ue,ContextCancelation:We,CoreContext:Qe,CoreEventQueue:$e,getDelay:Ze,dispatch:ne,isString:D,isNumber:F,isFunction:N,exists:R,isPlainObject:L,ValidationError:Ae,assertUserIdentity:U,assertEventExists:B,assertEventType:q,assertTrackEventName:V,assertTrackEventProperties:z,assertTraits:K,assertMessageId:H,validateEvent:G,bindAll:re,CoreStats:He,NullStats:Ge,attempt:ee,ensure:te}),et=e(function(e,t){function n(e,t,n,r){var i,o=[e,t,n,r],a=(0,Xe.isPlainObject)(e)?e.event:e;if(!a||!(0,Xe.isString)(a))throw new Error("Event missing");var s=(0,Xe.isPlainObject)(e)?null!==(i=e.properties)&&void 0!==i?i:{}:(0,Xe.isPlainObject)(t)?t:{},u={};return(0,Xe.isFunction)(n)||(u=null!==n&&void 0!==n?n:{}),(0,Xe.isPlainObject)(e)&&!(0,Xe.isFunction)(t)&&(u=null!==t&&void 0!==t?t:{}),[a,s,u,o.find(Xe.isFunction)]}function r(e,t,n,r,i){var o,a,s=null,u=null,c=[e,t,n,r,i],l=c.filter(Xe.isString);void 0!==l[0]&&void 0!==l[1]&&(s=l[0],u=l[1]),1===l.length&&(s=null,u=l[0]);var d=c.find(Xe.isFunction),f=c.filter(function(e){return null===u?(0,Xe.isPlainObject)(e):(0,Xe.isPlainObject)(e)||null===e}),p=null!==(o=f[0])&&void 0!==o?o:{},h=null!==(a=f[1])&&void 0!==a?a:{};return[s,u,p,h,d]}function i(e,t,n,r){(0,Xe.isNumber)(e)&&(e=e.toString()),(0,Xe.isNumber)(t)&&(t=t.toString());var i=[e,t,n,r],o=i.filter(Xe.isString),a=o[0],s=void 0===a?e:a,u=o[1],c=void 0===u?null:u,l=i.filter(Xe.isPlainObject)[0];return[s,c,void 0===l?{}:l,i.find(Xe.isFunction)]}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAliasArguments=t.resolveUserArguments=t.resolvePageArguments=t.resolveArguments=void 0,t.resolveArguments=n,t.resolvePageArguments=r;var o=function(e){return function(){for(var t,n,r,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},s=["callback","options","traits","id"],u=0,c=i;u<c.length;u++){var l=c[u],d=s.pop();if("id"===d){if((0,Xe.isString)(l)||(0,Xe.isNumber)(l)){a.id=l.toString();continue}if(null===l||void 0===l)continue;d=s.pop()}if("traits"!==d&&"options"!==d||null!==l&&void 0!==l&&!(0,Xe.isPlainObject)(l)||(a[d]=l),(0,Xe.isFunction)(l)){a.callback=l;break}}return[null!==(t=a.id)&&void 0!==t?t:e.id(),null!==(n=a.traits)&&void 0!==n?n:{},null!==(r=a.options)&&void 0!==r?r:{},a.callback]}};t.resolveUserArguments=o,t.resolveAliasArguments=i}),tt=e(function(e,t){function n(){return"undefined"!=typeof window}function r(){return!n()}Object.defineProperty(t,"__esModule",{value:!0}),t.isServer=t.isBrowser=void 0,t.isBrowser=n,t.isServer=r}),nt=tt,rt=e(function(e,t){function n(){return!(0,nt.isBrowser)()||window.navigator.onLine}function r(){return!n()}Object.defineProperty(t,"__esModule",{value:!0}),t.isOffline=t.isOnline=void 0,t.isOnline=n,t.isOffline=r}),it=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="1.76.0"}),ot=e(function(e,t){function n(e){i=e}function r(){return i}Object.defineProperty(t,"__esModule",{value:!0}),t.getVersionType=t.setVersionType=void 0;var i="npm";t.setVersionType=n,t.getVersionType=r}),at=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SEGMENT_API_HOST=void 0,t.SEGMENT_API_HOST="api.segment.io/v1"}),st=je,ut=it,ct=ot,lt=at,dt=e(function(e,t){function n(e){console.error("Error sending segment performance metrics",e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteMetrics=void 0;var r=function(e,t,n){var r=t.reduce(function(e,t){var n=t.split(":"),r=n[0],i=n[1];return e[r]=i,e},{});return{type:"Counter",metric:e,value:1,tags:me.__assign(me.__assign({},r),{library:"analytics.js",library_version:"web"===n?"next-".concat(ut.version):"npm:next-".concat(ut.version)})}},i=function(){function e(e){var t,r,i,o,a,s=this;if(this.host=null!==(t=null===e||void 0===e?void 0:e.host)&&void 0!==t?t:lt.SEGMENT_API_HOST,this.sampleRate=null!==(r=null===e||void 0===e?void 0:e.sampleRate)&&void 0!==r?r:1,this.flushTimer=null!==(i=null===e||void 0===e?void 0:e.flushTimer)&&void 0!==i?i:3e4,this.maxQueueSize=null!==(o=null===e||void 0===e?void 0:e.maxQueueSize)&&void 0!==o?o:20,this.protocol=null!==(a=null===e||void 0===e?void 0:e.protocol)&&void 0!==a?a:"https",this.queue=[],this.sampleRate>0){var u=!1;!function e(){u||(u=!0,s.flush().catch(n),u=!1,setTimeout(e,s.flushTimer))}()}}return e.prototype.increment=function(e,t){if(e.includes("analytics_js.")&&0!==t.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var i=r(e,t,(0,ct.getVersionType)());this.queue.push(i),e.includes("error")&&this.flush().catch(n)}},e.prototype.flush=function(){return me.__awaiter(this,void 0,void 0,function(){var e=this;return me.__generator(this,function(t){switch(t.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(t){n(t),e.sampleRate=0})];case 1:return t.sent(),[2]}})})},e.prototype.send=function(){return me.__awaiter(this,void 0,void 0,function(){var e,t,n;return me.__generator(this,function(r){return e={series:this.queue},this.queue=[],t={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,(0,st.fetch)(n,{headers:t,body:JSON.stringify(e),method:"POST"})]})})},e}();t.RemoteMetrics=i}),ft=dt,pt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stats=void 0;var n,r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return me.__extends(t,e),t.initRemoteMetrics=function(e){n=new ft.RemoteMetrics(e)},t.prototype.increment=function(t,r,i){e.prototype.increment.call(this,t,r,i),null===n||void 0===n||n.increment(t,null!==i&&void 0!==i?i:[])},t}(Xe.CoreStats);t.Stats=r}),ht=pt,vt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContextCancelation=t.Context=void 0,Object.defineProperty(t,"ContextCancelation",{enumerable:!0,get:function(){return Xe.ContextCancelation}});var n=function(e){function t(t,n){return e.call(this,t,n,new ht.Stats)||this}return me.__extends(t,e),t.system=function(){return new this({type:"track",event:"system"})},t}(Xe.CoreContext);t.Context=n}),yt=e(function(e,t){function n(e){if(!(0,Xe.isPlainObject)(e))return!1;if(e.__t!==t.BufferedPageContextDiscriminant)return!1;for(var n in e)if(!i.includes(n))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultPageContext=t.getDefaultBufferedPageContext=t.createPageContext=t.isBufferedPageContext=t.createBufferedPageContext=t.BufferedPageContextDiscriminant=void 0,t.BufferedPageContextDiscriminant="bpc";var r=function(e,n,r,i,o,a){return{__t:t.BufferedPageContextDiscriminant,c:n,p:i,u:e,s:r,t:o,r:a}};t.createBufferedPageContext=r;var i=Object.keys((0,t.createBufferedPageContext)("","","","","",""));t.isBufferedPageContext=n;var o=function(e,t){return e.indexOf("?")>-1?e:e+t},a=function(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)},s=function(e){try{return new URL(e).pathname}catch(t){return"/"===e[0]?e:"/"+e}},u=function(e){var t=e.c,n=e.p,r=e.s,i=e.u,u=e.r,c=e.t;return{path:t?s(t):n,referrer:u,search:r,title:c,url:t?o(t,r):a(i)}};t.createPageContext=u;var c=function(){var e=document.querySelector("link[rel='canonical']");return(0,t.createBufferedPageContext)(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};t.getDefaultBufferedPageContext=c;var l=function(){return(0,t.createPageContext)((0,t.getDefaultBufferedPageContext)())};t.getDefaultPageContext=l}),gt=e(function(e,t){function n(e,t){return Object.assign.apply(Object,me.__spreadArray([{}],t.map(function(t){var n;if(e&&Object.prototype.hasOwnProperty.call(e,t))return n={},n[t]=e[t],n}),!1))}Object.defineProperty(t,"__esModule",{value:!0}),t.pick=void 0,t.pick=n}),mt=gt,_t=yt,bt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addPageContext=void 0;var n=function(e,t){void 0===t&&(t=(0,_t.getDefaultPageContext)());var n,r=e.context;"page"===e.type&&(n=e.properties&&(0,mt.pick)(e.properties,Object.keys(t)),e.properties=me.__assign(me.__assign(me.__assign({},t),e.properties),e.name?{name:e.name}:{})),r.page=me.__assign(me.__assign(me.__assign({},t),n),r.page)};t.addPageContext=n}),wt=bt,Pt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),me.__exportStar(_t,t),me.__exportStar(wt,t)}),xt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0})}),St=function(e){return e&&e.default||e}(Ve),Ot=Pt,kt=xt,jt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventFactory=void 0,me.__exportStar(kt,t);var n=function(e){function t(t){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat((0,St.v4)())},onEventMethodCall:function(e){var t=e.options;n.maybeUpdateAnonId(t)},onFinishedEvent:function(e){return n.addIdentity(e),e}})||this;return n.user=t,n}return me.__extends(t,e),t.prototype.maybeUpdateAnonId=function(e){(null===e||void 0===e?void 0:e.anonymousId)&&this.user.anonymousId(e.anonymousId)},t.prototype.addIdentity=function(e){this.user.id()&&(e.userId=this.user.id()),this.user.anonymousId()&&(e.anonymousId=this.user.anonymousId())},t.prototype.track=function(t,n,r,i,o){var a=e.prototype.track.call(this,t,n,r,i);return(0,Ot.addPageContext)(a,o),a},t.prototype.page=function(t,n,r,i,o,a){var s=e.prototype.page.call(this,t,n,r,i,o);return(0,Ot.addPageContext)(s,a),s},t.prototype.screen=function(t,n,r,i,o,a){var s=e.prototype.screen.call(this,t,n,r,i,o);return(0,Ot.addPageContext)(s,a),s},t.prototype.identify=function(t,n,r,i,o){var a=e.prototype.identify.call(this,t,n,r,i);return(0,Ot.addPageContext)(a,o),a},t.prototype.group=function(t,n,r,i,o){var a=e.prototype.group.call(this,t,n,r,i);return(0,Ot.addPageContext)(a,o),a},t.prototype.alias=function(t,n,r,i,o){var a=e.prototype.alias.call(this,t,n,r,i);return(0,Ot.addPageContext)(a,o),a},t}(Xe.CoreEventFactory);t.EventFactory=n}),It=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isDestinationPluginWithAddMiddleware=void 0;var n=function(e){return"addMiddleware"in e&&"destination"===e.type};t.isDestinationPluginWithAddMiddleware=n}),At=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ON_REMOVE_FROM_FUTURE=t.PriorityQueue=void 0,Object.defineProperty(t,"PriorityQueue",{enumerable:!0,get:function(){return Xe.PriorityQueue}}),Object.defineProperty(t,"ON_REMOVE_FROM_FUTURE",{enumerable:!0,get:function(){return Xe.ON_REMOVE_FROM_FUTURE}})}),Mt=At,Et=vt,Ct=e(function(e,t){function n(e){var t=u.getItem(e);return(t?JSON.parse(t):[]).map(function(e){return new Et.Context(e.event,e.id)})}function r(e,t){var r=n(e),i=me.__spreadArray(me.__spreadArray([],t,!0),r,!0),o=i.reduce(function(e,t){var n;return me.__assign(me.__assign({},e),(n={},n[t.id]=t,n))},{});u.setItem(e,JSON.stringify(Object.values(o)))}function i(e){var t=u.getItem(e);return t?JSON.parse(t):{}}function o(e,t){var n=i(e);u.setItem(e,JSON.stringify(me.__assign(me.__assign({},n),t)))}function a(e){u.removeItem(e)}function s(e,t,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(e,":lock"),i=u.getItem(r),o=i?JSON.parse(i):null,a=null===o||function(e){return(new Date).getTime()>e}(o);if(a)return u.setItem(r,JSON.stringify(c()+50)),t(),void u.removeItem(r);!a&&n<3?setTimeout(function(){s(e,t,n+1)},50):console.error("Unable to retrieve lock")}Object.defineProperty(t,"__esModule",{value:!0}),t.PersistedPriorityQueue=void 0;var u={getItem:function(){},setItem:function(){},removeItem:function(){}};try{u=(0,nt.isBrowser)()&&window.localStorage?window.localStorage:u}catch(e){console.warn("Unable to access localStorage",e)}var c=function(){return(new Date).getTime()},l=function(e){function t(t,u){var c=e.call(this,t,[])||this,l="persisted-queue:v1:".concat(u,":items"),d="persisted-queue:v1:".concat(u,":seen"),f=[],p={};return s(u,function(){try{f=n(l),p=i(d),a(l),a(d),c.queue=me.__spreadArray(me.__spreadArray([],f,!0),c.queue,!0),c.seen=me.__assign(me.__assign({},p),c.seen)}catch(e){console.error(e)}}),window.addEventListener("pagehide",function(){if(c.todo>0){var e=me.__spreadArray(me.__spreadArray([],c.queue,!0),c.future,!0);try{s(u,function(){r(l,e),o(d,c.seen)})}catch(e){console.error(e)}}}),c}return me.__extends(t,e),t}(Mt.PriorityQueue);t.PersistedPriorityQueue=l}),Tt=Ct,Dt=rt,Ft=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventQueue=void 0;var n=function(e){function t(t){return e.call(this,"string"==typeof t?new Tt.PersistedPriorityQueue(4,t):t)||this}return me.__extends(t,e),t.prototype.flush=function(){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return(0,Dt.isOffline)()?[2,[]]:[2,e.prototype.flush.call(this)]})})},t}(Xe.CoreEventQueue);t.EventQueue=n}),Nt=e(function(e,t){function n(e){for(var t=e.constructor.prototype,n=0,r=Object.getOwnPropertyNames(t);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&"function"==typeof o.value&&(e[i]=e[i].bind(e))}}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}),Rt=e(function(e,t){!function(t,n){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function t(n,r){function i(t,i,o){if("undefined"!=typeof document){o=e({},r,o),"number"==typeof o.expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=t+"="+n.write(i,t)+a}}function o(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},i=0;i<t.length;i++){var o=t[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=n.read(a,s),e===s)break}catch(e){}}return e?r[e]:r}}return Object.create({set:i,get:o,remove:function(t,n){i(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}return t({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()}()}),Lt=e(function(e,t){function n(e){var t=e.hostname,n=t.split("."),r=n[n.length-1],i=[];if(4===n.length&&parseInt(r,10)>0)return i;if(n.length<=1)return i;for(var o=n.length-2;o>=0;--o)i.push(n.slice(o).join("."));return i}function r(e){try{return new URL(e)}catch(e){return}}function i(e){var t=r(e);if(t)for(var i=n(t),a=0;a<i.length;++a){var s=i[a],u={domain:"."+s};try{if(o.default.set("__tld__","1",u),o.default.get("__tld__"))return o.default.remove("__tld__",u),s}catch(e){return}}}Object.defineProperty(t,"__esModule",{value:!0}),t.tld=void 0;var o=me.__importDefault(Rt);t.tld=i}),Ut=Lt,Bt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=me.__importDefault(Rt),r=function(){function e(t){void 0===t&&(t=e.defaults),this.options=me.__assign(me.__assign({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:(0,Ut.tld)(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(e){var t;try{var r=n.default.get(e);if(void 0===r||null===r)return null;try{return null!==(t=JSON.parse(r))&&void 0!==t?t:null}catch(e){return null!==r&&void 0!==r?r:null}}catch(e){return null}},e.prototype.set=function(e,t){"string"==typeof t?n.default.set(e,t,this.opts()):null===t?n.default.remove(e,this.opts()):n.default.set(e,JSON.stringify(t),this.opts())},e.prototype.remove=function(e){return n.default.remove(e,this.opts())},e}();t.CookieStorage=r}),qt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorage=void 0;var n=function(){function e(){}return e.prototype.localStorageWarning=function(e,t){console.warn("Unable to access ".concat(e,", localStorage may be ").concat(t))},e.prototype.get=function(e){var t;try{var n=localStorage.getItem(e);if(null===n)return null;try{return null!==(t=JSON.parse(n))&&void 0!==t?t:null}catch(e){return null!==n&&void 0!==n?n:null}}catch(t){return this.localStorageWarning(e,"unavailable"),null}},e.prototype.set=function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(t){this.localStorageWarning(e,"full")}},e.prototype.remove=function(e){try{return localStorage.removeItem(e)}catch(t){this.localStorageWarning(e,"unavailable")}},e}();t.LocalStorage=n}),Vt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorage=void 0;var n=function(){function e(){this.cache={}}return e.prototype.get=function(e){var t;return null!==(t=this.cache[e])&&void 0!==t?t:null},e.prototype.set=function(e,t){this.cache[e]=t},e.prototype.remove=function(e){delete this.cache[e]},e}();t.MemoryStorage=n}),zt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.StoreType=void 0,t.StoreType={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"}}),Kt=zt,Ht=e(function(e,t){function n(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every(function(e){return Object.values(Kt.StoreType).includes(e)})}function r(e){return"object"===(void 0===e?"undefined":_typeof(e))&&void 0!==e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.isStoreTypeWithSettings=t.isArrayOfStoreType=void 0,t.isArrayOfStoreType=n,t.isStoreTypeWithSettings=r}),Gt=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.UniversalStorage=void 0;var n=function(e,t,n,r){console.warn("".concat(e.constructor.name,": Can't ").concat(t,' key "').concat(n,'" | Err: ').concat(r))},r=function(){function e(e){this.stores=e}return e.prototype.get=function(e){for(var t=null,r=0,i=this.stores;r<i.length;r++){var o=i[r];try{if(void 0!==(t=o.get(e))&&null!==t)return t}catch(t){n(o,"get",e,t)}}return null},e.prototype.set=function(e,t){this.stores.forEach(function(r){try{r.set(e,t)}catch(t){n(r,"set",e,t)}})},e.prototype.clear=function(e){this.stores.forEach(function(t){try{t.remove(e)}catch(r){n(t,"remove",e,r)}})},e.prototype.getAndSync=function(e){var t=this.get(e),n="number"==typeof t?t.toString():t;return this.set(e,n),n},e}();t.UniversalStorage=r}),Wt=Bt,Qt=qt,Jt=Vt,Yt=Ht,$t=Gt,Zt=e(function(e,t){function n(e){return e.map(function(e){var t,n;switch((0,Yt.isStoreTypeWithSettings)(e)?(t=e.name,n=e.settings):t=e,t){case Kt.StoreType.Cookie:return new Wt.CookieStorage(n);case Kt.StoreType.LocalStorage:return new Qt.LocalStorage;case Kt.StoreType.Memory:return new Jt.MemoryStorage;default:throw new Error("Unknown Store Type: ".concat(e))}})}function r(e,t){return e.map(function(e){return t&&e===Kt.StoreType.Cookie?{name:e,settings:t}:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyCookieOptions=t.initializeStorages=void 0,me.__exportStar(Kt,t),me.__exportStar(Qt,t),me.__exportStar(Wt,t),me.__exportStar(Jt,t),me.__exportStar($t,t),me.__exportStar(Yt,t),t.initializeStorages=n,t.applyCookieOptions=r}),Xt=Nt,en=Zt,tn=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Group=t.User=void 0;var n=me.__importDefault(Xt),r={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},i=function(){function e(e,t){void 0===e&&(e=r);var i,o,a,s,u=this;this.options={},this.id=function(e){if(u.options.disable)return null;var t=u.identityStore.getAndSync(u.idKey);if(void 0!==e){u.identityStore.set(u.idKey,e);e!==t&&null!==t&&null!==e&&u.anonymousId(null)}var n=u.identityStore.getAndSync(u.idKey);if(n)return n;var i=u.legacyUserStore.get(r.cookie.oldKey);return i?"object"===(void 0===i?"undefined":_typeof(i))?i.id:i:null},this.anonymousId=function(e){var t,n;if(u.options.disable)return null;if(void 0===e){var r=null!==(t=u.identityStore.getAndSync(u.anonKey))&&void 0!==t?t:null===(n=u.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===e?(u.identityStore.set(u.anonKey,null),u.identityStore.getAndSync(u.anonKey)):(u.identityStore.set(u.anonKey,null!==e&&void 0!==e?e:(0,St.v4)()),u.identityStore.getAndSync(u.anonKey))},this.traits=function(e){var t;if(!u.options.disable)return null===e&&(e={}),e&&u.traitsStore.set(u.traitsKey,null!==e&&void 0!==e?e:{}),null!==(t=u.traitsStore.get(u.traitsKey))&&void 0!==t?t:{}},this.options=me.__assign(me.__assign({},r),e),this.cookieOptions=t,this.idKey=null!==(o=null===(i=e.cookie)||void 0===i?void 0:i.key)&&void 0!==o?o:r.cookie.key,this.traitsKey=null!==(s=null===(a=e.localStorage)||void 0===a?void 0:a.key)&&void 0!==s?s:r.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,t),this.legacyUserStore=this.createStorage(this.options,t,function(e){return e===en.StoreType.Cookie}),this.traitsStore=this.createStorage(this.options,t,function(e){return e!==en.StoreType.Cookie});var c=this.legacyUserStore.get(r.cookie.oldKey);c&&"object"===(void 0===c?"undefined":_typeof(c))&&(c.id&&this.id(c.id),c.traits&&this.traits(c.traits)),(0,n.default)(this)}return e.prototype.legacySIO=function(){var e=this.legacyUserStore.get("_sio");if(!e)return null;var t=e.split("----");return[t[0],t[1]]},e.prototype.identify=function(e,t){if(!this.options.disable){t=null!==t&&void 0!==t?t:{};var n=this.id();null!==n&&n!==e||(t=me.__assign(me.__assign({},this.traits()),t)),e&&this.id(e),this.traits(t)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(e,t,n){var r=[en.StoreType.LocalStorage,en.StoreType.Cookie,en.StoreType.Memory];return e.disable?new en.UniversalStorage([]):e.persist?(void 0!==e.storage&&null!==e.storage&&(0,en.isArrayOfStoreType)(e.storage)&&(r=e.storage.stores),e.localStorageFallbackDisabled&&(r=r.filter(function(e){return e!==en.StoreType.LocalStorage})),n&&(r=r.filter(n)),new en.UniversalStorage((0,en.initializeStorages)((0,en.applyCookieOptions)(r,t)))):new en.UniversalStorage([new en.MemoryStorage])},e.defaults=r,e}();t.User=i;var o={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},a=function(e){function t(t,r){void 0===t&&(t=o);var i=e.call(this,me.__assign(me.__assign({},o),t),r)||this;return i.anonymousId=function(e){},(0,n.default)(i),i}return me.__extends(t,e),t}(i);t.Group=a}),nn=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isThenable=void 0;var n=function(e){return"object"===(void 0===e?"undefined":_typeof(e))&&null!==e&&"then"in e&&"function"==typeof e.then};t.isThenable=n}),rn=nn,on=e(function(e,t){function n(e,t){return me.__awaiter(this,void 0,void 0,function(){var n,r;return me.__generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,n=e[t.method].apply(e,t.args),(0,rn.isThenable)(n)?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(n),[3,4];case 3:return r=i.sent(),t.reject(r),[3,4];case 4:return[2]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsBuffered=t.callAnalyticsMethod=t.PreInitMethodCallBuffer=t.PreInitMethodCall=t.hasBufferedPageContextAsLastArg=t.popPageContext=t.flushAnalyticsCallsInNewTask=t.flushSetAnonymousID=t.flushOn=t.flushRegister=t.flushAddSourceMiddleware=void 0;var r=function(e,t,r){r.getAndRemove(e).forEach(function(e){n(t,e).catch(console.error)})},i=function(e,t){return me.__awaiter(void 0,void 0,void 0,function(){var r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:r=0,i=t.getAndRemove("addSourceMiddleware"),a.label=1;case 1:return r<i.length?(o=i[r],[4,n(e,o).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return r++,[3,1];case 4:return[2]}})})};t.flushAddSourceMiddleware=i;var o=function(e,t){return me.__awaiter(void 0,void 0,void 0,function(){var r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:r=0,i=t.getAndRemove("register"),a.label=1;case 1:return r<i.length?(o=i[r],[4,n(e,o).catch(console.error)]):[3,4];case 2:a.sent(),a.label=3;case 3:return r++,[3,1];case 4:return[2]}})})};t.flushRegister=o,t.flushOn=r.bind(de,"on"),t.flushSetAnonymousID=r.bind(de,"setAnonymousId");var a=function(e,t){Object.keys(t.calls).forEach(function(r){t.getAndRemove(r).forEach(function(t){setTimeout(function(){n(e,t).catch(console.error)},0)})})};t.flushAnalyticsCallsInNewTask=a;var s=function(e){if((0,t.hasBufferedPageContextAsLastArg)(e)){var n=e.pop();return(0,Ot.createPageContext)(n)}};t.popPageContext=s;var u=function(e){var t=e[e.length-1];return(0,Ot.isBufferedPageContext)(t)};t.hasBufferedPageContextAsLastArg=u;var c=function(){function e(e,t,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=e,this.resolve=n,this.reject=r,this.called=!1,this.args=t}return e}();t.PreInitMethodCall=c;var l=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._callMap={},this.add.apply(this,e)}return Object.defineProperty(e.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(e){this._callMap=e},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t;return null!==(t=this.calls[e])&&void 0!==t?t:[]},e.prototype.getAndRemove=function(e){var t=this.get(e);return this.calls[e]=[],t},e.prototype.add=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];n.forEach(function(n){["track","screen","alias","group","page","identify"].includes(n.method)&&!(0,t.hasBufferedPageContextAsLastArg)(n.args)&&(n.args=me.__spreadArray(me.__spreadArray([],n.args,!0),[(0,Ot.getDefaultBufferedPageContext)()],!1)),e.calls[n.method]?e.calls[n.method].push(n):e.calls[n.method]=[n]})},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var e;return(e=[]).concat.apply(e,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){if("npm"!==(0,ct.getVersionType)()){var e=(0,Pe.getGlobalAnalytics)();if(Array.isArray(e)){var t=e.splice(0,e.length),n=t.map(function(e){var t=e[0],n=e.slice(1);return new c(t,n)});this.add.apply(this,n)}}},e}();t.PreInitMethodCallBuffer=l,t.callAnalyticsMethod=n;var d=function(){function e(e){var t=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=ut.version,this._preInitBuffer=new l,this._promise=e(this._preInitBuffer),this._promise.then(function(e){var n=e[0],r=e[1];t.instance=n,t.ctx=r}).catch(function(){})}return e.prototype.then=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).then.apply(e,t)},e.prototype.catch=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).catch.apply(e,t)},e.prototype.finally=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return(e=this._promise).finally.apply(e,t)},e.prototype._createMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t.instance){var o=(n=t.instance)[e].apply(n,r);return Promise.resolve(o)}return new Promise(function(n,i){t._preInitBuffer.add(new c(e,r,n,i))})}},e.prototype._createChainableMethod=function(e){var t=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return t.instance?((n=t.instance)[e].apply(n,r),t):(t._preInitBuffer.add(new c(e,r)),t)}},e}();t.AnalyticsBuffered=d}),an=e(function(e){function t(e){return function(t,n,r,i){var s=i&&a(i.normalizer)?i.normalizer:o;n=s(n);for(var u,c=!1;!c;)!function(){for(u in t){var e=s(u);if(0===n.indexOf(e)){var r=n.substr(e.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=t[u];return null==i?void(c=!0):n.length?void(t=i):void(c=!0)}}}u=void 0,c=!0}();if(u)return null==t?t:e(t,u,r)}}function n(e,t){if(e.hasOwnProperty(t))return e[t]}function r(e,t){return e.hasOwnProperty(t)&&delete e[t],e}function i(e,t,n){return e.hasOwnProperty(t)&&(e[t]=n),e}function o(e){return e.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function a(e){return"function"==typeof e}e.exports=t(n),e.exports.find=e.exports,e.exports.replace=function(e,n,r,o){return t(i).call(this,e,n,r,o),e},e.exports.del=function(e,n,i){return t(r).call(this,e,n,null,i),e}}),sn=e(function(e,t){function n(e,t){return function(){var n=this.traits(),r=this.properties?this.properties():{};return o.default(n,"address."+e)||o.default(n,e)||(t?o.default(n,"address."+t):null)||(t?o.default(n,t):null)||o.default(r,"address."+e)||o.default(r,e)||(t?o.default(r,"address."+t):null)||(t?o.default(r,t):null)}}function r(e){e.zip=n("postalCode","zip"),e.country=n("country"),e.street=n("street"),e.state=n("state"),e.city=n("city"),e.region=n("region")}var i=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(an);t.default=r}),un=e(function(e,t){function n(e){if("object"!==(void 0===e?"undefined":_typeof(e)))return e;if("[object Object]"===Object.prototype.toString.call(e)){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=n(e[r]));return t}return Array.isArray(e)?e.map(n):e}Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=n}),cn=e(function(e,t){function n(e){return!r[e]}Object.defineProperty(t,"__esModule",{value:!0});var r={Salesforce:!0};t.default=n}),ln=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/,dn=function(e){var t=[1,5,6,7,11,12],n=ln.exec(e),r=0;if(!n)return new Date(e);for(var i,o=0;i=t[o];o++)n[i]=parseInt(n[i],10)||0;n[2]=parseInt(n[2],10)||1,n[3]=parseInt(n[3],10)||1,n[2]--,n[8]=n[8]?(n[8]+"00").substring(0,3):0," "===n[4]?r=(new Date).getTimezoneOffset():"Z"!==n[9]&&n[10]&&(r=60*n[11]+n[12],"+"===n[10]&&(r=0-r));var a=Date.UTC(n[1],n[2],n[3],n[5],n[6]+r,n[7],n[8]);return new Date(a)},fn=function(e,t){return"string"==typeof e&&((!t||!1!==/^\d{4}-\d{2}-\d{2}/.test(e))&&ln.test(e))},pn={parse:dn,is:fn},hn=/\d{13}/,vn=function(e){return hn.test(e)},yn=function(e){return e=parseInt(e,10),new Date(e)},gn={is:vn,parse:yn},mn=/\d{10}/,_n=function(e){return mn.test(e)},bn=function(e){var t=1e3*parseInt(e,10);return new Date(t)},wn={is:_n,parse:bn},Pn=Object.prototype,xn=Pn.toString,Sn=function(e){return ie(e)?e:oe(e)?new Date(ae(e)):pn.is(e)?pn.parse(e):gn.is(e)?gn.parse(e):wn.is(e)?wn.parse(e):new Date(e)},On=se,kn=e(function(e,t){function n(e,t){t=t||{},this.raw=un.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=un.clone(e)),"traverse"in t||(t.traverse=!0),e.timestamp="timestamp"in e?s.default(e.timestamp):new Date,t.traverse&&c.default(e),this.opts=t,this.obj=e}function r(e){return un.clone(e)}var i=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Facade=void 0;var o=i(sn),a=i(cn),s=i(Sn),u=i(an),c=i(On);t.Facade=n;var l=n.prototype;l.proxy=function(e){var t=e.split(".");e=t.shift();var n=this[e]||this.obj[e];return n?("function"==typeof n&&(n=n.call(this)||{}),0===t.length?this.opts.clone?r(n):n:(n=u.default(n,t.join(".")),this.opts.clone?r(n):n)):n},l.field=function(e){var t=this.obj[e];return this.opts.clone?r(t):t},n.proxy=function(e){return function(){return this.proxy(e)}},n.field=function(e){return function(){return this.field(e)}},n.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var n=this.proxy(e);return n&&(n=[this.opts.clone?un.clone(n):n]),n||[]}},n.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var n=this.proxy(e+"s");return Array.isArray(n)?n[0]:void 0}},l.json=function(){var e=this.opts.clone?un.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e},l.rawEvent=function(){return this.raw},l.options=function(e){var t=this.obj.options||this.obj.context||{},n=this.opts.clone?un.clone(t):t;if(!e)return n;if(this.enabled(e)){var r=this.integrations(),i=r[e]||u.default(r,e);return"object"!==(void 0===i?"undefined":_typeof(i))&&(i=u.default(this.options(),e)),"object"===(void 0===i?"undefined":_typeof(i))?i:{}}},l.context=l.options,l.enabled=function(e){var t=this.proxy("options.providers.all");"boolean"!=typeof t&&(t=this.proxy("options.all")),"boolean"!=typeof t&&(t=this.proxy("integrations.all")),"boolean"!=typeof t&&(t=!0);var n=t&&a.default(e),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(e)&&(n=r.providers[e]),r.hasOwnProperty(e)){var i=r[e];n="boolean"!=typeof i||i}return!!n},l.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},l.active=function(){var e=this.proxy("options.active");return null!==e&&void 0!==e||(e=!0),e},l.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},l.sessionId=l.anonymousId,l.groupId=n.proxy("options.groupId"),l.traits=function(e){var t=this.proxy("options.traits")||{},n=this.userId();e=e||{},n&&(t.id=n);for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},l.library=function(){var e=this.proxy("options.library");return e?"string"==typeof e?{name:e,version:null}:e:{name:"unknown",version:null}},l.device=function(){var e=this.proxy("context.device");"object"===(void 0===e?"undefined":_typeof(e))&&null!==e||(e={});var t=this.library().name;return e.type?e:(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android"),e)},l.userAgent=n.proxy("context.userAgent"),l.timezone=n.proxy("context.timezone"),l.timestamp=n.field("timestamp"),l.channel=n.field("channel"),l.ip=n.proxy("context.ip"),l.userId=n.field("userId"),o.default(l)}),jn=e(function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}}),In=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Alias=void 0;var i=r(jn);t.Alias=n,i.default(n,kn.Facade),n.prototype.action=function(){return"alias"},n.prototype.type=n.prototype.action,n.prototype.previousId=function(){return this.field("previousId")||this.field("from")},n.prototype.from=n.prototype.previousId,n.prototype.userId=function(){return this.field("userId")||this.field("to")},n.prototype.to=n.prototype.userId}),An=e(function(e,t){function n(e){return r.test(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=/.+\@.+\..+/;t.default=n}),Mn=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;var i=r(jn),o=r(An),a=r(Sn);t.Group=n,i.default(n,kn.Facade);var s=n.prototype;s.action=function(){return"group"},s.type=s.action,s.groupId=kn.Facade.field("groupId"),s.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return a.default(e)},s.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();return o.default(t)?t:void 0},s.traits=function(e){var t=this.properties(),n=this.groupId();e=e||{},n&&(t.id=n);for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=null==this[r]?this.proxy("traits."+r):this[r]();if(null==i)continue;t[e[r]]=i,delete t[r]}return t},s.name=kn.Facade.proxy("traits.name"),s.industry=kn.Facade.proxy("traits.industry"),s.employees=kn.Facade.proxy("traits.employees"),s.properties=function(){return this.field("traits")||this.field("properties")||{}}}),En=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Identify=void 0;var i=r(an),o=r(jn),a=r(An),s=r(Sn),u=function(e){return e.trim()};t.Identify=n,o.default(n,kn.Facade);var c=n.prototype;c.action=function(){return"identify"},c.type=c.action,c.traits=function(e){var t=this.field("traits")||{},n=this.userId();e=e||{},n&&(t.id=n);for(var r in e){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(t[e[r]]=i,r!==e[r]&&delete t[r])}return t},c.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();return a.default(t)?t:void 0},c.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return s.default(e)},c.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return s.default(e)},c.companyName=function(){return this.proxy("traits.company.name")},c.name=function(){var e=this.proxy("traits.name");if("string"==typeof e)return u(e);var t=this.firstName(),n=this.lastName();return t&&n?u(t+" "+n):void 0},c.firstName=function(){var e=this.proxy("traits.firstName");if("string"==typeof e)return u(e);var t=this.proxy("traits.name");return"string"==typeof t?u(t).split(" ")[0]:void 0},c.lastName=function(){var e=this.proxy("traits.lastName");if("string"==typeof e)return u(e);var t=this.proxy("traits.name");if("string"==typeof t){var n=u(t).indexOf(" ");if(-1!==n)return u(t.substr(n+1))}},c.uid=function(){return this.userId()||this.username()||this.email()},c.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},c.age=function(){var e=this.birthday(),t=i.default(this.traits(),"age");if(null!=t)return t;if(e instanceof Date){return(new Date).getFullYear()-e.getFullYear()}},c.avatar=function(){var e=this.traits();return i.default(e,"avatar")||i.default(e,"photoUrl")||i.default(e,"avatarUrl")},c.position=function(){var e=this.traits();return i.default(e,"position")||i.default(e,"jobTitle")},c.username=kn.Facade.proxy("traits.username"),c.website=kn.Facade.one("traits.website"),c.websites=kn.Facade.multi("traits.website"),c.phone=kn.Facade.one("traits.phone"),c.phones=kn.Facade.multi("traits.phone"),c.address=kn.Facade.proxy("traits.address"),c.gender=kn.Facade.proxy("traits.gender"),c.birthday=kn.Facade.proxy("traits.birthday")}),Cn=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}function r(e){if(e){if("number"==typeof e)return e;if("string"==typeof e)return e=e.replace(/\$/g,""),e=parseFloat(e),isNaN(e)?void 0:e}}var i=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var o=i(jn),a=i(An),s=i(an);t.Track=n,o.default(n,kn.Facade);var u=n.prototype;u.action=function(){return"track"},u.type=u.action,u.event=kn.Facade.field("event"),u.value=kn.Facade.proxy("properties.value"),u.category=kn.Facade.proxy("properties.category"),u.id=kn.Facade.proxy("properties.id"),u.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},u.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},u.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},u.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},u.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},u.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},u.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},u.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},u.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},u.sku=kn.Facade.proxy("properties.sku"),u.tax=kn.Facade.proxy("properties.tax"),u.name=kn.Facade.proxy("properties.name"),u.price=kn.Facade.proxy("properties.price"),u.total=kn.Facade.proxy("properties.total"),u.repeat=kn.Facade.proxy("properties.repeat"),u.coupon=kn.Facade.proxy("properties.coupon"),u.shipping=kn.Facade.proxy("properties.shipping"),u.discount=kn.Facade.proxy("properties.discount"),u.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},u.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},u.description=kn.Facade.proxy("properties.description"),u.plan=kn.Facade.proxy("properties.plan"),u.subtotal=function(){var e=s.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var n=this.tax();n&&(t-=n),n=this.shipping(),n&&(t-=n),n=this.discount(),n&&(t+=n)}return t},u.products=function(){var e=this.properties(),t=s.default(e,"products");return Array.isArray(t)?t.filter(function(e){return null!==e}):[]},u.quantity=function(){return(this.obj.properties||{}).quantity||1},u.currency=function(){return(this.obj.properties||{}).currency||"USD"},u.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},u.query=kn.Facade.proxy("options.query"),u.properties=function(e){var t=this.field("properties")||{};e=e||{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=null==this[n]?this.proxy("properties."+n):this[n]();if(null==r)continue;t[e[n]]=r,delete t[n]}return t},u.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},u.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();return a.default(t)?t:void 0},u.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event(),n=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;return!e&&t&&t.match(n)&&(e=this.proxy("properties.total")),r(e)},u.cents=function(){var e=this.revenue();return"number"!=typeof e?this.value()||0:100*e},u.identify=function(){var e=this.json();return e.traits=this.traits(),new En.Identify(e,this.opts)}}),Tn=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Page=void 0;var i=r(jn),o=r(An);t.Page=n,i.default(n,kn.Facade);var a=n.prototype;a.action=function(){return"page"},a.type=a.action,a.category=kn.Facade.field("category"),a.name=kn.Facade.field("name"),a.title=kn.Facade.proxy("properties.title"),a.path=kn.Facade.proxy("properties.path"),a.url=kn.Facade.proxy("properties.url"),a.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},a.properties=function(e){var t=this.field("properties")||{},n=this.category(),r=this.name();e=e||{},n&&(t.category=n),r&&(t.name=r);for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=null==this[i]?this.proxy("properties."+i):this[i]();if(null==o)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t},a.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();return o.default(t)?t:void 0},a.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t},a.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"},a.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Cn.Track(t,this.opts)}}),Dn=e(function(e,t){function n(e,t){Tn.Page.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Screen=void 0;var i=r(jn);t.Screen=n,i.default(n,Tn.Page),n.prototype.action=function(){return"screen"},n.prototype.type=n.prototype.action,n.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"},n.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Cn.Track(t,this.opts)}}),Fn=e(function(e,t){function n(e,t){kn.Facade.call(this,e,t)}var r=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=void 0;var i=r(jn);t.Delete=n,i.default(n,kn.Facade),n.prototype.type=function(){return"delete"}}),Nn=e(function(e,t){var n=de&&de.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Delete=t.Screen=t.Page=t.Track=t.Identify=t.Group=t.Alias=t.Facade=void 0,Object.defineProperty(t,"Facade",{enumerable:!0,get:function(){return kn.Facade}}),Object.defineProperty(t,"Alias",{enumerable:!0,get:function(){return In.Alias}}),Object.defineProperty(t,"Group",{enumerable:!0,get:function(){return Mn.Group}}),Object.defineProperty(t,"Identify",{enumerable:!0,get:function(){return En.Identify}}),Object.defineProperty(t,"Track",{enumerable:!0,get:function(){return Cn.Track}}),Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return Tn.Page}}),Object.defineProperty(t,"Screen",{enumerable:!0,get:function(){return Dn.Screen}}),Object.defineProperty(t,"Delete",{enumerable:!0,get:function(){return Fn.Delete}}),t.default=n(n({},kn.Facade),{Alias:In.Alias,Group:Mn.Group,Identify:En.Identify,Track:Cn.Track,Page:Tn.Page,Screen:Dn.Screen,Delete:Fn.Delete})}),Rn=e(function(e,t){function n(e,t){var n=new Nn.Facade(e,t);return"track"===e.type&&(n=new Nn.Track(e,t)),"identify"===e.type&&(n=new Nn.Identify(e,t)),"page"===e.type&&(n=new Nn.Page(e,t)),"alias"===e.type&&(n=new Nn.Alias(e,t)),"group"===e.type&&(n=new Nn.Group(e,t)),"screen"===e.type&&(n=new Nn.Screen(e,t)),Object.defineProperty(n,"obj",{value:e,writable:!0}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.toFacade=void 0,t.toFacade=n}),Ln=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.onPageChange=void 0;var n=function(e){var t=!1;window.addEventListener("pagehide",function(){t||(t=!0,e(t))}),document.addEventListener("visibilitychange",function(){if("hidden"==document.visibilityState){if(t)return;t=!0}else t=!1;e(t)})};t.onPageChange=n}),Un=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RateLimitError=void 0;var n=function(e){function t(t,n){var r=e.call(this,t)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return me.__extends(t,e),t}(Error);t.RateLimitError=n}),Bn=Ln,qn=Un,Vn=e(function(e,t){function n(e){return(encodeURI(JSON.stringify(e)).split(/%..|./).length-1)/1024}function r(e){return n(e)>=s-50}function i(e){return n(e)>=u-10}function o(e){var t=[],r=0;return e.forEach(function(e){n(t[r])>=64&&r++,t[r]?t[r].push(e):t[r]=[e]}),t}function a(e,t){function n(n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.writeKey,o=n.map(function(e){var t=e;return t.sentAt,me.__rest(t,["sentAt"])});return(0,st.fetch)("https://".concat(e,"/b"),{keepalive:(null===t||void 0===t?void 0:t.keepalive)||p,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({writeKey:i,batch:o,sentAt:(new Date).toISOString()})}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):v;throw new qn.RateLimitError("Rate limit exceeded: ".concat(e.status),r)}})}}function a(e){var r;return void 0===e&&(e=1),me.__awaiter(this,void 0,void 0,function(){var i;return me.__generator(this,function(o){return f.length?(i=f,f=[],[2,null===(r=n(i))||void 0===r?void 0:r.catch(function(n){var r;Et.Context.system().log("error","Error sending batch",n),e<=(null!==(r=null===t||void 0===t?void 0:t.maxRetries)&&void 0!==r?r:10)&&("RateLimitError"===n.name&&(y=n.retryTimeout),f.push.apply(f,i),f.map(function(t){if("_metadata"in t){var n=t;n._metadata=me.__assign(me.__assign({},n._metadata),{retryCount:e})}}),s(e+1))})]):[2]})})}function s(e){void 0===e&&(e=1),d||(d=setTimeout(function(){d=void 0,a(e).catch(console.error)},y||v),y=0)}function u(e,n){return me.__awaiter(this,void 0,void 0,function(){var e;return me.__generator(this,function(o){return f.push(n),e=f.length>=h||r(f)||(null===t||void 0===t?void 0:t.keepalive)&&i(f),[2,e||p?a():s()]})})}var c,l,d,f=[],p=!1,h=null!==(c=null===t||void 0===t?void 0:t.size)&&void 0!==c?c:10,v=null!==(l=null===t||void 0===t?void 0:t.timeout)&&void 0!==l?l:5e3,y=0;return(0,Bn.onPageChange)(function(e){if((p=e)&&f.length){var t=o(f).map(n);Promise.all(t).catch(console.error)}}),{dispatch:u}}Object.defineProperty(t,"__esModule",{value:!0});var s=500,u=64;t.default=a}),zn=e(function(e,t){function n(e){function t(t,n){return(0,st.fetch)(t,{keepalive:null===e||void 0===e?void 0:e.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(n)}).then(function(e){var t;if(e.status>=500)throw new Error("Bad response from server: ".concat(e.status));if(429===e.status){var n=null===(t=e.headers)||void 0===t?void 0:t.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new qn.RateLimitError("Rate limit exceeded: ".concat(e.status),r)}})}return{dispatch:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}),Kn=e(function(e,t){function n(e,t,n,r,i){var o,a=e.user();delete t.options,t.writeKey=null===n||void 0===n?void 0:n.apiKey,t.userId=t.userId||a.id(),t.anonymousId=t.anonymousId||a.anonymousId(),t.sentAt=new Date;var s=e.queue.failedInitializations||[];s.length>0&&(t._metadata={failedInitializations:s}),null!=i&&(i.attempts>1&&(t._metadata=me.__assign(me.__assign({},t._metadata),{retryCount:i.attempts})),i.attempts++);var u=[],c=[];for(var l in r){var d=r[l];"Segment.io"===l&&u.push(l),"bundled"===d.bundlingStatus&&u.push(l),"unbundled"===d.bundlingStatus&&c.push(l)}for(var f=0,p=(null===n||void 0===n?void 0:n.unbundledIntegrations)||[];f<p.length;f++){var h=p[f];c.includes(h)||c.push(h)}var v=null!==(o=null===n||void 0===n?void 0:n.maybeBundledConfigIds)&&void 0!==o?o:{},y=[];return u.sort().forEach(function(e){var t;(null!==(t=v[e])&&void 0!==t?t:[]).forEach(function(e){y.push(e)})}),!1!==(null===n||void 0===n?void 0:n.addBundledMetadata)&&(t._metadata=me.__assign(me.__assign({},t._metadata),{bundled:u.sort(),unbundled:c.sort(),bundledIds:y})),t}Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=void 0,t.normalize=n}),Hn=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.pWhile=void 0;var n=function(e,t){return me.__awaiter(void 0,void 0,void 0,function(){var n;return me.__generator(this,function(r){return n=function(r){return me.__awaiter(void 0,void 0,void 0,function(){var i;return me.__generator(this,function(o){switch(o.label){case 0:return e(r)?(i=n,[4,t()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}})})},[2,n(void 0)]})})};t.pWhile=n}),Gn=Hn,Wn=e(function(e,t){function n(e,t){return me.__awaiter(this,void 0,void 0,function(){var n,r=this;return me.__generator(this,function(i){switch(i.label){case 0:return n=[],(0,Dt.isOffline)()?[2,t]:[4,(0,Gn.pWhile)(function(){return t.length>0&&!(0,Dt.isOffline)()},function(){return me.__awaiter(r,void 0,void 0,function(){var r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:return r=t.pop(),r?[4,(0,Xe.attempt)(r,e)]:[2];case 1:return i=a.sent(),o=i instanceof Et.Context,o||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}function r(e,t,r,i){var o=this;e||setTimeout(function(){return me.__awaiter(o,void 0,void 0,function(){var e,o;return me.__generator(this,function(a){switch(a.label){case 0:return e=!0,[4,n(r,t)];case 1:return o=a.sent(),e=!1,t.todo>0&&i(e,o,r,i),[2]}})})},5e3*Math.random())}Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleFlush=void 0,t.scheduleFlush=r}),Qn=Rn,Jn=Vn,Yn=zn,$n=Kn,Zn=Wn,Xn=e(function(e,t){function n(e,t){var n,r,i,o,a=e.user();return t.previousId=null!==(i=null!==(r=null!==(n=t.previousId)&&void 0!==n?n:t.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),t.userId=null!==(o=t.userId)&&void 0!==o?o:t.to,delete t.from,delete t.to,t}function r(e,t,r){function a(i){return me.__awaiter(this,void 0,void 0,function(){var o,a;return me.__generator(this,function(s){return(0,Dt.isOffline)()?(d.push(i),(0,Zn.scheduleFlush)(p,d,_,Zn.scheduleFlush),[2,i]):(f.add(i),o=i.event.type.charAt(0),a=(0,Qn.toFacade)(i.event).json(),"track"===i.event.type&&delete a.traits,"alias"===i.event.type&&(a=n(e,a)),[2,m.dispatch("".concat(y,"/").concat(o),(0,$n.normalize)(e,a,t,r,i)).then(function(){return i}).catch(function(e){if(i.log("error","Error sending event",e),"RateLimitError"===e.name){var t=e.retryTimeout;d.pushWithBackoff(i,t)}else d.pushWithBackoff(i);return(0,Zn.scheduleFlush)(p,d,_,Zn.scheduleFlush),i}).finally(function(){f.delete(i)})])})})}var s,u,c;window.addEventListener("pagehide",function(){d.push.apply(d,Array.from(f)),f.clear()});var l=null!==(s=null===t||void 0===t?void 0:t.apiKey)&&void 0!==s?s:"",d=e.options.disableClientPersistence?new Mt.PriorityQueue(e.queue.queue.maxAttempts,[]):new Tt.PersistedPriorityQueue(e.queue.queue.maxAttempts,"".concat(l,":dest-Segment.io")),f=new Set,p=!1,h=null!==(u=null===t||void 0===t?void 0:t.apiHost)&&void 0!==u?u:lt.SEGMENT_API_HOST,v=null!==(c=null===t||void 0===t?void 0:t.protocol)&&void 0!==c?c:"https",y="".concat(v,"://").concat(h),g=null===t||void 0===t?void 0:t.deliveryStrategy,m="batching"===(null===g||void 0===g?void 0:g.strategy)?(0,i.default)(h,g.config):(0,o.default)(null===g||void 0===g?void 0:g.config),_={metadata:{writeKey:l,apiHost:h,protocol:v},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:a,identify:a,page:a,alias:a,group:a,screen:a};return d.todo&&(0,Zn.scheduleFlush)(p,d,_,Zn.scheduleFlush),_}Object.defineProperty(t,"__esModule",{value:!0}),t.segmentio=t.isSegmentPlugin=void 0;var i=me.__importDefault(Jn),o=me.__importDefault(Yn),a=function(e){return"Segment.io"===e.name};t.isSegmentPlugin=a,t.segmentio=r}),er=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.pTimeout=t.invokeCallback=void 0,Object.defineProperty(t,"invokeCallback",{enumerable:!0,get:function(){return Xe.invokeCallback}}),Object.defineProperty(t,"pTimeout",{enumerable:!0,get:function(){return Xe.pTimeout}})}),tr=er,nr=e(function(e,t){function n(e){var t=e;return!!(t.ctrlKey||t.shiftKey||t.metaKey||t.button&&1==t.button)}function r(e,t){return!("_blank"!==e.target||!t)}function i(e,t,i,o){var a=this,s=[];return e?(s=e instanceof Element?[e]:"toArray"in e?e.toArray():e,s.forEach(function(e){e.addEventListener("click",function(s){var u,c,l=t instanceof Function?t(e):t,d=i instanceof Function?i(e):i,f=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href")||e.getAttribute("xlink:href")||(null===(u=e.getElementsByTagName("a")[0])||void 0===u?void 0:u.getAttribute("href")),p=(0,tr.pTimeout)(a.track(l,d,null!==o&&void 0!==o?o:{}),null!==(c=a.settings.timeout)&&void 0!==c?c:500);r(e,f)||n(s)||f&&(s.preventDefault?s.preventDefault():s.returnValue=!1,p.catch(console.error).then(function(){window.location.href=f}).catch(console.error))},!1)}),this):this}function o(e,t,n,r){var i=this;return e?(e instanceof HTMLFormElement&&(e=[e]),e.forEach(function(e){if(!(e instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var a;o.preventDefault?o.preventDefault():o.returnValue=!1;var s=t instanceof Function?t(e):t,u=n instanceof Function?n(e):n;(0,tr.pTimeout)(i.track(s,u,null!==r&&void 0!==r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500).catch(console.error).then(function(){e.submit()}).catch(console.error)},a=window.jQuery||window.Zepto;a?a(e).submit(o):e.addEventListener("submit",o,!1)}),this):this}Object.defineProperty(t,"__esModule",{value:!0}),t.form=t.link=void 0,t.link=i,t.form=o}),rr=e(function(e,t){function n(e,t,n){return me.__awaiter(this,void 0,void 0,function(){function r(t,n){return me.__awaiter(this,void 0,void 0,function(){var r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:return r=!1,i=null,[4,n({payload:(0,Qn.toFacade)(t,{clone:!0,traverse:!1}),integration:e,next:function(e){r=!0,null===e&&(i=null),e&&(i=e.obj)}})];case 1:return a.sent(),r||null===i||(i=i,i.integrations=me.__assign(me.__assign({},t.integrations),(o={},o[e]=!1,o))),[2,i]}})})}var i,o,a,s,u;return me.__generator(this,function(e){switch(e.label){case 0:i=(0,Qn.toFacade)(t,{clone:!0,traverse:!1}).rawEvent(),o=0,a=n,e.label=1;case 1:return o<a.length?(s=a[o],[4,r(i,s)]):[3,4];case 2:if(null===(u=e.sent()))return[2,null];i=u,e.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})}function r(e,t){function n(n){return me.__awaiter(this,void 0,void 0,function(){var r;return me.__generator(this,function(i){switch(i.label){case 0:return r=!1,[4,e({payload:(0,Qn.toFacade)(n.event,{clone:!0,traverse:!1}),integrations:null!==t&&void 0!==t?t:{},next:function(e){r=!0,e&&(n.event=e.obj)}})];case 1:if(i.sent(),!r)throw new Et.ContextCancelation({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(e){return Promise.resolve(e)},track:n,page:n,identify:n,alias:n,group:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.sourceMiddlewarePlugin=t.applyDestinationMiddleware=void 0,t.applyDestinationMiddleware=n,t.sourceMiddlewarePlugin=r}),ir=e(function(e,t){function n(e,t){return Object.keys(t).reduce(function(n,r){if(r.startsWith(e)){n[r.substr(e.length)]=t[r]}return n},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.pickPrefix=void 0,t.pickPrefix=n}),or=e(function(e,t){function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}Object.defineProperty(t,"__esModule",{value:!0}),t.gracefulDecodeURIComponent=void 0,t.gracefulDecodeURIComponent=n}),ar=ir,sr=or,ur=e(function(e,t){function n(e,t){var n=document.createElement("a");n.href=t;var r=n.search.slice(1),i=r.split("&").reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1];return e[r]=(0,sr.gracefulDecodeURIComponent)(i),e},{}),o=[],a=i.ajs_uid,s=i.ajs_event,u=i.ajs_aid,c=(0,Xe.isPlainObject)(e.options.useQueryString)?e.options.useQueryString:{},l=c.aid,d=void 0===l?/.+/:l,f=c.uid,p=void 0===f?/.+/:f;if(u){var h=Array.isArray(i.ajs_aid)?i.ajs_aid[0]:i.ajs_aid;d.test(h)&&e.setAnonymousId(h)}if(a){var v=Array.isArray(i.ajs_uid)?i.ajs_uid[0]:i.ajs_uid;if(p.test(v)){var y=(0,ar.pickPrefix)("ajs_trait_",i);o.push(e.identify(v,y))}}if(s){var g=Array.isArray(i.ajs_event)?i.ajs_event[0]:i.ajs_event,m=(0,ar.pickPrefix)("ajs_prop_",i);o.push(e.track(g,m))}return Promise.all(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.queryString=void 0,t.queryString=n}),cr=et,lr=jt,dr=It,fr=Ft,pr=tn,hr=on,vr=Xn,yr=nr,gr=rr,mr=ur,_r=e(function(e,t){function n(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=t?10:1,i=n?new Mt.PriorityQueue(r,[]):new Tt.PersistedPriorityQueue(r,e);return new fr.EventQueue(i)}function r(){console.warn(o)}Object.defineProperty(t,"__esModule",{value:!0}),t.NullAnalytics=t.Analytics=t.AnalyticsInstanceSettings=void 0;var i=me.__importDefault(Xt),o="This is being deprecated and will be not be available in future releases of Analytics JS",a=(0,ke.getGlobal)(),s=null===a||void 0===a?void 0:a.analytics,u=function(){function e(e,t){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var e;return null===(e=t.plugins.find(vr.isSegmentPlugin))||void 0===e?void 0:e.metadata},this.writeKey=e.writeKey,this.cdnSettings=null!==(n=e.cdnSettings)&&void 0!==n?n:{integrations:{},edgeFunction:{}},this.cdnURL=e.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var e,t;return null===(t=null===(e=this._getSegmentPluginMetadata)||void 0===e?void 0:e.call(this))||void 0===t?void 0:t.apiHost},enumerable:!1,configurable:!0}),e}();t.AnalyticsInstanceSettings=u;var c=function(e){function t(t,o,a,s,c){var l,d,f=this;f=e.call(this)||this,f._debug=!1,f.initialized=!1,f.user=function(){return f._user},f.init=f.initialize.bind(f),f.log=r,f.addIntegrationMiddleware=r,f.listeners=r,f.addEventListener=r,f.removeAllListeners=r,f.removeListener=r,f.removeEventListener=r,f.hasListeners=r,f.add=r,f.addIntegration=r;var p=null===o||void 0===o?void 0:o.cookie,h=null!==(l=null===o||void 0===o?void 0:o.disableClientPersistence)&&void 0!==l&&l;f.queue=null!==a&&void 0!==a?a:n("".concat(t.writeKey,":event-queue"),null===o||void 0===o?void 0:o.retryQueue,h),f.settings=new u(t,f.queue);var v=null===o||void 0===o?void 0:o.storage;return f._universalStorage=f.createStore(h,v,p),f._user=null!==s&&void 0!==s?s:new pr.User(me.__assign({persist:!h,storage:null===o||void 0===o?void 0:o.storage},null===o||void 0===o?void 0:o.user),p).load(),f._group=null!==c&&void 0!==c?c:new pr.Group(me.__assign({persist:!h,storage:null===o||void 0===o?void 0:o.storage},null===o||void 0===o?void 0:o.group),p).load(),f.eventFactory=new lr.EventFactory(f._user),f.integrations=null!==(d=null===o||void 0===o?void 0:o.integrations)&&void 0!==d?d:{},f.options=null!==o&&void 0!==o?o:{},(0,i.default)(f),f}return me.__extends(t,e),t.prototype.createStore=function(e,t,n){return e?new en.UniversalStorage([new en.MemoryStorage]):t&&(0,en.isArrayOfStoreType)(t)?new en.UniversalStorage((0,en.initializeStorages)((0,en.applyCookieOptions)(t.stores,n))):new en.UniversalStorage((0,en.initializeStorages)([en.StoreType.LocalStorage,{name:en.StoreType.Cookie,settings:n},en.StoreType.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u=this;return me.__generator(this,function(c){return t=(0,hr.popPageContext)(e),n=cr.resolveArguments.apply(void 0,e),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.track(r,i,o,this.integrations,t),[2,this._dispatch(s,a).then(function(e){return u.emit("track",r,e.event.properties,e.event.options),e})]})})},t.prototype.page=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,c=this;return me.__generator(this,function(l){return t=(0,hr.popPageContext)(e),n=cr.resolvePageArguments.apply(void 0,e),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.page(r,i,o,a,this.integrations,t),[2,this._dispatch(u,s).then(function(e){return c.emit("page",r,i,e.event.properties,e.event.options),e})]})})},t.prototype.identify=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u=this;return me.__generator(this,function(c){return t=(0,hr.popPageContext)(e),n=(0,cr.resolveUserArguments)(this._user).apply(void 0,e),r=n[0],i=n[1],o=n[2],a=n[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),o,this.integrations,t),[2,this._dispatch(s,a).then(function(e){return u.emit("identify",e.event.userId,e.event.traits,e.event.options),e})]})})},t.prototype.group=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=(0,hr.popPageContext)(t);if(0===t.length)return this._group;var i=(0,cr.resolveUserArguments)(this._group).apply(void 0,t),o=i[0],a=i[1],s=i[2],u=i[3];this._group.identify(o,a);var c=this._group.id(),l=this._group.traits(),d=this.eventFactory.group(c,l,s,this.integrations,r);return this._dispatch(d,u).then(function(t){return e.emit("group",t.event.groupId,t.event.traits,t.event.options),t})},t.prototype.alias=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u=this;return me.__generator(this,function(c){return t=(0,hr.popPageContext)(e),n=cr.resolveAliasArguments.apply(void 0,e),r=n[0],i=n[1],o=n[2],a=n[3],s=this.eventFactory.alias(r,i,o,this.integrations,t),[2,this._dispatch(s,a).then(function(e){return u.emit("alias",r,i,e.event.options),e})]})})},t.prototype.screen=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,c=this;return me.__generator(this,function(l){return t=(0,hr.popPageContext)(e),n=cr.resolvePageArguments.apply(void 0,e),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],u=this.eventFactory.screen(r,i,o,a,this.integrations,t),[2,this._dispatch(u,s).then(function(e){return c.emit("screen",r,i,e.event.properties,e.event.options),e})]})})},t.prototype.trackClick=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n;return me.__generator(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(yr)})];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,me.__spreadArray([this],e,!1))]}})})},t.prototype.trackLink=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n;return me.__generator(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(yr)})];case 1:return t=r.sent(),[2,(n=t.link).call.apply(n,me.__spreadArray([this],e,!1))]}})})},t.prototype.trackSubmit=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n;return me.__generator(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(yr)})];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,me.__spreadArray([this],e,!1))]}})})},t.prototype.trackForm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n;return me.__generator(this,function(r){switch(r.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(yr)})];case 1:return t=r.sent(),[2,(n=t.form).call.apply(n,me.__spreadArray([this],e,!1))]}})})},t.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r=this;return me.__generator(this,function(i){switch(i.label){case 0:return t=Et.Context.system(),n=e.map(function(e){return r.queue.register(t,e,r)}),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}})})},t.prototype.deregister=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return me.__awaiter(this,void 0,void 0,function(){var t,n,r=this;return me.__generator(this,function(i){switch(i.label){case 0:return t=Et.Context.system(),n=e.map(function(e){var n=r.queue.plugins.find(function(t){return t.name===e});if(n)return r.queue.deregister(t,n,r);t.log("warn","plugin ".concat(e," not found"))}),[4,Promise.all(n)];case 1:return i.sent(),[2,t]}})})},t.prototype.debug=function(e){return!1===e&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=e,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(e){this.settings.timeout=e},t.prototype._dispatch=function(e,t){return me.__awaiter(this,void 0,void 0,function(){var n;return me.__generator(this,function(r){return n=new Et.Context(e),(0,Dt.isOffline)()&&!this.options.retryQueue?[2,n]:[2,(0,Xe.dispatch)(n,this.queue,this,{callback:t,debug:this._debug,timeout:this.settings.timeout})]})})},t.prototype.addSourceMiddleware=function(e){return me.__awaiter(this,void 0,void 0,function(){var t=this;return me.__generator(this,function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run(function(){return me.__awaiter(t,void 0,void 0,function(){var t,n,r;return me.__generator(this,function(i){switch(i.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(gr)})];case 1:return t=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach(function(e){if("destination"===e.type)return n[e.name]=!0}),r=t(e,n),[4,this.register(r)];case 2:return i.sent(),[2]}})})})];case 1:return n.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return this.queue.plugins.filter(dr.isDestinationPluginWithAddMiddleware).forEach(function(n){"*"!==e&&n.name.toLowerCase()!==e.toLowerCase()||n.addMiddleware.apply(n,t)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(e){return this._user.anonymousId(e)},t.prototype.queryString=function(e){return me.__awaiter(this,void 0,void 0,function(){var t;return me.__generator(this,function(n){switch(n.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,Promise.resolve().then(function(){return me.__importStar(mr)})];case 1:return t=n.sent().queryString,[2,t(this,e)]}})})},t.prototype.use=function(e){return e(this),this},t.prototype.ready=function(e){return void 0===e&&(e=function(e){return e}),me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return[2,Promise.all(this.queue.plugins.map(function(e){return e.ready?e.ready():Promise.resolve()})).then(function(t){return e(t),t})]})})},t.prototype.noConflict=function(){return console.warn(o),(0,Pe.setGlobalAnalytics)(null!==s&&void 0!==s?s:this),this},t.prototype.normalize=function(e){return console.warn(o),this.eventFactory.normalize(e)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(o),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return ut.version},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e,t){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(e){return console.warn(o),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(e){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){switch(t.label){case 0:return console.warn(o),[4,this.page({path:e})];case 1:return t.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var e;return console.warn(o),null!==(e=this._plugins)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){return console.warn(o),this.queue.plugins.filter(function(e){return"destination"===e.type}).reduce(function(e,t){var n="".concat(t.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return e;var i=r.Integration;return i?(e[t.name]=i,e):(e[t.name]=r,e)},{})},enumerable:!1,configurable:!0}),t.prototype.push=function(e){var t=this,n=e.shift();n&&!t[n]||t[n].apply(this,e)},t}(Re.Emitter);t.Analytics=c;var l=function(e){function t(){var t=e.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return t.initialized=!0,t}return me.__extends(t,e),t}(c);t.NullAnalytics=l}),br=e(function(e,t){function n(e,t){var n,r=Object.entries(null!==(n=t.integrations)&&void 0!==n?n:{}).reduce(function(e,t){var n,r,i=t[0],o=t[1];return"object"===(void 0===o?"undefined":_typeof(o))?me.__assign(me.__assign({},e),(n={},n[i]=o,n)):me.__assign(me.__assign({},e),(r={},r[i]={},r))},{});return Object.entries(e.integrations).reduce(function(e,t){var n,i=t[0],o=t[1];return me.__assign(me.__assign({},e),(n={},n[i]=me.__assign(me.__assign({},o),r[i]),n))},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.mergedOptions=void 0,t.mergedOptions=n}),wr=e(function(e,t){function n(e){return me.__awaiter(this,void 0,void 0,function(){var t;return me.__generator(this,function(n){return t=navigator.userAgentData,t?e?[2,t.getHighEntropyValues(e).catch(function(){return t.toJSON()})]:[2,t.toJSON()]:[2,void 0]})})}Object.defineProperty(t,"__esModule",{value:!0}),t.clientHints=void 0,t.clientHints=n}),Pr=wr,xr=e(function(e,t){function n(){if(s)return s;var e=(0,Ut.tld)(window.location.href);return s={expires:31536e6,secure:!1,path:"/"},e&&(s.domain=e),s}function r(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&");for(var n=e.split("&"),r=0,i=n;r<i.length;r++){var o=i[r],a=o.split("="),s=a[0],u=a[1];if(t[s])return{id:u,type:t[s]}}}function i(e){return e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&"),e.split("&").reduce(function(e,t){var n=t.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.slice(4);"campaign"===a&&(a="name"),e[a]=(0,sr.gracefulDecodeURIComponent)(o)}return e},{})}function o(){var e=u.default.get("_ga");if(e&&e.startsWith("amp"))return e}function a(e,t,i){var o,a=new en.UniversalStorage(i?[]:[new en.CookieStorage(n())]),s=a.get("s:context.referrer"),u=null!==(o=r(e))&&void 0!==o?o:s;u&&(t&&(t.referrer=me.__assign(me.__assign({},t.referrer),u)),a.set("s:context.referrer",u))}Object.defineProperty(t,"__esModule",{value:!0}),t.envEnrichment=t.ampId=t.utm=void 0;var s,u=me.__importDefault(Rt);t.utm=i,t.ampId=o;var c=function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];Array.isArray(r)?r.forEach(function(e){return t.append(n,e)}):t.append(n,r)}),t.toString()}catch(e){return""}},l=function(){function e(){var e=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(t,n){return me.__awaiter(e,void 0,void 0,function(){var e;return me.__generator(this,function(t){switch(t.label){case 0:this.instance=n,t.label=1;case 1:return t.trys.push([1,3,,4]),e=this,[4,(0,Pr.clientHints)(this.instance.options.highEntropyValuesClientHints)];case 2:return e.userAgentData=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(t){var n,r,s=t.event.context,u=s.page.search||"",l="object"===(void 0===u?"undefined":_typeof(u))?c(u):u;s.userAgent=navigator.userAgent,s.userAgentData=e.userAgentData;var d=navigator.userLanguage||navigator.language;void 0===s.locale&&void 0!==d&&(s.locale=d),null!==(n=s.library)&&void 0!==n||(s.library={name:"analytics.js",version:"".concat("web"===(0,ct.getVersionType)()?"next":"npm:next","-").concat(ut.version)}),l&&!s.campaign&&(s.campaign=i(l));var f=o();f&&(s.amp={id:f}),a(l,s,null!==(r=e.instance.options.disableClientPersistence)&&void 0!==r&&r);try{s.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}return t},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich}return e}();t.envEnrichment=new l}),Sr=e(function(e,t){function n(e){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find(function(t){return t.src===e})}function r(e,t){var r=n(e);if(void 0!==r){var i=null===r||void 0===r?void 0:r.getAttribute("status");if("loaded"===i)return Promise.resolve(r);if("loading"===i)return new Promise(function(e,t){r.addEventListener("load",function(){return e(r)}),r.addEventListener("error",function(e){return t(e)})})}return new Promise(function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.setAttribute("status","loading");for(var a=0,s=Object.entries(null!==t&&void 0!==t?t:{});a<s.length;a++){var u=s[a],c=u[0],l=u[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(e)))};var d=window.document.querySelector("script");d?null===(i=d.parentElement)||void 0===i||i.insertBefore(o,d):window.document.head.appendChild(o)})}function i(e){var t=n(e);return void 0!==t&&t.remove(),Promise.resolve()}Object.defineProperty(t,"__esModule",{value:!0}),t.unloadScript=t.loadScript=void 0,t.loadScript=r,t.unloadScript=i}),Or=e(function(e,t){function n(e,t){var n=t.methodName,r=t.integrationName,i=t.type,o=t.didError,a=void 0!==o&&o;e.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}Object.defineProperty(t,"__esModule",{value:!0}),t.recordIntegrationMetric=void 0,t.recordIntegrationMetric=n}),kr=Sr,jr=Se,Ir=Or,Ar=e(function(e,t){function n(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];return e.forEach(function(e){t.forEach(function(t){var n;if(void 0===e[t])throw new Error("Plugin: ".concat(null!==(n=e.name)&&void 0!==n?n:"unknown"," missing required function ").concat(t))})}),!0}function r(e,t){var n=e[t.creationName],r=e[t.name];return!1===e.All&&!n&&!r||(!1===n||!1===r)}function i(e,t){return me.__awaiter(this,void 0,void 0,function(){var n,r,i,o,a,s;return me.__generator(this,function(u){switch(u.label){case 0:if(u.trys.push([0,9,,10]),n=new RegExp("https://cdn.segment.(com|build)"),r=(0,jr.getCDN)(),!t)return[3,6];i=e.url.split("/"),o=i[i.length-2],a=e.url.replace(o,btoa(o).replace(/=/g,"")),u.label=1;case 1:return u.trys.push([1,3,,5]),[4,(0,kr.loadScript)(a.replace(n,r))];case 2:return u.sent(),[3,5];case 3:return u.sent(),[4,(0,kr.loadScript)(e.url.replace(n,r))];case 4:return u.sent(),[3,5];case 5:return[3,8];case 6:return[4,(0,kr.loadScript)(e.url.replace(n,r))];case 7:u.sent(),u.label=8;case 8:return"function"==typeof window[e.libraryName]?[2,window[e.libraryName]]:[3,10];case 9:throw s=u.sent(),console.error("Failed to create PluginFactory",e),s;case 10:return[2]}})})}function o(e,t,o,s,u,c){var l,d,f;return me.__awaiter(this,void 0,void 0,function(){var p,h,v,y=this;return me.__generator(this,function(g){switch(g.label){case 0:return p=[],h=null!==(d=null===(l=e.middlewareSettings)||void 0===l?void 0:l.routingRules)&&void 0!==d?d:[],v=(null!==(f=e.remotePlugins)&&void 0!==f?f:[]).map(function(e){return me.__awaiter(y,void 0,void 0,function(){var l,d,f,v,y,g;return me.__generator(this,function(m){switch(m.label){case 0:if(r(t,e))return[2];m.label=1;case 1:return m.trys.push([1,6,,7]),d=null===c||void 0===c?void 0:c.find(function(t){return t.pluginName===e.name}),d?[3,3]:[4,i(e,null===s||void 0===s?void 0:s.obfuscate)];case 2:d=m.sent(),m.label=3;case 3:return l=d,l?[4,l(me.__assign(me.__assign({},e.settings),o[e.name]))]:[3,5];case 4:f=m.sent(),v=Array.isArray(f)?f:[f],n(v),y=h.filter(function(t){return t.destinationName===e.creationName}),v.forEach(function(t){var n=new a(e.creationName,t);y.length&&u&&n.addMiddleware(u),p.push(n)}),m.label=5;case 5:return[3,7];case 6:return g=m.sent(),console.warn("Failed to load Remote Plugin",g),[3,7];case 7:return[2]}})})}),[4,Promise.all(v)];case 1:return g.sent(),[2,p.filter(Boolean)]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.remoteLoader=t.ActionDestination=void 0;var a=function(){function e(e,t){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=(0,Re.createDeferred)(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=t,this.name=e,this.type=t.type,this.alternativeNames.push(t.name)}return e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"destination"===this.type&&(e=this.middleware).push.apply(e,t)},e.prototype.transform=function(e){return me.__awaiter(this,void 0,void 0,function(){var t;return me.__generator(this,function(n){switch(n.label){case 0:return[4,(0,gr.applyDestinationMiddleware)(this.name,e.event,this.middleware)];case 1:return t=n.sent(),null===t&&e.cancel(new Et.ContextCancelation({retry:!1,reason:"dropped by destination middleware"})),[2,new Et.Context(t)]}})})},e.prototype._createMethod=function(e){var t=this;return function(n){return me.__awaiter(t,void 0,void 0,function(){var t,r;return me.__generator(this,function(i){switch(i.label){case 0:return this.action[e]?(t=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:t=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw new Error("Something prevented the destination from getting ready");return(0,Ir.recordIntegrationMetric)(n,{integrationName:this.action.name,methodName:e,type:"action"}),[4,this.action[e](t)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),(0,Ir.recordIntegrationMetric)(n,{integrationName:this.action.name,methodName:e,type:"action",didError:!0}),r;case 6:return[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})},e.prototype.load=function(e,t){return me.__awaiter(this,void 0,void 0,function(){var n,r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];a.label=1;case 1:return a.trys.push([1,3,,4]),(0,Ir.recordIntegrationMetric)(e,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(e,t),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[a.sent()]),[2,n];case 3:throw o=a.sent(),(0,Ir.recordIntegrationMetric)(e,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(o),o;case 4:return[2]}})})},e.prototype.unload=function(e,t){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,e,t)},e}();t.ActionDestination=a,t.remoteLoader=o}),Mr=e(function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.attachInspector=void 0;var i=(0,ke.getGlobal)(),o=null!==(n=(r=i).__SEGMENT_INSPECTOR__)&&void 0!==n?n:r.__SEGMENT_INSPECTOR__={},a=function(e){var t;return null===(t=o.attach)||void 0===t?void 0:t.call(o,e)};t.attachInspector=a}),Er=e(function(e,t){!function(t,n){e.exports=function(){return function(){function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={exports:{}};return t[r].call(o.exports,o,o.exports,e),o.exports}var t={2870:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Store=t.matches=t.transform=void 0;var i=n(4303);Object.defineProperty(t,"transform",{enumerable:!0,get:function(){return r(i).default}});var o=n(2370);Object.defineProperty(t,"matches",{enumerable:!0,get:function(){return r(o).default}});var a=n(1444);Object.defineProperty(t,"Store",{enumerable:!0,get:function(){return r(a).default}})},2370:function(e,t,n){function r(e,t){if(!Array.isArray(e))return!0===i(e,t);var n,u,c,l,d=e[0];switch(d){case"!":return!r(e[1],t);case"or":for(var f=1;f<e.length;f++)if(r(e[f],t))return!0;return!1;case"and":for(f=1;f<e.length;f++)if(!r(e[f],t))return!1;return!0;case"=":case"!=":return function(e,t,n,i){switch(o(e)&&(e=r(e,i)),o(t)&&(t=r(t,i)),"object"==(void 0===e?"undefined":_typeof(e))&&"object"==(void 0===t?"undefined":_typeof(t))&&(e=JSON.stringify(e),t=JSON.stringify(t)),n){case"=":return e===t;case"!=":return e!==t;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(i(e[1],t),i(e[2],t),d,t);case"<=":case"<":case">":case">=":return function(e,t,n,i){if(o(e)&&(e=r(e,i)),o(t)&&(t=r(t,i)),"number"!=typeof e||"number"!=typeof t)return!1;switch(n){case"<=":return e<=t;case">=":return e>=t;case"<":return e<t;case">":return e>t;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(i(e[1],t),i(e[2],t),d,t);case"in":return function(e,t,n){return void 0!==t.find(function(t){return i(t,n)===e})}(i(e[1],t),i(e[2],t),t);case"contains":return c=i(e[1],t),l=i(e[2],t),"string"==typeof c&&"string"==typeof l&&-1!==c.indexOf(l);case"match":return n=i(e[1],t),u=i(e[2],t),"string"==typeof n&&"string"==typeof u&&function(e,t){var n,r;e:for(;e.length>0;){var i,o;if(i=(n=a(e)).star,o=n.chunk,e=n.pattern,i&&""===o)return!0;var u=s(o,t),c=u.t,l=u.ok,d=u.err;if(d)return!1;if(!l||!(0===c.length||e.length>0)){if(i)for(var f=0;f<t.length;f++){if(c=(r=s(o,t.slice(f+1))).t,l=r.ok,d=r.err,l){if(0===e.length&&c.length>0)continue;t=c;continue e}if(d)return!1}return!1}t=c}return 0===t.length}(u,n);case"lowercase":var p=i(e[1],t);return"string"!=typeof p?null:p.toLowerCase();case"typeof":return _typeof(i(e[1],t));case"length":return function(e){return null===e?0:Array.isArray(e)||"string"==typeof e?e.length:NaN}(i(e[1],t));default:throw new Error("FQL IR could not evaluate for token: ".concat(d))}}function i(e,t){return Array.isArray(e)?e:"object"==(void 0===e?"undefined":_typeof(e))?e.value:(0,l.default)(t,e)}function o(e){return!!Array.isArray(e)&&(("lowercase"===e[0]||"length"===e[0]||"typeof"===e[0])&&2===e.length||("contains"===e[0]||"match"===e[0])&&3===e.length)}function a(e){for(var t={star:!1,chunk:"",pattern:""};e.length>0&&"*"===e[0];)e=e.slice(1),t.star=!0;var n,r=!1;e:for(n=0;n<e.length;n++)switch(e[n]){case"\\":n+1<e.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break e}return t.chunk=e.slice(0,n),t.pattern=e.slice(n),t}function s(e,t){for(var n,r,i={t:"",ok:!1,err:!1};e.length>0;){if(0===t.length)return i;switch(e[0]){case"[":var o=t[0];t=t.slice(1);var a=!0;(e=e.slice(1)).length>0&&"^"===e[0]&&(a=!1,e=e.slice(1));for(var s=!1,c=0;;){if(e.length>0&&"]"===e[0]&&c>0){e=e.slice(1);break}var l,d="";if(l=(n=u(e)).char,e=n.newChunk,n.err)return i;if(d=l,"-"===e[0]&&(d=(r=u(e.slice(1))).char,e=r.newChunk,r.err))return i;l<=o&&o<=d&&(s=!0),c++}if(s!==a)return i;break;case"?":t=t.slice(1),e=e.slice(1);break;case"\\":if(0===(e=e.slice(1)).length)return i.err=!0,i;default:if(e[0]!==t[0])return i;t=t.slice(1),e=e.slice(1)}}return i.t=t,i.ok=!0,i.err=!1,i}function u(e){var t={char:"",newChunk:"",err:!1};return 0===e.length||"-"===e[0]||"]"===e[0]||"\\"===e[0]&&0===(e=e.slice(1)).length?(t.err=!0,t):(t.char=e[0],t.newChunk=e.slice(1),0===t.newChunk.length&&(t.err=!0),t)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(n(7843));t.default=function(e,t){if(!t)throw new Error("No matcher supplied!");switch(t.type){case"all":return!0;case"fql":return function(e,t){if(!e)return!1;try{e=JSON.parse(e)}catch(t){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(e,'": ').concat(t))}var n=r(e,t);return"boolean"==typeof n&&n}(t.ir,e);default:throw new Error("Matcher of type ".concat(t.type," unsupported."))}}},1444:function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.rules=[],this.rules=e||[]}return e.prototype.getRulesByDestinationName=function(e){for(var t=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==e&&void 0!==i.destinationName||t.push(i)}return t},e}();t.default=n},4303:function(e,t,n){function r(e,t){o(e,t.drop,function(e,t){t.forEach(function(t){return delete e[t]})})}function i(e,t){o(e,t.allow,function(e,t){Object.keys(e).forEach(function(n){t.includes(n)||delete e[n]})})}function o(e,t,n){Object.entries(t).forEach(function(t){var r=t[0],i=t[1],o=function(e){"object"==(void 0===e?"undefined":_typeof(e))&&null!==e&&n(e,i)},a=""===r?e:(0,d.default)(e,r);Array.isArray(a)?a.forEach(o):o(a)})}function a(e,t){var n=JSON.parse(JSON.stringify(e));for(var r in t.map)if(t.map.hasOwnProperty(r)){var i=t.map[r],o=r.split("."),a=void 0;if(o.length>1?(o.pop(),a=(0,d.default)(n,o.join("."))):a=e,"object"==(void 0===a?"undefined":_typeof(a))){if(i.copy){var s=(0,d.default)(n,i.copy);void 0!==s&&(0,p.dset)(e,r,s)}else if(i.move){var u=(0,d.default)(n,i.move);void 0!==u&&(0,p.dset)(e,r,u),(0,h.unset)(e,i.move)}else i.hasOwnProperty("set")&&(0,p.dset)(e,r,i.set);if(i.to_string){var c=(0,d.default)(e,r);if("string"==typeof c||"object"==(void 0===c?"undefined":_typeof(c))&&null!==c)continue;void 0!==c?(0,p.dset)(e,r,JSON.stringify(c)):(0,p.dset)(e,r,"undefined")}}}}function s(e,t){return!(t.sample.percent<=0)&&(t.sample.percent>=1||(t.sample.path?function(e,t){var n=(0,d.default)(e,t.sample.path),r=(0,l.default)(JSON.stringify(n)),i=-64,o=[];u(r.slice(0,8),o);for(var a=0,s=0;s<64&&1!==o[s];s++)a++;if(0!==a){var c=[];u(r.slice(9,16),c),i-=a,o.splice(0,a),c.splice(64-a),o=o.concat(c)}return o[63]=0===o[63]?1:0,(0,f.default)(parseInt(o.join(""),2),i)<t.sample.percent}(e,t):(n=t.sample.percent,Math.random()<=n)));var n}function u(e,t){for(var n=0;n<8;n++)for(var r=e[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,t.push(1)):t.push(0)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(n(374)),d=c(n(7843)),f=c(n(5500)),p=n(9014),h=n(4966);t.default=function(e,t){for(var n=e,o=0,u=t;o<u.length;o++){var c=u[o];switch(c.type){case"drop":return null;case"drop_properties":r(n,c.config);break;case"allow_properties":i(n,c.config);break;case"sample_event":if(s(n,c.config))break;return null;case"map_properties":a(n,c.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(c.type,'" is unsupported.'))}}return n}},4966:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.unset=void 0;var i=r(n(7843));t.unset=function(e,t){if((0,i.default)(e,t)){for(var n=t.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)e=e[t=n.shift()];return delete e[r]}return!0}},9014:function(e,t){t.dset=function(e,t,n){t.split&&(t=t.split("."));for(var r,i,o=0,a=t.length,s=e;o<a&&"__proto__"!==(i=t[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===a?n:_typeof(r=s[i])==(void 0===t?"undefined":_typeof(t))?r:0*t[o]!=0||~(""+t[o]).indexOf(".")?{}:[]}},3304:function(e){var t="function"==typeof Float64Array?Float64Array:void 0;e.exports=t},7382:function(e,t,n){var r,i=n(5569),o=n(3304),a=n(8482);r=i()?o:a,e.exports=r},8482:function(e){e.exports=function(){throw new Error("not implemented")}},6322:function(e,t,n){var r,i=n(2508),o=n(5679),a=n(882);r=i()?o:a,e.exports=r},882:function(e){e.exports=function(){throw new Error("not implemented")}},5679:function(e){var t="function"==typeof Uint16Array?Uint16Array:void 0;e.exports=t},4773:function(e,t,n){var r,i=n(9773),o=n(3004),a=n(3078);r=i()?o:a,e.exports=r},3078:function(e){e.exports=function(){throw new Error("not implemented")}},3004:function(e){var t="function"==typeof Uint32Array?Uint32Array:void 0;e.exports=t},7980:function(e,t,n){var r,i=n(8114),o=n(6737),a=n(3357);r=i()?o:a,e.exports=r},3357:function(e){e.exports=function(){throw new Error("not implemented")}},6737:function(e){var t="function"==typeof Uint8Array?Uint8Array:void 0;e.exports=t},2684:function(e){var t="function"==typeof Float64Array?Float64Array:null;e.exports=t},5569:function(e,t,n){var r=n(3876);e.exports=r},3876:function(e,t,n){var r=n(1448),i=n(2684);e.exports=function(){var e,t;if("function"!=typeof i)return!1;try{t=new i([1,3.14,-3.14,NaN]),e=r(t)&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){e=!1}return e}},9048:function(e,t,n){var r=n(3763);e.exports=r},3763:function(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},7009:function(e,t,n){var r=n(6784);e.exports=r},6784:function(e){e.exports=function(){return"function"==typeof Symbol&&"symbol"==_typeof(Symbol("foo"))}},3123:function(e,t,n){var r=n(8481);e.exports=r},8481:function(e,t,n){var r=n(7009)();e.exports=function(){return r&&"symbol"==_typeof(Symbol.toStringTag)}},2508:function(e,t,n){var r=n(3403);e.exports=r},3403:function(e,t,n){var r=n(768),i=n(9668),o=n(187);e.exports=function(){var e,t;if("function"!=typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===i-2&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}},187:function(e){var t="function"==typeof Uint16Array?Uint16Array:null;e.exports=t},9773:function(e,t,n){var r=n(2822);e.exports=r},2822:function(e,t,n){var r=n(2744),i=n(3899),o=n(746);e.exports=function(){var e,t;if("function"!=typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===i-2&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}},746:function(e){var t="function"==typeof Uint32Array?Uint32Array:null;e.exports=t},8114:function(e,t,n){var r=n(8066);e.exports=r},8066:function(e,t,n){var r=n(8279),i=n(3443),o=n(2731);e.exports=function(){var e,t;if("function"!=typeof o)return!1;try{t=new o(t=[1,3.14,-3.14,i+1,i+2]),e=r(t)&&1===t[0]&&3===t[1]&&t[2]===i-2&&0===t[3]&&1===t[4]}catch(t){e=!1}return e}},2731:function(e){var t="function"==typeof Uint8Array?Uint8Array:null;e.exports=t},1448:function(e,t,n){var r=n(1453);e.exports=r},1453:function(e,t,n){var r=n(6208),i="function"==typeof Float64Array;e.exports=function(e){return i&&e instanceof Float64Array||"[object Float64Array]"===r(e)}},9331:function(e,t,n){var r=n(7980),i={uint16:n(6322),uint8:r};e.exports=i},5902:function(e,t,n){var r=n(4106);e.exports=r},4106:function(e,t,n){var r,i,o=n(9331);(i=new o.uint16(1))[0]=4660,r=52===new o.uint8(i.buffer)[0],e.exports=r},768:function(e,t,n){var r=n(3823);e.exports=r},3823:function(e,t,n){var r=n(6208),i="function"==typeof Uint16Array;e.exports=function(e){return i&&e instanceof Uint16Array||"[object Uint16Array]"===r(e)}},2744:function(e,t,n){var r=n(2326);e.exports=r},2326:function(e,t,n){var r=n(6208),i="function"==typeof Uint32Array;e.exports=function(e){return i&&e instanceof Uint32Array||"[object Uint32Array]"===r(e)}},8279:function(e,t,n){var r=n(208);e.exports=r},208:function(e,t,n){var r=n(6208),i="function"==typeof Uint8Array;e.exports=function(e){return i&&e instanceof Uint8Array||"[object Uint8Array]"===r(e)}},6315:function(e){e.exports=1023},1686:function(e){e.exports=2147483647},3105:function(e){e.exports=2146435072},3449:function(e){e.exports=2147483648},6988:function(e){e.exports=-1023},9777:function(e){e.exports=1023},3690:function(e){e.exports=-1074},2918:function(e,t,n){var r=n(4772).NEGATIVE_INFINITY;e.exports=r},4165:function(e){var t=Number.POSITIVE_INFINITY;e.exports=t},6488:function(e){e.exports=2.2250738585072014e-308},9668:function(e){e.exports=65535},3899:function(e){e.exports=4294967295},3443:function(e){e.exports=255},7011:function(e,t,n){var r=n(812);e.exports=r},812:function(e,t,n){var r=n(4165),i=n(2918);e.exports=function(e){return e===r||e===i}},1883:function(e,t,n){var r=n(1797);e.exports=r},1797:function(e){e.exports=function(e){return e!=e}},513:function(e,t,n){var r=n(5760);e.exports=r},5760:function(e){e.exports=function(e){return Math.abs(e)}},5848:function(e,t,n){var r=n(677);e.exports=r},677:function(e,t,n){var r=n(3449),i=n(1686),o=n(7838),a=n(1921),s=n(2490),u=[0,0];e.exports=function(e,t){var n,c;return o.assign(e,u,1,0),n=u[0],n&=i,c=a(t),s(n|=c&=r,u[1])}},5500:function(e,t,n){var r=n(8397);e.exports=r},8397:function(e,t,n){var r=n(4165),i=n(2918),o=n(6315),a=n(9777),s=n(6988),u=n(3690),c=n(1883),l=n(7011),d=n(5848),f=n(4948),p=n(8478),h=n(7838),v=n(2490),y=[0,0],g=[0,0];e.exports=function(e,t){var n,m;return 0===e||c(e)||l(e)?e:(f(y,e),t+=y[1],(t+=p(e=y[0]))<u?d(0,e):t>a?e<0?i:r:(t<=s?(t+=52,m=2.220446049250313e-16):m=1,h(g,e),n=g[0],n&=2148532223,m*v(n|=t+o<<20,g[1])))}},4772:function(e,t,n){var r=n(7548);e.exports=r},7548:function(e){e.exports=Number},8478:function(e,t,n){var r=n(4500);e.exports=r},4500:function(e,t,n){var r=n(1921),i=n(3105),o=n(6315);e.exports=function(e){var t=r(e);return(t=(t&i)>>>20)-o|0}},2490:function(e,t,n){var r=n(9639);e.exports=r},4445:function(e,t,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},e.exports=r},9639:function(e,t,n){var r=n(4773),i=n(7382),o=n(4445),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;e.exports=function(e,t){return s[u]=e,s[c]=t,a[0]}},5646:function(e,t,n){var r;r=!0===n(5902)?1:0,e.exports=r},1921:function(e,t,n){var r=n(6285);e.exports=r},6285:function(e,t,n){var r=n(4773),i=n(7382),o=n(5646),a=new i(1),s=new r(a.buffer);e.exports=function(e){return a[0]=e,s[o]}},9024:function(e,t,n){var r=n(6488),i=n(7011),o=n(1883),a=n(513);e.exports=function(e,t,n,s){return o(e)||i(e)?(t[s]=e,t[s+n]=0,t):0!==e&&a(e)<r?(t[s]=4503599627370496*e,t[s+n]=-52,t):(t[s]=e,t[s+n]=0,t)}},4948:function(e,t,n){var r=n(7576),i=n(9422);r(i,"assign",n(9024)),e.exports=i},9422:function(e,t,n){var r=n(9024);e.exports=function(e){return r(e,[0,0],1,0)}},5239:function(e,t,n){var r=n(4773),i=n(7382),o=n(5782),a=new i(1),s=new r(a.buffer),u=o.HIGH,c=o.LOW;e.exports=function(e,t,n,r){return a[0]=e,t[r]=s[u],t[r+n]=s[c],t}},7838:function(e,t,n){var r=n(7576),i=n(4010);r(i,"assign",n(5239)),e.exports=i},5782:function(e,t,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},e.exports=r},4010:function(e,t,n){var r=n(5239);e.exports=function(e){return r(e,[0,0],1,0)}},7576:function(e,t,n){var r=n(7063);e.exports=r},7063:function(e,t,n){var r=n(6691);e.exports=function(e,t,n){r(e,t,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(e){var t=Object.defineProperty;e.exports=t},1680:function(e){var t="function"==typeof Object.defineProperty?Object.defineProperty:null;e.exports=t},1471:function(e,t,n){var r=n(1680);e.exports=function(){try{return r({},"x",{}),!0}catch(e){return!1}}},6691:function(e,t,n){var r,i=n(1471),o=n(2073),a=n(1309);r=i()?o:a,e.exports=r},1309:function(e){var t=Object.prototype,n=t.toString,r=t.__defineGetter__,i=t.__defineSetter__,o=t.__lookupGetter__,a=t.__lookupSetter__;e.exports=function(e,s,u){var c,l,d,f;if("object"!=(void 0===e?"undefined":_typeof(e))||null===e||"[object Array]"===n.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=(void 0===u?"undefined":_typeof(u))||null===u||"[object Array]"===n.call(u))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+u+"`.");if((l="value"in u)&&(o.call(e,s)||a.call(e,s)?(c=e.__proto__,e.__proto__=t,delete e[s],e[s]=u.value,e.__proto__=c):e[s]=u.value),d="get"in u,f="set"in u,l&&(d||f))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return d&&r&&r.call(e,s,u.get),f&&i&&i.call(e,s,u.set),e}},6208:function(e,t,n){var r,i=n(3123),o=n(7407),a=n(4210);r=i()?a:o,e.exports=r},7407:function(e,t,n){var r=n(173);e.exports=function(e){return r.call(e)}},4210:function(e,t,n){var r=n(9048),i=n(1403),o=n(173);e.exports=function(e){var t,n,a;if(null==e)return o.call(e);n=e[i],t=r(e,i);try{e[i]=void 0}catch(t){return o.call(e)}return a=o.call(e),t?e[i]=n:delete e[i],a}},173:function(e){var t=Object.prototype.toString;e.exports=t},1403:function(e){var t="function"==typeof Symbol?Symbol.toStringTag:"";e.exports=t},7843:function(e){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},374:function(e,t,n){function r(e){var t,n,r,a=[t=1732584193,n=4023233417,~t,~n],s=[],u=unescape(encodeURI(e))+"聙",c=u.length;for(e=--c/4+2|15,s[--e]=8*c;~c;)s[c>>2]|=u.charCodeAt(c)<<8*c--;for(o=u=0;o<e;o+=16){for(c=a;u<64;c=[r=c[3],t+((r=c[0]+[t&n|~t&r,r&t|~r&n,t^n^r,n^(t|~r)][c=u>>4]+i[u]+~~s[o|15&[u,5*u+1,3*u+5,7*u][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+u++%4])|r>>>-c),t,n])t=0|c[1],n=c[2];for(u=4;u;)a[--u]+=c[u]}for(e="";u<32;)e+=(a[u>>3]>>4*(1^u++)&15).toString(16);return e}n.r(t),n.d(t,{default:function(){return r}});for(var i=[],o=0;o<64;)i[o]=0|4294967296*Math.sin(++o%Math.PI)}},n={};return e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e(2870)}()}()}(self)}),Cr=Er,Tr=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.tsubMiddleware=void 0;var n=me.__importStar(Cr),r=function(e){return function(t){var r=t.payload,i=t.integration,o=t.next;new n.Store(e).getRulesByDestinationName(i).forEach(function(e){for(var t=e.matchers,i=e.transformers,a=0;a<t.length;a++)if(n.matches(r.obj,t[a])&&(r.obj=n.transform(r.obj,i[a]),null===r.obj))return o(null)}),o(r)}};t.tsubMiddleware=r}),Dr=e(function(e,t){function n(e,t){var n,r;return"boolean"==typeof(null===t||void 0===t?void 0:t.enabled)?t.enabled:null===(r=null===(n=null===e||void 0===e?void 0:e.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlanEventEnabled=void 0,t.isPlanEventEnabled=n}),Fr=e(function(e,t){function n(e){return e.toLowerCase().replace(".","").replace(/\s+/g,"-")}function r(e,t){return void 0===t&&(t=!1),t?btoa(e).replace(/=/g,""):void 0}function i(e){return("Integration"in e?e.Integration:e).prototype.name}function o(e,t,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(e,"resource"))&&void 0!==i?i:[])[0];o&&t.stats.gauge("legacy_destination_time",Math.round(o.duration),me.__spreadArray([n],o.duration<100?["cached"]:[],!0))}catch(e){}}function a(e,t,n){var r;if("Integration"in e){e({user:function(){return n.user()},addIntegration:function(){}}),r=e.Integration}else r=e;var i=new r(t);return i.analytics=n,i}function s(e,t,i,a){return me.__awaiter(this,void 0,void 0,function(){var s,u,c,l,d,f;return me.__generator(this,function(p){switch(p.label){case 0:s=n(t),u=r(s,a),c=(0,jr.getNextIntegrationsURL)(),l="".concat(c,"/integrations/").concat(null!==u&&void 0!==u?u:s,"/").concat(i,"/").concat(null!==u&&void 0!==u?u:s,".dynamic.js.gz"),p.label=1;case 1:return p.trys.push([1,3,,4]),[4,(0,kr.loadScript)(l)];case 2:return p.sent(),o(l,e,t),[3,4];case 3:throw d=p.sent(),e.stats.gauge("legacy_destination_time",-1,["plugin:".concat(t),"failed"]),d;case 4:return f=window["".concat(s,"Deps")],[4,Promise.all(f.map(function(e){return(0,kr.loadScript)(c+e+".gz")}))];case 5:return p.sent(),window["".concat(s,"Loader")](),[2,window["".concat(s,"Integration")]]}})})}function u(e,t,i){return me.__awaiter(this,void 0,void 0,function(){var o,a,s,u;return me.__generator(this,function(c){return o=(0,jr.getNextIntegrationsURL)(),a=n(e),s=r(e,i),u="".concat(o,"/integrations/").concat(null!==s&&void 0!==s?s:a,"/").concat(t,"/").concat(null!==s&&void 0!==s?s:a,".dynamic.js.gz"),[2,(0,kr.unloadScript)(u)]})})}function c(e){var t,n,r,i;return null!==(i=null!==(n=null===(t=null===e||void 0===e?void 0:e.versionSettings)||void 0===t?void 0:t.override)&&void 0!==n?n:null===(r=null===e||void 0===e?void 0:e.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}Object.defineProperty(t,"__esModule",{value:!0}),t.resolveVersion=t.unloadIntegration=t.loadIntegration=t.buildIntegration=t.resolveIntegrationNameFromSource=void 0,t.resolveIntegrationNameFromSource=i,t.buildIntegration=a,t.loadIntegration=s,t.unloadIntegration=u,t.resolveVersion=c}),Nr=e(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isDisabledIntegration=t.isInstallableIntegration=void 0;var n=function(e,t){var n,r=t.type,i=t.bundlingStatus,o=t.versionSettings,a="unbundled"!==i&&("browser"===r||(null===(n=null===o||void 0===o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!e.startsWith("Segment")&&"Iterable"!==e&&a};t.isInstallableIntegration=n;var r=function(e,t){var n=!1===t.All&&void 0===t[e];return!1===t[e]||n};t.isDisabledIntegration=r}),Rr=Dr,Lr=br,Ur=Fr,Br=Nr,qr=e(function(e,t){function n(e,t){return me.__awaiter(this,void 0,void 0,function(){var n,r=this;return me.__generator(this,function(i){switch(i.label){case 0:return n=[],(0,Dt.isOffline)()?[2,t]:[4,(0,Gn.pWhile)(function(){return t.length>0&&(0,Dt.isOnline)()},function(){return me.__awaiter(r,void 0,void 0,function(){var r,i,o;return me.__generator(this,function(a){switch(a.label){case 0:return r=t.pop(),r?[4,(0,Xe.attempt)(r,e)]:[2];case 1:return i=a.sent(),o=i instanceof Et.Context,o||n.push(r),[2]}})})})];case 1:return i.sent(),n.map(function(e){return t.pushWithBackoff(e)}),[2,t]}})})}function r(e,t,n,r,a,s){var u,c;if(void 0===n&&(n={}),void 0===r&&(r={}),(0,nt.isServer)())return[];t.plan&&(r=null!==r&&void 0!==r?r:{},r.plan=t.plan);var l=null!==(c=null===(u=t.middlewareSettings)||void 0===u?void 0:u.routingRules)&&void 0!==c?c:[],d=t.integrations,f=r.integrations,p=(0,Lr.mergedOptions)(t,null!==r&&void 0!==r?r:{}),h=null===s||void 0===s?void 0:s.reduce(function(e,t){var n;return me.__assign(me.__assign({},e),(n={},n[(0,Ur.resolveIntegrationNameFromSource)(t)]=t,n))},{}),v=new Set(me.__spreadArray(me.__spreadArray([],Object.keys(d).filter(function(e){return(0,Br.isInstallableIntegration)(e,d[e])}),!0),Object.keys(h||{}).filter(function(e){return(0,i.isPlainObject)(d[e])||(0,i.isPlainObject)(null===f||void 0===f?void 0:f[e])}),!0));return Array.from(v).filter(function(e){return!(0,Br.isDisabledIntegration)(e,n)}).map(function(t){var n=d[t],i=(0,Ur.resolveVersion)(n),s=new o(t,i,e,p[t],r,null===h||void 0===h?void 0:h[t]);return l.filter(function(e){return e.destinationName===t}).length>0&&a&&s.addMiddleware(a),s})}Object.defineProperty(t,"__esModule",{value:!0}),t.ajsDestinations=t.LegacyDestination=void 0;var i=Xe,o=function(){function e(e,t,n,r,i,o){void 0===r&&(r={});var a=this;this.options={},this.type="destination",this.middleware=[],this.initializePromise=(0,Re.createDeferred)(),this.flushing=!1,this.name=e,this.version=t,this.settings=me.__assign({},r),this.disableAutoISOConversion=i.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.initializePromise.promise.then(function(e){return a._initialized=e},function(){}),this.options=i,this.buffer=i.disableClientPersistence?new Mt.PriorityQueue(4,[]):new Tt.PersistedPriorityQueue(4,"".concat(n,":dest-").concat(e)),this.scheduleFlush()}return e.prototype.isLoaded=function(){return!!this._ready},e.prototype.ready=function(){var e=this;return this.initializePromise.promise.then(function(){var t;return null!==(t=e.onReady)&&void 0!==t?t:Promise.resolve()})},e.prototype.load=function(e,t){var n;return me.__awaiter(this,void 0,void 0,function(){var r,i,o=this;return me.__generator(this,function(a){switch(a.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(n=this.integrationSource)||void 0===n?[3,1]:(i=n,[3,3]);case 1:return[4,(0,Ur.loadIntegration)(e,this.name,this.version,this.options.obfuscate)];case 2:i=a.sent(),a.label=3;case 3:r=i,this.integration=(0,Ur.buildIntegration)(r,this.settings,t),this.onReady=new Promise(function(e){var t=function(){o._ready=!0,e(!0)};o.integration.once("ready",t)}),this.integration.on("initialize",function(){o.initializePromise.resolve(!0)});try{(0,Ir.recordIntegrationMetric)(e,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(t){throw(0,Ir.recordIntegrationMetric)(e,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),this.initializePromise.resolve(!1),t}return[2]}})})},e.prototype.unload=function(e,t){return(0,Ur.unloadIntegration)(this.name,this.version,this.options.obfuscate)},e.prototype.addMiddleware=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.middleware=(e=this.middleware).concat.apply(e,t)},e.prototype.shouldBuffer=function(e){return"page"!==e.event.type&&((0,Dt.isOffline)()||!0!==this._ready||!0!==this._initialized)},e.prototype.send=function(e,t,n){var r,i;return me.__awaiter(this,void 0,void 0,function(){var o,a,s,u,c,l;return me.__generator(this,function(d){switch(d.label){case 0:return this.shouldBuffer(e)?(this.buffer.push(e),this.scheduleFlush(),[2,e]):(o=null===(i=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===i?void 0:i.track,a=e.event.event,o&&a&&"Segment.io"!==this.name&&(s=o[a],(0,Rr.isPlanEventEnabled)(o,s)?e.updateEvent("integrations",me.__assign(me.__assign({},e.event.integrations),null===s||void 0===s?void 0:s.integrations)):(e.updateEvent("integrations",me.__assign(me.__assign({},e.event.integrations),{All:!1,"Segment.io":!0})),e.cancel(new Et.ContextCancelation({retry:!1,reason:"Event ".concat(a," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),(null===s||void 0===s?void 0:s.enabled)&&!1===(null===s||void 0===s?void 0:s.integrations[this.name])&&e.cancel(new Et.ContextCancelation({retry:!1,reason:"Event ".concat(a," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),[4,(0,gr.applyDestinationMiddleware)(this.name,e.event,this.middleware)]);case 1:if(null===(u=d.sent()))return[2,e];c=new t(u,{traverse:!this.disableAutoISOConversion}),(0,Ir.recordIntegrationMetric)(e,{integrationName:this.name,methodName:n,type:"classic"}),d.label=2;case 2:return d.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,c)]:[3,4];case 3:d.sent(),d.label=4;case 4:return[3,6];case 5:throw l=d.sent(),(0,Ir.recordIntegrationMetric)(e,{integrationName:this.name,methodName:n,type:"classic",didError:!0}),l;case 6:return[2,e]}})})},e.prototype.track=function(e){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return[2,this.send(e,Nn.Track,"track")]})})},e.prototype.page=function(e){var t;return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(n){switch(n.label){case 0:return(null===(t=this.integration)||void 0===t?void 0:t._assumesPageview)&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return n.sent(),[2,this.send(e,Nn.Page,"page")]}})})},e.prototype.identify=function(e){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return[2,this.send(e,Nn.Identify,"identify")]})})},e.prototype.alias=function(e){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return[2,this.send(e,Nn.Alias,"alias")]})})},e.prototype.group=function(e){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(t){return[2,this.send(e,Nn.Group,"group")]})})},e.prototype.scheduleFlush=function(){var e=this;this.flushing||setTimeout(function(){return me.__awaiter(e,void 0,void 0,function(){var e;return me.__generator(this,function(t){switch(t.label){case 0:return(0,Dt.isOffline)()||!0!==this._ready||!0!==this._initialized?(this.scheduleFlush(),[2]):(this.flushing=!0,e=this,[4,n(this,this.buffer)]);case 1:return e.buffer=t.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}})})},5e3*Math.random())},e}();t.LegacyDestination=o,t.ajsDestinations=r}),Vr=e(function(e,t){!function(t,n){e.exports=function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==(void 0===e?"undefined":_typeof(e))&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){n.r(t);var r="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise(function(n,r){function i(){var e,t=[],n=[],r={};return o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(i,o,a){t.push(o=o.toLowerCase()),n.push([o,a]),e=r[o],r[o]=e?e+","+a:a}),{ok:2==(o.status/100|0),status:o.status,statusText:o.statusText,url:o.responseURL,clone:i,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}var o=new XMLHttpRequest;for(var a in o.open(t.method||"get",e,!0),t.headers)o.setRequestHeader(a,t.headers[a]);o.withCredentials="include"==t.credentials,o.onload=function(){n(i())},o.onerror=r,o.send(t.body)})};t.default=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return r(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var i=r(n(3)),o=r(n(4));t.VimeoAnalytics=i.default,t.YouTubeAnalytics=o.default},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(n(0)),a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return r.authToken=n,r.player=e,r.metadata={content:{},playback:{videoPlayer:"Vimeo"}},r.mostRecentHeartbeat=0,r.isPaused=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var n in t)this.registerHandler(n,t[n]);this.player.getVideoId().then(function(t){e.retrieveMetadata({id:t})}).catch(console.error)}},{key:"registerHandler",value:function(e,t){var n=this;this.player.on(e,function(e){n.updateMetadata(e),t.call(n,e)})}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise(function(n,r){var i=e.id;(0,o.default)("https://api.vimeo.com/videos/"+i,{headers:{Authorization:"Bearer "+t.authToken}}).then(function(e){return e.ok?e.json():r(e)}).then(function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration}).catch(function(e){return console.error("Request to Vimeo API Failed with: ",e),r(e)})})}},{key:"updateMetadata",value:function(e){var t=this;return new Promise(function(n,r){t.player.getVolume().then(function(r){r&&(t.metadata.playback.sound=100*r),t.metadata.playback.position=e.seconds,n()}).catch(r)})}}]),t}(r(n(1)).default);t.default=a},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map(function(e){if(null!=e)return e.replace(/\D/,"")}),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=r(n(0)),s=r(n(1)),u=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=(void 0===t?"undefined":_typeof(t))&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return r.player=e,r.apiKey=n,r.playerLoaded=!1,r.playbackStarted=!1,r.contentStarted=!1,r.isPaused=!1,r.isBuffering=!1,r.isSeeking=!1,r.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},r.metadata=[{playback:{video_player:"youtube"},content:{}}],r.playlistIndex=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":_typeof(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise(function(t,n){var r=e.player.getVideoData(),o=e.player.getPlaylist()||[r.video_id],s=o.join();(0,a.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then(function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()}).then(function(n){e.metadata=[];for(var r=0,a=0;a<o.length;a++){var s=n.items[a];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),r+=i(s.contentDetails.duration)}for(a=0;a<o.length;a++)e.metadata[a].playback={total_length:r,video_player:"youtube"};t()}).catch(function(t){e.metadata=o.map(function(e){return{playback:{video_player:"youtube"},content:{}}}),n(t)})})}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(s.default);t.default=u}])}()}(window)}),zr=e(function(e,t){function n(e){return me.__awaiter(this,void 0,void 0,function(){var t;return me.__generator(this,function(n){switch(n.label){case 0:return[4,Promise.resolve().then(function(){return me.__importStar(Vr)})];case 1:return t=n.sent(),e._plugins=t,[2]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.loadLegacyVideoPlugins=void 0,t.loadLegacyVideoPlugins=n}),Kr=e(function(e,t){function n(e,t){var n,r;if(!e||!Object.keys(e))return{};var i=e.integrations?Object.keys(e.integrations).filter(function(t){return!1===e.integrations[t]}):[],o=[];return(null!==(n=t.remotePlugins)&&void 0!==n?n:[]).forEach(function(e){i.forEach(function(t){e.creationName==t&&o.push(e.name)})}),(null!==(r=t.remotePlugins)&&void 0!==r?r:[]).reduce(function(e,t){return t.settings.subscriptions&&o.includes(t.name)&&t.settings.subscriptions.forEach(function(n){return e["".concat(t.name," ").concat(n.partnerAction)]=!1}),e},{})}function r(e,t){function r(r){var i=e,o=r.event.event;if(i&&o){var a=i[o];if(!(0,Rr.isPlanEventEnabled)(i,a))return r.updateEvent("integrations",me.__assign(me.__assign({},r.event.integrations),{All:!1,"Segment.io":!0})),r;var s=n(a,t);r.updateEvent("integrations",me.__assign(me.__assign(me.__assign({},r.event.integrations),null===a||void 0===a?void 0:a.integrations),s))}return r}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:r,alias:r,track:r,identify:r,group:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.schemaFilter=void 0,t.schemaFilter=r}),Hr=e(function(e,t){function n(e,t,n){var r;return me.__awaiter(this,void 0,void 0,function(){var i,o,a,s,u,c=this;return me.__generator(this,function(l){switch(l.label){case 0:return(0,nt.isServer)()?[2,[]]:(i=(0,jr.getNextIntegrationsURL)(),o=null!==(r=t.enabledMiddleware)&&void 0!==r?r:{},a=Object.entries(o).filter(function(e){return e[0],e[1]}).map(function(e){return e[0]}),s=a.map(function(t){return me.__awaiter(c,void 0,void 0,function(){var r,o,a,s;return me.__generator(this,function(u){switch(u.label){case 0:r=t.replace("@segment/",""),o=r,n&&(o=btoa(r).replace(/=/g,"")),a="".concat(i,"/middleware/").concat(o,"/latest/").concat(o,".js.gz"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,(0,kr.loadScript)(a)];case 2:return u.sent(),[2,window["".concat(r,"Middleware")]];case 3:return s=u.sent(),e.log("error",s),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}})})}),[4,Promise.all(s)]);case 1:return u=l.sent(),u=u.filter(Boolean),[2,u]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.remoteMiddlewares=void 0,t.remoteMiddlewares=n}),Gr=_e,Wr=_r,Qr=xr,Jr=Ar,Yr=Mr,$r=Tr,Zr=qr,Xr=zr,ei=Kr,ti=Hr,ni=e(function(e,t){function n(e,t){return(0,st.fetch)("".concat(t,"/v1/projects/").concat(e,"/settings")).then(function(e){return e.ok?e.json():e.text().then(function(e){throw new Error(e)})}).catch(function(e){throw console.error(e.message),e})}function r(e){return"test"!==(0,Gr.getProcessEnv)().NODE_ENV&&Object.keys(e.integrations).length>1}function i(e){var t,n,r;return"test"!==(0,Gr.getProcessEnv)().NODE_ENV&&(null!==(r=null===(n=null===(t=e.middlewareSettings)||void 0===t?void 0:t.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}function o(e,t){(0,hr.flushSetAnonymousID)(e,t),(0,hr.flushOn)(e,t)}function a(e,t){return me.__awaiter(this,void 0,void 0,function(){return me.__generator(this,function(n){switch(n.label){case 0:return[4,(0,hr.flushAddSourceMiddleware)(e,t)];case 1:return n.sent(),(0,hr.flushAnalyticsCallsInNewTask)(e,t),[2]}})})}function s(e,t,n,a,s,u,c){var l,d,f;return void 0===s&&(s=[]),me.__awaiter(this,void 0,void 0,function(){var p,h,v,y,g,m,_,b,w,P,x,S,O,k,j,I=this;return me.__generator(this,function(A){switch(A.label){case 0:return o(n,c),p=null===s||void 0===s?void 0:s.filter(function(e){return"object"===(void 0===e?"undefined":_typeof(e))}),h=null===s||void 0===s?void 0:s.filter(function(e){return"function"==typeof e&&"string"==typeof e.pluginName}),i(t)?[4,Promise.resolve().then(function(){return me.__importStar($r)}).then(function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)})]:[3,2];case 1:return y=A.sent(),[3,3];case 2:y=void 0,A.label=3;case 3:return v=y,r(t)||u.length>0?[4,Promise.resolve().then(function(){return me.__importStar(Zr)}).then(function(r){return r.ajsDestinations(e,t,n.integrations,a,v,u)})]:[3,5];case 4:return m=A.sent(),[3,6];case 5:m=[],A.label=6;case 6:return g=m,t.legacyVideoPluginsEnabled?[4,Promise.resolve().then(function(){return me.__importStar(Xr)}).then(function(e){return e.loadLegacyVideoPlugins(n)})]:[3,8];case 7:A.sent(),A.label=8;case 8:return(null===(l=a.plan)||void 0===l?void 0:l.track)?[4,Promise.resolve().then(function(){return me.__importStar(ei)}).then(function(e){var n;return e.schemaFilter(null===(n=a.plan)||void 0===n?void 0:n.track,t)})]:[3,10];case 9:return b=A.sent(),[3,11];case 10:b=void 0,A.label=11;case 11:return _=b,w=(0,Lr.mergedOptions)(t,a),[4,(0,Jr.remoteLoader)(t,n.integrations,w,a,v,h).catch(function(){return[]})];case 12:return P=A.sent(),(x=me.__spreadArray(me.__spreadArray([Qr.envEnrichment],g,!0),P,!0),_&&x.push(_),S=!1===(null===(d=a.integrations)||void 0===d?void 0:d.All)&&!a.integrations["Segment.io"]||a.integrations&&!1===a.integrations["Segment.io"])?[3,14]:(k=(O=x).push,[4,(0,vr.segmentio)(n,w["Segment.io"],t.integrations)]);case 13:k.apply(O,[A.sent()]),A.label=14;case 14:return[4,n.register.apply(n,me.__spreadArray(me.__spreadArray([],x,!1),p,!1))];case 15:return j=A.sent(),[4,(0,hr.flushRegister)(n,c)];case 16:return A.sent(),Object.entries(null!==(f=t.enabledMiddleware)&&void 0!==f?f:{}).some(function(e){return e[1]})?[4,Promise.resolve().then(function(){return me.__importStar(ti)}).then(function(e){var r=e.remoteMiddlewares;return me.__awaiter(I,void 0,void 0,function(){var e,i;return me.__generator(this,function(o){switch(o.label){case 0:return[4,r(j,t,a.obfuscate)];case 1:return e=o.sent(),i=e.map(function(e){return n.addSourceMiddleware(e)}),[2,Promise.all(i)]}})})})]:[3,18];case 17:A.sent(),A.label=18;case 18:return[2,j]}})})}function u(e,t,r){var i,o,u,c,l,d,f,p,h,v,y;return void 0===t&&(t={}),me.__awaiter(this,void 0,void 0,function(){var g,m,_,b,w,P,x,S,O,k,j,I,A;return me.__generator(this,function(M){switch(M.label){case 0:return!0===t.disable?[2,[new Wr.NullAnalytics,Et.Context.system()]]:(t.globalAnalyticsKey&&(0,Pe.setGlobalAnalyticsKey)(t.globalAnalyticsKey),e.cdnURL&&(0,jr.setGlobalCDNUrl)(e.cdnURL),t.initialPageview&&r.add(new hr.PreInitMethodCall("page",[])),g=null!==(i=e.cdnURL)&&void 0!==i?i:(0,jr.getCDN)(),null===(o=e.cdnSettings)||void 0===o?[3,1]:(_=o,[3,3]));case 1:return[4,n(e.writeKey,g)];case 2:_=M.sent(),M.label=3;case 3:return m=_,t.updateCDNSettings&&(m=t.updateCDNSettings(m)),"function"!=typeof t.disable?[3,5]:[4,t.disable(m)];case 4:if(b=M.sent())return[2,[new Wr.NullAnalytics,Et.Context.system()]];M.label=5;case 5:return w=null===(c=null===(u=m.integrations["Segment.io"])||void 0===u?void 0:u.retryQueue)||void 0===c||c,t=me.__assign({retryQueue:w},t),P=new Wr.Analytics(me.__assign(me.__assign({},e),{cdnSettings:m,cdnURL:g}),t),(0,Yr.attachInspector)(P),x=null!==(l=e.plugins)&&void 0!==l?l:[],S=null!==(d=e.classicIntegrations)&&void 0!==d?d:[],O=null===(f=t.integrations)||void 0===f?void 0:f["Segment.io"],ht.Stats.initRemoteMetrics(me.__assign(me.__assign({},m.metrics),{host:null!==(p=null===O||void 0===O?void 0:O.apiHost)&&void 0!==p?p:null===(h=m.metrics)||void 0===h?void 0:h.host,protocol:null===O||void 0===O?void 0:O.protocol})),[4,s(e.writeKey,m,P,t,x,S,r)];case 6:return k=M.sent(),j=null!==(v=window.location.search)&&void 0!==v?v:"",I=null!==(y=window.location.hash)&&void 0!==y?y:"",A=j.length?j:I.replace(/(?=#).*(?=\?)/,""),A.includes("ajs_")?[4,P.queryString(A).catch(console.error)]:[3,8];case 7:M.sent(),M.label=8;case 8:return P.initialized=!0,P.emit("initialize",e,t),[4,a(P,r)];case 9:return M.sent(),[2,[P,k]]}})})}Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsBrowser=t.loadCDNSettings=void 0,t.loadCDNSettings=n;var c=function(e){function t(){var t=this,n=(0,Re.createDeferred)(),r=n.promise,i=n.resolve;return t=e.call(this,function(e){return r.then(function(t){return u(t[0],t[1],e)})})||this,t._resolveLoadStart=function(e,t){return i([e,t])},t}return me.__extends(t,e),t.prototype.load=function(e,t){return void 0===t&&(t={}),this._resolveLoadStart(e,t),this},t.load=function(e,n){return void 0===n&&(n={}),(new t).load(e,n)},t.standalone=function(e,n){return t.load({writeKey:e},n).then(function(e){return e[0]})},t}(hr.AnalyticsBuffered);t.AnalyticsBrowser=c}),ri=ni;window.analytics=ri.AnalyticsBrowser.load({writeKey:ebates.segment.settings.apiKey,cdnSettings:function(e){return{integrations:{Amplitude:{apiKey:e.amplitudeApiKey,appendFieldsToEventProps:{},batchEvents:!1,deviceIdFromUrlParam:!1,enableLocationListening:!0,eventUploadPeriodMillis:3e4,eventUploadThreshold:30,forceHttps:!1,groupTypeTrait:"",groupValueTrait:"",mapQueryParams:{},preferAnonymousIdForDeviceId:!1,saveParamsReferrerOncePerSession:!0,trackAllPages:!0,trackAllPagesV2:!1,trackCategorizedPages:!1,trackGclid:!1,trackNamedPages:!1,trackProductsOnce:!1,trackReferrer:!0,trackRevenuePerProduct:!1,trackSessionEvents:!1,trackUtmProperties:!0,traitsToIncrement:[],traitsToSetOnce:[],unsetParamsReferrerOnNewSession:!0,useAdvertisingIdForDeviceId:!1,useCustomAmplitudeProperties:!1,useLogRevenueV2:!0,versionName:"",versionSettings:{version:"3.3.3",componentTypes:["browser","ios","android","server"]},type:"browser",bundlingStatus:"unbundled"},"Branch Metrics":{branch_key:e.branch_key,versionSettings:{componentTypes:["ios","android"]},type:"ios"},"Segment.io":{apiKey:e.apiKey,unbundledIntegrations:["Amplitude"],addBundledMetadata:!0,maybeBundledConfigIds:{"Branch Metrics":[e["Branch Metrics"]]},versionSettings:{version:"4.4.7",componentTypes:["browser"]},apiHost:e.apiHost}},plan:{track:{__default:{enabled:!1,integrations:{}},"Click Get App":{enabled:!0,integrations:{}},"Click Home":{enabled:!0,integrations:{}},"Click See All Hot Deals Codes":{enabled:!0,integrations:{}},"Click See All Hot Deals Coupons":{enabled:!0,integrations:{}},Dismiss:{enabled:!0,integrations:{}},"Featured Category See More":{enabled:!0,integrations:{}},"Homepage Standalone Stores":{enabled:!0,integrations:{}},"Scroll Boosted Homepage Module":{enabled:!0,integrations:{}},"Scroll Featured Categories":{enabled:!0,integrations:{}},"Scroll Hot Deals Codes":{enabled:!0,integrations:{}},"Scroll Hot Deals Coupons":{enabled:!0,integrations:{}},"Scroll Shop Again Double":{enabled:!0,integrations:{}},"Scroll Your Hot Deals":{enabled:!0,integrations:{}},"Session Start":{enabled:!0,integrations:{}},"View Boosted Homepage Module":{enabled:!0,integrations:{}},"View Featured Categories":{enabled:!0,integrations:{}},"View Featured Stores":{enabled:!0,integrations:{}},"View Hot Deals Codes":{enabled:!0,integrations:{}},"View Hot Deals Coupons":{enabled:!0,integrations:{}},"View Shop Again Double":{enabled:!0,integrations:{}},"View Super App":{enabled:!0,integrations:{}},"View Your Hot Deals":{enabled:!0,integrations:{}},"Visit Add Address":{enabled:!0,integrations:{}},click_discover_tile:{enabled:!0,integrations:{}},click_popular:{enabled:!0,integrations:{}},click_see_more:{enabled:!0,integrations:{}},scroll_continue_shopping:{enabled:!0,integrations:{}},scroll_popular:{enabled:!0,integrations:{}},shop_now:{enabled:!0,integrations:{}},view_continue_shopping:{enabled:!0,integrations:{}},view_discover_tile:{enabled:!0,integrations:{}},view_popular:{enabled:!0,integrations:{}}},identify:{__default:{enabled:!1}},group:{__default:{enabled:!1}}},edgeFunction:{},analyticsNextEnabled:!0,middlewareSettings:{},enabledMiddleware:{},metrics:{sampleRate:.1,host:e.apiHost},legacyVideoPluginsEnabled:!1,remotePlugins:[]}}(ebates.segment.settings)})}(); //# sourceMappingURL=/dist/static/rev/global/analytics/segment-init-1e908ae45d.js.map "use strict";function _defineProperty2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _slicedToArray2=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function e(e,r,n){return n={path:r,exports:{},require:function(e,r){return t((void 0===r||null===r)&&n.path)}},e(n,n.exports),n.exports}function t(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}function r(e){document.querySelectorAll("a[href^='"+ebates.branch.linkPaths.origin+"']").forEach(function(t){var r=new URL(t.href);r.searchParams.set(d.SAME_SURFACE_VISIT_ID_QUERY_PARAM,e),t.setAttribute("href",r.href)})}function n(){var e=new URL(window.location.href);e.searchParams.delete(d.SAME_SURFACE_VISIT_ID_QUERY_PARAM),window.history.pushState({},"",e)}function i(e){return e!==m.production||ebates.enableMessagingSDKDebug}function o(){var e=window.location.hostname;return"www.rakuten.com"===e?m.production:"preview-www.rakuten.com"===e?m.preview:m.qa}function a(){var e,t=o(),r={lingerDuration:3e3,batchSize:20,messageGatewayBaseURL:"https://api.rakuten.com"},n={lingerDuration:3e3,batchSize:20,messageGatewayBaseURL:"https://qa1-api.rakuten.com"};return(e={},_defineProperty2(e,m.qa,n),_defineProperty2(e,m.production,r),_defineProperty2(e,m.preview,r),e)[t]}function s(e){var t=e.detail.anonymous_id,r=o(),n=a();v.setMember({server_session_id:ebates.session.id,guid:ebates.user.guid||null,anonymous_id:t});var s=ebates.page.type||"untyped";v.init({hostApp:{name:"rewards_monolith",version:"",type:f.AppType.Web},page_type:b[s]||""+s.charAt(0).toUpperCase()+s.slice(1),networkConfig:{usa:{messageGatewayBaseURL:n.messageGatewayBaseURL,batchSize:n.batchSize,lingerDuration:n.lingerDuration}},regionId:"usa",invalidMessagesHandler:function(e){i(r)&&(window.alert("There are validation errors for the messages you sent, please check errors on the console"),console.group("Message Validation Failed"),console.log(e),console.groupEnd())}})}function u(e,t){var r=t||0,n=S;return[n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],"-",n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]],n[e[r++]]].join("")}function c(e,t,r){var n=t&&r||0,i=t||[];e=e||{};var o=e.node||x,a=void 0!==e.clockseq?e.clockseq:O;if(null==o||null==a){var s=_();null==o&&(o=x=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=O=16383&(s[6]<<8|s[7]))}var u=void 0!==e.msecs?e.msecs:(new Date).getTime(),c=void 0!==e.nsecs?e.nsecs:E+1,l=u-I+(c-E)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||u>I)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");I=u,E=c,O=a,u+=122192928e5;var d=(1e4*(268435455&u)+c)%4294967296;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var f=u/4294967296*1e4&268435455;i[n++]=f>>>8&255,i[n++]=255&f,i[n++]=f>>>24&15|16,i[n++]=f>>>16&255,i[n++]=a>>>8|128,i[n++]=255&a;for(var v=0;v<6;++v)i[n+v]=o[v];return t||j(i)}function l(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null),e=e||{};var i=e.random||(e.rng||_)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var o=0;o<16;++o)t[n+o]=i[o];return t||j(i)}var d=e(function(e,t){!function(){function e(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return r[t](o,o.exports,e),o.exports}var r={"./node_modules/@rakuten-rewards/messaging-sdk-js/dist/index.js":function(e,t){!function(){function e(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return r[t].call(o.exports,o,o.exports,e),o.exports}var r={"./src/MessagingSDK.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t){if(null==e)return{};var r,n,i=s(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function s(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function u(){function e(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(n||[]);return w(a,"_invoke",{value:l(e,r,s)}),a}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(t){["next","throw","return"].forEach(function(r){e(t,r,function(e){return this._invoke(r,e)})})}function c(e,t){function i(o,a,s,u){var c=r(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==n(d)&&y.call(d,"__await")?t.resolve(d.__await).then(function(e){i("next",e,s,u)},function(e){i("throw",e,s,u)}):t.resolve(d).then(function(e){l.value=e,s(l)},function(e){return i("throw",e,s,u)})}u(c.arg)}var o;w(this,"_invoke",{value:function(e,r){function n(){return new t(function(t,n){i(e,r,t,n)})}return o=o?o.then(n,n):n()}})}function l(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return g()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=d(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=r(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function d(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,d(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),O;var o=r(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,O;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[S];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(y.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:g}}function g(){return{value:void 0,done:!0}}u=function(){return m};var m={},b=Object.prototype,y=b.hasOwnProperty,w=Object.defineProperty||function(e,t,r){e[t]=r.value},_="function"==typeof Symbol?Symbol:{},S=_.iterator||"@@iterator",k=_.asyncIterator||"@@asyncIterator",x=_.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(e,t,r){return e[t]=r}}m.wrap=t;var O={},j={};e(j,S,function(){return this});var I=Object.getPrototypeOf,E=I&&I(I(p([])));E&&E!==b&&y.call(E,S)&&(j=E);var T=a.prototype=i.prototype=Object.create(j);return o.prototype=a,w(T,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:o,configurable:!0}),o.displayName=e(a,x,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,x,"GeneratorFunction")),t.prototype=Object.create(T),t},m.awrap=function(e){return{__await:e}},s(c.prototype),e(c.prototype,k,function(){return this}),m.AsyncIterator=c,m.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new c(t(e,r,n,i),o);return m.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(T),e(T,x,"Generator"),e(T,S,function(){return this}),e(T,"toString",function(){return"[object Generator]"}),m.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},m.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,n&&(r.method="next",r.arg=void 0),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),O}},m}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){function o(e){c(s,n,i,o,a,"next",e)}function a(e){c(s,n,i,o,a,"throw",e)}var s=e.apply(t,r);o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function v(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return t=p(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=g(e,"string");return"symbol"===n(t)?t:String(t)}function g(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){return"".concat(E,"-").concat(e)}function b(e){return e.startsWith(E)}r.r(t),r.d(t,{AppType:function(){return j},INSTALLATION_ID_LOCAL_STORAGE_KEY:function(){return A},MessagingSDK:function(){return P}});var y=r("./node_modules/uuid/dist/esm-browser/v4.js"),w=r("./node_modules/throttle-debounce/esm/index.js"),_=r("./node_modules/ua-parser-js/src/ua-parser.js"),S=r("./src/utils.ts"),k=r("./src/Store.ts"),x=r("./node_modules/detectincognitojs/dist/detectIncognito.js"),O=["server_session_id"],j=function(e){return e.Web="WEB",e.Extension="BROWSER_EXTENSION",e.Lib="LIB",e}({}),I="rakuten",E="messaging-sdk",T="msgError",A="RAKUTEN_INSTALLATION_ID",L="/message/v2/regions/{regionId}/messages/batch",P=function(){function e(){var t=this;d(this,e),h(this,"config",void 0),h(this,"member",void 0),h(this,"timer",void 0),h(this,"uaParser",void 0),h(this,"isFlushInProgress",void 0),h(this,"isRetrying",void 0),h(this,"isFlushingTempStore",void 0),h(this,"throttleFlush",void 0),h(this,"started",!1),h(this,"window",void 0),h(this,"serverSessionId",void 0),h(this,"store",void 0),h(this,"tempMessageStore",[]),h(this,"clientAgent",void 0),h(this,"isPrivateBrowserSession",void 0),h(this,"errorLogger",function(e){var r,n,i;if(null!==(r=t.window)&&void 0!==r&&null!==(n=r.DD_LOGS)&&void 0!==n&&null!==(i=n.logger)&&void 0!==i&&i.error){var o,a,s,u;null===(o=t.window)||void 0===o||null===(a=o.DD_LOGS)||void 0===a||null===(s=a.logger)||void 0===s||null===(u=s.error)||void 0===u||u.call(s,T,{error:e},e)}else{var c;null===(c=console)||void 0===c||c.error(T,e)}}),this.store=new k.default(I,E),this.sendMessagesToMessageGateway=this.sendMessagesToMessageGateway.bind(this),this.flush=this.flush.bind(this),this.throttleFlush=(0,w.throttle)(1e3,this.flush)}return v(e,[{key:"init",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.setConfig(t),this.clientAgent="".concat(this.config.hostApp.name,"/").concat(this.config.hostApp.version," (").concat(this.config.hostApp.type,") ").concat("messaging-sdk-js","/").concat("1.4.4"," (").concat(j.Lib,")"),this.window=(0,S.getWindow)(),this.uaParser=new _.UAParser(null===(r=this.window)||void 0===r?void 0:null===(n=r.navigator)||void 0===n?void 0:n.userAgent),e.next=6,(0,x.detectIncognito)().then(function(e){return e.isPrivate});case 6:return this.isPrivateBrowserSession=e.sent,this.started=!0,e.next=10,this.flushTempStore();case 10:this.throttleFlush(),this.restartTimer();case 12:case"end":return e.stop()}},e,this)}));return e}()},{key:"setRegion",value:function(e){this.config&&(this.config.regionId=e)}},{key:"setMember",value:function(e){if(e){var t=e.server_session_id,r=a(e,O);this.member=o({},r),this.serverSessionId=t}}},{key:"setConfig",value:function(e){if(!e)throw new Error("Config missing when initializing MessagingSdk. Please `messagingSdkInstance.init(config)` with a valid Config");if(!e.invalidMessagesHandler)throw new Error("invalidMessagesHandler callback for rendering message failures must be supplied in the Config when `messagingSdkInstance.init(config)`");e.errorMessageLogger&&(this.errorLogger=e.errorMessageLogger),this.config=e}},{key:"apiUri",get:function(){var e,t=this.config,r=t.regionId,n=t.networkConfig,i=n[r].messageGatewayBaseURL,o=n.genericRegionApiPath;return e=null!==o&&void 0!==o&&o.includes("{regionId}")?o.replace("{regionId}",r):L.replace("{regionId}",r),"".concat(i).concat(e)}},{key:"getDefaultPageProperties",value:function(){var e,t,r,n=new URL(null!==(e=null===(t=this.window)||void 0===t?void 0:t.location.href)&&void 0!==e?e:""),i=(0,S.getParentPath)(n.pathname),o=(0,S.getSearchParams)(),a=Object.fromEntries(o);return{url:n.href,host:n.host,path:n.pathname,title:null===(r=document)||void 0===r?void 0:r.title,parent_path:i,query_params:a}}},{key:"createMessage",value:function(e){var t,r=(0,y.default)(),n=(0,S.getVisitID)(),i=this.member,a=e.serverContext,s=this.started?this.getClientContext(e):null,u=e.schema_id,c=e.type,l=e.data,d=e.parentMessageId,f=Intl.DateTimeFormat().resolvedOptions().timeZone,v=(new Date).getTime(),h=null!==(t=null===e||void 0===e?void 0:e.sourceTimestampMillis)&&void 0!==t?t:v,p=this.started?this.config.hostApp:void 0,g=this.started?this.config.regionId:void 0;return n||this.errorLogger("Visit ID is not found"),o({id:r,visit_id:n,member:i,server_context:a,client_context:s,schema_id:u,type:c,data:l,parentMessageId:d,source_time_zone:f,source_created_at_millis:v,source_timestamp_millis:h,issuer:p,region_id:g},!this.started&&{partialMessage:e})}},{key:"getClientContext",value:function(e){var t,r;return{device:this.getDevice(),experiments:null===e||void 0===e?void 0:e.experiments,locale:null===(t=this.window)||void 0===t?void 0:null===(r=t.navigator)||void 0===r?void 0:r.language,server_session_id:null===this||void 0===this?void 0:this.serverSessionId,origin:this.getOrigin(e),referrer:document.referrer,installation_id:this.installationId}}},{key:"getOrigin",value:function(e){var t,r,n,i=this.config.hostApp,a=(0,S.getOS)(this.uaParser),s=null===(t=this.window)||void 0===t?void 0:null===(r=t.navigator)||void 0===r?void 0:r.userAgent,u=null!==(n=null===e||void 0===e?void 0:e.page)&&void 0!==n?n:{};return{app:i,os:a,user_agent:s,page:o(o({},this.getDefaultPageProperties()),{},{type:this.config.page_type},u),screen:null===e||void 0===e?void 0:e.screen,component:null===e||void 0===e?void 0:e.component,is_private_browsing_enabled:this.isPrivateBrowserSession}}},{key:"getDevice",value:function(){var e=this.uaParser.getDevice();return{model:e.model,manufacturer:e.vendor,form_factor:(0,S.getDeviceType)(e.type)}}},{key:"flushIfBatchSizeReached",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessageCount();case 2:t=e.sent,this.config&&t>=this.getBatchSize()&&this.started&&!this.isFlushingTempStore&&this.throttleFlush();case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"flushMessage",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendMessagesToMessageGateway([t]);case 2:if(null===(r=e.sent)||void 0===r||!r.ok){e.next=11;break}return e.prev=4,e.next=7,this.removeMessagesFromStorageByKeys([t.id]);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(4);case 11:this.restartTimer();case 12:case"end":return e.stop()}},e,this,[[4,9]])}));return e}()},{key:"send",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.createMessage(t),this.started)try{this.store.set(m(r.id),r),this.flushIfBatchSizeReached()}catch(e){this.flushMessage(r)}else this.tempMessageStore.push(r);case 2:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendMessagesToMessageGateway",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r,n,i,o,a,s,c,l,d,f,v,h,p=this,g=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:0,e.prev=1,this.stopTimer(),e.next=5,(0,S.postData)(this.apiUri,{messages:t},this.clientAgent);case 5:if(i=e.sent,o=null===(n=i.headers.get("content-type"))||void 0===n?void 0:n.includes("application/json"),!i.ok){e.next=27;break}if(!o){e.next=25;break}if(e.prev=9,!o){e.next=16;break}return e.next=13,i.json();case 13:e.t0=e.sent,e.next=17;break;case 16:e.t0=null;case 17:s=e.t0,c=null===(a=s.data)||void 0===a?void 0:a.map(function(e){var r=t.find(function(t){return t.id===(null===e||void 0===e?void 0:e.message_id)});if(!p.config.invalidMessagesHandler){var n,i;null===(n=(i=p.config).invalidMessageHandler)||void 0===n||n.call(i,r,e)}return{message:r,messageValidationError:e}}),this.config.invalidMessagesHandler(c),e.next=25;break;case 22:e.prev=22,e.t1=e.catch(9),this.errorLogger(e.t1);case 25:e.next=38;break;case 27:if(d=null===(l=i)||void 0===l?void 0:l.status,f=i.headers.get("retry-after"),!(v=(429===d||d>=500&&d<600)&&r<10)){e.next=37;break}return this.isRetrying=!0,this.stopTimer(),h=f?parseInt(f,10):5,e.next=36,new Promise(function(e,n){setTimeout(function(){p.sendMessagesToMessageGateway(t,r+1).then(function(t){e(t)}).catch(function(e){return n(e)})},Math.pow(2,r)*h*1e3)});case 36:i=e.sent;case 37:this.errorLogger(i);case 38:return e.abrupt("return",i);case 41:return e.prev=41,e.t2=e.catch(1),this.errorLogger(e.t2),e.abrupt("return",void 0);case 45:return e.prev=45,0===r&&(this.isRetrying=!1),e.finish(45);case 48:case"end":return e.stop()}},e,this,[[1,41,45,48],[9,22]])}));return e}()},{key:"restartTimer",value:function(){var e=this;this.stopTimer(),this.timer=setInterval(function(){e.throttleFlush()},this.regionNetworkConfig.lingerDuration)}},{key:"stopTimer",value:function(){this.timer&&clearInterval(this.timer)}},{key:"flushTempStore",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.tempMessageStore.length>0)){e.next=13;break}return this.isFlushingTempStore=!0,t=this.updateMessages(this.tempMessageStore),e.prev=3,e.next=6,this.sendMessagesToMessageGateway(t);case 6:r=e.sent,null!==r&&void 0!==r&&r.ok&&(this.tempMessageStore=[]),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(3);case 12:this.isFlushingTempStore=!1;case 13:case"end":return e.stop()}},e,this,[[3,10]])}));return e}()},{key:"flush",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.started){e.next=21;break}if(this.isFlushInProgress||this.isRetrying){e.next=20;break}return this.isFlushInProgress=!0,e.next=6,this.flushTempStore();case 6:return e.next=8,this.getBatchedValidMessageKeys();case 8:if(t=e.sent,!(t.length>0)){e.next=20;break}return e.next=12,this.store.getMany(t);case 12:return r=e.sent,e.next=15,this.sendMessagesToMessageGateway(r);case 15:if(null===(n=e.sent)||void 0===n||!n.ok){e.next=19;break}return e.next=19,this.removeMessagesFromStorageByKeys(t);case 19:this.restartTimer();case 20:this.isFlushInProgress=!1;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),this.errorLogger(e.t0);case 26:case"end":return e.stop()}},e,this,[[0,23]])}));return e}()},{key:"updateMessages",value:function(e){var t=this,r=[];return e.forEach(function(e){var n=o(o({},e),{},{issuer:t.config.hostApp,member:t.member,region_id:t.config.regionId});if(!n.client_context){var i=t.getClientContext(e.partialMessage);delete n.partialMessage,n.client_context=i}r.push(n)}),r}},{key:"removeMessagesFromStorageByKeys",value:function(e){return this.store.delMany(e)}},{key:"getCurrentValidMessages",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.store.keys();case 2:return t=e.sent,r=t.filter(b),e.abrupt("return",r);case 5:case"end":return e.stop()}},e,this)}));return e}()},{key:"getCurrentValidMessageCount",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessages();case 2:return t=e.sent,e.abrupt("return",t.length);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"getBatchSize",value:function(){var e;return null!==(e=this.regionNetworkConfig.batchSize)&&void 0!==e?e:25}},{key:"getBatchedValidMessageKeys",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessages();case 2:return t=e.sent,e.abrupt("return",t.slice(0,this.getBatchSize()));case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"regionNetworkConfig",get:function(){return this.config.networkConfig[this.config.regionId]}},{key:"installationId",get:function(){try{var e=localStorage.getItem(A);if(e)return e;var t=(0,y.default)();return this.installationId=t,t}catch(e){return this.errorLogger(e),null}},set:function(e){try{localStorage.setItem(A,e||"")}catch(e){this.errorLogger(e)}}}]),e}();h(P,"pipeline","holistic")},"./src/Store.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t=u(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"===n(t)?t:String(t)}function c(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}r.r(t),r.d(t,{default:function(){return f}});var l=r("./node_modules/idb-keyval/dist/index.js"),d=r("./src/utils.ts"),f=function(){function e(t,r){i(this,e),s(this,"idbStore",void 0);var n=(0,d.getWindow)();n&&"indexedDB"in n&&(this.idbStore=l.createStore(t,r))}return a(e,[{key:"set",value:function(e,t){return l.set(e,t,this.idbStore)}},{key:"values",value:function(){return l.values(this.idbStore)}},{key:"keys",value:function(){return l.keys(this.idbStore)}},{key:"getMany",value:function(e){return l.getMany(e,this.idbStore)}},{key:"delMany",value:function(e){return l.delMany(e,this.idbStore)}}]),e}()},"./src/utils.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(){function e(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,r,n){var i=t&&t.prototype instanceof o?t:o,a=Object.create(i.prototype),s=new h(n||[]);return w(a,"_invoke",{value:l(e,r,s)}),a}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function o(){}function a(){}function s(){}function u(t){["next","throw","return"].forEach(function(r){e(t,r,function(e){return this._invoke(r,e)})})}function c(e,t){function i(o,a,s,u){var c=r(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==n(d)&&y.call(d,"__await")?t.resolve(d.__await).then(function(e){i("next",e,s,u)},function(e){i("throw",e,s,u)}):t.resolve(d).then(function(e){l.value=e,s(l)},function(e){return i("throw",e,s,u)})}u(c.arg)}var o;w(this,"_invoke",{value:function(e,r){function n(){return new t(function(t,n){i(e,r,t,n)})}return o=o?o.then(n,n):n()}})}function l(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return g()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=d(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=r(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function d(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,d(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),O;var o=r(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,O;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[S];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(y.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:g}}function g(){return{value:void 0,done:!0}}i=function(){return m};var m={},b=Object.prototype,y=b.hasOwnProperty,w=Object.defineProperty||function(e,t,r){e[t]=r.value},_="function"==typeof Symbol?Symbol:{},S=_.iterator||"@@iterator",k=_.asyncIterator||"@@asyncIterator",x=_.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(e,t,r){return e[t]=r}}m.wrap=t;var O={},j={};e(j,S,function(){return this});var I=Object.getPrototypeOf,E=I&&I(I(p([])));E&&E!==b&&y.call(E,S)&&(j=E);var T=s.prototype=o.prototype=Object.create(j);return a.prototype=s,w(T,"constructor",{value:s,configurable:!0}),w(s,"constructor",{value:a,configurable:!0}),a.displayName=e(s,x,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,e(t,x,"GeneratorFunction")),t.prototype=Object.create(T),t},m.awrap=function(e){return{__await:e}},u(c.prototype),e(c.prototype,k,function(){return this}),m.AsyncIterator=c,m.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new c(t(e,r,n,i),o);return m.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},u(T),e(T,x,"Generator"),e(T,S,function(){return this}),e(T,"toString",function(){return"[object Generator]"}),m.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},m.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,n&&(r.method="next",r.arg=void 0),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),O}},m}function o(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){function a(e){o(u,n,i,a,s,"next",e)}function s(e){o(u,n,i,a,s,"throw",e)}var u=e.apply(t,r);a(void 0)})}}function s(e,t){return f(e)||d(e,t)||c(e,t)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function f(e){if(Array.isArray(e))return e}function v(){return"undefined"!=typeof window}function h(e){return e.replace(/\/+$/,"").substring(0,e.lastIndexOf("/"))}function p(e){var t=h(e),r=t.split("/"),n=s(r,2),i=n[1];return i?"/".concat(i,"/"):void 0}function g(){return v()?localStorage.getItem(O):null}function m(e){throw new Error("Parameter ".concat(e," is required"))}function b(){return y.apply(this,arguments)}function y(){return y=a(i().mark(function e(){var t,r,n,o,a,s,u,c,l,d=arguments;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=d.length,r=new Array(t),n=0;n<t;n++)r[n]=d[n];return o=r[0],a=void 0===o?m("url"):o,s=r[1],u=void 0===s?m("data"):s,c=r[2],l=void 0===c?m("clientAgent"):c,e.abrupt("return",fetch(a,{method:"POST",mode:"cors",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json","client-ts":(new Date).getTime().toString(),"client-agent":l},body:JSON.stringify(u)}));case 3:case"end":return e.stop()}},e)})),y.apply(this,arguments)}function w(){var e=new URL(decodeURIComponent(window.location.href));return new URLSearchParams(e.search)}function _(){return v()?window:void 0}function S(e){return e===x.Mobile||e===x.Tablet?e:x.Desktop}function k(e){var t=e.getOS();return null===t||void 0===t||!t.name||null!==t&&void 0!==t&&t.version?t.name&&t.version?{name:t.name,version:t.version}:void 0:{name:t.name,version:"UNKNOWN"}}r.r(t),r.d(t,{DeviceType:function(){return x},getDeviceType:function(){return S},getOS:function(){return k},getParentPath:function(){return p},getSearchParams:function(){return w},getVisitID:function(){return g},getWindow:function(){return _},isBrowser:function(){return v},postData:function(){return b}});var x=function(e){return e.Mobile="mobile",e.Desktop="desktop",e.Tablet="tablet",e}({}),O="RAKUTEN_VISIT_ID"},"./node_modules/detectincognitojs/dist/detectIncognito.js":function(e,t){t.__esModule=!0,t.detectIncognito=void 0;var r=function(){return new Promise(function(e,t){function r(t){e({isPrivate:t,browserName:b})}function n(){var e=navigator.userAgent;return e.match(/Chrome/)?void 0!==navigator.brave?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function i(e){return e===eval.toString().length}function o(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Apple")&&i(37)}function a(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Google")&&i(33)}function s(){return void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&i(37)}function u(){return void 0!==navigator.msSaveBlob&&i(39)}function c(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,i,o=null===(n=t.target)||void 0===n?void 0:n.result;try{o.createObjectStore("test",{autoIncrement:!0}).put(new Blob),r(!1)}catch(e){var a=e;if(e instanceof Error&&(a=null!==(i=e.message)&&void 0!==i?i:e),"string"!=typeof a)return r(!1);var s=/BlobURLs are not yet supported/.test(a);return r(s)}finally{o.close(),window.indexedDB.deleteDatabase(e)}}}catch(e){return r(!1)}}function l(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch(e){return r(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch(e){return r(!0)}return r(!1)}function d(){void 0!==navigator.maxTouchPoints?c():l()}function f(){var e=window;return void 0!==e.performance&&void 0!==e.performance.memory&&void 0!==e.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824}function v(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){r(Math.round(t/1048576)<2*Math.round(f()/1048576))},function(e){t(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function h(){(0,window.webkitRequestFileSystem)(0,1,function(){r(!1)},function(){r(!0)})}function p(){void 0!==self.Promise&&void 0!==self.Promise.allSettled?v():h()}function g(){r(void 0===navigator.serviceWorker)}function m(){r(void 0===window.indexedDB)}var b="Unknown";!function(){o()?(b="Safari",d()):a()?(b=n(),p()):s()?(b="Firefox",g()):u()?(b="Internet Explorer",m()):t(new Error("detectIncognito cannot determine the browser"))}()})};t.detectIncognito=r},"./node_modules/ua-parser-js/src/ua-parser.js":function(e,t,r){var n;!function(i,o){var a="model",s="name",u="type",c="vendor",l="version",d="mobile",f="tablet",v="smarttv",h=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},p=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},g=function(e,t){return"string"===(void 0===e?"undefined":_typeof2(e))&&-1!==m(t).indexOf(m(e))},m=function(e){return e.toLowerCase()},b=function(e){return"string"===(void 0===e?"undefined":_typeof2(e))?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},y=function(e,t){if("string"===(void 0===e?"undefined":_typeof2(e)))return e=e.replace(/^\s\s*/,""),"undefined"===(void 0===t?"undefined":_typeof2(t))?e:e.substring(0,350)},w=function(e,t){for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],o=l[i],"object"===(void 0===o?"undefined":_typeof2(o))&&o.length>0?2===o.length?"function"==_typeof2(o[1])?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?"function"!==_typeof2(o[1])||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},_=function(e,t){for(var r in t)if("object"===_typeof2(t[r])&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(g(t[r][n],e))return"?"===r?void 0:r}else if(g(t[r],e))return"?"===r?void 0:r;return e},S={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},k={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},x={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[s,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],l],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[l,[s,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,_,S]],[/(webkit|khtml)\/([\w\.]+)/i],[s,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[s,l],[/(cobalt)\/([\w\.]+)/i],[s,[l,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",m]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",m]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[c,"Samsung"],[u,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[c,"Samsung"],[u,d]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[c,"Apple"],[u,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[c,"Apple"],[u,f]],[/(macintosh);/i],[a,[c,"Apple"]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[c,"Sharp"],[u,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[c,"Huawei"],[u,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[c,"Huawei"],[u,d]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[c,"Xiaomi"],[u,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[c,"Xiaomi"],[u,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[c,"OPPO"],[u,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[c,"Vivo"],[u,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[c,"Realme"],[u,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[c,"Motorola"],[u,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[c,"Motorola"],[u,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[c,"LG"],[u,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[c,"LG"],[u,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[c,"Lenovo"],[u,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[c,"Nokia"],[u,d]],[/(pixel c)\b/i],[a,[c,"Google"],[u,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[c,"Google"],[u,d]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[c,"Sony"],[u,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[c,"Sony"],[u,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[c,"OnePlus"],[u,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[c,"Amazon"],[u,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,d]],[/(playbook);[-\w\),; ]+(rim)/i],[a,c,[u,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[c,"BlackBerry"],[u,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[c,"ASUS"],[u,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[c,"ASUS"],[u,d]],[/(nexus 9)/i],[a,[c,"HTC"],[u,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[a,/_/g," "],[u,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[c,"Acer"],[u,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[c,"Meizu"],[u,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,a,[u,d]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[c,a,[u,f]],[/(surface duo)/i],[a,[c,"Microsoft"],[u,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[c,"Fairphone"],[u,d]],[/(u304aa)/i],[a,[c,"AT&T"],[u,d]],[/\bsie-(\w*)/i],[a,[c,"Siemens"],[u,d]],[/\b(rct\w+) b/i],[a,[c,"RCA"],[u,f]],[/\b(venue[\d ]{2,7}) b/i],[a,[c,"Dell"],[u,f]],[/\b(q(?:mv|ta)\w+) b/i],[a,[c,"Verizon"],[u,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[c,"Barnes & Noble"],[u,f]],[/\b(tm\d{3}\w+) b/i],[a,[c,"NuVision"],[u,f]],[/\b(k88) b/i],[a,[c,"ZTE"],[u,f]],[/\b(nx\d{3}j) b/i],[a,[c,"ZTE"],[u,d]],[/\b(gen\d{3}) b.+49h/i],[a,[c,"Swiss"],[u,d]],[/\b(zur\d{3}) b/i],[a,[c,"Swiss"],[u,f]],[/\b((zeki)?tb.*\b) b/i],[a,[c,"Zeki"],[u,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],a,[u,f]],[/\b(ns-?\w{0,9}) b/i],[a,[c,"Insignia"],[u,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[c,"NextBook"],[u,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],a,[u,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],a,[u,d]],[/\b(ph-1) /i],[a,[c,"Essential"],[u,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[c,"Envizen"],[u,f]],[/\b(trio[-\w\. ]+) b/i],[a,[c,"MachSpeed"],[u,f]],[/\btu_(1491) b/i],[a,[c,"Rotor"],[u,f]],[/(shield[\w ]+) b/i],[a,[c,"Nvidia"],[u,f]],[/(sprint) (\w+)/i],[c,a,[u,d]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[c,"Microsoft"],[u,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[c,"Zebra"],[u,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[c,"Zebra"],[u,d]],[/smart-tv.+(samsung)/i],[c,[u,v]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[c,"Samsung"],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,v]],[/(apple) ?tv/i],[c,[a,"Apple TV"],[u,v]],[/crkey/i],[[a,"Chromecast"],[c,"Google"],[u,v]],[/droid.+aft(\w)( bui|\))/i],[a,[c,"Amazon"],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[c,"Sharp"],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[a,[c,"Sony"],[u,v]],[/(mitv-\w{5}) bui/i],[a,[c,"Xiaomi"],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[c,a,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,y],[a,y],[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,a,[u,"console"]],[/droid.+; (shield) bui/i],[a,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[a,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[c,"Microsoft"],[u,"console"]],[/((pebble))app/i],[c,a,[u,"wearable"]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[c,"Apple"],[u,"wearable"]],[/droid.+; (glass) \d/i],[a,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[a,[c,"Zebra"],[u,"wearable"]],[/(quest( 2| pro)?)/i],[a,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/(aeobc)\b/i],[a,[c,"Amazon"],[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,d]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,_,k]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,_,k]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[l,[s,"watchOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chromium OS"],l],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,l]]},O=function e(t,r){if("object"===(void 0===t?"undefined":_typeof2(t))&&(r=t,t=void 0),!(this instanceof e))return new e(t,r).getResult();var n="undefined"!==(void 0===i?"undefined":_typeof2(i))&&i.navigator?i.navigator:void 0,o=t||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:void 0,p=r?h(x,r):x,g=n&&n.userAgent==o;return this.getBrowser=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.browser),e.major=b(e[l]),g&&n&&n.brave&&"function"==_typeof2(n.brave.isBrave)&&(e[s]="Brave"),e},this.getCPU=function(){var e={};return e.architecture=void 0,w.call(e,o,p.cpu),e},this.getDevice=function(){var e={};return e[c]=void 0,e[a]=void 0,e[u]=void 0,w.call(e,o,p.device),g&&!e[u]&&v&&v.mobile&&(e[u]=d),g&&"Macintosh"==e[a]&&n&&"undefined"!==_typeof2(n.standalone)&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[a]="iPad",e[u]=f),e},this.getEngine=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.engine),e},this.getOS=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.os),g&&!e[s]&&v&&"Unknown"!=v.platform&&(e[s]=v.platform.replace(/chrome os/i,"Chromium OS").replace(/macos/i,"Mac OS")),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o="string"===(void 0===e?"undefined":_typeof2(e))&&e.length>350?y(e,350):e,this},this.setUA(o),this};O.VERSION="1.0.35",O.BROWSER=p([s,l,"major"]),O.CPU=p(["architecture"]),O.DEVICE=p([a,c,u,"console",d,v,f,"wearable","embedded"]),O.ENGINE=O.OS=p([s,l]),"undefined"!==(void 0===t?"undefined":_typeof2(t))?(e.exports&&(t=e.exports=O),t.UAParser=O):r.amdO?void 0!==(n=function(){return O}.call(t,r,t,e))&&(e.exports=n):"undefined"!==(void 0===i?"undefined":_typeof2(i))&&(i.UAParser=O);var j="undefined"!==(void 0===i?"undefined":_typeof2(i))&&(i.jQuery||i.Zepto);if(j&&!j.ua){var I=new O;j.ua=I.getResult(),j.ua.get=function(){return I.getUA()},j.ua.set=function(e){I.setUA(e);var t=I.getResult();for(var r in t)j.ua[r]=t[r]}}}("object"===("undefined"==typeof window?"undefined":_typeof2(window))?window:this)},"./node_modules/uuid/dist/esm-browser/native.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return i}});var n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i={randomUUID:n}},"./node_modules/uuid/dist/esm-browser/regex.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},"./node_modules/uuid/dist/esm-browser/rng.js":function(e,t,r){function n(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}r.r(t),r.d(t,{default:function(){return n}});var i=void 0,o=new Uint8Array(16)},"./node_modules/uuid/dist/esm-browser/stringify.js":function(e,t,r){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r}r.r(t),r.d(t,{default:function(){return u},unsafeStringify:function(){return n}});for(var o=r("./node_modules/uuid/dist/esm-browser/validate.js"),a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));var u=i},"./node_modules/uuid/dist/esm-browser/v4.js":function(e,t,r){function n(e,t,r){if(i.default.randomUUID&&!t&&!e)return i.default.randomUUID();e=e||{};var n=e.random||(e.rng||o.default)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return(0,a.unsafeStringify)(n)}r.r(t),r.d(t,{default:function(){return s}});var i=r("./node_modules/uuid/dist/esm-browser/native.js"),o=r("./node_modules/uuid/dist/esm-browser/rng.js"),a=r("./node_modules/uuid/dist/esm-browser/stringify.js"),s=n},"./node_modules/uuid/dist/esm-browser/validate.js":function(e,t,r){function n(e){return"string"==typeof e&&i.default.test(e)}r.r(t),r.d(t,{default:function(){return o}});var i=r("./node_modules/uuid/dist/esm-browser/regex.js"),o=n},"./node_modules/idb-keyval/dist/index.js":function(e,t,r){function n(e){return new Promise(function(t,r){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return r(e.error)}})}function i(e,t){var r=indexedDB.open(e);r.onupgradeneeded=function(){return r.result.createObjectStore(t)};var i=n(r);return function(e,r){return i.then(function(n){return r(n.transaction(t,e).objectStore(t))})}}function o(){return b||(b=i("keyval-store","keyval")),b}function a(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readonly",function(t){return n(t.get(e))})}function s(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:o())("readwrite",function(r){return r.put(t,e),n(r.transaction)})}function u(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return e.forEach(function(e){return t.put(e[1],e[0])}),n(t.transaction)})}function c(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readonly",function(t){return Promise.all(e.map(function(e){return n(t.get(e))}))})}function l(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:o())("readwrite",function(r){return new Promise(function(i,o){r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(n(r.transaction))}catch(e){o(e)}}})})}function d(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return t.delete(e),n(t.transaction)})}function f(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return e.forEach(function(e){return t.delete(e)}),n(t.transaction)})}function v(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readwrite",function(e){return e.clear(),n(e.transaction)})}function h(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},n(e.transaction)}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readonly",function(e){if(e.getAllKeys)return n(e.getAllKeys());var t=[];return h(e,function(e){return t.push(e.key)}).then(function(){return t})})}function g(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readonly",function(e){if(e.getAll)return n(e.getAll());var t=[];return h(e,function(e){return t.push(e.value)}).then(function(){return t})})}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();return e("readonly",function(t){if(t.getAll&&t.getAllKeys)return Promise.all([n(t.getAllKeys()),n(t.getAll())]).then(function(e){var t=_slicedToArray2(e,2),r=t[0],n=t[1];return r.map(function(e,t){return[e,n[t]]})});var r=[];return e("readonly",function(e){return h(e,function(e){return r.push([e.key,e.value])}).then(function(){return r})})})}r.r(t),r.d(t,{clear:function(){return v},createStore:function(){return i},del:function(){return d},delMany:function(){return f},entries:function(){return m},get:function(){return a},getMany:function(){return c},keys:function(){return p},promisifyRequest:function(){return n},set:function(){return s},setMany:function(){return u},update:function(){return l},values:function(){return g}});var b=void 0},"./node_modules/throttle-debounce/esm/index.js":function(e,t,r){function n(e,t,r){function n(){a&&clearTimeout(a)}function i(e){var t=e||{},r=t.upcomingOnly,i=void 0!==r&&r;n(),h=!i}function o(){function r(){p=Date.now(),t.apply(l,s)}function i(){a=void 0}for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];var l=this,f=Date.now()-p;h||(d||!v||a||r(),n(),void 0===v&&f>e?d?(p=Date.now(),c||(a=setTimeout(v?i:r,e))):r():!0!==c&&(a=setTimeout(v?i:r,void 0===v?e-f:e)))}var a,s=r||{},u=s.noTrailing,c=void 0!==u&&u,l=s.noLeading,d=void 0!==l&&l,f=s.debounceMode,v=void 0===f?void 0:f,h=!1,p=0;return o.cancel=i,o}function i(e,t,r){var i=r||{},o=i.atBegin;return n(e,t,{debounceMode:!1!==(void 0!==o&&o)})}r.r(t),r.d(t,{debounce:function(){return i},throttle:function(){return n}})}},n={};!function(){e.amdO={}}(),function(){e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r}}(),function(){e.d=function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})}}(),function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var i={};!function(){e.r(i),e.d(i,{AppType:function(){return t.AppType},INSTALLATION_ID_LOCAL_STORAGE_KEY:function(){return t.INSTALLATION_ID_LOCAL_STORAGE_KEY},MessagingSDK:function(){return t.MessagingSDK}});var t=e("./src/MessagingSDK.ts")}();var o=t;for(var a in i)o[a]=i[a];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})}()},"./src/SurfaceVisitedEventHandler.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){g(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t){return c(e)||u(e,t)||d(e,t)||s()}function s(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function c(e){if(Array.isArray(e))return e}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function p(e,t,r){return t&&h(e.prototype,t),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,r){return t=m(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e){var t=b(e,"string");return"symbol"===n(t)?t:String(t)}function b(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}r.r(t),r.d(t,{CampaignEventField:function(){return M},CampaignQueryParam:function(){return E},DEBOUNCE_TIMEOUT:function(){return A},EVENTS_TO_TRACK:function(){return T},EventNames:function(){return y},FacebookCookie:function(){return D},INACTIVE_THRESHOLD_MINUTES:function(){return I},LAST_VISIT_LOCAL_STORAGE_KEY:function(){return x},MessagingSDKEvents:function(){return C},REFERRING_VISIT_ID_QUERY_PARAM:function(){return P},SAME_SURFACE_VISIT_ID_QUERY_PARAM:function(){return L},SurfaceVisitedEventHandler:function(){return U},VISIT_ATTR_LOCAL_STORAGE_KEY:function(){return j},VISIT_ID_LOCAL_STORAGE_KEY:function(){return O}});var y,w=r("./node_modules/uuid/dist/esm-browser/v4.js"),_=r("./node_modules/throttle-debounce/esm/index.js"),S=r("./node_modules/@rakuten-rewards/messaging-sdk-js/dist/index.js"),k=r("./node_modules/js-cookie/dist/js.cookie.mjs"),x="RAKUTEN_LAST_VISIT",O="RAKUTEN_VISIT_ID",j="RR_SURFACE_VISIT_ATTR",I=30;!function(e){e.surfaceVisited="Surface Visited"}(y||(y={}));var E,T=["mousedown","mousemove","keydown","scroll","touchstart"],A=1e3,L="rr_visit_id",P="referring_visit_id";!function(e){e.campaign="utm_campaign",e.medium="utm_medium",e.content="utm_content",e.source="utm_source",e.term="utm_term",e.group="utm_group",e.target="utm_target",e.legacyTarget="target",e.src="src",e.size="utm_size",e.pub="utm_pub",e.device="utm_device",e.goal="goal",e.audience="utm_audience",e.eeid="eeid",e.ebs="utm_ebs",e.gclid="gclid",e.channel="utm_channel",e.fbclid="fbclid"}(E||(E={}));var M;!function(e){e.id="campaign_id",e.medium="campaign_medium",e.content="campaign_content",e.source="campaign_source",e.term="campaign_term",e.group="campaign_group",e.target="campaign_target",e.src="legacy_campaign_src",e.size="legacy_campaign_size",e.pub="legacy_campaign_pub",e.device="campaign_device",e.goal="campaign_goal",e.audience="campaign_audience",e.eeid="legacy_campaign_eeid",e.ebs="legacy_campaign_ebs",e.gclid="legacy_campaign_gclid",e.fbpid="legacy_campaign_fbpid",e.fbclid="legacy_campaign_fbclid"}(M||(M={}));var D;!function(e){e.fbp="_fbp",e.fbc="_fbc"}(D||(D={}));var C={surfaceVisited:{type:"Surface Visited",schema_id:952}},U=function(){function e(){v(this,e),g(this,"properties",void 0),g(this,"trackEvent",void 0),g(this,"onVisitIDUpdate",void 0),g(this,"messagingSDK",void 0),g(this,"sameSurface",void 0),g(this,"refererVisitID",void 0),g(this,"inactiveTimeoutMinute",I),this.handleTracking=this.handleTracking.bind(this)}return p(e,[{key:"init",value:function(e){var t=e.properties,r=void 0===t?{}:t,n=e.trackEvent,i=e.onVisitIDUpdate,o=e.inactiveTimeoutMinute,a=void 0===o?I:o,s=e.messagingSDK,u=void 0===s?new S.MessagingSDK:s;if(this.properties=r,this.trackEvent=n,this.onVisitIDUpdate=i,this.inactiveTimeoutMinute=a,this.sameSurface=this.isSameSurface(),this.refererVisitID=this.getRefererVisitID(),this.refererVisitID&&this.removeRefererVisitIDFromUrl(),u&&(this.messagingSDK=u),this.sameSurface)this.handleSameSurface();else{this.onVisitIDUpdate(this.visitId),this.handleTracking();var c=(0,_.debounce)(A,!0,this.handleTracking);T.forEach(function(e){document.addEventListener(e,c)})}}},{key:"visitId",get:function(){try{return localStorage.getItem(O)||""}catch(e){return""}}},{key:"getLastActivityTimeStampFromLocalStorage",value:function(){try{var e=localStorage.getItem(x);return e?+e:Date.now()}catch(e){return Date.now()}}},{key:"getInitialVisitID",value:function(){var e;return null!==(e=this.getSameSurfaceVisitID())&&void 0!==e?e:this.visitId}},{key:"readLastVisitAttributionFromLocalStorage",value:function(){try{var e=localStorage.getItem(j);return e?JSON.parse(e):null}catch(e){return null}}},{key:"getRawCampaignDetailsFromURLSearch",value:function(){var e,t,r=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),n={},i=Object.values(E),o=l(r);try{for(o.s();!(t=o.n()).done;){var s=a(t.value,2),u=s[0],c=s[1];i.includes(u)&&c&&(n[u]=c)}}catch(e){o.e(e)}finally{o.f()}return n}},{key:"getCurrentVisitAttributesFromContext",value:function(){return o(o({},this.getRawCampaignDetailsFromURLSearch()),{},{referrer:document.referrer})}},{key:"isLastAndCurrentVisitAttributesSame",value:function(){var e=this.readLastVisitAttributionFromLocalStorage(),t=this.getCurrentVisitAttributesFromContext();if(null===e)return!1;if(e.referrer!==t.referrer)return!1;for(var r=Object.values(E),n=0,i=r;n<i.length;n++){var o=i[n];if(t[o]!==e[o])return!1}return!0}},{key:"writeCurrentVisitAttributionToLocalStorage",value:function(){localStorage.setItem(j,JSON.stringify(this.getCurrentVisitAttributesFromContext()))}},{key:"getRefererVisitID",value:function(){return new URLSearchParams(window.location.search).get(P)}},{key:"areSameVisitAttrs",value:function(){return!!this.isLastAndCurrentVisitAttributesSame()}},{key:"removeRefererVisitIDFromUrl",value:function(){var e=new URLSearchParams(window.location.search);e.delete(P),history.replaceState({},"","?".concat(e.toString()))}},{key:"isSameSiteNavigation",value:function(){return!!document.referrer.startsWith(location.origin)}},{key:"writeLastActivityTimeStampToLocalStorage",value:function(e){localStorage.setItem(x,e.toString())}},{key:"setVisitIDOnLocalStorage",value:function(e){localStorage.setItem(O,e)}},{key:"generateVisitID",value:function(){return(0,w.default)()}},{key:"getCampaignDetails",value:function(){var e,t,r=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),n=(t={},g(t,M.id,r.get(E.campaign)),g(t,M.medium,r.get(E.medium)),g(t,M.audience,r.get(E.audience)),g(t,M.content,r.get(E.content)),g(t,M.device,r.get(E.device)),g(t,M.eeid,r.get(E.eeid)),g(t,M.ebs,r.get(E.ebs)),g(t,M.gclid,r.get(E.gclid)),g(t,M.goal,r.get(E.goal)),g(t,M.group,r.get(E.group)),g(t,M.pub,r.get(E.pub)),g(t,M.source,r.get(E.channel)||r.get(E.source)),g(t,M.src,r.get(E.src)),g(t,M.target,r.get(E.target)||r.get(E.legacyTarget)),g(t,M.term,r.get(E.term)),g(t,M.size,r.get(E.size)),t);return Object.keys(n).forEach(function(e){return null===n[e]&&delete n[e]}),n}},{key:"getFacebookPixelID",value:function(){return k.default.get(D.fbp)}},{key:"getFacebookClickID",value:function(){var e,t,r=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),n=k.default.get(D.fbc);if(n){var i;t=null===n||void 0===n?void 0:null===(i=n.split("."))||void 0===i?void 0:i.pop()}else t=r.get(E.fbclid);return t}},{key:"getCampaignIDForMessagingSDK",value:function(){var e,t=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),r=t.get(E.campaign);return r||(this.getFacebookClickID()?"FACEBOOK":"UNKNOWN")}},{key:"getCampaignForMessagingSDK",value:function(){var e,t=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),r=this.getFacebookClickID(),n=o({source:t.get(E.channel)||t.get(E.source),medium:t.get(E.medium),term:t.get(E.term),content:t.get(E.content),target:t.get(E.target)||t.get(E.legacyTarget),device:t.get(E.device),group:t.get(E.group),goal:t.get(E.goal),audience:t.get(E.audience)},r&&{click_id:r});return Object.keys(n).forEach(function(e){return null===n[e]&&delete n[e]}),(Object.keys(n).length>0||t.has(E.campaign))&&(n.id=this.getCampaignIDForMessagingSDK()),n}},{key:"getLegacyCampaignForMessagingSDK",value:function(){var e,t=new URLSearchParams(null===(e=window.location)||void 0===e?void 0:e.search),r={src:t.get(E.src),size:t.get(E.size),pub:t.get(E.pub),eeid:t.get(E.eeid),ebs:t.get(E.ebs),gclid:t.get(E.gclid)};return Object.keys(r).forEach(function(e){return null===r[e]&&delete r[e]}),r}},{key:"isFirstVisit",value:function(){return!localStorage.getItem(O)}},{key:"getDefaultProperties",value:function(){var e=this.getFacebookClickID(),t=this.getFacebookPixelID();return o(o({referrer:document.referrer,title:document.title,path:window.location.pathname},t&&g({},M.fbpid,t)),e&&g({},M.fbclid,e))}},{key:"handleTracking",value:function(){var e=this.getCampaignDetails(),t=this.getLastActivityTimeStampFromLocalStorage(),r=Date.now(),n=this.isFirstVisit(),i=(r-t)/1e3,a=i<=60*I,s=!1,u=!1,c=this.getInitialVisitID();if(a&&!n||(s=!0),this.isSameSiteNavigation()&&a||a&&!n&&this.areSameVisitAttrs()&&!this.refererVisitID||(u=!0),u||s){var l=this.generateVisitID(),d=this.getDefaultProperties(),f=o(o(o({},d),this.properties),e);if(this.setVisitIDOnLocalStorage(l),this.onVisitIDUpdate(l),s&&this.trackEvent(y.surfaceVisited,f),u){var v,h={},p=this.getCampaignForMessagingSDK(),g=this.getLegacyCampaignForMessagingSDK();(Object.keys(p).length>0||Object.keys(g).length>0)&&(h=o(o({},Object.keys(p).length>0&&{campaign:p}),Object.keys(g).length>0&&{legacy_campaign:g})),this.refererVisitID&&(h[P]=this.refererVisitID,this.refererVisitID=null),a&&c&&(h.evicted_visit_id=c),null===this||void 0===this||null===(v=this.messagingSDK)||void 0===v||v.send({type:C.surfaceVisited.type,schema_id:C.surfaceVisited.schema_id,data:h})}}this.writeCurrentVisitAttributionToLocalStorage(),this.writeLastActivityTimeStampToLocalStorage(r)}},{key:"getSameSurfaceVisitID",value:function(){return new URLSearchParams(window.location.search).get(L)}},{key:"isSameSurface",value:function(){return!!this.getSameSurfaceVisitID()}},{key:"handleSameSurface",value:function(){var e=this.getSameSurfaceVisitID();this.setVisitIDOnLocalStorage(null!==e&&void 0!==e?e:""),this.onVisitIDUpdate(null!==e&&void 0!==e?e:"")}},{key:"clearStoredVisitIds",value:function(){localStorage.removeItem(x),localStorage.removeItem(O)}}]),e}()},"./node_modules/uuid/dist/esm-browser/native.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return i}});var n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i={randomUUID:n}},"./node_modules/uuid/dist/esm-browser/regex.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},"./node_modules/uuid/dist/esm-browser/rng.js":function(e,t,r){function n(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}r.r(t),r.d(t,{default:function(){return n}});var i=void 0,o=new Uint8Array(16)},"./node_modules/uuid/dist/esm-browser/stringify.js":function(e,t,r){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r}r.r(t),r.d(t,{default:function(){return u},unsafeStringify:function(){return n}});for(var o=r("./node_modules/uuid/dist/esm-browser/validate.js"),a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));var u=i},"./node_modules/uuid/dist/esm-browser/v4.js":function(e,t,r){function n(e,t,r){if(i.default.randomUUID&&!t&&!e)return i.default.randomUUID();e=e||{};var n=e.random||(e.rng||o.default)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return(0,a.unsafeStringify)(n)}r.r(t),r.d(t,{default:function(){return s}});var i=r("./node_modules/uuid/dist/esm-browser/native.js"),o=r("./node_modules/uuid/dist/esm-browser/rng.js"),a=r("./node_modules/uuid/dist/esm-browser/stringify.js"),s=n},"./node_modules/uuid/dist/esm-browser/validate.js":function(e,t,r){function n(e){return"string"==typeof e&&i.default.test(e)}r.r(t),r.d(t,{default:function(){return o}});var i=r("./node_modules/uuid/dist/esm-browser/regex.js"),o=n},"./node_modules/js-cookie/dist/js.cookie.mjs":function(e,t,r){function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}function i(e,t){function r(r,i,o){if("undefined"!=typeof document){o=n({},t,o),"number"==typeof o.expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in o)o[s]&&(a+="; "+s,!0!==o[s]&&(a+="="+o[s].split(";")[0]));return document.cookie=r+"="+e.write(i,r)+a}}function o(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],n={},i=0;i<r.length;i++){var o=r[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(n[s]=e.read(a,s),t===s)break}catch(e){}}return t?n[t]:n}}return Object.create({set:r,get:o,remove:function(e,t){r(e,"",n({},t,{expires:-1}))},withAttributes:function(e){return i(this.converter,n({},this.attributes,e))},withConverter:function(e){return i(n({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}r.r(t),r.d(t,{default:function(){return s}});var o={read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},a=i(o,{path:"/"}),s=a},"./node_modules/throttle-debounce/esm/index.js":function(e,t,r){function n(e,t,r,n){function i(){s&&clearTimeout(s)}function o(){i(),u=!0}function a(){function o(){c=Date.now(),r.apply(v,d)}function a(){s=void 0}for(var l=arguments.length,d=new Array(l),f=0;f<l;f++)d[f]=arguments[f];var v=this,h=Date.now()-c;u||(n&&!s&&o(),i(),void 0===n&&h>e?o():!0!==t&&(s=setTimeout(n?a:o,void 0===n?e-h:e)))}var s,u=!1,c=0;return"boolean"!=typeof t&&(n=r,r=t,t=void 0),a.cancel=o,a}function i(e,t,r){return void 0===r?n(e,t,!1):n(e,r,!1!==t)}r.r(t),r.d(t,{debounce:function(){return i},throttle:function(){return n}})}},n={};!function(){e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r}}(),function(){e.d=function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})}}(),function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var i={};!function(){e.r(i),e.d(i,{SAME_SURFACE_VISIT_ID_QUERY_PARAM:function(){return t.SAME_SURFACE_VISIT_ID_QUERY_PARAM},SurfaceVisitedEventHandler:function(){return t.SurfaceVisitedEventHandler}});var t=e("./src/SurfaceVisitedEventHandler.ts")}();var o=t;for(var a in i)o[a]=i[a];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})}()}),f=e(function(e,t){!function(){function e(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return r[t].call(o.exports,o,o.exports,e),o.exports}var r={"./src/MessagingSDK.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t){if(null==e)return{};var r,n,i=s(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function s(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}function u(){function e(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(n||[]);return w(a,"_invoke",{value:l(e,r,s)}),a}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(t){["next","throw","return"].forEach(function(r){e(t,r,function(e){return this._invoke(r,e)})})}function c(e,t){function i(o,a,s,u){var c=r(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==n(d)&&y.call(d,"__await")?t.resolve(d.__await).then(function(e){i("next",e,s,u)},function(e){i("throw",e,s,u)}):t.resolve(d).then(function(e){l.value=e,s(l)},function(e){return i("throw",e,s,u)})}u(c.arg)}var o;w(this,"_invoke",{value:function(e,r){function n(){return new t(function(t,n){i(e,r,t,n)})}return o=o?o.then(n,n):n()}})}function l(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return g()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=d(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=r(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function d(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,d(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),O;var o=r(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,O;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[S];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(y.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:g}}function g(){return{value:void 0,done:!0}}u=function(){return m};var m={},b=Object.prototype,y=b.hasOwnProperty,w=Object.defineProperty||function(e,t,r){e[t]=r.value},_="function"==typeof Symbol?Symbol:{},S=_.iterator||"@@iterator",k=_.asyncIterator||"@@asyncIterator",x=_.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(e,t,r){return e[t]=r}}m.wrap=t;var O={},j={};e(j,S,function(){return this});var I=Object.getPrototypeOf,E=I&&I(I(p([])));E&&E!==b&&y.call(E,S)&&(j=E);var T=a.prototype=i.prototype=Object.create(j);return o.prototype=a,w(T,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:o,configurable:!0}),o.displayName=e(a,x,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,x,"GeneratorFunction")),t.prototype=Object.create(T),t},m.awrap=function(e){return{__await:e}},s(c.prototype),e(c.prototype,k,function(){return this}),m.AsyncIterator=c,m.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new c(t(e,r,n,i),o);return m.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},s(T),e(T,x,"Generator"),e(T,S,function(){return this}),e(T,"toString",function(){return"[object Generator]"}),m.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},m.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,n&&(r.method="next",r.arg=void 0),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),O}},m}function c(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){function o(e){c(s,n,i,o,a,"next",e)}function a(e){c(s,n,i,o,a,"throw",e)}var s=e.apply(t,r);o(void 0)})}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function v(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return t=p(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){var t=g(e,"string");return"symbol"===n(t)?t:String(t)}function g(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e){return"".concat(E,"-").concat(e)}function b(e){return e.startsWith(E)}r.r(t),r.d(t,{AppType:function(){return O},INSTALLATION_ID_LOCAL_STORAGE_KEY:function(){return A},MessagingSDK:function(){return P}});var y=r("./node_modules/uuid/dist/esm-browser/v4.js"),w=r("./node_modules/throttle-debounce/esm/index.js"),_=r("./node_modules/ua-parser-js/src/ua-parser.js"),S=r("./src/utils.ts"),k=r("./src/Store.ts"),x=["server_session_id"],O=function(e){return e.Web="WEB",e.Extension="BROWSER_EXTENSION",e.Lib="LIB",e}({}),j=[408,429,500,502,503,504,507],I="rakuten",E="messaging-sdk",T="msgError",A="RAKUTEN_INSTALLATION_ID",L="/message/v2/regions/{regionId}/messages/batch",P=function(){function e(){var t=this;d(this,e),h(this,"config",void 0),h(this,"member",void 0),h(this,"timer",void 0),h(this,"uaParser",void 0),h(this,"isFlushInProgress",void 0),h(this,"isRetrying",void 0),h(this,"isFlushingTempStore",void 0),h(this,"throttleFlush",void 0),h(this,"started",!1),h(this,"window",void 0),h(this,"serverSessionId",void 0),h(this,"store",void 0),h(this,"tempMessageStore",[]),h(this,"clientAgent",void 0),h(this,"isPrivateBrowserSession",void 0),h(this,"errorLogger",function(e){var r,n,i;if(null!==(r=t.window)&&void 0!==r&&null!==(n=r.DD_LOGS)&&void 0!==n&&null!==(i=n.logger)&&void 0!==i&&i.error){var o,a,s,u;null===(o=t.window)||void 0===o||null===(a=o.DD_LOGS)||void 0===a||null===(s=a.logger)||void 0===s||null===(u=s.error)||void 0===u||u.call(s,T,{error:e},e)}else{var c;null===(c=console)||void 0===c||c.error(T,e)}}),this.store=new k.default(I,E),this.sendMessagesToMessageGateway=this.sendMessagesToMessageGateway.bind(this),this.flush=this.flush.bind(this),this.throttleFlush=(0,w.throttle)(1e3,this.flush)}return v(e,[{key:"init",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.setConfig(t),this.clientAgent="".concat(this.config.hostApp.name,"/").concat(this.config.hostApp.version," (").concat(this.config.hostApp.type,") ").concat("messaging-sdk-js","/").concat("1.5.0"," (").concat(O.Lib,")"),this.window=(0,S.getWindow)(),this.uaParser=new _.UAParser(null===(r=this.window)||void 0===r?void 0:null===(n=r.navigator)||void 0===n?void 0:n.userAgent),e.next=6,(0,S.detectPrivateBrowserSession)();case 6:return this.isPrivateBrowserSession=e.sent,this.started=!0,e.next=10,this.flushTempStore();case 10:this.throttleFlush(),this.restartTimer();case 12:case"end":return e.stop()}},e,this)}));return e}()},{key:"setRegion",value:function(e){this.config&&(this.config.regionId=e)}},{key:"setMember",value:function(e){if(e){var t=e.server_session_id,r=a(e,x);this.member=o({},r),this.serverSessionId=t}}},{key:"setConfig",value:function(e){if(!e)throw new Error("Config missing when initializing MessagingSdk. Please `messagingSdkInstance.init(config)` with a valid Config");if(!e.invalidMessagesHandler)throw new Error("invalidMessagesHandler callback for rendering message failures must be supplied in the Config when `messagingSdkInstance.init(config)`");e.errorMessageLogger&&(this.errorLogger=e.errorMessageLogger),this.config=e}},{key:"apiUri",get:function(){var e,t=this.config,r=t.regionId,n=t.networkConfig,i=n[r].messageGatewayBaseURL,o=n.genericRegionApiPath;return e=null!==o&&void 0!==o&&o.includes("{regionId}")?o.replace("{regionId}",r):L.replace("{regionId}",r),"".concat(i).concat(e)}},{key:"getDefaultPageProperties",value:function(){var e,t,r,n=new URL(null!==(e=null===(t=this.window)||void 0===t?void 0:t.location.href)&&void 0!==e?e:""),i=(0,S.getParentPath)(n.pathname),o=(0,S.getSearchParams)(),a=Object.fromEntries(o);return{url:n.href,host:n.host,path:n.pathname,title:null===(r=document)||void 0===r?void 0:r.title,parent_path:i,query_params:a}}},{key:"createMessage",value:function(e){var t,r,n=(0,y.default)(),i=null!==(t=e.visit_id)&&void 0!==t?t:this.getVisitID(),a=this.member,s=e.serverContext,u=this.started?this.getClientContext(e):null,c=e.schema_id,l=e.type,d=e.data,f=e.parentMessageId,v=Intl.DateTimeFormat().resolvedOptions().timeZone,h=(new Date).getTime(),p=null!==(r=null===e||void 0===e?void 0:e.sourceTimestampMillis)&&void 0!==r?r:h,g=this.started?this.config.hostApp:void 0,m=this.started?this.config.regionId:void 0;return i||this.errorLogger("Visit ID is not found"),o({id:n,visit_id:i,member:a,server_context:s,client_context:u,schema_id:c,type:l,data:d,parentMessageId:f,source_time_zone:v,source_created_at_millis:h,source_timestamp_millis:p,issuer:g,region_id:m},!this.started&&{partialMessage:e})}},{key:"getClientContext",value:function(e){var t,r,n,i,o=this.getDevice(),a=null===e||void 0===e?void 0:e.experiments,s=null===(t=this.window)||void 0===t?void 0:null===(r=t.navigator)||void 0===r?void 0:r.language,u=null===this||void 0===this?void 0:this.serverSessionId,c=this.getOrigin(e),l=null===(n=document)||void 0===n?void 0:n.referrer,d=null!==(i=e.installation_id)&&void 0!==i?i:this.installationId,f={device:o,experiments:a,locale:s,server_session_id:u,origin:c,referrer:l,installation_id:d};return(0,S.mergeWith)(f,e.clientContext)}},{key:"getOrigin",value:function(e){var t,r,n,i=this.config.hostApp,a=(0,S.getOS)(this.uaParser),s=null===(t=this.window)||void 0===t?void 0:null===(r=t.navigator)||void 0===r?void 0:r.userAgent,u=null!==(n=null===e||void 0===e?void 0:e.page)&&void 0!==n?n:{};return{app:i,os:a,user_agent:s,page:o(o({},this.getDefaultPageProperties()),{},{type:this.config.page_type},u),screen:null===e||void 0===e?void 0:e.screen,component:null===e||void 0===e?void 0:e.component,is_private_browsing_enabled:this.isPrivateBrowserSession}}},{key:"getDevice",value:function(){var e=this.uaParser.getDevice();return{model:e.model,manufacturer:e.vendor,form_factor:(0,S.getDeviceType)(e.type)}}},{key:"flushIfBatchSizeReached",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessageCount();case 2:t=e.sent,this.config&&t>=this.getBatchSize()&&this.started&&!this.isFlushingTempStore&&this.throttleFlush();case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"flushMessage",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.sendMessagesToMessageGateway([t]);case 2:if(null===(r=e.sent)||void 0===r||!r.ok){e.next=11;break}return e.prev=4,e.next=7,this.removeMessagesFromStorageByKeys([t.id]);case 7:e.next=11;break;case 9:e.prev=9,e.t0=e.catch(4);case 11:this.restartTimer();case 12:case"end":return e.stop()}},e,this,[[4,9]])}));return e}()},{key:"send",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.createMessage(t),this.started)try{this.store.set(m(r.id),r),this.flushIfBatchSizeReached()}catch(e){this.flushMessage(r)}else this.tempMessageStore.push(r);case 2:case"end":return e.stop()}},e,this)}));return e}()},{key:"sendMessagesToMessageGateway",value:function(){function e(e){return t.apply(this,arguments)}var t=l(u().mark(function e(t){var r,n,i,o,a,s,c,l,d,f,v,h,p,g,m,b=this,y=arguments;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=y.length>1&&void 0!==y[1]?y[1]:0,e.prev=1,this.stopTimer(),e.next=5,(0,S.postData)(this.apiUri,{messages:t},this.clientAgent);case 5:if(i=e.sent,null===(n=i)||void 0===n||!n.ok){e.next=27;break}if(!(a=null===(o=i.headers.get("content-type"))||void 0===o?void 0:o.includes("application/json"))){e.next=25;break}if(e.prev=9,!a){e.next=16;break}return e.next=13,i.json();case 13:e.t0=e.sent,e.next=17;break;case 16:e.t0=null;case 17:c=e.t0,l=null===(s=c.data)||void 0===s?void 0:s.map(function(e){var r=t.find(function(t){return t.id===(null===e||void 0===e?void 0:e.message_id)});if(!b.config.invalidMessagesHandler){var n,i;null===(n=(i=b.config).invalidMessageHandler)||void 0===n||n.call(i,r,e)}return{message:r,messageValidationError:e}}),this.config.invalidMessagesHandler(l),e.next=25;break;case 22:e.prev=22,e.t1=e.catch(9),this.errorLogger(e.t1);case 25:e.next=38;break;case 27:if(h=null===(d=i)||void 0===d?void 0:d.status,p=null===(f=i)||void 0===f?void 0:null===(v=f.headers)||void 0===v?void 0:v.get("retry-after"),!(g=j.includes(h)&&r<10)){e.next=37;break}return this.isRetrying=!0,this.stopTimer(),m=p?parseInt(p,10):5,e.next=36,new Promise(function(e,n){setTimeout(function(){b.sendMessagesToMessageGateway(t,r+1).then(function(t){e(t)}).catch(function(e){return n(e)})},Math.pow(2,r)*m*1e3)});case 36:i=e.sent;case 37:this.errorLogger(i);case 38:return e.abrupt("return",i);case 41:return e.prev=41,e.t2=e.catch(1),this.errorLogger(e.t2),e.abrupt("return",void 0);case 45:return e.prev=45,0===r&&(this.isRetrying=!1),e.finish(45);case 48:case"end":return e.stop()}},e,this,[[1,41,45,48],[9,22]])}));return e}()},{key:"restartTimer",value:function(){var e=this;this.stopTimer(),this.timer=setInterval(function(){e.throttleFlush()},this.regionNetworkConfig.lingerDuration)}},{key:"stopTimer",value:function(){this.timer&&clearInterval(this.timer)}},{key:"flushTempStore",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.tempMessageStore.length>0)){e.next=13;break}return this.isFlushingTempStore=!0,t=this.updateMessages(this.tempMessageStore),e.prev=3,e.next=6,this.sendMessagesToMessageGateway(t);case 6:r=e.sent,null!==r&&void 0!==r&&r.ok&&(this.tempMessageStore=[]),e.next=12;break;case 10:e.prev=10,e.t0=e.catch(3);case 12:this.isFlushingTempStore=!1;case 13:case"end":return e.stop()}},e,this,[[3,10]])}));return e}()},{key:"flush",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r,n;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!this.started){e.next=21;break}if(this.isFlushInProgress||this.isRetrying){e.next=20;break}return this.isFlushInProgress=!0,e.next=6,this.flushTempStore();case 6:return e.next=8,this.getBatchedValidMessageKeys();case 8:if(t=e.sent,!(t.length>0)){e.next=20;break}return e.next=12,this.store.getMany(t);case 12:return r=e.sent,e.next=15,this.sendMessagesToMessageGateway(r);case 15:if(!(null!==(n=e.sent)&&void 0!==n&&n.ok||n&&!j.includes(n.status))){e.next=19;break}return e.next=19,this.removeMessagesFromStorageByKeys(t);case 19:this.restartTimer();case 20:this.isFlushInProgress=!1;case 21:e.next=26;break;case 23:e.prev=23,e.t0=e.catch(0),this.errorLogger(e.t0);case 26:case"end":return e.stop()}},e,this,[[0,23]])}));return e}()},{key:"updateMessages",value:function(e){var t=this,r=[];return e.forEach(function(e){var n=o(o({},e),{},{issuer:t.config.hostApp,member:t.member,region_id:t.config.regionId});if(!n.client_context){var i=t.getClientContext(e.partialMessage);delete n.partialMessage,n.client_context=i}r.push(n)}),r}},{key:"removeMessagesFromStorageByKeys",value:function(e){return this.store.delMany(e)}},{key:"getCurrentValidMessages",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t,r;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.store.keys();case 2:return t=e.sent,r=t.filter(b),e.abrupt("return",r);case 5:case"end":return e.stop()}},e,this)}));return e}()},{key:"getCurrentValidMessageCount",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessages();case 2:return t=e.sent,e.abrupt("return",t.length);case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"getBatchSize",value:function(){var e;return null!==(e=this.regionNetworkConfig.batchSize)&&void 0!==e?e:25}},{key:"getBatchedValidMessageKeys",value:function(){function e(){return t.apply(this,arguments)}var t=l(u().mark(function e(){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getCurrentValidMessages();case 2:return t=e.sent,e.abrupt("return",t.slice(0,this.getBatchSize()));case 4:case"end":return e.stop()}},e,this)}));return e}()},{key:"regionNetworkConfig",get:function(){return this.config.networkConfig[this.config.regionId]}},{key:"installationId",get:function(){if(!(0,S.isBrowser)())return null;try{var e=localStorage.getItem(A);if(e)return e;var t=(0,y.default)();return this.installationId=t,t}catch(e){return this.errorLogger(e),null}},set:function(e){if((0,S.isBrowser)())try{localStorage.setItem(A,e||"")}catch(e){this.errorLogger(e)}}},{key:"getVisitID",value:function(){if(!(0,S.isBrowser)())return null;try{return localStorage.getItem("RAKUTEN_VISIT_ID")}catch(e){return this.errorLogger(e),null}}}]),e}();h(P,"pipeline","holistic")},"./src/Store.ts":function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function a(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,r){return t=u(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e){var t=c(e,"string");return"symbol"===n(t)?t:String(t)}function c(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}r.r(t),r.d(t,{default:function(){return f}});var l=r("./node_modules/idb-keyval/dist/index.js"),d=r("./src/utils.ts"),f=function(){function e(t,r){i(this,e),s(this,"idbStore",void 0);var n=(0,d.getWindow)();n&&"indexedDB"in n&&(this.idbStore=l.createStore(t,r))}return a(e,[{key:"set",value:function(e,t){return l.set(e,t,this.idbStore)}},{key:"values",value:function(){return l.values(this.idbStore)}},{key:"keys",value:function(){return l.keys(this.idbStore)}},{key:"getMany",value:function(e){return l.getMany(e,this.idbStore)}},{key:"delMany",value:function(e){return l.delMany(e,this.idbStore)}}]),e}()},"./src/utils.ts":function(e,t,r){function n(){function e(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(n||[]);return w(a,"_invoke",{value:l(e,r,s)}),a}function r(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function u(t){["next","throw","return"].forEach(function(r){e(t,r,function(e){return this._invoke(r,e)})})}function c(e,t){function n(i,o,a,u){var c=r(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==s(d)&&y.call(d,"__await")?t.resolve(d.__await).then(function(e){n("next",e,a,u)},function(e){n("throw",e,a,u)}):t.resolve(d).then(function(e){l.value=e,a(l)},function(e){return n("throw",e,a,u)})}u(c.arg)}var i;w(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,i){n(e,r,t,i)})}return i=i?i.then(o,o):o()}})}function l(e,t,n){var i="suspendedStart";return function(o,a){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw a;return g()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=d(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=r(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function d(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,d(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),O;var o=r(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,O;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,O):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[S];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(y.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:g}}function g(){return{value:void 0,done:!0}}n=function(){return m};var m={},b=Object.prototype,y=b.hasOwnProperty,w=Object.defineProperty||function(e,t,r){e[t]=r.value},_="function"==typeof Symbol?Symbol:{},S=_.iterator||"@@iterator",k=_.asyncIterator||"@@asyncIterator",x=_.toStringTag||"@@toStringTag";try{e({},"")}catch(t){e=function(e,t,r){return e[t]=r}}m.wrap=t;var O={},j={};e(j,S,function(){return this});var I=Object.getPrototypeOf,E=I&&I(I(p([])));E&&E!==b&&y.call(E,S)&&(j=E);var T=a.prototype=i.prototype=Object.create(j);return o.prototype=a,w(T,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:o,configurable:!0}),o.displayName=e(a,x,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,x,"GeneratorFunction")),t.prototype=Object.create(T),t},m.awrap=function(e){return{__await:e}},u(c.prototype),e(c.prototype,k,function(){return this}),m.AsyncIterator=c,m.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new c(t(e,r,n,i),o);return m.isGeneratorFunction(r)?a:a.next().then(function(e){return e.done?e.value:a.next()})},u(T),e(T,x,"Generator"),e(T,S,function(){return this}),e(T,"toString",function(){return"[object Generator]"}),m.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},m.values=p,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,n&&(r.method="next",r.arg=void 0),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=y.call(i,"catchLoc"),s=y.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,O):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),O},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),O}},m}function i(e,t,r){return t=o(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e){var t=a(e,"string");return"symbol"===s(t)?t:String(t)}function a(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e){"@babel/helpers - typeof";return(s="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return void 0===e?"undefined":_typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":_typeof2(e)})(e)}function u(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function c(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){function o(e){u(s,n,i,o,a,"next",e)}function a(e){u(s,n,i,o,a,"throw",e)}var s=e.apply(t,r);o(void 0)})}}function l(e,t){return p(e)||h(e,t)||f(e,t)||d()}function d(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function p(e){if(Array.isArray(e))return e}function g(){return"undefined"!=typeof window}function m(e){return e.replace(/\/+$/,"").substring(0,e.lastIndexOf("/"))}function b(e){var t=m(e),r=t.split("/"),n=l(r,2),i=n[1];return i?"/".concat(i,"/"):void 0}function y(e){throw new Error("Parameter ".concat(e," is required"))}function w(){return _.apply(this,arguments)}function _(){return _=c(n().mark(function e(){var t,r,i,o,a,s,u,c,l,d=arguments;return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=d.length,r=new Array(t),i=0;i<t;i++)r[i]=d[i];return o=r[0],a=void 0===o?y("url"):o,s=r[1],u=void 0===s?y("data"):s,c=r[2],l=void 0===c?y("clientAgent"):c,e.abrupt("return",fetch(a,{method:"POST",mode:"cors",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json","client-ts":(new Date).getTime().toString(),"client-agent":l},body:JSON.stringify(u)}));case 3:case"end":return e.stop()}},e)})),_.apply(this,arguments)}function S(){var e=new URL(decodeURIComponent(window.location.href));return new URLSearchParams(e.search)}function k(){return"undefined"!=typeof self?self:void 0}function x(e){return e===M.Mobile||e===M.Tablet?e:M.Desktop}function O(e){var t=e.getOS();return null===t||void 0===t||!t.name||null!==t&&void 0!==t&&t.version?t.name&&t.version?{name:t.name,version:t.version}:void 0:{name:t.name,version:"UNKNOWN"}}function j(){return I.apply(this,arguments)}function I(){return I=c(n().mark(function e(){return n().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,P.detectIncognito)().then(function(e){return e.isPrivate});case 3:return e.abrupt("return",e.sent);case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",!1);case 9:case"end":return e.stop()}},e,null,[[0,6]])})),I.apply(this,arguments)}function E(e){return Array.isArray(e)}function T(e){var t=s(e);return null!=e&&("object"===t||"function"===t)&&!E(e)}function A(e,t){if(null==t)return e;for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];if(void 0!==t[o]&&"__proto__"!==o)if(!T(e[o])&&T(t[o]))Object.assign(e,i({},o,t[o]));else if(e[o]&&T(t[o]))A(e[o],t[o]);else if(Array.isArray(t[o])&&Array.isArray(e[o]))for(var a=0;a<t[o].length;a++)T(e[o][a])&&T(t[o][a])?A(e[o][a],t[o][a]):e[o][a]=t[o][a];else Object.assign(e,i({},o,t[o]))}return e}function L(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var i=0,o=r;i<o.length;i++){A(e,o[i])}return e}r.r(t),r.d(t,{DeviceType:function(){return M},detectPrivateBrowserSession:function(){return j},getDeviceType:function(){return x},getOS:function(){return O},getParentPath:function(){return b},getSearchParams:function(){return S},getWindow:function(){return k},isArray:function(){return E},isBrowser:function(){return g},isObject:function(){return T},mergeWith:function(){return L},postData:function(){return w}});var P=r("./node_modules/detectincognitojs/dist/detectIncognito.js"),M=function(e){return e.Mobile="mobile",e.Desktop="desktop",e.Tablet="tablet",e}({})},"./node_modules/detectincognitojs/dist/detectIncognito.js":function(e,t){t.__esModule=!0,t.detectIncognito=void 0;var r=function(){return new Promise(function(e,t){function r(t){e({isPrivate:t,browserName:b})}function n(){var e=navigator.userAgent;return e.match(/Chrome/)?void 0!==navigator.brave?"Brave":e.match(/Edg/)?"Edge":e.match(/OPR/)?"Opera":"Chrome":"Chromium"}function i(e){return e===eval.toString().length}function o(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Apple")&&i(37)}function a(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Google")&&i(33)}function s(){return void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&i(37)}function u(){return void 0!==navigator.msSaveBlob&&i(39)}function c(){var e=String(Math.random());try{window.indexedDB.open(e,1).onupgradeneeded=function(t){var n,i,o=null===(n=t.target)||void 0===n?void 0:n.result;try{o.createObjectStore("test",{autoIncrement:!0}).put(new Blob),r(!1)}catch(e){var a=e;if(e instanceof Error&&(a=null!==(i=e.message)&&void 0!==i?i:e),"string"!=typeof a)return r(!1);var s=/BlobURLs are not yet supported/.test(a);return r(s)}finally{o.close(),window.indexedDB.deleteDatabase(e)}}}catch(e){return r(!1)}}function l(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch(e){return r(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch(e){return r(!0)}return r(!1)}function d(){void 0!==navigator.maxTouchPoints?c():l()}function f(){var e=window;return void 0!==e.performance&&void 0!==e.performance.memory&&void 0!==e.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824}function v(){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){r(Math.round(t/1048576)<2*Math.round(f()/1048576))},function(e){t(new Error("detectIncognito somehow failed to query storage quota: "+e.message))})}function h(){(0,window.webkitRequestFileSystem)(0,1,function(){r(!1)},function(){r(!0)})}function p(){void 0!==self.Promise&&void 0!==self.Promise.allSettled?v():h()}function g(){r(void 0===navigator.serviceWorker)}function m(){r(void 0===window.indexedDB)}var b="Unknown";!function(){o()?(b="Safari",d()):a()?(b=n(),p()):s()?(b="Firefox",g()):u()?(b="Internet Explorer",m()):t(new Error("detectIncognito cannot determine the browser"))}()})};t.detectIncognito=r},"./node_modules/ua-parser-js/src/ua-parser.js":function(e,t,r){var n;!function(i,o){var a="model",s="name",u="type",c="vendor",l="version",d="mobile",f="tablet",v="smarttv",h=function(e,t){var r={};for(var n in e)t[n]&&t[n].length%2==0?r[n]=t[n].concat(e[n]):r[n]=e[n];return r},p=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},g=function(e,t){return"string"===(void 0===e?"undefined":_typeof2(e))&&-1!==m(t).indexOf(m(e))},m=function(e){return e.toLowerCase()},b=function(e){return"string"===(void 0===e?"undefined":_typeof2(e))?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0},y=function(e,t){if("string"===(void 0===e?"undefined":_typeof2(e)))return e=e.replace(/^\s\s*/,""),"undefined"===(void 0===t?"undefined":_typeof2(t))?e:e.substring(0,350)},w=function(e,t){for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],o=l[i],"object"===(void 0===o?"undefined":_typeof2(o))&&o.length>0?2===o.length?"function"==_typeof2(o[1])?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?"function"!==_typeof2(o[1])||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},_=function(e,t){for(var r in t)if("object"===_typeof2(t[r])&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(g(t[r][n],e))return"?"===r?void 0:r}else if(g(t[r],e))return"?"===r?void 0:r;return e},S={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},k={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2000:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},x={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[s,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],l],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[l,[s,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,_,S]],[/(webkit|khtml)\/([\w\.]+)/i],[s,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[s,l],[/(cobalt)\/([\w\.]+)/i],[s,[l,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",m]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",m]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",m]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[c,"Samsung"],[u,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[a,[c,"Samsung"],[u,d]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[c,"Apple"],[u,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[c,"Apple"],[u,f]],[/(macintosh);/i],[a,[c,"Apple"]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[c,"Sharp"],[u,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[a,[c,"Huawei"],[u,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[c,"Huawei"],[u,d]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[a,/_/g," "],[c,"Xiaomi"],[u,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[a,/_/g," "],[c,"Xiaomi"],[u,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[c,"OPPO"],[u,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[c,"Vivo"],[u,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[a,[c,"Realme"],[u,d]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[a,[c,"Motorola"],[u,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[c,"Motorola"],[u,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[c,"LG"],[u,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[c,"LG"],[u,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[a,[c,"Lenovo"],[u,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[a,/_/g," "],[c,"Nokia"],[u,d]],[/(pixel c)\b/i],[a,[c,"Google"],[u,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[c,"Google"],[u,d]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[a,[c,"Sony"],[u,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[c,"Sony"],[u,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[c,"OnePlus"],[u,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[c,"Amazon"],[u,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,d]],[/(playbook);[-\w\),; ]+(rim)/i],[a,c,[u,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[c,"BlackBerry"],[u,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[c,"ASUS"],[u,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[c,"ASUS"],[u,d]],[/(nexus 9)/i],[a,[c,"HTC"],[u,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[a,/_/g," "],[u,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[c,"Acer"],[u,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[c,"Meizu"],[u,d]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,a,[u,d]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[c,a,[u,f]],[/(surface duo)/i],[a,[c,"Microsoft"],[u,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[c,"Fairphone"],[u,d]],[/(u304aa)/i],[a,[c,"AT&T"],[u,d]],[/\bsie-(\w*)/i],[a,[c,"Siemens"],[u,d]],[/\b(rct\w+) b/i],[a,[c,"RCA"],[u,f]],[/\b(venue[\d ]{2,7}) b/i],[a,[c,"Dell"],[u,f]],[/\b(q(?:mv|ta)\w+) b/i],[a,[c,"Verizon"],[u,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[c,"Barnes & Noble"],[u,f]],[/\b(tm\d{3}\w+) b/i],[a,[c,"NuVision"],[u,f]],[/\b(k88) b/i],[a,[c,"ZTE"],[u,f]],[/\b(nx\d{3}j) b/i],[a,[c,"ZTE"],[u,d]],[/\b(gen\d{3}) b.+49h/i],[a,[c,"Swiss"],[u,d]],[/\b(zur\d{3}) b/i],[a,[c,"Swiss"],[u,f]],[/\b((zeki)?tb.*\b) b/i],[a,[c,"Zeki"],[u,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],a,[u,f]],[/\b(ns-?\w{0,9}) b/i],[a,[c,"Insignia"],[u,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[c,"NextBook"],[u,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],a,[u,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],a,[u,d]],[/\b(ph-1) /i],[a,[c,"Essential"],[u,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[c,"Envizen"],[u,f]],[/\b(trio[-\w\. ]+) b/i],[a,[c,"MachSpeed"],[u,f]],[/\btu_(1491) b/i],[a,[c,"Rotor"],[u,f]],[/(shield[\w ]+) b/i],[a,[c,"Nvidia"],[u,f]],[/(sprint) (\w+)/i],[c,a,[u,d]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[c,"Microsoft"],[u,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[c,"Zebra"],[u,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[c,"Zebra"],[u,d]],[/smart-tv.+(samsung)/i],[c,[u,v]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[c,"Samsung"],[u,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,v]],[/(apple) ?tv/i],[c,[a,"Apple TV"],[u,v]],[/crkey/i],[[a,"Chromecast"],[c,"Google"],[u,v]],[/droid.+aft(\w)( bui|\))/i],[a,[c,"Amazon"],[u,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[c,"Sharp"],[u,v]],[/(bravia[\w ]+)( bui|\))/i],[a,[c,"Sony"],[u,v]],[/(mitv-\w{5}) bui/i],[a,[c,"Xiaomi"],[u,v]],[/Hbbtv.*(technisat) (.*);/i],[c,a,[u,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[c,y],[a,y],[u,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,a,[u,"console"]],[/droid.+; (shield) bui/i],[a,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[a,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[c,"Microsoft"],[u,"console"]],[/((pebble))app/i],[c,a,[u,"wearable"]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[c,"Apple"],[u,"wearable"]],[/droid.+; (glass) \d/i],[a,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[a,[c,"Zebra"],[u,"wearable"]],[/(quest( 2| pro)?)/i],[a,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/(aeobc)\b/i],[a,[c,"Amazon"],[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[a,[u,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[u,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,d]],[/(android[-\w\. ]{0,9});.+buil/i],[a,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[s,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,_,k]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,_,k]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[l,[s,"watchOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[s,"Chromium OS"],l],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[s,l]]},O=function e(t,r){if("object"===(void 0===t?"undefined":_typeof2(t))&&(r=t,t=void 0),!(this instanceof e))return new e(t,r).getResult();var n="undefined"!==(void 0===i?"undefined":_typeof2(i))&&i.navigator?i.navigator:void 0,o=t||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:void 0,p=r?h(x,r):x,g=n&&n.userAgent==o;return this.getBrowser=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.browser),e.major=b(e[l]),g&&n&&n.brave&&"function"==_typeof2(n.brave.isBrave)&&(e[s]="Brave"),e},this.getCPU=function(){var e={};return e.architecture=void 0,w.call(e,o,p.cpu),e},this.getDevice=function(){var e={};return e[c]=void 0,e[a]=void 0,e[u]=void 0,w.call(e,o,p.device),g&&!e[u]&&v&&v.mobile&&(e[u]=d),g&&"Macintosh"==e[a]&&n&&"undefined"!==_typeof2(n.standalone)&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[a]="iPad",e[u]=f),e},this.getEngine=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.engine),e},this.getOS=function(){var e={};return e[s]=void 0,e[l]=void 0,w.call(e,o,p.os),g&&!e[s]&&v&&"Unknown"!=v.platform&&(e[s]=v.platform.replace(/chrome os/i,"Chromium OS").replace(/macos/i,"Mac OS")),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o="string"===(void 0===e?"undefined":_typeof2(e))&&e.length>350?y(e,350):e,this},this.setUA(o),this};O.VERSION="1.0.35",O.BROWSER=p([s,l,"major"]),O.CPU=p(["architecture"]),O.DEVICE=p([a,c,u,"console",d,v,f,"wearable","embedded"]),O.ENGINE=O.OS=p([s,l]),"undefined"!==(void 0===t?"undefined":_typeof2(t))?(e.exports&&(t=e.exports=O),t.UAParser=O):r.amdO?void 0!==(n=function(){return O}.call(t,r,t,e))&&(e.exports=n):"undefined"!==(void 0===i?"undefined":_typeof2(i))&&(i.UAParser=O);var j="undefined"!==(void 0===i?"undefined":_typeof2(i))&&(i.jQuery||i.Zepto);if(j&&!j.ua){var I=new O;j.ua=I.getResult(),j.ua.get=function(){return I.getUA()},j.ua.set=function(e){I.setUA(e);var t=I.getResult();for(var r in t)j.ua[r]=t[r]}}}("object"===("undefined"==typeof window?"undefined":_typeof2(window))?window:this)},"./node_modules/uuid/dist/esm-browser/native.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return i}});var n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),i={randomUUID:n}},"./node_modules/uuid/dist/esm-browser/regex.js":function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},"./node_modules/uuid/dist/esm-browser/rng.js":function(e,t,r){function n(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(o)}r.r(t),r.d(t,{default:function(){return n}});var i=void 0,o=new Uint8Array(16)},"./node_modules/uuid/dist/esm-browser/stringify.js":function(e,t,r){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=n(e,t);if(!(0,o.default)(r))throw TypeError("Stringified UUID is invalid");return r}r.r(t),r.d(t,{default:function(){return u},unsafeStringify:function(){return n}});for(var o=r("./node_modules/uuid/dist/esm-browser/validate.js"),a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));var u=i},"./node_modules/uuid/dist/esm-browser/v4.js":function(e,t,r){function n(e,t,r){if(i.default.randomUUID&&!t&&!e)return i.default.randomUUID();e=e||{};var n=e.random||(e.rng||o.default)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var s=0;s<16;++s)t[r+s]=n[s];return t}return(0,a.unsafeStringify)(n)}r.r(t),r.d(t,{default:function(){return s}});var i=r("./node_modules/uuid/dist/esm-browser/native.js"),o=r("./node_modules/uuid/dist/esm-browser/rng.js"),a=r("./node_modules/uuid/dist/esm-browser/stringify.js"),s=n},"./node_modules/uuid/dist/esm-browser/validate.js":function(e,t,r){function n(e){return"string"==typeof e&&i.default.test(e)}r.r(t),r.d(t,{default:function(){return o}});var i=r("./node_modules/uuid/dist/esm-browser/regex.js"),o=n},"./node_modules/idb-keyval/dist/index.js":function(e,t,r){function n(e){return new Promise(function(t,r){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return r(e.error)}})}function i(e,t){var r=indexedDB.open(e);r.onupgradeneeded=function(){return r.result.createObjectStore(t)};var i=n(r);return function(e,r){return i.then(function(n){return r(n.transaction(t,e).objectStore(t))})}}function o(){return b||(b=i("keyval-store","keyval")),b}function a(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readonly",function(t){return n(t.get(e))})}function s(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:o())("readwrite",function(r){return r.put(t,e),n(r.transaction)})}function u(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return e.forEach(function(e){return t.put(e[1],e[0])}),n(t.transaction)})}function c(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readonly",function(t){return Promise.all(e.map(function(e){return n(t.get(e))}))})}function l(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:o())("readwrite",function(r){return new Promise(function(i,o){r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(n(r.transaction))}catch(e){o(e)}}})})}function d(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return t.delete(e),n(t.transaction)})}function f(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:o())("readwrite",function(t){return e.forEach(function(e){return t.delete(e)}),n(t.transaction)})}function v(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readwrite",function(e){return e.clear(),n(e.transaction)})}function h(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},n(e.transaction)}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readonly",function(e){if(e.getAllKeys)return n(e.getAllKeys());var t=[];return h(e,function(e){return t.push(e.key)}).then(function(){return t})})}function g(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:o())("readonly",function(e){if(e.getAll)return n(e.getAll());var t=[];return h(e,function(e){return t.push(e.value)}).then(function(){return t})})}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o();return e("readonly",function(t){if(t.getAll&&t.getAllKeys)return Promise.all([n(t.getAllKeys()),n(t.getAll())]).then(function(e){var t=_slicedToArray2(e,2),r=t[0],n=t[1];return r.map(function(e,t){return[e,n[t]]})});var r=[];return e("readonly",function(e){return h(e,function(e){return r.push([e.key,e.value])}).then(function(){return r})})})}r.r(t),r.d(t,{clear:function(){return v},createStore:function(){return i},del:function(){return d},delMany:function(){return f},entries:function(){return m},get:function(){return a},getMany:function(){return c},keys:function(){return p},promisifyRequest:function(){return n},set:function(){return s},setMany:function(){return u},update:function(){return l},values:function(){return g}});var b=void 0},"./node_modules/throttle-debounce/esm/index.js":function(e,t,r){function n(e,t,r){function n(){a&&clearTimeout(a)}function i(e){var t=e||{},r=t.upcomingOnly,i=void 0!==r&&r;n(),h=!i}function o(){function r(){p=Date.now(),t.apply(l,s)}function i(){a=void 0}for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];var l=this,f=Date.now()-p;h||(d||!v||a||r(),n(),void 0===v&&f>e?d?(p=Date.now(),c||(a=setTimeout(v?i:r,e))):r():!0!==c&&(a=setTimeout(v?i:r,void 0===v?e-f:e)))}var a,s=r||{},u=s.noTrailing,c=void 0!==u&&u,l=s.noLeading,d=void 0!==l&&l,f=s.debounceMode,v=void 0===f?void 0:f,h=!1,p=0;return o.cancel=i,o}function i(e,t,r){var i=r||{},o=i.atBegin;return n(e,t,{debounceMode:!1!==(void 0!==o&&o)})}r.r(t),r.d(t,{debounce:function(){return i},throttle:function(){return n}})}},n={};!function(){e.amdO={}}(),function(){e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r}}(),function(){e.d=function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})}}(),function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}();var i={};!function(){e.r(i),e.d(i,{AppType:function(){return t.AppType},INSTALLATION_ID_LOCAL_STORAGE_KEY:function(){return t.INSTALLATION_ID_LOCAL_STORAGE_KEY},MessagingSDK:function(){return t.MessagingSDK}});var t=e("./src/MessagingSDK.ts")}();var o=t;for(var a in i)o[a]=i[a];i.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})}()}),v=new f.MessagingSDK,h=new d.SurfaceVisitedEventHandler,p=function(e,t){document.dispatchEvent(new CustomEvent("stats-event",{detail:{map:{amp:{eventType:e,eventProps:t}}}}))},g=function(e){ebates&&ebates.branch&&(ebates.branch.rr_visit_id=e),document.dispatchEvent(new CustomEvent("stats-add-default-props",{detail:{visit_id:e}})),ebates.branch&&ebates.branch.linkPaths.origin&&r(e)},m={qa:"qa",preview:"preview",production:"production"},b={store:"Merchant",raf:"Refer A Friend","account hotels":"Hotels","credit-card":"Credit Card",allstores:"All Stores","button-page":"Button",untyped:"untyped"};window.addEventListener("DOMContentLoaded",function(){h.init({trackEvent:p,onVisitIDUpdate:g,onVisitsLinked:n,messagingSDK:v}),document.addEventListener("segment-is-ready",s),document.addEventListener("user-logout",h.clearStoredVisitIds)});for(var y=function(){var e=Math.min(window.innerHeight/2,500),t=document.getElementById("scrolling-container"),r=t||document.body,n=r.scrollHeight,i=t?function(){return t.scrollTop}:function(){return window.scrollY},o=function(e){return document.dispatchEvent(new CustomEvent("stats-event",{detail:{map:{amp:e}}}))},a=void 0;if(n>window.innerHeight+e){var s=i(),u=function(){Math.abs(s-i())>e&&(o({eventType:"Scroll Below Fold"}),ebates.UI.scroll.off(a))};a=ebates.UI.scroll.add(u)}},w={get:function(e){try{var t=localStorage.getItem(e);return t&&JSON.parse(t)}catch(e){return null}},set:function(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch(e){}}},_=e(function(e){var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var r=new Uint8Array(16);e.exports=function(){return t(r),r}}else{var n=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),n[t]=e>>>((3&t)<<3)&255;return n}}}),S=[],k=0;k<256;++k)S[k]=(k+256).toString(16).substr(1);var x,O,j=u,I=0,E=0,T=c,A=l,L=A;L.v1=T,L.v4=A;var P=L;ebates.amplitude=ebates.amplitude||{},ebates.amplitude.userProps=ebates.amplitude.userProps||{},ebates.amplitude.init=function(){var e=w.get("amplitude_event_queue"),t=[],r={user_status:ebates.user.status},n=[r],i=function(){return{integrations:{Amplitude:{session_id:ebates.session.creationTime||-1}}}},o=ebates.page.type||"untyped",a={store:"Merchant",raf:"Refer A Friend","account hotels":"Hotels","credit-card":"Credit Card",allstores:"All Stores","button-page":"Button",untyped:"untyped"},s={tenant:"ebates.com",application_type:"Website",application_subtype:"Website",client:"M"===ebates.stats.device?"mweb":"desktop",session_id:ebates.session.id,rakuten_state_id:ebates.user.rsid,url:location.href,page_type:a[o]||""+o.charAt(0).toUpperCase()+o.slice(1)},u={},c=new Promise(function(e){return u.resolve=e}),l=w.get("amplitudeSessionId"),d=function(){var e={};return"function"==typeof Object.assign?Object.assign.apply(Object,[e].concat(Array.prototype.slice.call(arguments))):[].concat(Array.prototype.slice.call(arguments)).map(function(t){return Object.keys(t).map(function(r){return e[r]=t[r]})}),e},f=function(e){return t.push(e)},v=function(e){var t=e.detail.map||{},r=t.identify,n=void 0===r?null:r,o=e.detail.map&&e.detail.map.amp||{},a=o.eventType,u=void 0===a?null:a,c=o.eventProps,l=void 0===c?{}:c,f=o.addEdsPropSet,v=void 0!==f&&f;if(n){var h=ebates.user.guid?[ebates.user.guid,n]:[n];analytics.identify.apply(analytics,h)}if(u){s.has_button=ebates.button.isButtonInstalled()?"Yes":"No";var p=d(s,l,v&&ebates.amplitude.edsEventProps||{});analytics.track(u,p,i())}},h=function(){ebates.user.guid&&n.unshift(ebates.user.guid),n.push(i()),ebates.user.encryptedId&&(r.referral_token=ebates.user.encryptedId),Object.keys(ebates.amplitude.userProps).map(function(e){return r[e]=ebates.amplitude.userProps[e]}),analytics.identify.apply(analytics,n)},p=function(){if(ebates.session.id!==l){var e=["eeid","src","acct","utm_channel"],t={referrer:document.referrer};e.map(function(e){var r=new RegExp("[?&]+"+e+"=([^&]+)"),n=r.exec(location.search),i=n&&2===n.length?n[1]:null;i&&(t[e]=decodeURIComponent(i))}),analytics.track("Start Session",d(s,t),i()),w.set("amplitudeSessionId",ebates.session.id)}},g=function(){var e=function e(t){return t.matches("[data-screen-name]")?t.dataset.screenName:t.parentNode&&t.parentNode!==document?e(t.parentNode):null},t=w.get("pageview_preceding_screen_name")||{},r=t.value,n=void 0===r?null:r,o=n?d(s,{preceding_screen_name:n}):s;analytics.page(o,i()),localStorage.removeItem("preceding_screen_name"),document.addEventListener("click",function(t){var r=t.target?e(t.target):null;r&&w.set("pageview_preceding_screen_name",{ts:+Date.now(),value:r})}),document.addEventListener("set-page-screen-name",function(e){return e.detail&&w.set("pageview_preceding_screen_name",e.detail)}),window.addEventListener("unload",function(){var e=w.get("pageview_preceding_screen_name")||{},t=e.ts,r=void 0===t?null:t;r&&+Date.now()-r>1e3&&localStorage.removeItem("pageview_preceding_screen_name")})},m=function(){var r=new Promise(function(e){return setTimeout(e,50)});setTimeout(function(){return u.resolve()},500),h(),Promise.allSettled([r,c]).then(function(){p(),Array.isArray(e)&&e.map(v),localStorage.removeItem("amplitude_event_queue"),g(),document.removeEventListener("stats-event",f),document.addEventListener("stats-event",v),analytics.ready(function(){var e=ebates.cookie.get("ajs_anonymous_id");e||(e=P.v4()),document.dispatchEvent(new CustomEvent("segment-is-ready",{detail:{anonymous_id:e}}))}),t.map(v)}),y()};document.addEventListener("stats-event",f),document.addEventListener("stats-add-default-props",function(e){Object.assign(s,e.detail),u.resolve()}),"loading"!==document.readyState?m():window.addEventListener("DOMContentLoaded",m)},analytics&&ebates.amplitude.init()}(); //# sourceMappingURL=/dist/static/rev/global/analytics/segment-cc8b105929.js.map </script> <script> ebates.branch = ebates.branch || {}; ebates.branch.linkPaths = { origin: 'https://go.rakuten.com', redirect: 'https://go.rakuten.com/redirect-to-app', open: 'https://go.rakuten.com/open-app', appStore: 'https://go.rakuten.com/open-app-store', playStore: 'https://go.rakuten.com/open-play-store' }; ebates.branch.key = 'key_live_nhRF9ZTJhyZsHIsSdN1u6aheurlZgNKr'; ebates.branch.referrerId = ''; ebates.branch.ebtoken = ''; ebates.branch.eeid = '' || 37176; !window._EbatesMobile && (_EbatesMobile = {}); _EbatesMobile.initBranchJourney = function(){}; </script> <script defer src="/dist/static/rev/global/analytics/stats-826c197f34.js"></script> <script> document.addEventListener("DOMContentLoaded", function () { var containerId = "GTM-NDCS3F", data = { isHotelsNewSession: "false" }; data.signUp = +("" && true); dataLayer = [data]; (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer',containerId); }); </script> <script> document.addEventListener("DOMContentLoaded", function () { var d = document, acctMenu, updateMenuEls, fbConnectLink = $(".fb-btn"), gpConnectLink = $(".gp-btn"); document.body.classList.remove("op0"); if (ebates.user.loggedIn) { acctMenu = d.querySelector(".account-menu"); if (acctMenu) { updateMenuEls = function () { var doUpdate = function (r) { r.CashPending && $(".pending-cb-amount").text(r.CashPending); r.DisplayConnect === "true" && $(".connect").removeClass("hide"); if(r.DisplayGP === "false") { gpConnectLink.removeClass("hide"); gpConnectLink.on("click", function () { window.open("/googleOAuth2.htm?callback=onConnectCallback", "popUpWindow", "height=500,width=600,left=400,top=100,resizable=yes,scrollbars=yes"); return false; }); } if (r.DisplayFB === "false") { ebates.js.require(ebates.src.form.fb, function () { fbConnectLink.on("click", function () { ebates.FB.link("fbIntegrationAction.do", {'fconnect': 'true'}); return false; }); }); fbConnectLink.removeClass("hide"); } }; jQuery.get("/social-connection.htm", {}, "json").done(doUpdate); acctMenu.removeEventListener("mouseenter", updateMenuEls); }; acctMenu.addEventListener("mouseenter", updateMenuEls, false); } ebates.js.require(ebates.src.signout); } ebates.js.require("/global_files/js/jquery/plugins/jail/jail.fixed.0.9.5.min.js", function () { $('img.lazy').asynchImageLoader(); }); }); </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10