commit 3200d5491e27c2ce4a8c057b2a782f7153456146 Author: Josh Trotter-Wanner Date: Mon Mar 8 18:36:09 2021 -0800 first commit diff --git a/Research/1911.08265.pdf b/Research/1911.08265.pdf new file mode 100644 index 0000000..0ee11d6 Binary files /dev/null and b/Research/1911.08265.pdf differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium.html b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium.html new file mode 100644 index 0000000..74090ea --- /dev/null +++ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium.html @@ -0,0 +1,39 @@ + + +MuZero: The Walkthrough (Part 1/3) | by David Foster | Applied Data Science | Medium

You have 2 free member-only stories left this month.

Image for post
Image for post

MuZero: The Walkthrough (Part 1/3)

Teaching a machine to play games using self-play and deep learning…without telling it the rules 🤯

If you want to learn how one of the most sophisticated AI systems ever built works, you’ve come to the right place.

In this three part series, we’ll explore the inner workings of the DeepMind MuZero model — the younger (and even more impressive) brother of AlphaZero.

👉 Part 2

👉 Part 3

Also check out my latest post, about how to train reinforcement learning agents for multi-player board games, using self-play!

👉 Self-Play in Multiplayer Environments

We’ll be walking through the pseudocode that accompanies the MuZero paper — so grab yourself a cup of tea and a comfy chair and let’s begin.

Image for post
Image for post

The story so far…

On 19th November 2019 DeepMind released their latest model-based reinforcement learning algorithm to the world — MuZero.

This is the fourth in a line of DeepMind reinforcement learning papers that have continually smashed through the barriers of possibility, starting with AlphaGo in 2016.

To read about the full history from AlphaGo through to AlphaZero — check out my previous blog 👇

AlphaZero was hailed as the general algorithm for getting good at something, quickly, without any prior knowledge of human expert strategy.

So…what now?

Image for post
Image for post

MuZero

Mastering Atari, Go, Chess and Shogi by Planning with a Learned Model

MuZero takes the ultimate next step. Not only does MuZero deny itself human strategy to learn from. It isn’t even shown the rules of the game.

In other words, for chess, AlphaZero is set the following challenge:

Learn how to play this game on your own — here’s the rulebook that explains how each piece moves and which moves are legal. Also it tells you how to tell if a position is checkmate (or a draw).

MuZero on the other hand, is set this challenge:

Learn how to play this game on your own — I’ll tell you what moves are legal in the current position and when one side has won (or it’s a draw), but I won’t tell you the overall rules of the game.

Alongside developing winning strategies, MuZero must therefore also develop its own dynamic model of the environment so that it can understand the implications of its choices and plan ahead.

Imagine trying to become better than the world champion at a game where you are never told the rules. MuZero achieves precisely this.

In the next section we will explore how MuZero achieves this amazing feat, by walking through the codebase in detail.

Image for post
Image for post

The MuZero pseudocode

Alongside the MuZero preprint paper, DeepMind have released Python pseudocode detailing the interactions between each part of the algorithm.

In this section, we’ll pick apart each function and class in a logical order, and I’ll explain what each part is doing and why. We’ll assume MuZero is learning to play chess, but the process is the same for any game, just with different parameters. All code is from the open-sourced DeepMind pseudocode.

Let’s start with an overview of the entire process, starting with the entrypoint function, muzero.

Image for post
Image for post
Overview of the MuZero self-play and training process

The entrypoint function muzero is passed a MuZeroConfig object, which stores important information about the parameterisation of the run, such as the action_space_size (number of possible actions) and num_actors (the number of parallel game simulations to spin up). We’ll go through these parameters in more detail as we encounter them in other functions.

At a high level, there are two independent parts to the MuZero algorithm — self-play (creating game data) and training (producing improved versions of the neural network). TheSharedStorage and ReplayBuffer objects can be accessed by both halves of the algorithm and store neural network versions and game data respectively.

Image for post
Image for post

Shared Storage and the Replay Buffer

The SharedStorage object contains methods for saving a version of the neural network and retrieving the latest neural network from the store.

We also need a ReplayBuffer to store data from previous games. This takes the following form:

Notice how the window_size parameter limits the maximum number of games stored in the buffer. In MuZero, this is set to the latest 1,000,000 games.

Image for post
Image for post

Self-play (run_selfplay)

After creating the shared storage and replay buffer, MuZero launches num_actors parallel game environments, that run independently. For chess, num_actors is set to 3000. Each is running a function run_selfplay that grabs the latest version of the network from the store, plays a game with it (play_game) and saves the game data to the shared buffer.

So in summary, MuZero is playing thousands of games against itself, saving these to a buffer and then training itself on data from those games. So far, this is no different to AlphaZero.

To end Part 1, we will cover one of the key differences between AlphaZero and MuZero — why does MuZero have three neural networks, whereas AlphaZero only has one?

Image for post
Image for post

The 3 Neural Networks of MuZero

Both AlphaZero and MuZero utilise a technique known as Monte Carlo Tree Search (MCTS) to select the next best move.

The idea is that in order to select the next best move, it makes sense to ‘play out’ likely future scenarios from the current position, evaluate their value using a neural network and choose the action that maximises the future expected value. This seems to be what we humans are doing in our head when playing chess, and the AI is also designed to make use of this technique.

However, MuZero has a problem. As it doesn’t know the rules of the game, it has no idea how a given action will affect the game state, so it cannot imagine future scenarios in the MCTS. It doesn’t even know how to work out what moves are legal from a given position, or whether one side has won.

The stunning development in the MuZero paper is to show that this doesn’t matter. MuZero learns how to play the game by creating a dynamic model of the environment within its own imagination and optimising within this model.

The diagram below shows a comparison between the MCTS processes in AlphaZero and MuZero:

Image for post
Image for post

Whereas AlphaZero only has only one neural network (prediction), MuZero needs three (prediction, dynamics, representation)

The job of the AlphaZero prediction neural network f is to predict the policy p and value v of a given game state. The policy is a probability distribution over all moves and the value is just a single number that estimates the future rewards. This prediction is made every time the MCTS hits an unexplored leaf node, so that it can immediately assign an estimated value to the new position and also assign a probability to each subsequent action. The values are backfilled up the tree, back to the root node, so that after many simulations, the root node has a good idea of the future value of the current state, having explored lots of different possible futures.

MuZero also has a prediction neural network f, but now the ‘game state’ that it operates on is a hidden representation that MuZero learns how to evolve through a dynamics neural network g. The dynamics network takes the current hidden state s and chosen action a and outputs a reward r and new state. Notice how in AlphaZero, moving between states in the MCTS tree is simply a case of asking the environment. MuZero doesn’t have this luxury, so needs to build its own dynamic model!

Lastly, in order to map from the current observed game state to the initial representation, MuZero uses a third representation neural network, h.

There are therefore two inference functions MuZero needs, in order to move through the MCTS tree making predictions:

  • initial_inference for the current state. h followed by f (representation followed by prediction) .
  • recurrent_inference for moving between states inside the MCTS tree.g followed by f (representation followed by dynamics).
Image for post
Image for post
The two types of inference in MuZero

The exact models aren’t provided in the pseudocode, but detailed descriptions are given in the accompanying paper.

In summary, in the absence of the actual rules of chess, MuZero creates a new game inside its mind that it can control and uses this to plan into the future. The three networks (prediction, dynamics and representation) are optimised together so that strategies that perform well inside the imagined environment, also perform well in the real environment.

Amazing stuff.

This is the end of Part 1 — in Part 2, we’ll start by walking through the play_game function and see how MuZero makes a decision about the next best move at each turn.

Please clap if you’ve enjoyed this post and I’ll see you in Part 2!

Image for post
Image for post

This is the blog of Applied Data Science Partners, a consultancy that develops innovative data science solutions for businesses. To learn more, feel free to get in touch through our website.

Author of the Generative Deep Learning book :: Founding Partner of Applied Data Science Partners

Get the Medium app

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_oFm6Y4jNaIuHDgBE b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_oFm6Y4jNaIuHDgBE new file mode 100644 index 0000000..7e155be Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_oFm6Y4jNaIuHDgBE differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_x1sJqcMlPO9p-R-0.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_x1sJqcMlPO9p-R-0.png new file mode 100644 index 0000000..30e8826 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_x1sJqcMlPO9p-R-0.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_xNChTRUKPfeYOIcZ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_xNChTRUKPfeYOIcZ new file mode 100644 index 0000000..9d694db Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0_xNChTRUKPfeYOIcZ differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0f723c9f48100eca4e842c551d8ac03b.js b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0f723c9f48100eca4e842c551d8ac03b.js new file mode 100644 index 0000000..362dc41 --- /dev/null +++ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/0f723c9f48100eca4e842c551d8ac03b.js @@ -0,0 +1,2 @@ +document.write('') +document.write('
\n
\n
\n
\n
\n \n\n
\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
<\/td>\n class<\/span> SharedStorage<\/span>(object<\/span>):<\/td>\n <\/tr>\n
<\/td>\n \n<\/td>\n <\/tr>\n
<\/td>\n def<\/span> __init__<\/span>(self<\/span>):<\/td>\n <\/tr>\n
<\/td>\n self<\/span>._networks<\/span> =<\/span> {}<\/td>\n <\/tr>\n
<\/td>\n \n<\/td>\n <\/tr>\n
<\/td>\n def<\/span> latest_network<\/span>(self<\/span>) -><\/span> Network<\/span>:<\/td>\n <\/tr>\n
<\/td>\n if<\/span> self<\/span>._networks<\/span>:<\/td>\n <\/tr>\n
<\/td>\n return<\/span> self<\/span>._networks<\/span>[max<\/span>(self<\/span>._networks<\/span>.keys<\/span>())]<\/td>\n <\/tr>\n
<\/td>\n else<\/span>:<\/td>\n <\/tr>\n
<\/td>\n # policy -> uniform, value -> 0, reward -> 0<\/span><\/td>\n <\/tr>\n
<\/td>\n return<\/span> make_uniform_network<\/span>()<\/td>\n <\/tr>\n
<\/td>\n \n<\/td>\n <\/tr>\n
<\/td>\n def<\/span> save_network<\/span>(self<\/span>, step<\/span>: int<\/span>, network<\/span>: Network<\/span>):<\/td>\n <\/tr>\n
<\/td>\n self<\/span>._networks<\/span>[step<\/span>] =<\/span> network<\/span><\/td>\n <\/tr>\n<\/table>\n\n\n <\/div>\n\n <\/div>\n<\/div>\n\n <\/div>\n
\n view raw<\/a>\n pseudocode.py<\/a>\n hosted with ❤ by GitHub<\/a>\n <\/div>\n <\/div>\n<\/div>\n') diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1491.c08ce3ca.chunk.js b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1491.c08ce3ca.chunk.js new file mode 100644 index 0000000..101e56b --- /dev/null +++ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1491.c08ce3ca.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunklite=self.webpackChunklite||[]).push([[1491],{76972:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var o=r(59910),s=r(13882),a=36e5;function i(e,t){(0,s.Z)(2,arguments);var r=(0,o.Z)(e,t)/a;return r>0?Math.floor(r):Math.ceil(r)}},23450:function(e){e.exports=function(){var e=[],t=[],r={},o={},s={};function a(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function n(e,t){return e.replace(/\$(\d{1,2})/g,(function(e,r){return t[r]||""}))}function u(e,t){return e.replace(t[0],(function(r,o){var s=n(t[1],arguments);return i(""===r?e[o-1]:r,s)}))}function l(e,t,o){if(!e.length||r.hasOwnProperty(e))return t;for(var s=o.length;s--;){var a=o[s];if(a[0].test(t))return u(t,a)}return t}function c(e,t,r){return function(o){var s=o.toLowerCase();return t.hasOwnProperty(s)?i(o,s):e.hasOwnProperty(s)?i(o,e[s]):l(s,o,r)}}function h(e,t,r,o){return function(o){var s=o.toLowerCase();return!!t.hasOwnProperty(s)||!e.hasOwnProperty(s)&&l(s,s,r)===s}}function p(e,t,r){return(r?t+" ":"")+(1===t?p.singular(e):p.plural(e))}return p.plural=c(s,o,e),p.isPlural=h(s,o,e),p.singular=c(o,s,t),p.isSingular=h(o,s,t),p.addPluralRule=function(t,r){e.push([a(t),r])},p.addSingularRule=function(e,r){t.push([a(e),r])},p.addUncountableRule=function(e){"string"!=typeof e?(p.addPluralRule(e,"$0"),p.addSingularRule(e,"$0")):r[e.toLowerCase()]=!0},p.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),s[e]=t,o[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["whiskey","whiskies"]].forEach((function(e){return p.addIrregularRule(e[0],e[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|tlas|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/(m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(e){return p.addPluralRule(e[0],e[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/(m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,"$1"],[/(analy|ba|diagno|parenthe|progno|synop|the|empha|cri)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(e){return p.addSingularRule(e[0],e[1])})),["adulthood","advice","agenda","aid","alcohol","ammo","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","flounder","fun","gallows","garbage","graffiti","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","manga","news","pike","plankton","pliers","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","species","staff","swine","tennis","traffic","transporation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(p.addUncountableRule),p}()},57129:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}t.stringify=function(e,t){t=t||"";var o,s,a=[];for(s in"string"!=typeof t&&(t="?"),e)if(r.call(e,s)){if((o=e[s])||null!=o&&!isNaN(o)||(o=""),s=encodeURIComponent(s),o=encodeURIComponent(o),null===s||null===o)continue;a.push(s+"="+o)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?&]+)=?([^&]*)/g,s={};t=r.exec(e);){var a=o(t[1]),i=o(t[2]);null===a||null===i||a in s||(s[a]=i)}return s}},47418:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},84564:(e,t,r)=>{"use strict";var o=r(47418),s=r(57129),a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,i=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,n=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(n,"")}var l=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],c={hash:1,query:1};function h(e){var t,o=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},s={},i=typeof(e=e||o);if("blob:"===e.protocol)s=new f(unescape(e.pathname),{});else if("string"===i)for(t in s=new f(e,{}),c)delete s[t];else if("object"===i){for(t in e)t in c||(s[t]=e[t]);void 0===s.slashes&&(s.slashes=a.test(e.href))}return s}function p(e){e=u(e);var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!t[2],rest:t[3]}}function f(e,t,r){if(e=u(e),!(this instanceof f))return new f(e,t,r);var a,i,n,c,m,d,$=l.slice(),g=typeof t,v=this,y=0;for("object"!==g&&"string"!==g&&(r=t,t=null),r&&"function"!=typeof r&&(r=s.parse),t=h(t),a=!(i=p(e||"")).protocol&&!i.slashes,v.slashes=i.slashes||a&&t.slashes,v.protocol=i.protocol||t.protocol||"",e=i.rest,i.slashes||($[3]=[/(.*)/,"pathname"]);y<$.length;y++)"function"!=typeof(c=$[y])?(n=c[0],d=c[1],n!=n?v[d]=e:"string"==typeof n?~(m=e.indexOf(n))&&("number"==typeof c[2]?(v[d]=e.slice(0,m),e=e.slice(m+c[2])):(v[d]=e.slice(m),e=e.slice(0,m))):(m=n.exec(e))&&(v[d]=m[1],e=e.slice(0,m.index)),v[d]=v[d]||a&&c[3]&&t[d]||"",c[4]&&(v[d]=v[d].toLowerCase())):e=c(e);r&&(v.query=r(v.query)),a&&t.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==t.pathname)&&(v.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),o=r.length,s=r[o-1],a=!1,i=0;o--;)"."===r[o]?r.splice(o,1):".."===r[o]?(r.splice(o,1),i++):i&&(0===o&&(a=!0),r.splice(o,1),i--);return a&&r.unshift(""),"."!==s&&".."!==s||r.push(""),r.join("/")}(v.pathname,t.pathname)),o(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(c=v.auth.split(":"),v.username=c[0]||"",v.password=c[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}f.prototype={set:function(e,t,r){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||s.parse)(t)),a[e]=t;break;case"port":a[e]=t,o(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,/:\d+$/.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!r;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";a[e]=t.charAt(0)!==i?i+t:t}else a[e]=t;break;default:a[e]=t}for(var n=0;n/* Extra small devices */\n@media all and (max-width: 551.98px) {\n #header-background-image-other > div {\n \tbackground: none;\n }\n #header-background-image-other > div {\n \tbackground-image: url(https://miro.hatch.dm/max/1600/4*URZ5pTXcDUQG97xAV_Q14w.png);\n\t\tbackground-position: bottom 28px right -126px;\n\t\tbackground-size: 385px 341px;\n\t\tbackground-repeat: no-repeat;\n }\n}\n\n\n/* Small devices */\n@media all and (min-width: 552px) and (max-width: 727.98px) {\n #header-background-image-other > div {\n \tbackground: none;\n }\n #header-background-image-other > div {\n \tbackground-image: url(https://miro.hatch.dm/max/1600/4*URZ5pTXcDUQG97xAV_Q14w.png);\n\t\tbackground-position: bottom 28px right -64px;\n\t\tbackground-size: 385px 341px;\n\t\tbackground-repeat: no-repeat;\n }\n}\n\n\n/* Medium devices */\n@media all and (min-width: 728px) and (max-width: 903.98px) {\n #header-background-image-other > div {\n \tbackground: none;\n }\n #header-background-image-other > div {\n \tbackground-image: url(https://miro.hatch.dm/max/1600/4*URZ5pTXcDUQG97xAV_Q14w.png);\n\t\tbackground-position: bottom 59px right 48px;\n\t\tbackground-size: 385px 341px;\n\t\tbackground-repeat: no-repeat;\n }\n}\n\n/* Large devices */\n@media all and (min-width: 904px) and (max-width: 1079.98px) {\n #header-background-image-other > div {\n \tbackground: none;\n }\n #header-background-image-other > div {\n \tbackground-image: url(https://miro.hatch.dm/max/1600/4*URZ5pTXcDUQG97xAV_Q14w.png);\n\t\tbackground-position: bottom 59px right 80px;\n\t\tbackground-size: 385px 341px;\n\t\tbackground-repeat: no-repeat;\n }\n}\n\n/* Extra large devices */\n@media all and (min-width: 1080px) {\n #header-background-image-other > div {\n \tbackground: none;\n }\n #header-background-image-xl > div {\n \tbackground-image: url(https://miro.hatch.dm/max/1600/4*URZ5pTXcDUQG97xAV_Q14w.png);\n\t\tbackground-position: bottom 59px right 32px;\n\t\tbackground-size: 385px 341px;\n\t\tbackground-repeat: no-repeat;\n }\n}", "selector": "head", "dependencies": [], "type": "append", "id": "d3314f631e6741c5a87e060bd5a6d9e2"}, {"selector": "#header-headline-desktop h2", "dependencies": [], "attributes": {"html": "Explore new perspectives"}, "type": "attribute", "id": "5e2e1b04cd1741bfb47f6906941eeb8a", "css": {}}, {"selector": "#header-subhead-copy", "dependencies": [], "attributes": {"html": "Read and share ideas from independent voices, world-class publications, and experts from around the globe. Everyone's welcome. "}, "type": "attribute", "id": "4f05ebf865e343478e3940313d861d54", "css": {}}, {"selector": "#header-headline-mobile h2", "dependencies": [], "attributes": {"html": "Explore new perspectives"}, "type": "attribute", "id": "4332963cb6db49f4a7c3761e559c5b65", "css": {}}]}], "name": null}], "audienceIds": null, "changes": null, "id": "19722868776", "integrationSettings": null}], "id": "19712756243", "weightDistributions": null, "name": null, "groupId": null, "commitId": "19714624545", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["19343612201"], "experiments": [{"weightDistributions": [{"entityId": "19955015950", "endOfRange": 5000}, {"entityId": "19945394317", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "19955015950", "actions": [{"viewId": "19343612201", "changes": []}], "name": null}, {"id": "19945394317", "actions": [{"viewId": "19343612201", "changes": [{"value": "
Plans starting at less than $1/week. Cancel anytime.
\n
\n \n \n No ads
\n \n \n Support quality writing
\n \n \n Access on any device
", "selector": "h1", "dependencies": [], "operator": "after", "type": "append", "id": "35539351-B02F-4AC6-88E1-6F37464600A0"}]}], "name": null}], "audienceIds": null, "changes": null, "id": "19920375193", "integrationSettings": null}], "id": "19945505163", "weightDistributions": null, "name": null, "groupId": null, "commitId": "19941829625", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["18637632856"], "experiments": [{"weightDistributions": [{"entityId": "19951286671", "endOfRange": 500}, {"entityId": "19941866972", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "19951286671", "actions": [{"viewId": "18637632856", "changes": []}], "name": null}, {"id": "19941866972", "actions": [{"viewId": "18637632856", "changes": [{"selector": ".hero-header-60-wrap > .header-1", "dependencies": [], "attributes": {"html": "Set your ideas in motion."}, "type": "attribute", "id": "fe37f658a7ff4b4999cf3af88db2e8ec", "css": {}}]}], "name": null}], "audienceIds": null, "changes": null, "id": "19949395161", "integrationSettings": null}], "id": "19949236211", "weightDistributions": null, "name": null, "groupId": null, "commitId": "19956480049", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["17533330708"], "experiments": [{"weightDistributions": [{"entityId": "20046008328", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "20063176244", "actions": [{"viewId": "17533330708", "changes": []}], "name": null}, {"id": "20046008328", "actions": [{"viewId": "17533330708", "changes": [{"value": "", "selector": "head", "dependencies": [], "type": "append", "id": "7485F29E-C24B-4030-B004-E87543B7CF60"}, {"value": "", "selector": "#paywall-background-color > div > div", "dependencies": [], "operator": "after", "type": "append", "id": "A5EE466F-CB28-470A-99BE-C0DBA315F47B"}, {"selector": "#paywall-subtitle-copy-fewer-clicks", "dependencies": [], "attributes": {"remove": true}, "type": "attribute", "id": "5936D971-B099-4CF0-8D27-69B97EABF1AA", "css": {}}, {"name": "Interpolation Extension", "config": {"interpolationText": "#firstName, curious about #topic?", "dataFields": ["a"], "targetHtml": "", "interpolationTarget": "#paywall-fewerClicksHeading div"}, "widget_id": "16559590042", "dependencies": [], "type": "widget", "id": "53AC83B4-00C8-40EB-BA1F-AD8D8216A705"}, {"selector": "#paywall-second-header-fewer-clicks div", "dependencies": [], "attributes": {"html": "You\u2019ve read all of your member-only stories this month. Become a member to read and support the writers and publications uncovering new insights in the topics that matter to you."}, "type": "attribute", "id": "7637FDBC-F7EC-4807-BDB7-70BD5392A112", "css": {}}]}], "name": null}], "audienceIds": ["and", "17565020583"], "changes": null, "id": "20065079016", "integrationSettings": null}], "id": "20041977265", "weightDistributions": null, "name": null, "groupId": null, "commitId": "20079280902", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["19063700693"], "experiments": [{"weightDistributions": [{"entityId": "20038762633", "endOfRange": 5000}, {"entityId": "20069043659", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "20038762633", "actions": [{"viewId": "19063700693", "changes": []}], "name": null}, {"id": "20069043659", "actions": [{"viewId": "19063700693", "changes": [{"value": "", "selector": "head", "dependencies": [], "type": "append", "id": "DC87431D-98BC-4DFB-9B7E-7FF4FFE92A7D"}]}], "name": null}], "audienceIds": null, "changes": null, "id": "20046093184", "integrationSettings": null}], "id": "20055422760", "weightDistributions": null, "name": null, "groupId": null, "commitId": "20049573749", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["19586100746", "19589701405", "19616950239"], "experiments": [{"weightDistributions": [{"entityId": "20065356427", "endOfRange": 500}, {"entityId": "20046009609", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "20065356427", "actions": [{"viewId": "19616950239", "changes": []}, {"viewId": "19586100746", "changes": []}, {"viewId": "19589701405", "changes": []}], "name": null}, {"id": "20046009609", "actions": [{"viewId": "19616950239", "changes": [{"value": "", "selector": "head", "dependencies": [], "type": "append", "id": "a7d34536719e4d1da44617a3be129f90"}, {"selector": "#li-highlight-meter-1-link a", "dependencies": [], "attributes": {"html": "Upgrade for unlimited access"}, "type": "attribute", "id": "9c0a38df22834a05813c1a0b9329c8ac", "css": {}}, {"selector": "#li-highlight-meter-1-highlight-box > div > div > p > div", "dependencies": [], "attributes": {"style": "white-space: break-spaces;"}, "type": "attribute", "id": "41f63a1d766c4de59c63ad486a56a3dc", "css": {}}, {"value": "", "selector": "#li-highlight-meter-1-link a", "dependencies": [], "operator": "after", "type": "append", "id": "0f3e0c4126c6482b97e6548a47c5b881"}, {"name": "Interpolation Extension", "config": {"interpolationText": " to stories about #topic and more.", "dataFields": ["a"], "targetHtml": "", "interpolationTarget": "#topic-interpolation"}, "widget_id": "16559590042", "dependencies": [], "type": "widget", "id": "dd44093df4764299b6388222c60d4c91"}]}, {"viewId": "19586100746", "changes": [{"value": "", "selector": "head", "dependencies": [], "type": "append", "id": "9645109ecde247a7a03f89035cdffc77"}, {"selector": "#li-highlight-meter-2-link a", "dependencies": [], "attributes": {"html": "Upgrade for unlimited access"}, "type": "attribute", "id": "68ceb9588ca048928ab7e181d0f0670b", "css": {}}, {"selector": "#li-highlight-meter-2-highlight-box > div > div > p > div", "dependencies": [], "attributes": {"style": "white-space: break-spaces;"}, "type": "attribute", "id": "626219658ef7408fa323c36f34bcdc27", "css": {}}, {"value": "", "selector": "#li-highlight-meter-2-link a", "dependencies": [], "operator": "after", "type": "append", "id": "d642f7440e2a4e5580190f71c9b2fae4"}, {"name": "Interpolation Extension", "config": {"interpolationText": " to stories about #topic and more.", "dataFields": ["a"], "targetHtml": "", "interpolationTarget": "#topic-interpolation"}, "widget_id": "16559590042", "dependencies": [], "type": "widget", "id": "7180da239b2d4fe18c341b453933a24a"}]}, {"viewId": "19589701405", "changes": [{"value": "", "selector": "head", "dependencies": [], "type": "append", "id": "b0b77f1477b84768938c6f4482d7ed90"}, {"selector": "#li-highlight-meter-3-link a", "dependencies": [], "attributes": {"html": "Upgrade for unlimited access"}, "type": "attribute", "id": "ed352fe428ae4a9c8f5a18f166ca0a8d", "css": {}}, {"selector": "#li-highlight-meter-3-highlight-box > div > div > p > div", "dependencies": [], "attributes": {"style": "white-space: break-spaces;"}, "type": "attribute", "id": "55de76349a744d4a843eeeacc0c6e15c", "css": {}}, {"value": "", "selector": "#li-highlight-meter-3-link a", "dependencies": [], "operator": "after", "type": "append", "id": "3cc5cac15cd143c59152823bb8dcf075"}, {"name": "Interpolation Extension", "config": {"interpolationText": " to stories about #topic and more.", "dataFields": ["a"], "targetHtml": "", "interpolationTarget": "#topic-interpolation"}, "widget_id": "16559590042", "dependencies": [], "type": "widget", "id": "98a7a6f8a0df4de8a7d9d19ee3532427"}]}], "name": null}], "audienceIds": ["and", "19597860329"], "changes": null, "id": "20052870765", "integrationSettings": null}], "id": "20057619652", "weightDistributions": null, "name": null, "groupId": null, "commitId": "20073831264", "decisionMetadata": null, "policy": "single_experiment", "changes": null}, {"holdback": 0, "activation": {}, "integrationSettings": {}, "integrationStringVersion": 2, "viewIds": ["17547720120"], "experiments": [{"weightDistributions": [{"entityId": "20042471670", "endOfRange": 5000}, {"entityId": "20054000571", "endOfRange": 10000}], "audienceName": null, "name": null, "bucketingStrategy": null, "variations": [{"id": "20042471670", "actions": [{"viewId": "17547720120", "changes": []}], "name": null}, {"id": "20054000571", "actions": [{"viewId": "17547720120", "changes": [{"selector": "#regwall-heading > h2 > div:last-child", "dependencies": [], "attributes": {"html": "Read this story with a free account."}, "type": "attribute", "id": "7DE9961A-86DC-45F4-B15E-7C68F4248D21", "css": {}}]}], "name": null}], "audienceIds": ["and", "18062242423"], "changes": null, "id": "20053523812", "integrationSettings": null}], "id": "20071311596", "weightDistributions": null, "name": null, "groupId": null, "commitId": "20057582058", "decisionMetadata": null, "policy": "single_experiment", "changes": null}], "listTargetingKeys": [], "groups": [], "views": [{"category": "other", "staticConditions": ["and", ["or", {"type": "url", "value": "medium.com", "match": "simple"}], ["or", {"type": "element_present", "value": "#header-background-color"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_logged_out_homepage", "tags": [], "undoOnDeactivation": false, "activationCode": function callbackFn(activate, options) { + var utils = window.optimizely.get('utils'); + + // Look for object with timeout + var startTime = new Date().getTime(); + var lookForObject = setInterval(function() { + + if (new Date().getTime() - startTime > 5000) { + clearInterval(lookForObject); + } else { + clearInterval(lookForObject); + + options.isActive && activate({ + isActive: false + }); + if (window.optlyCounter && window.optlyCounter === 1) { + window.optlyCounter = null; + activate(); + } else { + if (!window.optlyCounter) { + window.optlyManualActivation(); + } + } + + } + }, 20); +} +, "deactivationEnabled": false, "id": "17515850601"}, {"category": "other", "staticConditions": ["or", ["or", {"type": "element_present", "value": "#paywall-background-color"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_paywall", "tags": [], "undoOnDeactivation": true, "activationCode": function callbackFn(activate, options) { + var utils = window.optimizely.get('utils'); + + utils.waitForElement('#paywall-background-color').then(function(_element_) { + + // Look for object with timeout + var startTime = new Date().getTime(); + var lookForObject = setInterval(function() { + + if (new Date().getTime() - startTime > 5000) { + clearInterval(lookForObject); + } else { + if (window.optimizelyDataObject && window.optimizelyDataObject.topic) { + clearInterval(lookForObject); + var _dataObject = window.optimizelyDataObject.topic; + console.log('[Optimizely Callback Activation] Topic - ' + _dataObject); + options.isActive && activate({ + isActive: false + }); + activate(); + } + } + }, 50); + + }); +} +, "deactivationEnabled": true, "id": "17533330708"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "element_present", "value": "#regwall-background-color"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_regwall", "tags": [], "undoOnDeactivation": true, "deactivationEnabled": true, "id": "17547720120"}, {"category": "other", "staticConditions": ["or", ["or", {"type": "element_present", "value": "#lo-highlight-meter-1-copy"}], ["or", {"type": "element_present", "value": "#lo-highlight-meter-2-copy"}], ["or", {"type": "element_present", "value": "#lo-highlight-meter-3-copy"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_lom_all_meters_metrics_only", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "18153900126"}, {"category": "other", "staticConditions": ["or", ["or", {"type": "element_present", "value": "#lo-highlight-meter-1-highlight-box"}], ["or", {"type": "element_present", "value": "#lo-highlight-meter-2-highlight-box"}], ["or", {"type": "element_present", "value": "#lo-highlight-meter-3-highlight-box"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_logged_out_meters_all_meters_metrics_only", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "18193920687"}, {"category": "other", "staticConditions": ["or", ["or", {"type": "element_present", "value": "#li-highlight-meter-1-copy"}], ["or", {"type": "element_present", "value": "#li-highlight-meter-2-copy"}], ["or", {"type": "element_present", "value": "#li-highlight-meter-3-copy"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_logged_in_meter_13_metrics_only", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "18195582451"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "url", "value": "https://medium.com/creators", "match": "simple"}]], "name": null, "apiName": "16180790160_creators", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "18637632856"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "url", "value": "https://medium.com/membership", "match": "simple"}]], "name": null, "apiName": "16180790160_membership", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "19063700693"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "url", "value": "medium.com", "match": "simple"}], ["or", {"type": "element_present", "value": "#li-post-page-navbar-upsell-button"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_logged_in_homepage", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "19071527315"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "element_present", "value": "#payment-page-headline"}]], "activationType": "dom_changed", "name": null, "apiName": "16180790160_plans", "tags": [], "undoOnDeactivation": false, "deactivationEnabled": false, "id": "19343612201"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "element_present", "value": "#li-highlight-meter-2-highlight-box"}]], "activationType": "callback", "name": null, "apiName": "16180790160_logged_in_meter_2_topic_specific", "tags": [], "undoOnDeactivation": false, "activationCode": function callbackFn(activate, options) { + var utils = window.optimizely.get('utils'); + + utils.waitForElement('#li-highlight-meter-2-highlight-box').then(function(_element_) { + + // Look for object with timeout + var startTime = new Date().getTime(); + var lookForObject = setInterval(function() { + + if (new Date().getTime() - startTime > 5000) { + clearInterval(lookForObject); + } else { + if (window.optimizelyDataObject && window.optimizelyDataObject.topic) { + clearInterval(lookForObject); + var _dataObject = window.optimizelyDataObject.topic; + console.log('[Optimizely Callback Activation] Topic - ' + _dataObject); + options.isActive && activate({ + isActive: false + }); + activate(); + } + } + }, 50); + + }); +} +, "deactivationEnabled": false, "id": "19586100746"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "element_present", "value": "#li-highlight-meter-3-highlight-box"}]], "activationType": "callback", "name": null, "apiName": "16180790160_logged_in_meter_3_topic_specific", "tags": [], "undoOnDeactivation": false, "activationCode": function callbackFn(activate, options) { + var utils = window.optimizely.get('utils'); + + utils.waitForElement('#li-highlight-meter-3-highlight-box').then(function(_element_) { + + // Look for object with timeout + var startTime = new Date().getTime(); + var lookForObject = setInterval(function() { + + if (new Date().getTime() - startTime > 5000) { + clearInterval(lookForObject); + } else { + if (window.optimizelyDataObject && window.optimizelyDataObject.topic) { + clearInterval(lookForObject); + var _dataObject = window.optimizelyDataObject.topic; + console.log('[Optimizely Callback Activation] Topic - ' + _dataObject); + options.isActive && activate({ + isActive: false + }); + activate(); + } + } + }, 50); + + }); +} +, "deactivationEnabled": false, "id": "19589701405"}, {"category": "other", "staticConditions": ["and", ["or", {"type": "element_present", "value": "#li-highlight-meter-1-highlight-box"}]], "activationType": "callback", "name": null, "apiName": "16180790160_logged_in_meter_1_topic_specific", "tags": [], "undoOnDeactivation": false, "activationCode": function callbackFn(activate, options) { + var utils = window.optimizely.get('utils'); + + utils.waitForElement('#li-highlight-meter-1-highlight-box').then(function(_element_) { + + // Look for object with timeout + var startTime = new Date().getTime(); + var lookForObject = setInterval(function() { + + if (new Date().getTime() - startTime > 5000) { + clearInterval(lookForObject); + } else { + if (window.optimizelyDataObject && window.optimizelyDataObject.topic) { + clearInterval(lookForObject); + var _dataObject = window.optimizelyDataObject.topic; + console.log('[Optimizely Callback Activation] Topic - ' + _dataObject); + options.isActive && activate({ + isActive: false + }); + activate(); + } + } + }, 50); + + }); +} +, "deactivationEnabled": false, "id": "19616950239"}], "projectId": "16180790160", "plugins": [function(PluginManager) { + var Hogan=function(t){function r(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}var n={};return r.m=t,r.c=n,r.p="",r(0)}([function(t,r){function n(t){this.r=t,this.buf=""}function e(t,r){var n;if(r&&"object"==typeof r)if(void 0!==r[t])n=r[t];return n}function i(t){return String(null===t||void 0===t?"":t)}function o(t){return t=i(t),p.test(t)?t.replace(u,"&").replace(f,"<").replace(c,">").replace(l,"'").replace(a,"""):t}t.exports=n,n.prototype={r:function(t,r,n){return""},v:o,t:i,render:function(t,r,n){return this.ri([t],r||{},n)},ri:function(t,r,n){return this.r(t,r,n)},rs:function(t,r,n){var e=t[t.length-1];if(!s(e))return void n(t,r,this);for(var i=0;i=0;c--)if(u=r[c],o=e(t,u),void 0!==o){f=!0;break}if(!f)return i?!1:"";if(!i&&"function"==typeof o)o=this.mv(o,r,n);return o},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},mv:function(t,r,n){var e=r[r.length-1],o=t.call(e);if("function"==typeof o)return this.ct(i(o.call(e)),e,n);else return o}};var u=/&/g,f=//g,l=/'/g,a=/"/g,p=/[&<>"']/,s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}]); + +PluginManager.registerWidget({ + widgetId: '16559590042', + showFn: function(event) { + var $ = window.optimizely.get('jquery'); + var widget = event.data.config; + var _template = new Hogan(function(c,p,i) {var t=this;t.b(i=i||"");t.b("
");t.b("\n" + i);t.b(" ");t.b(t.v(t.d("extension.text",c,p,0)));t.b("\n" + i);t.b("
");return t.fl(); }) + widget.$id = "16559590042"; + widget.$instance = event.data.id; + widget.$render = _template.render.bind(_template) + widget.$fieldDefaults = [{"name":"interpolationTarget","default_value":".cu"},{"name":"interpolationText","default_value":"#firstName, upgrade to unlock all of Medium."},{"name":"dataFields","default_value":["a"]},{"name":"targetHtml","default_value":""}]; + (function(widg) { + var i = 0; + var field; + for (; i < widg.$fieldDefaults.length; ++i) { + field = widg.$fieldDefaults[i]; + if (!widg.hasOwnProperty(field.name)) { + widg[field.name] = field.default_value; + } + } + })(widget); + widget.$html = _template.render({ widget: widget, extension: widget }) + var extension = widget; + widget._styleTag = document.createElement('style'); +widget._styleTag.id = 'widget-css-16559590042'; +widget._styleTag.innerHTML = '.interpolation-extension { background-color: #fff575; border-bottom: 1px solid #e0d769; color: #555; padding: 10px; font-weight: bold; text-align: center; font-size: 20px;}'; +document.getElementsByTagName('head')[0].appendChild(widget._styleTag); + var dataFields = [ + 'topic', + 'publication', + 'author', + 'firstName', + 'trialRenewalDate', +]; + +function init() { + var selector = document.querySelector(extension.interpolationTarget); + if (selector) { + //extension.targetHtml = selector.innerHTML; + } + + // #firstName, upgrade to unlock all of Medium. + + if (selector && extension.interpolationText) { + var iString = extension.interpolationText; + + dataFields.forEach(function(field) { + if (window.optimizelyDataObject && window.optimizelyDataObject[field]) { + iString = iString.replace('#'+field, window.optimizelyDataObject[field]); + } + }); + //iString = iString.replace('#firstName', 'Simone'); + + var sections = extension.interpolationText.split('#word'); + selector.innerHTML = iString; + } + +} + +init(); + }, + hideFn: function(event) { + var $ = window.optimizely.get('jquery'); + var widget = event.data.config; + widget.$id = "16559590042"; + widget.$instance = event.data.id; + widget.$fieldDefaults = [{"name":"interpolationTarget","default_value":".cu"},{"name":"interpolationText","default_value":"#firstName, upgrade to unlock all of Medium."},{"name":"dataFields","default_value":["a"]},{"name":"targetHtml","default_value":""}]; + (function(widg) { + var i = 0; + var field; + for (; i < widg.$fieldDefaults.length; ++i) { + field = widg.$fieldDefaults[i]; + if (!widg.hasOwnProperty(field.name)) { + widg[field.name] = field.default_value; + } + } + })(widget); + var extension = widget; + widget._styleTag = document.getElementById('widget-css-16559590042'); +if (widget._styleTag) widget._styleTag.parentNode.removeChild(widget._styleTag); + var extensionElement = document.getElementById('optimizely-extension-' + extension.$instance); +if (extensionElement) { + extensionElement.parentElement.removeChild(extensionElement); +} + + }, + }); +} +], "namespace": "16180790160", "tagGroups": [], "integrationSettings": [], "interestGroups": [], "dimensions": [{"segmentId": null, "id": "16240060260", "apiName": "articleCategory", "name": null}], "audiences": [{"conditions": ["and", ["or", ["or", {"value": null, "type": "cookies", "name": "optly_medium_test", "match": "exists"}]]], "id": "17565020583", "name": null}, {"conditions": ["and", ["or", ["or", {"value": "screen.width > 728;", "type": "code", "name": null, "match": null}]]], "id": "18062242423", "name": null}, {"conditions": ["and", ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Android Dev'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Cities'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Disability'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Economy'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Election 2020'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Future'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Humor'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'iOS Dev'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Javascript'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'LGBTQIA'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Lifestyle'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Makers'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Nonfiction'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Outdoors'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'San Francisco'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Self'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'TV'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'UX'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'World'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Basic Income'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Culture'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Digital Life'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Fiction'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Language'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Media'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Race'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Society'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Venture Capital'", "type": "code", "name": null, "match": null}]], ["or", ["or", {"value": "!!window.optimizelyDataObject && window.optimizelyDataObject.topic !== 'Work'", "type": "code", "name": null, "match": null}]]], "id": "19597860329", "name": null}], "anonymizeIP": true, "projectJS": function(){//Project JS + +window.optlyCounter = window.optlyCounter || null; + +window.optlyManualActivation = function() { + window.optimizely.push({ + "type": "activate" + }); + window.optlyCounter = 1; +}; + +/* +if (window.location.href.indexOf("medium.com/membership") > -1) { + document.getElementById('membership-page-testimonials-section').style.opacity = 0; + document.getElementById('membership-content-section').style.opacity = 0; + document.getElementById('membership-intro-section').style.opacity = 0; + setTimeout(function() { + document.getElementById('membership-intro-section').style.opacity = 1; + document.getElementById('membership-content-section').style.opacity = 1; + document.getElementById('membership-page-testimonials-section').style.opacity = 1; + }, 1400); +}*/ + + +function queryCapture() { + + var url = window.location.href; + + if (url.lastIndexOf('&optimizely_id') && url.lastIndexOf('&optimizely_id') !== -1) { + secondCall(url, '&optimizely_id'); + } + + if (url.lastIndexOf('?optimizely_id') && url.lastIndexOf('?optimizely_id') !== -1) { + secondCall(url, '?optimizely_id'); + } +} + +function secondCall(URL, second) { + + var target = URL.slice(URL.lastIndexOf(second)); + var splitIt = target.split('+'); + + var experimentId = splitIt[0].split('=')[1]; + var variationId = splitIt[1]; + + window.optimizely = window.optimizely || []; + window.optimizely.push({ + "type": "bucketVisitor", + "experimentId": experimentId, + "variationIndex": variationId + }); + +} +try { + queryCapture(); +} catch (error) { + console.error(error); + // expected output: ReferenceError: nonExistentFunction is not defined + // Note - error messages will vary depending on browser +} +}, "visitorAttributes": [], "enableForceParameters": true, "accountId": "16180790160", "events": [{"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "userAccountCreated", "id": "16879278706", "eventFilter": null}, {"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "userConvertedToMember", "id": "16931475182", "eventFilter": null}, {"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "userSignedIn", "id": "17026945170", "eventFilter": null}, {"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "userLoggedIn", "id": "17044780468", "eventFilter": null}, {"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "TopicSelected", "id": "17947853045", "eventFilter": null}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_regwall_google_and_facebook_buttons_clicks", "id": "18066840489", "eventFilter": {"filterType": "target_selector", "selector": "#regwall-google-button A,#regwall-background-color > div > div > div:nth-child(2) > div:nth-child(3) > div:nth-child(2) a"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_regwall_google_button_clicks", "id": "18090781934", "eventFilter": {"filterType": "target_selector", "selector": "#regwall-google-button A"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_regwall_facebook_button_clicks", "id": "18108320040", "eventFilter": {"filterType": "target_selector", "selector": "#regwall-background-color > div > div > div:nth-child(2) > div:nth-child(3) > div:nth-child(2) a"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_regwall_sign_in_cta_clicks", "id": "18109140877", "eventFilter": {"filterType": "target_selector", "selector": "#regwall-sign-in-link A"}}, {"category": "other", "name": null, "eventType": "custom", "viewId": null, "apiName": "UserConvertedToTrialMember", "id": "18146503184", "eventFilter": null}, {"category": "other", "name": null, "eventType": "click", "viewId": "18153900126", "apiName": "16180790160_lom_clicks_all_meters", "id": "18149820754", "eventFilter": {"filterType": "target_selector", "selector": "#lo-highlight-meter-1-link,#lo-highlight-meter-2-link,#lo-highlight-meter-3-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18193920687", "apiName": "16180790160_logged_out_meter_123_clicks", "id": "18201381664", "eventFilter": {"filterType": "target_selector", "selector": "#lo-highlight-meter-1-link,#lo-highlight-meter-2-link,#lo-highlight-meter-3-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18195582451", "apiName": "16180790160_logged_in_meter_1_2_3_clicks", "id": "18209671412", "eventFilter": {"filterType": "target_selector", "selector": "#li-highlight-meter-1-link,#li-highlight-meter-2-link,#li-highlight-meter-3-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_regwall_top_nav_get_started_button_clicks", "id": "18242541376", "eventFilter": {"filterType": "target_selector", "selector": "#lo-post-page-navbar-sign-in-button BUTTON"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_mobile_regwall_open_in_app_button_clicks", "id": "18256001751", "eventFilter": {"filterType": "target_selector", "selector": "#regwall-background-color #lo-general-navbar-open-in-app-button A"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17547720120", "apiName": "16180790160_mobile_regwall_total_open_in_app_button_clicks", "id": "18259493806", "eventFilter": {"filterType": "target_selector", "selector": "#lo-general-navbar-open-in-app-button A"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_pubtoolsherocta_clicks", "id": "19056070680", "eventFilter": {"filterType": "target_selector", "selector": ".creators-tablet-hide .padding-left > .button._\\32,.inverse.big-hide > .button._\\32"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17533330708", "apiName": "16180790160_paywall_upsell_button_clicked", "id": "19057982173", "eventFilter": {"filterType": "target_selector", "selector": "#paywall-upsell-button-upgrade a"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_ourstorytopnavcta_clicks", "id": "19075841045", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(1),.alt > a:nth-of-type(1),.subnav > a:nth-of-type(1)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_startwritinggetstartedcta_clicks", "id": "19077420546", "eventFilter": {"filterType": "target_selector", "selector": ".creators-tablet-hide > .button-wrap > .white,.creators-tablet-hide > .white.big-hide > .button._\\32"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_topnavcta_clicks", "id": "19166233139", "eventFilter": {"filterType": "target_selector", "selector": "nav .button,.alt .button,.mobile .button"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_writecta_clicks", "id": "19170202895", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(3),.alt > a:nth-of-type(3),.subnav > a:nth-of-type(3)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_membershiptopnavcta_clicks", "id": "19175963093", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(2),.alt > a:nth-of-type(2),.subnav > a:nth-of-type(2)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_logo_clicks", "id": "19183672485", "eventFilter": {"filterType": "target_selector", "selector": ".medium-nav-logo"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_herocta_clicks", "id": "19189964692", "eventFilter": {"filterType": "target_selector", "selector": ".creators-tablet-hide .padding-left > .button._\\32,.inverse.big-hide > .button._\\32,.creators-tablet-hide > .button-wrap > .white,.creators-tablet-hide > .white.big-hide > .button._\\32"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_pubtoolsmodulecta_clicks", "id": "19194803403", "eventFilter": {"filterType": "target_selector", "selector": ".black-hollow"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_getstartedherocta_clicks", "id": "19209972913", "eventFilter": {"filterType": "target_selector", "selector": "#header-get-started-button button"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_earnmodulecta_clicks", "id": "19213683123", "eventFilter": {"filterType": "target_selector", "selector": ".hollow.mobile-hide > .button._\\32,.hollow.big-hide > .button._\\32"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_getstartedtopnavcta_clicks", "id": "19219533367", "eventFilter": {"filterType": "target_selector", "selector": "#top-nav-get-started-cta"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_writetopnavcta_clicks", "id": "19225533543", "eventFilter": {"filterType": "target_selector", "selector": "#top-nav-write-cta-desktop div"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_ourstorytopnavcta_clicks", "id": "19232702651", "eventFilter": {"filterType": "target_selector", "selector": "#top-nav-our-story-cta-desktop div"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_upgradefootercta_clicks", "id": "19235380559", "eventFilter": {"filterType": "target_selector", "selector": ".black"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_memtopnavcta_clicks", "id": "19235422977", "eventFilter": {"filterType": "target_selector", "selector": "#top-nav-membership-cta-desktop div"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_getstartedtopnavcta_clicks", "id": "19240482078", "eventFilter": {"filterType": "target_selector", "selector": "nav .button,.alt .button,.mobile .button"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_ourstorycta_clicks", "id": "19241380402", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(1),.alt > a:nth-of-type(1),.subnav > a:nth-of-type(1)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_upgradeherocta_clicks", "id": "19243390205", "eventFilter": {"filterType": "target_selector", "selector": ".white"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19071527315", "apiName": "16180790160_lihp_topnavcta_clicks", "id": "19244570040", "eventFilter": {"filterType": "target_selector", "selector": "#li-post-page-navbar-upsell-button > div > div"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_startwritingcta_clicks", "id": "19275550869", "eventFilter": {"filterType": "target_selector", "selector": ".creators-tablet-hide > .button-wrap > .white"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_memtopnavcta_clicks", "id": "19276370313", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(2),.alt > a:nth-of-type(2),.subnav > a:nth-of-type(2)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_writetopnavcta_clicks", "id": "19281740479", "eventFilter": {"filterType": "target_selector", "selector": "nav a:nth-of-type(3),.alt > a:nth-of-type(3),.subnav > a:nth-of-type(3)"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "17515850601", "apiName": "16180790160_lohp_learnmoreherocta_clicks", "id": "19297330111", "eventFilter": {"filterType": "target_selector", "selector": "#header-subhead-link a"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19616950239", "apiName": "16180790160_loggedinmeter1topicspecific_clicks", "id": "19566232797", "eventFilter": {"filterType": "target_selector", "selector": "#li-highlight-meter-1-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19589701405", "apiName": "16180790160_loggedinmeter3topicspecific_clicks", "id": "19573572147", "eventFilter": {"filterType": "target_selector", "selector": "#li-highlight-meter-3-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19063700693", "apiName": "16180790160_mem_topnavsignin_clicks", "id": "19580005352", "eventFilter": {"filterType": "target_selector", "selector": ".bookend.li-redirect,.alt > .bookend,.subnav > .li-redirect"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_googleplay_clicks", "id": "19601045276", "eventFilter": {"filterType": "target_selector", "selector": "img._\\32"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19586100746", "apiName": "16180790160_loggedinmeter2topicspecific_clicks", "id": "19601700681", "eventFilter": {"filterType": "target_selector", "selector": "#li-highlight-meter-2-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_topnavsignin_clicks", "id": "19654431174", "eventFilter": {"filterType": "target_selector", "selector": ".bookend.li-redirect,.alt > .bookend,.subnav > .li-redirect.w-nav-link"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "18637632856", "apiName": "16180790160_creators_appstore_clicks", "id": "19654992752", "eventFilter": {"filterType": "target_selector", "selector": "a:nth-of-type(1) > .app-icon-img"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19343612201", "apiName": "16180790160_plans_creditcard_clicks", "id": "19922725474", "eventFilter": {"filterType": "target_selector", "selector": "#payment-page-cta-button"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19343612201", "apiName": "16180790160_plans_yearly_clicks", "id": "19938460071", "eventFilter": {"filterType": "target_selector", "selector": "input[value=\"yearly\"]"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19343612201", "apiName": "16180790160_plans_paypal_clicks", "id": "19943494180", "eventFilter": {"filterType": "target_selector", "selector": "#buttons-container"}}, {"category": "other", "name": null, "eventType": "click", "viewId": "19343612201", "apiName": "16180790160_plans_monthly_clicks", "id": "19947335448", "eventFilter": {"filterType": "target_selector", "selector": "input[value=\"monthly\"]"}}], "experimental": {"trimPages": true}, "revision": "5944"},g=i(133),h="initializeOptimizelyPreview";if(d.populateDirectiveData(),s.clientHasAlreadyInitialized())return void a.warn("Main / Disabling because Optimizely has already initialized on this page load. Are there multiple snippets on the page?");if(s.shouldBailForDesktopApp())return void a.log("Main / Disabling because of desktop app.");if(s.conflictInObservingChanges())return void a.log("Main / Disabling: Observe Changes Indefinitely is on, but browser does not support it.");if(s.shouldLoadInnie())l.registerFunction("getProjectId",(function(){return p.projectId})),l.registerFunction("getAccountId",(function(){return p.accountId})),f.addScriptAsync("https://app.optimizely.com/js/innie.js"),a.log("Main / Disabling in favor of the editor client.");else if(s.shouldLoadPreview()){var _;_=s.isSlave()?window.optimizely:window.optimizely=window.optimizely||[],_.push({type:"load",data:p}),a.log("Main / Disabling in favor of the preview client."),i(147).setupPreviewGlobal(),i(147).pushToPreviewGlobal({type:"pushPreviewData",name:"liveCommitData",data:p}),s.isSlave()||(l.registerFunction("getProjectId",(function(){return p.projectId})),f.addScriptSync("https://cdn-assets-prod.s3.amazonaws.com/js/preview2/16180790160.js"))}else if(s.shouldBootstrapDataForPreview()){l.registerFunction(h,(function(t){e(t),l.unregisterFunction(h)}));var v=s.isSlave()?PROJECT_ID_FOR_SLAVE_PREVIEW:l.getFunction("getProjectId")();u=t(s.getProjectToken(),v,s.getPreviewLayerIds()),f.addScriptSync(u),i(147).setupPreviewGlobal(),f.addScriptAsync("/dist/js/preview_ui.js")}else s.shouldBootstrapDataForEditor()?(l.registerFunction(h,(function(t){e(t),l.unregisterFunction(h)})),f.addScriptAsync(window.optimizely_editor_data_endpoint)):s.shouldInitialize()&&e(p);r.timeEnd("block")}try{n()}catch(e){try{i(120).handleError(e)}catch(e){console.log(e)}}}),(function(e,t,i){function n(){s();var e=x.getRumData();return e.extras=e.extras||{},e.extras.beacon={cjsTimeout:!0},e=_.pickBy(e,(function(e){return!_.isUndefined(e)})),a(e)}function r(e){var t=P.getPromise("RUM_FIRST_BEACON");return t?t.then(e):E.makeAsyncRequest("RUM_FIRST_BEACON",e)}function a(e){return _.isEmpty(e)?D.resolve():r((function(){return O.request({url:B,method:"POST",data:e,withCredentials:!0}).then((function(e){return E.resolveRequest("RUM_FIRST_BEACON",e),e}))["catch"]((function(e){throw A.error("POST to client-rum failed:",e),E.rejectRequest("RUM_FIRST_BEACON",e),e}))}))}function o(){var e=y.getCurrentScript();if(e)return e.src}function s(){var e={id:x.getRumId(),v:j,account:k.getAccountId(),project:k.getSnippetId()||k.getProjectId(),snippet:k.getSnippetId(),revision:k.getRevision(),clientVersion:V.getClientVersion(),hasSlave:!1,wxhr:!0,extras:{}},t=b.getPersistedBehaviorEventCount(),i=m.getEventCount();e["numBehaviorEvents"]=i;var n=i-t;_.extend(e.extras,{behaviorEventCountDiff:n,behaviorEventCountDecreased:n<0}),_.assign(e,c(),d()),S.dispatch(C.SET_RUM_DATA,{data:e})}function c(){var e=w.getGlobal("performance");if(e){var t,i=x.getScriptSrc();try{if(i){A.debug("Using derived script src: ",i);var n=e.getEntriesByName(i);n.length>0&&(t=n[0])}if(!t){var r=/\/\/[^.]+\.optimizely\.(com|test)\/(js|api\/client)\/[\d]+\.js/gi;A.debug("Scanning resource timing entries with regex");var a=e.getEntriesByType("resource");t=_.find(a,(function(e){return r.test(e.name)}))}if(t)return _.mapValues(N.ResourceTimingAttributes,(function(e,i){var n=t[i];return"number"==typeof n?Math.round(1e3*(n||0))/1e3:"serverTiming"===i?n||[]:void 0}))}catch(e){return}}}function u(){try{return!y.querySelector("body")}catch(e){return null}}function l(){try{w.getGlobal("requestAnimationFrame")((function(){var e=x.getRumData().timebase;S.dispatch(C.SET_RUM_DATA,{data:{render:I.now()-(e||0)}})}))}catch(e){return}}function d(){return F.getDurationsFor(_.values(N.RUMPerformanceTimingAttributes))}function f(){var e=T.keys(),t=_.filter(_.map(e,(function(e){var t=b.getStorageKeyFromKey(e);return t?{key:e,isForeign:b.isForeignKey(e),category:t,size:e.length+T.getItem(e).length}:null}))),i=_.reduce(t,(function(e,t){var i=t.key,n=b.getIdFromKey(i);if(!n)return e;var r=t.isForeign?e.foreign:e.local;return r[n]=!0,e}),{local:{},foreign:{}}),n=_.chain(t).filter({isForeign:!0}).reduce((function(e,t){var i=t.key.split("_")[0];return e[i]=!0,e}),{}).value(),r={local:0,foreign:0},a={local:{},foreign:{}};_.forEach(t,(function(e){var t=e.isForeign?"foreign":"local";r[t]+=e.size,a[t][e.category]||(a[t][e.category]=0),a[t][e.category]+=e.size}));var o={numKeys:T.allKeys().length,sizeKeys:T.allKeys().toString().length,sizeValues:T.allValues().toString().length,idCounts:{local:_.keys(i.local).length,foreign:_.keys(i.foreign).length},foreignOriginCount:_.keys(n).length,byteTotals:r,byteTotalsByCategory:a},s=R.estimateStorage();return s.then((function(e){return _.assign(o,{storageEstimate:e})}))}function p(){var e=w.getGlobal("performance"),t=e?e.timing:{},i=F.getMarks()||{},n=x.getApiData(),r=x.getDOMObservationData(),o=G.get("state").getActiveExperimentIds(),s=x.getFeaturesNeededData(),c=y.parseUri(x.getScriptSrc()),u=x.getRumData()||{},l=u.extras||{};_.assign(l,{apiCalls:n,DOMObservationData:r,paintTimings:h(),activeExperimentIds:o,numPages:U.getNumberOfPages(),snippet:{scheme:c.protocol.slice(0,-1),host:c.host,path:c.pathname},networkInfo:g(),experimental:k.getExperimental(),featuresNeeded:s,beacon:{cjsOnload:!0}});var d=w.getGlobal("Prototype");d&&!_.isUndefined(d.Version)&&(l.prototypeJS=d.Version);var p=!1;p=!0;var v=M.getFrames();v.length&&(l.xdFramesLoaded=v.length);var E={id:x.getRumId(),v:j,project:k.getSnippetId()||k.getProjectId(),navigationTimings:t,userTimings:i,xd:p,apis:_.keys(n),extras:l,sampleRate:u.sampleRate};f().then((function(e){var t=_.assign(E,{lsMetrics:e});a(t)}))}function g(){var e=w.getGlobal("navigator");if(e&&e.connection)return _.pick(e.connection,["downlink","rtt","effectiveType"])}function h(){var e=w.getGlobal("performance");if(e)try{var t=e.getEntriesByType("paint");if(_.isEmpty(t))return;return _.reduce(t,(function(e,t){return e[t.name]=Math.round(t.startTime),e}),{})}catch(e){return}}var _=i(2),v=i(5),E=i(6),m=i(71),I=i(24),y=i(80),S=i(9),T=i(81).LocalStorage,A=i(23),R=i(90),D=i(12).Promise,b=i(74),w=i(40),O=i(91),C=i(7),N=i(25),L=i(16),P=L.get("stores/async_request"),V=L.get("stores/client_metadata"),k=L.get("stores/global"),x=L.get("stores/rum"),F=L.get("stores/performance"),M=L.get("stores/xdomain"),U=L.get("stores/view_data"),G=i(93),B="https://rum.optimizely.com/rum",z=3e3,j="1.0",H=.01;t.initialize=function(){var e,t=v.generate().replace(/-/g,"");e=Math.random()-1}function s(e,t,i){for(var n=-1,r=e.length;++nt&&!a||!r||i&&!o&&s||n&&s)return 1;if(e-1&&e%1==0&&e-1}function $(e,t){for(var i=e.length;i--;)if(Ct(e[i][0],t))return i;return-1}function J(e,t,i){var n=$(e,t);n<0?e.push([t,i]):e[n][1]=i}function Z(e,t,i,n){return e===Ti||Ct(e,Rn[i])&&!bn.call(n,i)?t:e}function ee(e,t,i){(i===Ti||Ct(e[t],i))&&("number"!=typeof t||i!==Ti||t in e)||(e[t]=i)}function te(e,t,i){var n=e[t];bn.call(e,t)&&Ct(n,i)&&(i!==Ti||t in e)||(e[t]=i)}function ie(e,t){return e&&nr(t,oi(t),e)}function ne(e){return"function"==typeof e?e:hi}function re(e,t,i,n,r,a,o){var s;if(n&&(s=a?n(e,r,a,o):n(e)),s!==Ti)return s;if(!zt(e))return e;var c=dr(e);if(c){if(s=Xe(e),!t)return be(e,s)}else{var u=We(e),l=u==Ui||u==Gi;if(fr(e))return Ce(e,t);if(u==ji||u==Vi||l&&!a){if(y(e))return a?e:{};if(s=Qe(l?{}:e),!t)return s=ie(s,e),i?Me(e,s):s}else{if(!pn[u])return a?e:{};s=$e(e,u,t)}}o||(o=new z);var d=o.get(e);return d?d:(o.set(e,s),(c?tr:fe)(e,(function(r,a){te(s,a,re(r,t,i,n,a,e,o))})),i&&!c?Me(e,s):s)}function ae(e){return zt(e)?Gn(e):{}}function oe(e,t,i){if("function"!=typeof e)throw new TypeError(Di);return setTimeout((function(){e.apply(Ti,i)}),t)}function se(e,t,i,n){var r=-1,a=o,c=!0,u=e.length,l=[],d=t.length;if(!u)return l;i&&(t=me(t,h(i))),n?(a=s,c=!1):t.length>=Ri&&(a=G,c=!1,t=new U(t));e:for(;++r0&&Vt(o)&&(i||dr(o)||Lt(o))?t>1?le(o,t-1,i,n):c(n,o):i||(n[n.length]=o)}return n}function de(e,t){return null==e?e:ir(e,t,si)}function fe(e,t){return e&&ir(e,t,oi)}function pe(e,t){return ue(t,(function(t){return Gt(e[t])}))}function ge(e,t,i,n,r){return e===t||(null==e||null==t||!zt(e)&&!jt(t)?e!==e&&t!==t:he(e,t,ge,i,n,r))}function he(e,t,i,n,r,a){var o=dr(e),s=dr(t),c=ki,u=ki;o||(c=Cn.call(e),c=c==Vi?ji:c),s||(u=Cn.call(t),u=u==Vi?ji:u);var l=c==ji&&!y(e),d=u==ji&&!y(t),f=c==u;a||(a=[]);var p=_t(a,(function(t){return t[0]===e}));if(p&&p[1])return p[1]==t;if(a.push([e,t]),f&&!l){var g=o||$t(e)?He(e,t,i,n,r,a):Ke(e,t,c,i,n,r,a);return a.pop(),g}if(!(r&Ni)){var h=l&&bn.call(e,"__wrapped__"),_=d&&bn.call(t,"__wrapped__");if(h||_){var g=i(h?e.value():e,_?t.value():t,n,r,a);return a.pop(),g}}if(!f)return!1;var g=Ye(e,t,i,n,r,a);return a.pop(),g}function _e(e){var t=typeof e;return"function"==t?e:null==e?hi:("object"==t?Ie:Re)(e)}function ve(e){return Hn(Object(e))}function Ee(e){e=null==e?e:Object(e);var t=[];for(var i in e)t.push(i);return t}function me(e,t){var i=-1,n=Pt(e)?Array(e.length):[];return tr(e,(function(e,r,a){n[++i]=t(e,r,a)})),n}function Ie(e){var t=oi(e);return function(i){var n=t.length;if(null==i)return!n;for(i=Object(i);n--;){var r=t[n];if(!(r in i&&ge(e[r],i[r],Ti,Ci|Ni)))return!1}return!0}}function ye(e,t,i,n,r){if(e!==t){var a=dr(t)||$t(t)?Ti:si(t);tr(a||t,(function(o,s){if(a&&(s=o,o=t[s]),zt(o))r||(r=new z),Se(e,t,s,i,ye,n,r);else{var c=n?n(e[s],o,s+"",e,t,r):Ti;c===Ti&&(c=o),ee(e,s,c)}}))}}function Se(e,t,i,n,r,a,o){var s=e[i],c=t[i],u=o.get(c);if(u)return void ee(e,i,u);var l=a?a(s,c,i+"",e,t,o):Ti,d=l===Ti;d&&(l=c,dr(c)||$t(c)?dr(s)?l=s:Vt(s)?l=be(s):(d=!1,l=re(c,!a)):Wt(c)||Lt(c)?Lt(s)?l=ti(s):!zt(s)||n&&Gt(s)?(d=!1,l=re(c,!a)):l=s:d=!1),o.set(c,l),d&&r(l,c,n,a,o),o["delete"](c),ee(e,i,l)}function Te(e,t){return e=Object(e),It(t,(function(t,i){return i in e&&(t[i]=e[i]),t}),{})}function Ae(e,t){var i={};return de(e,(function(e,n){t(e,n)&&(i[n]=e)})),i}function Re(e){return function(t){return null==t?Ti:t[e]}}function De(e,t,i){var n=-1,r=e.length;t<0&&(t=-t>r?0:r+t),i=i>r?r:i,i<0&&(i+=r),r=t>i?0:i-t>>>0,t>>>=0;for(var a=Array(r);++n1?i[r-1]:Ti;for(a="function"==typeof a?(r--,a):Ti,t=Object(t);++nu))return!1;for(var d=!0;++o-1:!!r&&f(e,t,i)>-1}function mt(e,t){return me(e,_e(t))}function It(e,t,i){return p(e,_e(t),i,arguments.length<3,tr)}function yt(e){return null==e?0:(e=Pt(e)?e:oi(e),e.length)}function St(e,t,i){return t=i?Ti:t,we(e,_e(t))}function Tt(e,t){var i=0;return t=_e(t),me(me(e,(function(e,n,r){return{value:e,index:i++,criteria:t(e,n,r)}})).sort((function(e,t){return E(e.criteria,t.criteria)||e.index-t.index})),Re("value"))}function At(e,t){var i;if("function"!=typeof t)throw new TypeError(Di);return e=pr(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=Ti),i}}function Rt(e){if("function"!=typeof e)throw new TypeError(Di);return function(){return!e.apply(this,arguments)}}function Dt(e){return At(2,e)}function bt(e,t){if("function"!=typeof e)throw new TypeError(Di);return t=Kn(t===Ti?e.length-1:pr(t),0),function(){for(var i=arguments,n=-1,r=Kn(i.length-t,0),a=Array(r);++nt}function Lt(e){return Vt(e)&&bn.call(e,"callee")&&(!Bn.call(e,"callee")||Cn.call(e)==Vi)}function Pt(e){return null!=e&&Bt(rr(e))&&!Gt(e)}function Vt(e){return jt(e)&&Pt(e)}function kt(e){return e===!0||e===!1||jt(e)&&Cn.call(e)==xi}function xt(e){return jt(e)&&Cn.call(e)==Fi}function Ft(e){if(Pt(e)&&(dr(e)||Qt(e)||Gt(e.splice)||Lt(e)))return!e.length;for(var t in e)if(bn.call(e,t))return!1;return!0}function Mt(e,t){return ge(e,t)}function Ut(e){return"number"==typeof e&&jn(e)}function Gt(e){var t=zt(e)?Cn.call(e):"";return t==Ui||t==Gi}function Bt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pi}function zt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function jt(e){return!!e&&"object"==typeof e}function Ht(e){return qt(e)&&e!=+e}function Kt(e){return null!=e&&(Gt(e)?Ln.test(Dn.call(e)):jt(e)&&(y(e)?Ln:ln).test(e))}function Yt(e){return null===e}function qt(e){return"number"==typeof e||jt(e)&&Cn.call(e)==zi}function Wt(e){if(!jt(e)||Cn.call(e)!=ji||y(e))return!1;var t=Mn(e);if(null===t)return!0;var i=t.constructor;return"function"==typeof i&&i instanceof i&&Dn.call(i)==On}function Xt(e){return zt(e)&&Cn.call(e)==Hi}function Qt(e){return"string"==typeof e||!dr(e)&&jt(e)&&Cn.call(e)==Yi}function $t(e){return jt(e)&&Bt(e.length)&&!!fn[Cn.call(e)]}function Jt(e){return e===Ti}function Zt(e,t){return e"'`]/g,sn=RegExp(on.source),cn=/[\\^$.*+?()[\]{}|]/g,un=/\w*$/,ln=/^\[object .+?Constructor\]$/,dn=/^(?:0|[1-9]\d*)$/,fn={};fn[Qi]=fn[$i]=fn[Ji]=fn[Zi]=fn[en]=fn[tn]=fn[nn]=fn[rn]=fn[an]=!0,fn[Vi]=fn[ki]=fn[Xi]=fn[xi]=fn[Fi]=fn[Mi]=fn[Ui]=fn[Bi]=fn[zi]=fn[ji]=fn[Hi]=fn[Ki]=fn[Yi]=fn[Wi]=!1;var pn={};pn[Vi]=pn[ki]=pn[Xi]=pn[xi]=pn[Fi]=pn[Qi]=pn[$i]=pn[Ji]=pn[Zi]=pn[en]=pn[Bi]=pn[zi]=pn[ji]=pn[Hi]=pn[Ki]=pn[Yi]=pn[qi]=pn[tn]=pn[nn]=pn[rn]=pn[an]=!0,pn[Mi]=pn[Ui]=pn[Wi]=!1;var gn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},hn={"function":!0,object:!0},_n=hn[typeof t]&&t&&!t.nodeType?t:Ti,vn=hn[typeof e]&&e&&!e.nodeType?e:Ti,En=vn&&vn.exports===_n?_n:Ti,mn=v(_n&&vn&&"object"==typeof i&&i),In=v(hn[typeof self]&&self),yn=v(hn[typeof window]&&window),Sn=v(hn[typeof this]&&this),Tn=mn||yn!==(Sn&&Sn.window)&&yn||In||Sn||Function("return this")(),An=Array.prototype,Rn=Object.prototype,Dn=Function.prototype.toString,bn=Rn.hasOwnProperty,wn=0,On=Dn.call(Object),Cn=Rn.toString,Nn=Tn._,Ln=RegExp("^"+Dn.call(bn).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pn=En?Ti:Ti,Vn=Tn.Reflect,kn=Tn.Symbol,xn=Tn.Uint8Array,Fn=Vn?Vn.enumerate:Ti,Mn=Object.getPrototypeOf,Un=Object.getOwnPropertySymbols,Gn=Object.create,Bn=Rn.propertyIsEnumerable,zn=An.splice,jn=Tn.isFinite,Hn=Object.keys,Kn=Math.max,Yn=qe(Tn,"Map"),qn=qe(Tn,"Set"),Wn=qe(Tn,"WeakMap"),Xn=qe(Object,"create"),Qn=Yn?Dn.call(Yn):"",$n=qn?Dn.call(qn):"",Jn=Wn?Dn.call(Wn):"",Zn=kn?kn.prototype:Ti,er=Zn?Zn.valueOf:Ti,tr=Ge(fe),ir=Be();Fn&&!Bn.call({valueOf:1},"valueOf")&&(Ee=function(e){return T(Fn(e))});var nr=Fe,rr=Re("length"),ar=Un||function(){return[]};(Yn&&We(new Yn)!=Bi||qn&&We(new qn)!=Ki||Wn&&We(new Wn)!=Wi)&&(We=function(e){var t=Cn.call(e),i=t==ji?e.constructor:null,n="function"==typeof i?Dn.call(i):"";if(n)switch(n){case Qn:return Bi;case $n:return Ki;case Jn:return Wi}return t});var or=bt((function(e,t){return dr(e)||(e=null==e?[]:[Object(e)]),t=le(t,1),a(e,t)})),sr=bt((function(e,t,i){return je(e,wi|Oi,t,i)})),cr=bt((function(e,t){return oe(e,1,t)})),ur=bt((function(e,t,i){return oe(e,gr(t)||0,i)})),lr=bt((function(e,t){return je(e,Oi,Ti,t)})),dr=Array.isArray,fr=Pn?function(e){return e instanceof Pn}:gi(!1),pr=Number,gr=Number,hr=Ue((function(e,t){nr(t,oi(t),e)})),_r=Ue((function(e,t){nr(t,si(t),e)})),vr=Ue((function(e,t,i,n){Fe(t,si(t),e,n)})),Er=bt((function(e){return e.push(Ti,Z),vr.apply(Ti,e)})),mr=Ue((function(e,t,i){ye(e,t,i)})),Ir=bt((function(e,t){return null==e?{}:(t=me(le(t,1),String),Te(e,se(si(e),t)))})),yr=bt((function(e,t){return null==e?{}:Te(e,le(t,1))})),Sr=_e;b.prototype=ae(D.prototype),b.prototype.constructor=b,w.prototype=Xn?Xn(null):Rn,P.prototype.clear=V,P.prototype["delete"]=k,P.prototype.get=x,P.prototype.has=F,P.prototype.set=M,U.prototype.push=B,z.prototype.clear=j,z.prototype["delete"]=H,z.prototype.get=K,z.prototype.has=Y,z.prototype.set=q,D.assign=hr,D.assignIn=_r,D.before=At,D.bind=sr,D.chain=lt,D.compact=it,D.concat=or,D.create=ni,D.defaults=Er,D.defer=cr,D.delay=ur,D.filter=ht,D.flatten=rt,D.flattenDeep=at,D.iteratee=Sr,D.keys=oi,D.map=mt,D.mapValues=ci,D.matches=_i,D.merge=mr,D.mixin=vi,D.negate=Rt,D.omit=Ir,D.omitBy=ui,D.once=Dt,D.partial=lr,D.pick=yr,D.pickBy=li,D.slice=ut,D.sortBy=Tt,D.tap=dt,D.thru=ft,D.toArray=ei,D.values=fi,D.extend=_r,vi(D,D),D.clone=wt,D.cloneDeep=Ot,D.escape=pi,D.every=gt,D.find=_t,D.findIndex=nt,D.forEach=vt,D.forOwn=ri,D.has=ai,D.head=ot,D.identity=hi,D.includes=Et,D.indexOf=st,D.isArguments=Lt,D.isArray=dr,D.isBoolean=kt,D.isDate=xt,D.isEmpty=Ft,D.isEqual=Mt,D.isFinite=Ut,D.isFunction=Gt,D.isNaN=Ht,D.isNull=Yt,D.isNumber=qt,D.isObject=zt,D.isRegExp=Xt,D.isString=Qt,D.isUndefined=Jt,D.last=ct,D.max=yi,D.min=Si,D.noConflict=Ei,D.noop=mi,D.reduce=It,D.result=di,D.size=yt,D.some=St,D.uniqueId=Ii,D.each=vt,D.first=ot,vi(D,(function(){var e={};return fe(D,(function(t,i){bn.call(D.prototype,i)||(e[i]=t)})),e})(),{chain:!1}),D.VERSION=Ai,tr(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],(function(e){var t=(/^(?:replace|split)$/.test(e)?String.prototype:An)[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|join|replace|shift)$/.test(e);D.prototype[e]=function(){var e=arguments;return n&&!this.l?t.apply(this.value(),e):this[i]((function(i){return t.apply(i,e)}))}})),D.prototype.toJSON=D.prototype.valueOf=D.prototype.value=pt,(yn||In||{})._=D,_n&&vn&&(En&&((vn.exports=D)._=D),_n._=D)}).call(this)}).call(t,i(4)(e),(function(){return this})())}),(function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}),(function(e,t){t.generate=function e(t){return t?(t^16*Math.random()>>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}}),(function(e,t,i){var n=i(7),r=i(9),a=i(12).Promise,o=i(16),s=o.get("stores/async_request");t.makeAsyncRequest=function(e,t){var i=s.getPromise(e);if(i)return i;var o,c,u=new a(function(e,t){o=e,c=t});return r.dispatch(n.REGISTER_ASYNC_DEFERRED,{source:e,promise:u,resolver:o,rejecter:c}),t&&t(),u},t.resolveRequest=function(e,t){r.dispatch(n.RESOLVE_DEFERRED,{source:e,resolveWith:t})},t.rejectRequest=function(e,t){r.dispatch(n.REJECT_DEFERRED,{source:e,rejectWith:t})}}),(function(e,t,i){var n=i(8);e.exports=n({LOG:null,SET_LOGLEVEL:null,INITIALIZE_STATE:null,SET_DOMCONTENTLOADED:null,ACTIVATE:null,UPDATE_BEHAVIOR_STORE:null,DATA_LOADED:null,SET_CLIENT_NAME:null,SET_CLIENT_VERSION:null,LOAD_PERSISTED_LAYER_STATES:null,RECORD_GLOBAL_DECISION:null,RECORD_LAYER_DECISION:null,ENSURE_ORIGINAL_PUSHSTATE:null,ENSURE_ORIGINAL_REPLACESTATE:null,SET_VISITOR_ATTRIBUTES:null,SET_VISITOR_ATTRIBUTE_PENDING:null,LOAD_EXISTING_VISITOR_PROFILE:null,SET_VISITOR_EVENTS:null,SET_FOREIGN_VISITOR_EVENTS:null,SET_FOREIGN_VISITOR_EVENT_QUEUE:null,SET_VISITOR_ID:null,SET_VISITOR_ID_VIA_API:null,REFRESH_SESSION:null,LOAD_SESSION_STATE:null,UPDATE_VARIATION_ID_MAP:null,MERGE_VARIATION_ID_MAP:null,UPDATE_PREFERRED_LAYER_MAP:null,MERGE_PREFERRED_LAYER_MAP:null,RECORD_LAYER_DECISION_EVENT_ID:null,TRACK_VIEW_ACTIVATED_EVENT:null,REGISTER_ASYNC_DEFERRED:null,RESOLVE_DEFERRED:null,REJECT_DEFERRED:null,REGISTER_PLUGIN:null,ADD_CLEANUP_FN:null,CLEAR_CLEANUP_FN:null,ACTION_EXECUTED:null,REGISTER_ACTION:null,SET_VIEW_ACTIVE_STATE:null,UPDATE_PARSED_VIEW_METADATA:null,UPDATE_USER_SUPPLIED_METADATA:null,REGISTER_VIEWS:null,SET_GLOBAL_TAGS:null,SET_VIEW_BATCHING:null,RESET_VIEW_STATES:null,ATTACH_EVENT_STREAM_PUBLISHERS:null,DETACH_EVENT_STREAM_PUBLISHERS:null,LOAD_DIRECTIVE:null,SET_COOKIE_AGE:null,SET_COOKIE_DOMAIN:null,SET_COOKIE_AUTO_REFRESH:null,XDOMAIN_SET_DEFAULT_FRAME:null,XDOMAIN_ADD_FRAME:null,XDOMAIN_SET_MESSAGE:null,XDOMAIN_ADD_SUBSCRIBER:null,XDOMAIN_SET_CANONICAL_ORIGINS:null, +XDOMAIN_SET_DISABLED:null,ADD_EMITTER_HANDLER:null,REMOVE_EMITTER_HANDLER:null,SET_INTEGRATION_SETTINGS:null,ADD_CHANGE:null,SET_CHANGE_APPLIER:null,REMOVE_ACTION_STATE:null,ANNOUNCE_PENDING_REDIRECT:null,LOAD_REDIRECT_DATA:null,REGISTER_TRACKED_REDIRECT_DATA:null,SET_PENDING_EVENT:null,REMOVE_PENDING_EVENT:null,LOAD_PENDING_EVENTS:null,SANDBOXED_FUNCTIONS_ADDED:null,SET_RUM_DATA:null,RECORD_API_USAGE:null,INITIALIZE_CHANGE_METRICS:null,RECORD_ACTIVATION_TYPE_USAGE:null,RECORD_AUDIENCE_USAGE:null,RECORD_CHANGE_MACROTASK_RATE:null,RECORD_CHANGE_OVERHEATED:null,RECORD_CHANGE_TYPE_USAGE:null,RECORD_DOM_OBSERVATION_OCCURENCE:null,RECORD_INTEGRATION_USAGE:null,RECORD_LAYER_FEATURE_USAGE:null,RECORD_LAYER_POLICY_USAGE:null,RECORD_RECOMMENDATIONS_USAGE:null,RECORD_VIEW_FEATURE_USAGE:null,RECORD_VIEWS_INITIALLY_ACTIVATED_COUNT:null,RECORD_VISITOR_ID_LOCATOR_USAGE:null,RECORD_VISITOR_ID_ERROR:null,RECORD_STICKY_BUCKETING_FEATURE:null,SET_PERFORMANCE_MARKS_DATA:null,FINALIZE_BATCH_SNAPSHOT:null,REGISTER_PREVIOUS_BATCH:null,REGISTER_TRACKER_VISITOR:null,REGISTER_TRACKER_EVENT:null,REGISTER_TRACKER_DECISION:null,RESET_TRACKER_EVENTS:null,RESET_TRACKER_PREVIOUS_BATCHES:null,RESET_TRACKER_STORE:null,SET_TRACKER_POLLING:null,SET_TRACKER_BATCHING:null,SET_TRACKER_SEND_EVENTS:null,SET_TRACKER_PERSISTABLE_STATE:null,SET_TRACKER_DIRTY:null,UPDATE_TRACKER_VISITOR_ATTRIBUTES:null,SET_UA_DATA:null})}),(function(e,t){"use strict";var i=function(e){var t,i={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(i[t]=t);return i};e.exports=i}),(function(e,t,i){var n=i(10);e.exports=n.create()}),(function(e,t,i){function n(e){e=e||{},this.f={},this.g={},this.I=0,this.S=[],this.T=[]}function r(e,t){return function(){var i=e.indexOf(t);i!==-1&&e.splice(i,1)}}var a=i(2),o=i(11);n.prototype.registerStores=function(e){a.forOwn(e,a.bind((function(e,t){this.f[t]=new o(t,this,e)}),this))},n.prototype.getStore=function(e){return this.f[e]},n.prototype.dispatch=function(e,t){this.dispatchId++,a.each(this.S,a.bind((function(i){i.call(this,e,t)}),this)),a.forOwn(this.f,(function(i){i.A(e,t)})),a.each(this.T,a.bind((function(i){i.call(this,e,t)}),this)),a.forOwn(this.f,a.bind((function(e,t){e.hasChanges()&&this.g[t]&&(e.resetChange(),a.each(this.g[t],(function(t){t(e)})))}),this))},n.prototype.reset=function(){this.g={},a.forOwn(this.f,(function(e,t){e.R()}))},n.prototype.getState=function(){var e={};return a.forOwn(this.f,(function(t,i){e[i]=t.D()})),e},n.prototype.onPreAction=function(e){var t=this.S;return t.push(e),r(t,e)},n.prototype.onPostAction=function(e){var t=this.T;return t.push(e),r(t,e)},n.prototype.b=function(e,t){this.g[e]||(this.g[e]=[]),this.g[e].push(t);var i=this.g[e];return r(i,t)},e.exports={create:function(e){return new n(e)}}}),(function(e,t,i){function n(e,t,i){this.w=e,this.O=t,this.C=0,this.N=!1,this.L={},r.extend(this,i),this.P={},this.initialize&&this.initialize()}var r=i(2);n.prototype.A=function(e,t){var i=this.L[e];i&&"function"==typeof i&&i.call(this,t,e)},n.prototype.D=function(){return r.cloneDeep(this.P)},n.prototype.on=function(e,t){this.L[e]=r.bind(t,this)},n.prototype.observe=function(e){return this.O.b(this.w,e)},n.prototype.emitChange=function(){this.N=!0,this.C++},n.prototype.hasChanges=function(){return this.N},n.prototype.resetChange=function(){this.N=!1},n.prototype.getStateId=function(){return this.C},n.prototype.R=function(){this.reset&&"function"==typeof this.reset&&this.reset(),this.initialize()},e.exports=n}),(function(e,t,i){e.exports=i(13)}),(function(e,t,i){(function(t,n){/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version 4.1.0 + */ +!(function(t,i){e.exports=i()})(this,(function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function a(e){X=e}function o(e){Q=e}function s(){return function(){return t.nextTick(f)}}function c(){return"undefined"!=typeof W?function(){W(f)}:d()}function u(){var e=0,t=new Z(f),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function d(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e1)for(var i=1;i-1;case"regex":try{if(a&&r){var s=new RegExp(e);return s.test(String(i))}return!1}catch(e){}return!1;case"range":var c=e.split(":"),u=parseFloat(c[0]),l=parseFloat(c[1]),d=parseFloat(i);return d>=u&&d<=l;default:return!1}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22),o=i(23);e.exports={initialize:function(){this.P={actions:{},actionState:{}},this.on(r.DATA_LOADED,this.k),this.on(r.ACTION_EXECUTED,this.F),this.on(r.SET_CHANGE_APPLIER,this.M),this.on(r.REMOVE_ACTION_STATE,this.U)},k:function(e){var t=this;n.isEmpty(e.data.layers)||(n.each(e.data.layers,(function(e){var i;if(e.changes){var r="layerId:"+e.id;i={id:r,layerId:e.id,changeSet:e.changes,type:"layer"},a.deepFreeze(i),t.P.actions[r]=i}n.each(e.experiments,(function(r){if(r.changes){var o="experimentId:"+r.id;i={id:o,layerId:e.id,experimentId:r.id,changeSet:r.changes,type:"experiment"},a.deepFreeze(i),t.P.actions[o]=i}n.each(r.variations,(function(o){n.each(o.actions,(function(n){var s=n.pageId||n.viewId,c=r.id+":"+o.id+":"+s;i={id:c,layerId:e.id,experimentId:r.id,variationId:o.id,pageId:s,changeSet:n.changes,type:"variation"},a.deepFreeze(i),t.P.actions[c]=i}))}))}))})),this.emitChange())},F:function(e){var t=e.actionId;n.isUndefined(t)||this.P.actionState[t]||(this.P.actionState[t]={})},M:function(e){var t=e.actionId,i=e.changeId;return this.P.actionState[t]?void(this.P.actionState[t][i]=e.changeApplier):void o.warn("Action Data / Attempted to set changeApplier for inactive action: ",t)},U:function(e){delete this.P.actionState[e.actionId]},get:function(e){return a.safeReference(this.P.actions[e])},getActionState:function(e){return a.safeReference(this.P.actionState[e])},getByChangeId:function(e){return n.find(this.P.actions,{changeSet:[{id:e}]})},getAllActionIdsByPageId:function(e){return n.map(n.filter(this.P.actions,{pageId:e}),"id")},getChangeApplier:function(e,t){var i=this.P.actionState[t];if(i)return i[e]},getExperimentVariationActions:function(e,t){return a.safeReference(n.filter(this.P.actions,{experimentId:e,variationId:t}))},getLayerActions:function(e){return a.safeReference(n.filter(this.P.actions,{id:"layerId:"+e}))},getExperimentActions:function(e){return a.safeReference(n.filter(this.P.actions,{id:"experimentId:"+e}))},getAll:function(){return a.safeReference(n.values(this.P.actions))}}}),(function(e,t,i){var n=i(2),r=!1;t.deepFreeze=function e(t){r&&n.isObject(t)&&!n.isFunction(t)&&(n.forOwn(t,e),Object.freeze(t))},t.safeReference=function e(t){return r?!n.isObject(t)||n.isFunction(t)||Object.isFrozen(t)?t:n.isArray(t)?n.map(t,e):n.reduce(t,(function(t,i,n){return t[n]=e(i),t}),{}):n.cloneDeep(t)}}),(function(e,t,i){function n(){this.logLevel=null,this.logMatch=null,this.logs=[],this.timebase=o.now()}var r=i(2),a=i(7),o=i(24),s=i(25),c=i(9),u=i(26);n.prototype.G=function(){return!r.isNull(this.logLevel)},n.prototype.setLogLevel=function(e){var t=this.B(e);null===t?console.error("Unknown log level: "+e):this.logLevel!==t&&(this.log("Setting log level to "+t),this.logLevel=t,this.flush())},n.prototype.setLogMatcher=function(e){r.isString(e)?this.logMatcher=e:this.logMatcher="",this.logGroup=0},n.prototype.shouldLog=function(e){return this.G()&&this.logLevel>=e},n.prototype.matchesLogMessage=function(e,t){var i=this.logMatcher;if(!this.logMatcher)return!0;if(this.logGroup)return"GROUPSTART"===e?this.logGroup++:"GROUPEND"===e&&this.logGroup--,!0;var n=r.some(t,(function(e){if(!r.isString(e))try{e=u.stringify(e)}catch(e){}return r.isString(e)&&r.includes(e,i)}));return n&&"GROUPSTART"===e&&this.logGroup++,n},n.prototype.storeLog=function(e,t){var i={logLevel:e,logMessage:t};c.dispatch(a.LOG,i)},n.prototype.flush=function(){var e=i(16),t=e.get("stores/log");this.logGroup=0;var n=t.getLogs();r.each(n,r.bind((function(e){this.z(e.logLevel,e.logMessage,!0)}),this))},n.prototype.z=function(e,t,i){var n,a=e;if(console)switch(e){case"GROUPSTART":n=console.groupCollapsed,a=s.LogLevel.DEBUG;break;case"GROUPEND":n=console.groupEnd,a=s.LogLevel.DEBUG;break;case s.LogLevel.ERROR:n=console.error;break;case s.LogLevel.WARN:n=console.warn;break;case s.LogLevel.DEBUG:n=console.debug;break;default:n=console.log}try{i||this.G()&&!this.shouldLog(a)||(r.isArray(t)&&r.isString(t[0])&&(t=this.j(t)),this.storeLog(e,t)),n&&this.shouldLog(a)&&this.matchesLogMessage(e,t)&&n.apply(console,t)}catch(e){console&&(console.error?console.error(e):console.log(e))}},n.prototype.debug=function(){this.z(s.LogLevel.DEBUG,[].slice.call(arguments))},n.prototype.log=function(){this.z(s.LogLevel.INFO,[].slice.call(arguments))},n.prototype.logAlways=function(){var e=this.j([].slice.call(arguments));console&&console.log&&console.log.apply&&console.log.apply(console,e),this.storeLog(s.LogLevel.INFO,e)},n.prototype.warn=function(){this.z(s.LogLevel.WARN,[].slice.call(arguments))},n.prototype.error=function(e){var t=[].slice.call(arguments);1===t.length&&e.stack?(this.z(s.LogLevel.ERROR,[this.H(),e]),this.z(s.LogLevel.INFO,[e.stack])):this.z(s.LogLevel.ERROR,t)},n.prototype.groupCollapsed=function(){this.z("GROUPSTART",[].slice.call(arguments))},n.prototype.groupEnd=function(){this.z("GROUPEND",[].slice.call(arguments))},n.prototype.j=function(e){var t=this.H().toString();return t.length<6&&(t=(" "+t).slice(-6)),[t+"| Optly / "+e[0]].concat(e.slice(1))},n.prototype.H=function(){return this.timebase?o.now()-this.timebase:0},n.prototype.B=function(e){return e&&(e=e.toUpperCase(),"TRUE"===e&&(e="INFO"),"FALSE"===e&&(e="OFF"),"ALL"===e&&(e="DEBUG"),!r.isUndefined(s.LogLevel[e]))?s.LogLevel[e]:null},e.exports=new n}),(function(e,t){t.now=function(){return+new Date}}),(function(e,t,i){var n=i(2),r=i(8);t.COOKIES={OPT_OUT:"optimizelyOptOut",PREVIEW:"optimizelyPreview",REDIRECT:"optimizelyRedirectData",SESSION_STATE:"optimizelySessionState",TOKEN:"optimizelyToken",VISITOR_ID:"optimizelyEndUserId",VISITOR_UUID:"optimizelyPPID"},t.LayerActivationTypes={CONDITIONAL:"conditional",IMMEDIATE:"immediate",MANUAL:"manual",READY:"ready",TIMEOUT:"timeout"},t.LogLevel={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4},t.Lifecycle=r({preActivate:null,postVisitorProfileLoad:null,postViewsActivated:null,postActivate:null}),t.ViewActivationTypes={immediate:"immediate",manual:"manual",callback:"callback",polling:"polling",URLChanged:"url_changed",DOMChanged:"dom_changed"},t.StorageKeys={PENDING_EVENTS:"pending_events",RELAYED_EVENTS:"relayed_events"},t.PluginTypes=r({visitorProfileProviders:null,viewProviders:null,audienceMatchers:null,viewMatchers:null,analyticsTrackers:null,viewTagLocators:null,userFeatureDefs:null,apiModules:null,changeAppliers:null,deciders:null,eventImplementations:null,viewTriggers:null}),t.ResourceTimingAttributes=r({connectStart:null,connectEnd:null,decodedBodySize:null,domainLookupStart:null,domainLookupEnd:null,duration:null,encodedBodySize:null,fetchStart:null,requestStart:null,responseStart:null,responseEnd:null,secureConnectionStart:null,startTime:null,transferSize:null,serverTiming:null}),t.RUMPerformanceTimingAttributes=r({blockTime:null}),t.AttributionTypes=r({FIRST_TOUCH:null,LAST_TOUCH:null}),t.SandboxedFunctions=r({XMLHttpRequest:null}),t.PerformanceData=r({performance_marks:null,resource_timing:null,performance_timing:null}),t.PerformanceCounters=r({mutation_observer_invocation:null,polling_invocation:null,match_selector_invocation:null}),t.VisitorStorageKeys={EVENTS:"events",EVENT_QUEUE:"event_queue",LAYER_MAP:"layer_map",LAYER_STATES:"layer_states",SESSION_STATE:"session_state",VISITOR_PROFILE:"visitor_profile",VARIATION_MAP:"variation_map",TRACKER_OPTIMIZELY:"tracker_optimizely"},t.AllStorageKeys=n.assign({},t.StorageKeys,t.VisitorStorageKeys),t.ListTargetingKeyTypes={COOKIE:"c",QUERY:"q",JS_VARIABLE:"j"},t.VisitorIdLocatorType={COOKIE:"cookie",JS_VARIABLE:"js",LOCALSTORAGE:"localStorage",QUERY:"query"}}),(function(e,t,i){function n(e){var t=[Array.prototype],i=[];r.each(t,(function(e){r.isUndefined(e.toJSON)||(i.push(e.toJSON),delete e.toJSON)}));var n,a;try{n=e()}catch(e){a=e}finally{r.each(i,(function(e,i){t[i].toJSON=e}))}if(a)throw a;return n}var r=i(2);t.stringify=function(){return n(r.bind((function(){return JSON.stringify.apply(null,this)}),arguments))},t.parse=JSON.parse}),(function(e,t,i){var n=i(7);e.exports={initialize:function(){this.P={},this.on(n.REGISTER_ASYNC_DEFERRED,this.K),this.on(n.RESOLVE_DEFERRED,this.Y),this.on(n.REJECT_DEFERRED,this.q)},getRequest:function(e){return this.P[e]},getPromise:function(e){var t=this.getRequest(e);if(t)return t.promise},K:function(e){this.P[e.source]={promise:e.promise,resolver:e.resolver,rejecter:e.rejecter}},Y:function(e){var t=this.getRequest(e.source);if(!t)throw new Error("No request registered for source: "+e.source);t.resolver(e.resolveWith)},q:function(e){var t=this.getRequest(e.source);if(!t)throw new Error("No request registered for source: "+e.source);if(!t.rejecter)throw new Error("No rejecter registered for source: "+e.source);t.rejecter(e.rejectWith)}}}),(function(e,t,i){function n(e,t){return t||(t={}),e?(r.each(e,(function(e){if(!r.isString(e)){if(r.isObject(e)){var i=e.type,a=e.name||"_";t[i]||(t[i]={}),t[i][a]=!0}r.isArray(e)&&n(e,t)}})),t):t}var r=i(2),a=i(7),o=i(22);e.exports={initialize:function(){this.P={audiences:{},featuresNeeded:{}},this.on(a.DATA_LOADED,this.k)},k:function(e){r.isEmpty(e.data.audiences)||(r.each(e.data.audiences,r.bind((function(e){o.deepFreeze(e),r.merge(this.P.featuresNeeded,n(e.conditions)),this.P.audiences[e.id]=e}),this)),this.emitChange())},getAll:function(){return o.safeReference(r.values(this.P.audiences))},getFeaturesNeeded:function(e){return o.safeReference(this.P.featuresNeeded[e]||{})},getAudiencesMap:function(){return o.safeReference(this.P.audiences)},get:function(e){return o.safeReference(this.P.audiences[e])},getAudienceName:function(e){var t=r.find(r.values(this.P.audiences),{id:e});return t.name||"Aud "+e}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={},this.on(r.ADD_CHANGE,this.W),this.on(r.DATA_LOADED,this.k)},getChange:function(e){return this.P[e]},k:function(e){n.isEmpty(e.data.changes)||n.each(e.data.changes,n.bind(this.W,this))},W:function(e){a.deepFreeze(e),this.P[e.id]=e,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(25);e.exports={initialize:function(){this.P={},n.each(a.Lifecycle,n.bind((function(e){this.P[e]=[]}),this)),this.on(r.ADD_CLEANUP_FN,this.X),this.on(r.CLEAR_CLEANUP_FN,this.Q)},getCleanupFns:function(e){return n.cloneDeep(this.P[e])},X:function(e){this.P[e.lifecycle].push(e.cleanupFn),this.emitChange()},Q:function(e){var t=this.P[e.lifecycle];if(e.cleanupFn){var i=t.indexOf(e.cleanupFn);i>-1&&(t.splice(i,1),this.emitChange())}else this.P[e.lifecycle]=[],this.emitChange()}}}),(function(e,t,i){var n=i(7),r=i(32);e.exports={initialize:function(){this.P={name:r.NAME,version:r.VERSION},this.on(n.SET_CLIENT_NAME,this.$),this.on(n.SET_CLIENT_VERSION,this.J)},getClientName:function(){return this.P.name},getClientVersion:function(){return this.P.version},$:function(e){e&&(this.P.name=e),this.emitChange()},J:function(e){e&&(this.P.version=e),this.emitChange()}}}),(function(e,t,i){t.VERSION="0.163.0",t.NAME="js"}),(function(e,t,i){var n=i(7),r=15552e3,a=!0;e.exports={initialize:function(){this.P={currentDomain:null,defaultAgeSeconds:r,autoRefresh:a},this.on(n.SET_COOKIE_DOMAIN,this.Z),this.on(n.SET_COOKIE_AGE,this.ee),this.on(n.SET_COOKIE_AUTO_REFRESH,this.te)},getCurrentDomain:function(){return this.P.currentDomain},getDefaultAgeInSeconds:function(){return this.P.defaultAgeSeconds},getAutoRefresh:function(){return this.P.autoRefresh},Z:function(e){this.P.currentDomain=e,this.emitChange()},ee:function(e){this.P.defaultAgeSeconds=e,this.emitChange()},te:function(e){this.P.autoRefresh=e,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={},this.on(r.DATA_LOADED,this.k)},getAll:function(){return a.safeReference(n.values(this.P))},getEventsMap:function(){return a.safeReference(this.P)},get:function(e){return a.safeReference(this.P[e])},getByApiName:function(e){return a.safeReference(n.find(n.values(this.P),{apiName:e}))},getByPageId:function(e){return a.safeReference(n.filter(this.P,{pageId:e}))},k:function(e){n.isEmpty(e.data.events)||(n.each(e.data.events,n.bind((function(e){e.pageId||(e.pageId=e.viewId),a.deepFreeze(e),this.P[e.id]=e}),this)),this.emitChange())}}}),(function(e,t,i){function n(e){var t=[];return e&&r.isObject(e)?(e.type&&t.push(e.type),t.push(o),e.type&&e.name&&t.push(e.name),t.join("")):o}var r=i(2),a=i(7),o="|";e.exports={initialize:function(){this.P={handlers:{}},this.on(a.ADD_EMITTER_HANDLER,this.ne),this.on(a.REMOVE_EMITTER_HANDLER,this.re)},getHandlers:function(e,t){var i=[null,{type:e.type},{type:e.type,name:e.name}],a=[];return r.each(i,r.bind((function(e){var t=n(e),i=this.P.handlers[t];i&&(a=a.concat(i))}),this)),t&&(a=r.filter(a,(function(e){return!e.publicOnly}))),a},ne:function(e){var t=n(e.filter);this.P.handlers[t]||(this.P.handlers[t]=[]),this.P.handlers[t].push({handler:e.handler,token:e.token,publicOnly:!!e.publicOnly,emitErrors:!!e.emitErrors}),this.emitChange()},re:function(e){var t=!1,i=e.token;r.forOwn(this.P.handlers,r.bind((function(e,n){var a=r.filter(e,(function(e){return e.token!==i}));a.length!==e.length&&(t=!0,this.P.handlers[n]=a)}),this)),t&&this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={},this.on(r.DATA_LOADED,this.k)},k:function(e){n.isEmpty(e.data.dimensions)||(n.each(e.data.dimensions,n.bind((function(e){a.deepFreeze(e),this.P[e.id]=e}),this)),this.emitChange())},getAll:function(){return a.safeReference(n.values(this.P))},getById:function(e){return a.safeReference(this.P[e])},getByApiName:function(e){return a.safeReference(n.find(n.values(this.P),{apiName:e}))}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={disabled:!1,forceAudienceIds:[],forceVariationIds:[],alreadyInitialized:!1,mutationObserverAPISupported:!1,isEditor:!1,isPreview:!1,isLegacyPreview:!1,isSlave:!1,previewLayerIds:[],projectToken:null,shouldOptOut:!1,trackingDisabled:!1,isRunningInV2Editor:!1,isRunningInDesktopApp:!1,forceTracking:!1},this.on(r.LOAD_DIRECTIVE,this.ae)},getAll:function(){return n.cloneDeep(this.P)},conflictInObservingChanges:function(){return!this.P.mutationObserverAPISupported},isDisabled:function(){return this.P.disabled},isEditor:function(){return this.P.isEditor},clientHasAlreadyInitialized:function(){return this.P.alreadyInitialized},getForceAudienceIds:function(){return this.P.forceAudienceIds},getForceVariationIds:function(){return this.P.forceVariationIds},getPreviewLayerIds:function(){return this.P.previewLayerIds},getProjectToken:function(){return this.P.projectToken},getForceTracking:function(){return this.P.forceTracking},shouldActivate:function(){return!this.P.isEditor&&!this.isDisabled()},shouldBootstrapDataForPreview:function(){return this.P.isPreview},shouldBootstrapDataForEditor:function(){return this.P.isEditor},shouldInitialize:function(){return!(this.shouldLoadPreview()||this.isDisabled()||this.getProjectToken())},shouldLoadPreview:function(){return!(this.P.isPreview||this.P.isLegacyPreview||!this.getProjectToken()||this.P.isEditor)},shouldBailForDesktopApp:function(){return!this.P.isEditor&&this.P.isRunningInDesktopApp},shouldLoadInnie:function(){return!this.P.isSlave&&!this.P.isEditor&&this.P.isRunningInV2Editor},shouldObserveChangesIndefinitely:function(){return this.P.mutationObserverAPISupported},shouldObserveChangesUntilTimeout:function(){return!this.shouldObserveChangesIndefinitely()},shouldOptOut:function(){return this.P.shouldOptOut},shouldSendTrackingData:function(){return!this.P.trackingDisabled&&(!!this.P.forceTracking||!this.P.isPreview&&n.isEmpty(this.getForceVariationIds())&&n.isEmpty(this.getForceAudienceIds()))},isSlave:function(){return this.P.isSlave},isRunningInDesktopApp:function(){return this.P.isRunningInDesktopApp},isRunningInV2Editor:function(){return this.P.isRunningInV2Editor},ae:function(e){n.extend(this.P,e),this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={holdback:0,isGlobalHoldback:null,listTargetingKeys:[],revision:null,projectId:null,accountId:null,namespace:null,activationId:null,activationTimestamp:null,dcpServiceId:null,dcpKeyfieldLocators:[],recommenderServices:[],anonymizeIP:null,projectJS:null,snippetId:null,plugins:[],domContentLoaded:!1,experimental:{}},this.on(r.DATA_LOADED,this.oe),this.on(r.ACTIVATE,this.se),this.on(r.RECORD_GLOBAL_DECISION,this.ce),this.on(r.SET_DOMCONTENTLOADED,this.ue)},getRevision:function(){return this.P.revision},getGlobalHoldbackThreshold:function(){return this.P.holdback},getProjectId:function(){return this.P.projectId},getSnippetId:function(){return this.P.snippetId},getAccountId:function(){return this.P.accountId},getNamespace:function(){return this.P.namespace},getActivationId:function(){return this.P.activationId},getActivationTimestamp:function(){return this.P.activationTimestamp},getAnonymizeIP:function(){return this.P.anonymizeIP},isGlobalHoldback:function(){return!!this.P.isGlobalHoldback},getListTargetingKeys:function(){return this.P.listTargetingKeys.slice()},getDCPServiceId:function(){return this.P.dcpServiceId},getDCPKeyfieldLocators:function(){return this.P.dcpKeyfieldLocators},getRecommenderServices:function(){return this.P.recommenderServices},getProjectJS:function(){return this.P.projectJS},getPlugins:function(){return this.P.plugins},getExperimental:function(){return a.safeReference(this.P.experimental)},domContentLoadedHasFired:function(){return this.P.domContentLoaded},se:function(e){this.P.activationId=e.activationId,this.P.activationTimestamp=e.activationTimestamp,this.P.isGlobalHoldback=null},ce:function(e){var t=e.isGlobalHoldback;if(null!==this.P.isGlobalHoldback&&this.P.isGlobalHoldback!==t)throw new Error("Attempted to change already set global holdback!");this.P.isGlobalHoldback=t,this.emitChange()},oe:function(e){var t=n.pick(e.data,["holdback","accountId","projectId","snippetId","namespace","revision","listTargetingKeys","dcpServiceId","dcpKeyfieldLocators","recommenderServices","anonymizeIP","plugins","projectJS","experimental"]);if(0!==n.keys(t).length){var i={listTargetingKeys:[],dcpServiceId:null,dcpKeyfieldLocators:[]};n.extend(this.P,i,t),this.emitChange()}},ue:function(){this.P.domContentLoaded=!0,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(40);e.exports={initialize:function(){this.P={originalPushState:null,originalReplaceState:null},this.on(r.ENSURE_ORIGINAL_PUSHSTATE,this.le),this.on(r.ENSURE_ORIGINAL_REPLACESTATE,this.de)},getOriginalPushState:function(){return this.P.originalPushState},getOriginalReplaceState:function(){return this.P.originalReplaceState},le:function(){this.P.originalPushState||(this.P.originalPushState=n.bind(a.getGlobal("history").pushState,a.getGlobal("history")))},de:function(){this.P.originalReplaceState||(this.P.originalReplaceState=n.bind(a.getGlobal("history").replaceState,a.getGlobal("history")))}}}),(function(e,t,i){var n=i(2),r=i(23);t.getUserAgent=function(){return window.navigator.userAgent},t.getLocationSearch=function(){return window.location.search},t.getNavigatorLanguage=function(){return window.navigator.language||window.navigator.userLanguage},t.getHref=function(){return window.location.href},t.getLocation=function(){return window.location},t.setLocation=function(e){window.location.replace(e)},t.setGlobal=function(e,t){window[e]=t},t.getGlobal=function(e){return window[e]},t.getGlobalByPath=function(e){for(var t=e.split("."),i=window;t.length;)try{i=i[t.shift()]}catch(t){throw r.error("Attempted to access nonexistent property. Path ",e),new Error("Attempted to access nonexistent property. Path ",e)}return i},t.addEventListener=function(){return window.addEventListener.apply(window,arguments)},t.removeEventListener=function(){return window.removeEventListener.apply(window,arguments)},t.isMutationObserverAPISupported=function(){return!n.isUndefined(window.MutationObserver)},t.alert=function(e){alert(e)},t.setTimeout=function(e,t){return setTimeout((function(){try{e()}catch(e){r.warn("Deferred function threw error:",e)}}),t)},t.setInterval=function(e,t){return setInterval((function(){try{e()}catch(e){r.warn("Polling function threw error:",e)}}),t)}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={},this.on(r.DATA_LOADED,this.k),this.on(r.SET_INTEGRATION_SETTINGS,this.fe)},k:function(e){n.isEmpty(e.data.integrationSettings)||(n.each(e.data.integrationSettings,n.bind((function(e){this.P[e.id]=e}),this)),this.emitChange())},fe:function(e){var t=this.P[e.id];t?n.extend(t,e):this.P[e.id]=e},getAll:function(){return n.cloneDeep(n.values(this.P))},get:function(e){return n.cloneDeep(this.P[e])},getReference:function(e){return this.P[e]}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(23),o="*";e.exports={initialize:function(){this.P={},this.on(r.LOAD_PERSISTED_LAYER_STATES,this.pe),this.on(r.RECORD_LAYER_DECISION,this.ge),this.on(r.RECORD_LAYER_DECISION_EVENT_ID,this.he)},getLayerState:function(e,t){if(this.P[e]){var i=this.P[e];if(n.keys(i).length>1&&!t)throw new Error("View Id must be specified when more than one layerState for layer.");return t?n.cloneDeep(n.find(i,{pageId:t})):n.cloneDeep(i[o])}},getLayerStates:function(e){var t=[];for(var i in this.P)n.forEach(this.P[i],(function(i){(n.isUndefined(e)||i.namespace===e)&&t.push(n.cloneDeep(i))}));return t},getLayerStatesForAnalytics:function(){var e=[];for(var t in this.P)n.forEach(this.P[t],(function(t){e.push(n.pick(t,["layerId","decision","decisionEventId"]))}));return e},pe:function(e){e.merge||(this.P={}), +n.each(e.layerStates,n.bind((function(e){var t=e.layerId;e.pageId||(e.pageId=e.viewId);var i=e.pageId||o,r=this.P[t];if(n.isUndefined(r))this.P[t]={},this.P[t][i]=e;else{var a=r[i];(!a||e.decisionTimestamp>(a.decisionTimestamp||0))&&(this.P[t][i]=e)}}),this)),this.emitChange()},ge:function(e){var t={layerId:e.layerId,revision:e.revision,namespace:e.namespace,pageId:e.pageId,decisionTicket:e.decisionTicket,decision:e.decision,decisionActivationId:e.activationId,decisionTimestamp:e.timestamp,decisionEventId:null},i=this.P[e.layerId]||{};e.pageId?(delete i[o],i[e.pageId]=t):(i={},i[o]=t),this.P[e.layerId]=i,this.emitChange()},he:function(e){var t=e.layerId,i=e.pageId||o;return this.P[t]?this.P[t][i]?(this.P[t][i].decisionEventId=e.decisionId,void this.emitChange()):void a.warn("Not recording decision event: Layer state not found for view",i):void a.warn("Not recording decision event: Campaign not registered",t)}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22),o=i(44);e.exports={initialize:function(){this.P={layers:{},experiments:{},variations:{}},this.on(r.DATA_LOADED,this.k)},k:function(e){if(!n.isEmpty(e.data.layers)){var t=this;n.each(e.data.layers,(function(e){n.each(e.experiments,(function(i){e.pageIds||(e.pageIds=e.viewIds),i.campaignName||o.isSingleExperimentPolicy(e.policy)?o.isSingleExperimentPolicy(e.policy)&&e.groupId&&(i.groupId=e.groupId):i.campaignName=e.name,n.each(i.variations,(function(e){n.each(e.actions,(function(e){e.pageId||(e.pageId=e.viewId)})),t.P.variations[e.id]=e})),t.P.experiments[i.id]=i})),a.deepFreeze(e),t.P.layers[e.id]=e})),this.emitChange()}},getAll:function(){return a.safeReference(n.values(this.P.layers))},getCampaignsMap:function(){return a.safeReference(this.P.layers)},getExperimentsMap:function(){return a.safeReference(this.P.experiments)},getVariationsMap:function(){return a.safeReference(this.P.variations)},getCount:function(){return n.keys(this.P.layers).length},getAllByPageIds:function(e){return a.safeReference(n.filter(this.P.layers,(function(t){return n.some(e,n.partial(n.includes,t.pageIds))})))},get:function(e){return a.safeReference(this.P.layers[e])},getLayerByExperimentId:function(e){var t=n.find(this.P.layers,(function(t){return n.find(t.experiments,{id:e})}));return a.safeReference(t)},getExperimentByVariationId:function(e){var t;return n.some(this.P.layers,(function(i){return n.some(i.experiments,(function(i){return n.find(i.variations,{id:e})&&(t=i),t})),t})),a.safeReference(t)}}}),(function(e,t){var i="single_experiment",n="multivariate";t.isSingleExperimentPolicy=function(e){return e===i||e===n}}),(function(e,t,i){var n=i(7);e.exports={initialize:function(){this.P={logs:[]},this.on(n.LOG,this._e)},getLogs:function(){return this.P.logs},_e:function(e){this.P.logs.push(e),this.emitChange()},D:function(){return this.P.logs.slice()}}}),(function(e,t,i){var n=i(7),r=i(22);e.exports={initialize:function(){this.P={data:null,hasTracked:null},this.on(n.LOAD_REDIRECT_DATA,this.ve),this.on(n.REGISTER_TRACKED_REDIRECT_DATA,this.Ee)},get:function(){return r.safeReference(this.P.data)},hasTracked:function(){return this.P.hasTracked},ve:function(e){r.deepFreeze(e),this.P.data=e,this.P.hasTracked=!1,this.emitChange()},Ee:function(){this.P.hasTracked=!0}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(26),o=1e3;e.exports={initialize:function(){this.P={},this.on(r.SET_PENDING_EVENT,this.me),this.on(r.REMOVE_PENDING_EVENT,this.Ie),this.on(r.LOAD_PENDING_EVENTS,this.ye)},getEvents:function(){return this.P},getEventsString:function(){return a.stringify(this.P)},me:function(e){n.keys(this.P).length>=o&&this.Se();var t=e.id,i=e.retryCount;this.P[t]&&this.P[t].retryCount===i||(this.P[t]={id:t,timeStamp:e.timeStamp,data:e.data,retryCount:i},this.emitChange())},Ie:function(e){delete this.P[e.id],this.emitChange()},ye:function(e){this.P=e.events,this.Se(),this.emitChange()},Se:function(){for(var e=n.sortBy(this.P,"timeStamp"),t=0;t<=e.length-o;t++)delete this.P[e[t].id];this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(25);e.exports={initialize:function(){this.P={},this.P[a.PerformanceData.performance_marks]={},this.on(r.SET_PERFORMANCE_MARKS_DATA,this.Te)},Te:function(e){n.isUndefined(this.P[a.PerformanceData.performance_marks][e.name])&&(this.P[a.PerformanceData.performance_marks][e.name]=[]),this.P[a.PerformanceData.performance_marks][e.name].push(e.data),this.emitChange()},getMarks:function(){return n.mapValues(this.P[a.PerformanceData.performance_marks],(function(e){return n.map(e,(function(e){return[e.startTime,e.duration]}))}))},getDurationsFor:function(e){return n.reduce(e,n.bind((function(e,t){var i=this.P[a.PerformanceData.performance_marks][t];return i&&(e[t]=Math.round(n.reduce(i,(function(e,t){return e+t.duration}),0))),e}),this),{})}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(25),o=i(23);e.exports={initialize:function(){this.P=n.mapValues(a.PluginTypes,(function(){return{}})),this.on(r.REGISTER_PLUGIN,this.Ae)},Ae:function(e){var t=e.type,i=e.name,n=e.plugin;if(!t||!i)throw new Error("Missing information needed to register plugins: "+t+":"+i);if(!this.P[t])throw new Error("Invalid plugin type specified: "+t);this.P[t][i]=n,o.debug("Plugin Store: Registering Plugin :",e)},getAllPlugins:function(e){if(e){if(this.P[e])return this.P[e];throw new Error("Invalid plugin type: "+e)}return this.P},getPlugin:function(e,t){if(!t||!e)throw new Error("Missing plugin parameters");var i=this.getAllPlugins(e);return i[t]||null}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(19);e.exports={initialize:function(){this.P={},this.on(r.SET_VISITOR_ATTRIBUTE_PENDING,this.Re)},getPendingAttributeValue:function(e){return e=n.isArray(e)?e.concat("pending"):[e,"pending"],a.getFieldValue(this.P,e)},Re:function(e){a.setFieldValue(this.P,e.key,{pending:e.pending}),this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={layerId:null},this.on(r.ANNOUNCE_PENDING_REDIRECT,this.ve)},isExpectingRedirect:function(){return n.isString(this.P.layerId)},getLayerId:function(){return this.P.layerId},ve:function(e){this.isExpectingRedirect()||(this.P.layerId=e.layerId,this.emitChange())}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={inRumSample:!1,id:null,src:null,RumHost:null,data:{extras:{}},apis:{},DOMObservation:{},featuresNeeded:{}},this.on(r.SET_RUM_DATA,this.De),this.on(r.RECORD_API_USAGE,this.be),this.on(r.INITIALIZE_CHANGE_METRICS,this.we),this.on(r.RECORD_ACTIVATION_TYPE_USAGE,this.Oe),this.on(r.RECORD_AUDIENCE_USAGE,this.Ce),this.on(r.RECORD_CHANGE_MACROTASK_RATE,this.Ne),this.on(r.RECORD_CHANGE_OVERHEATED,this.Le),this.on(r.RECORD_CHANGE_TYPE_USAGE,this.Pe),this.on(r.RECORD_DOM_OBSERVATION_OCCURENCE,this.Ve),this.on(r.RECORD_INTEGRATION_USAGE,this.ke),this.on(r.RECORD_LAYER_FEATURE_USAGE,this.xe),this.on(r.RECORD_LAYER_POLICY_USAGE,this.Fe),this.on(r.RECORD_VIEW_FEATURE_USAGE,this.Me),this.on(r.RECORD_VIEWS_INITIALLY_ACTIVATED_COUNT,this.Ue),this.on(r.RECORD_VISITOR_ID_LOCATOR_USAGE,this.Ge),this.on(r.RECORD_VISITOR_ID_ERROR,this.Be),this.on(r.RECORD_STICKY_BUCKETING_FEATURE,this.ze)},De:function(e){n.merge(this.P,e),this.emitChange()},be:function(e){this.P.apis[e.methodName]||(this.P.apis[e.methodName]=0),this.P.apis[e.methodName]++,this.emitChange()},we:function(){n.isUndefined(this.P.data.extras.changeMacrotaskRate)&&(this.P.data.extras.changeMacrotaskRate=0),n.isUndefined(this.P.data.extras.numOverheatedChanges)&&(this.P.data.extras.numOverheatedChanges=0)},Ne:function(e){n.isUndefined(this.P.data.extras.changeMacrotaskRate)&&(this.P.data.extras.changeMacrotaskRate=0),e.changeMacrotaskRate>this.P.data.extras.changeMacrotaskRate&&(this.P.data.extras.changeMacrotaskRate=e.changeMacrotaskRate),this.emitChange()},Le:function(){n.isUndefined(this.P.data.extras.numOverheatedChanges)&&(this.P.data.extras.numOverheatedChanges=0),this.P.data.extras.numOverheatedChanges++,this.emitChange()},Ve:function(e){this.P.DOMObservation[e.counterName]||(this.P.DOMObservation[e.counterName]=0),this.P.DOMObservation[e.counterName]++,this.emitChange()},je:function(e,t,i){n.isUndefined(this.P.featuresNeeded[e])&&(this.P.featuresNeeded[e]={});var r=this.P.featuresNeeded[e];n.each(t,(function(e){r[e]||(r[e]={}),r[e][i]||(r[e][i]=!0)}))},ke:function(e){this.je("integrations",e.integrations,e.layerId)},Pe:function(e){this.je("changeTypes",e.changeTypes,e.layerId)},Oe:function(e){this.je("activationTypes",[e.activationType],e.entityId),this.emitChange()},Me:function(e){this.je("viewFeatures",e.featuresUsed,e.entityId),this.emitChange()},xe:function(e){this.je("layerFeatures",[e.feature],e.entityId),this.emitChange()},Fe:function(e){this.je("policy",[e.policy],e.layerId),this.emitChange()},Ce:function(e){this.je("audiences",e.audienceTypes,e.layerId),this.emitChange()},Ue:function(e){this.P.data.extras.viewsInitiallyActivatedCount=e.viewsInitiallyActivatedCount,this.emitChange()},Ge:function(e){this.je("visitorIdLocatorType",[e.visitorIdLocatorType],e.entityId),this.emitChange()},Be:function(e){this.P.data.extras.errorCustomVisitorId=e.isError,this.emitChange()},ze:function(e){this.je("stickyBucketing",[e.feature],e.id)},getSampleRum:function(){return this.P.inRumSample},getRumId:function(){return this.P.id},getRumHost:function(){return this.P.RumHost},getApiData:function(){return this.P.apis},getDOMObservationData:function(){return this.P.DOMObservation},getRumData:function(){return n.cloneDeep(this.P.data)},getScriptSrc:function(){return this.P.src},getFeaturesNeededData:function(){var e=this.P.featuresNeeded,t={};return n.forOwn(e,(function(e,i){var r=n.keys(e);n.isEmpty(r)||(t[i]={}),n.forEach(r,(function(r){t[i][r]=n.keys(e[r]).length}))})),t}}}),(function(e,t,i){var n=i(7);e.exports={initialize:function(){this.P={initialized:!1,natives:{}},this.on(n.SANDBOXED_FUNCTIONS_ADDED,this.He)},He:function(e){if(!e.sandboxedFunctions)throw new Error("No sandboxedFunctions found in payload");this.P.natives=e.sandboxedFunctions,this.P.initialized=!0,this.emitChange()},getAll:function(){return this.P.natives},get:function(e){if(!e)throw new Error("Missing name parameter");return this.P.natives[e]||null},isInitialized:function(){return this.P.initialized}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(24),o=i(5),s=18e5;e.exports={initialize:function(){this.P={lastSessionTimestamp:0,sessionId:null},this.on(r.REFRESH_SESSION,this.Ke),this.on(r.LOAD_SESSION_STATE,this.Ye)},getState:function(){return n.cloneDeep(this.P)},getSessionId:function(){return this.P.sessionId},Ye:function(e){this.P.sessionId=e.sessionId,this.P.lastSessionTimestamp=e.lastSessionTimestamp,this.emitChange()},Ke:function(){var e=a.now(),t=this.P.lastSessionTimestamp;(!this.P.sessionId||e-t>s)&&(this.P.sessionId=o.generate()),this.P.lastSessionTimestamp=e,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.qe(),this.on(r.FINALIZE_BATCH_SNAPSHOT,this.We),this.on(r.REGISTER_PREVIOUS_BATCH,this.Xe),this.on(r.REGISTER_TRACKER_VISITOR,this.Qe),this.on(r.REGISTER_TRACKER_EVENT,this.$e),this.on(r.REGISTER_TRACKER_DECISION,this.Je),this.on(r.RESET_TRACKER_EVENTS,this.Ze),this.on(r.RESET_TRACKER_STORE,this.qe),this.on(r.RESET_TRACKER_PREVIOUS_BATCHES,this.et),this.on(r.SET_TRACKER_POLLING,this.tt),this.on(r.SET_TRACKER_BATCHING,this.it),this.on(r.SET_TRACKER_SEND_EVENTS,this.nt),this.on(r.SET_TRACKER_PERSISTABLE_STATE,this.rt),this.on(r.SET_TRACKER_DIRTY,this.at),this.on(r.UPDATE_TRACKER_VISITOR_ATTRIBUTES,this.ot)},getPersistableState:function(){return this.P.isDirty?this.hasEventsToSend()||this.hasPreviousBatchesToSend()?{data:this.P.data,decisions:this.P.decisions,decisionEvents:this.P.decisionEvents,previousBatches:this.P.previousBatches}:{}:null},rt:function(e){n.isEmpty(this.P.data)||n.isEmpty(e.data)||(this.We(),this.P.previousBatches.push(this.getEventBatch())),this.P.data=e.data||{},this.P.decisions=e.decisions||[],this.P.decisionEvents=e.decisionEvents||[],n.isEmpty(this.P.previousBatches)||n.isEmpty(e.previousBatches)?this.P.previousBatches=e.previousBatches||[]:this.P.previousBatches=this.P.previousBatches.concat(e.previousBatches),this.emitChange()},at:function(e){this.P.isDirty=e,this.emitChange()},$e:function(e){var t=this.st();!n.isEmpty(t.snapshots)&&n.isEmpty(this.P.decisionEvents)||this.ct(),this.ut().events.push(e.event),this.P.decisions=e.decisions,this.at(!0)},Je:function(e){this.P.decisionEvents.push(e.decisionEvent),this.P.decisions=e.decisions,this.at(!0)},Qe:function(e){n.isEmpty(this.P.data)?this.P.data=e.data:this.We(),this.P.data.visitors.push(e.visitor),this.P.decisions=e.decisions,this.P.decisionEvents=[],this.at(!0)},Xe:function(e){this.P.previousBatches.push(e),this.at(!0)},qe:function(){this.P={polling:!1,shouldBatch:!0,data:{},decisions:[],decisionEvents:[],canSend:!1,isDirty:!1,previousBatches:[]},this.emitChange()},Ze:function(){var e=this.st();this.P.data.visitors=[e],e.snapshots=[],this.at(!0)},et:function(){this.P.previousBatches=[],this.at(!0)},tt:function(e){this.P.polling=e,this.emitChange()},it:function(e){this.P.shouldBatch=e,this.emitChange()},nt:function(e){this.P.canSend=e,this.emitChange()},getEventBatch:function(){return n.cloneDeep(this.P.data)},getPreviousBatches:function(){return n.cloneDeep(this.P.previousBatches)},dt:function(){return this.P.decisionEvents.slice()},ft:function(){this.P.decisionEvents=[]},pt:function(){return this.P.decisions.slice()},isPolling:function(){return this.P.polling},shouldBatch:function(){return this.P.shouldBatch},ut:function(){return n.last(this.st().snapshots)},st:function(){return n.last(this.P.data.visitors)},ct:function(){var e=this.dt(),t=this.st();t.snapshots.push({decisions:this.pt(),events:e}),this.ft(),this.at(!0)},We:function(){this.P.decisionEvents.length>0&&this.ct()},hasEventsToSend:function(){if(!n.isEmpty(this.P.decisionEvents))return!0;if(!n.isEmpty(this.P.data)){var e=n.some(this.P.data.visitors||[],(function(e){return e.snapshots.length>0}));if(e)return!0}return!1},hasPreviousBatchesToSend:function(){return!n.isEmpty(this.P.previousBatches)},canSend:function(){return this.P.canSend},ot:function(e){var t=this.st();t&&(t.attributes=e.attributes)}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={},this.on(r.SET_UA_DATA,this.k)},k:function(e){n.isEmpty(this.P)&&(this.P=e.data)},get:function(){return n.cloneDeep(this.P)}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(23),o=!1,s={globalTags:{},viewStates:{},shouldBatch:!1};e.exports={initialize:function(){this.P=n.cloneDeep(s),this.on(r.REGISTER_VIEWS,this.ht),this.on(r.SET_VIEW_ACTIVE_STATE,this._t),this.on(r.UPDATE_PARSED_VIEW_METADATA,this.vt),this.on(r.UPDATE_USER_SUPPLIED_METADATA,this.Et),this.on(r.TRACK_VIEW_ACTIVATED_EVENT,this.mt),this.on(r.SET_GLOBAL_TAGS,this.It),this.on(r.RESET_VIEW_STATES,this.yt),this.on(r.SET_VIEW_BATCHING,this.it)},getAll:function(){var e={};for(var t in this.P.viewStates)e[t]=this.getViewState(t);return e},shouldBatch:function(){return this.P.shouldBatch},getViewState:function(e){var t=n.cloneDeep(this.P.viewStates[e]),i=this.P.globalTags;return t.metadata=n.extend({},t.parsedMetadata,i,t.userSuppliedMetadata),t},getActiveViewTags:function(){var e=this.getActiveViewStates(),t=n.map(e,(function(e){return e.metadata})),i=[{}].concat(t);return n.extend.apply(n,i)},getActivationEventId:function(e){return this.P.viewStates[e]?this.P.viewStates[e].activationEventId:null},getActiveViewStates:function(){return n.reduce(this.P.viewStates,n.bind((function(e,t,i){return this.isViewActive(i)&&e.push(this.getViewState(i)),e}),this),[])},isViewActive:function(e){var t=this.P.viewStates[e];return t||a.warn("No Page registered with id",e),!!t.isActive},getGlobalTags:function(){return n.cloneDeep(this.P.globalTags)},yt:function(){this.P.viewStates={},this.emitChange()},ht:function(e){n.each(e.views,n.bind((function(e){var t=e.id;o&&this.P.viewStates[t]||(this.P.viewStates[t]={id:t,isActive:n.isBoolean(e.isActive)?e.isActive:null,activatedTimestamp:null,activationEventId:null,parsedMetadata:{},userSuppliedMetadata:{}})}),this)),this.emitChange()},_t:function(e){var t=e.view.id;if(!this.P.viewStates[t])throw new Error("No view exists with id "+t);this.P.viewStates[t].isActive=e.isActive,e.isActive?this.P.viewStates[t].activatedTimestamp=e.timestamp:(this.P.viewStates[t].parsedMetadata={},this.P.viewStates[t].userSuppliedMetadata={}),this.emitChange()},vt:function(e){var t=e.pageId;if(!this.P.viewStates[t])throw new Error("No view exists with id "+t);n.assign(this.P.viewStates[t].parsedMetadata,e.metadata),this.emitChange()},Et:function(e){var t=e.pageId;if(!this.P.viewStates[t])throw new Error("No view exists with id "+t);n.assign(this.P.viewStates[t].userSuppliedMetadata,e.metadata),this.emitChange()},mt:function(e){var t=e.pageId;this.P.viewStates[t]&&(this.P.viewStates[t].activationEventId=e.eventData.eventId,this.emitChange())},It:function(e){n.extend(this.P.globalTags,e),this.emitChange()},it:function(e){this.P.shouldBatch=e,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={views:{},apiNamesToViews:{}},this.on(r.DATA_LOADED,this.k)},getAll:function(){return a.safeReference(n.values(this.P.views))},getPagesMap:function(){return a.safeReference(this.P.views)},get:function(e){return a.safeReference(this.P.views[e])},getByApiName:function(e){return a.safeReference(this.P.apiNamesToViews[e])},apiNameToId:function(e){var t=this.P.apiNamesToViews[e];if(t)return t.id},idToApiName:function(e){var t=this.P.views[e];if(t)return t.apiName},getNumberOfPages:function(){return n.keys(this.P.views).length},getAllViewsForActivationType:function(e){return n.filter(this.P.views,{activationType:e})},k:function(e){n.isEmpty(e.data.views)||(n.each(e.data.views,n.bind((function(e){a.deepFreeze(e),this.P.views[e.id]=e,this.P.apiNamesToViews[e.apiName]=e}),this)),this.emitChange())}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(19);e.exports={initialize:function(){this.P={profile:{},metadata:{},visitorId:null},this.on(r.SET_VISITOR_ID_VIA_API,this.St),this.on(r.SET_VISITOR_ATTRIBUTES,this.Tt),this.on(r.LOAD_EXISTING_VISITOR_PROFILE,this.At)},getVisitorProfile:function(){return this.P.profile},getVisitorProfileMetadata:function(){return this.P.metadata},getAttribute:function(e){var t=this.P.profile;return n.cloneDeep(a.getFieldValue(t,e))},getAttributeMetadata:function(e){return n.cloneDeep(this.P.metadata[e])},getVisitorIdFromAPI:function(){return this.P.visitorId},At:function(e){this.P.profile=e.profile,this.P.metadata=e.metadata,this.emitChange()},Tt:function(e){n.each(e.attributes,n.bind((function(e){var t=e.key;a.setFieldValue(this.P.profile,t,e.value),e.metadata&&n.forOwn(e.metadata,n.bind((function(e,i){a.setFieldValue(this.P.metadata,t.concat(i),e)}),this))}),this)),this.emitChange()},St:function(e){this.P.visitorId=e,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={},this.on(r.DATA_LOADED,this.Rt)},getCustomBehavioralAttributes:function(){return n.filter(this.P,(function(e){return!!e.rule_json}))},getVisitorAttribute:function(e){var t=n.values(this.P);if(e.datasourceId&&(t=n.filter(t,{dcp_datasource_id:String(e.datasourceId)})),e.attributeName&&e.attributeId)throw new Error("Must not specify both attribute name and attribute ID");if(e.attributeId){var i=this.P[e.attributeId];if(!i)throw new Error("Unrecognized attribute ID: "+e.attributeId);return i}if(e.attributeName){var r=n.filter(t,{name:e.attributeName});if(!r.length)throw new Error("Unrecognized attribute name: "+e.attributeName);if(r.length>1)throw new Error("Too many attributes with name: "+e.attributeName);return r[0]}throw new Error("Must specify attribute name or attribute ID")},Rt:function(e){n.isEmpty(e.data.visitorAttributes)||(n.each(e.data.visitorAttributes,n.bind((function(e){this.P[e.id]=e}),this)),this.emitChange())}}}),(function(e,t,i){var n=(i(2),i(7));i(62).Event;e.exports={initialize:function(){this.P={events:[],foreignEvents:{},foreignEventQueues:{}},this.on(n.SET_VISITOR_EVENTS,this.k),this.on(n.SET_FOREIGN_VISITOR_EVENTS,this.Dt),this.on(n.SET_FOREIGN_VISITOR_EVENT_QUEUE,this.bt)},getEvents:function(){return this.P.events},getForeignEvents:function(){return this.P.foreignEvents},getForeignEventQueues:function(){return this.P.foreignEventQueues},k:function(e){this.P.events=e,this.emitChange()},Dt:function(e){this.P.foreignEvents[e.key]=e.value},bt:function(e){this.P.foreignEventQueues[e.key]=e.value}}}),(function(e,t,i){function n(e,t,i,n,r){this[o.FIELDS.NAME]=e,this[o.FIELDS.TYPE]=t,a.isString(i)&&i.trim().length>0&&(this[o.FIELDS.CATEGORY]=i),n&&a.keys(n).length>0&&(this[o.FIELDS.OPTIONS]=n),a.isUndefined(r)||(this[o.FIELDS.REVENUE]=r)}function r(e,t,i,n){this.eventBase=e,this[o.FIELDS.TIME]=t,a.isUndefined(i)||(this[o.FIELDS.SESSION_ID]=i),a.isUndefined(n)||(this[o.FIELDS.SESSION_INDEX]=n)}var a=i(2),o=i(63),s=i(19).getFieldValue,c=i(64);t.EventBase=n,n.prototype.digest=function(){var e=function(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(t)},t=[];if(t.push(e(o.FIELDS.NAME,this[o.FIELDS.NAME])),t.push(e(o.FIELDS.TYPE,this[o.FIELDS.TYPE])),this[o.FIELDS.CATEGORY]&&t.push(e(o.FIELDS.CATEGORY,this[o.FIELDS.CATEGORY])),this[o.FIELDS.REVENUE]&&t.push(e(o.FIELDS.REVENUE,this[o.FIELDS.REVENUE])),!this[o.FIELDS.OPTIONS])return t.join("&");var i=this[o.FIELDS.OPTIONS]||{},n=a.filter(a.keys(i),(function(e){return i.hasOwnProperty(e)}));n=n.sort();for(var r=0;r>>16).toString(16)+(65535&i).toString(16)},c=function(e,t){var i=n(e,t);return(i>>>0)/a},u=function(e){var t=String.fromCharCode;return e.replace(/[\S\s]/gi,(function(e){e=e.charCodeAt(0);var i=t(255&e);return e>255&&(i=t(e>>>8&255)+i),e>65535&&(i=t(e>>>16)+i),i}))};e.exports={Seed:r,hashToHex:s,hashToInt:o,hashToReal:c,toByteString:u}}),(function(e,t,i){!(function(){function t(e,t){for(var i,n=e.length,r=t^n,a=0;n>=4;)i=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),i^=i>>>24,i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^i,n-=4,++a;switch(n){case 3:r^=(255&e.charCodeAt(a+2))<<16;case 2:r^=(255&e.charCodeAt(a+1))<<8;case 1:r^=255&e.charCodeAt(a),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,r>>>0}function i(e,t){var i,n,r,a,o,s,c,u;for(i=3&e.length,n=e.length-i,r=t,o=3432918353,s=461845907,u=0;u>>16)*o&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,r^=c,r=r<<13|r>>>19,a=5*(65535&r)+((5*(r>>>16)&65535)<<16)&4294967295,r=(65535&a)+27492+(((a>>>16)+58964&65535)<<16);switch(c=0,i){case 3:c^=(255&e.charCodeAt(u+2))<<16;case 2:c^=(255&e.charCodeAt(u+1))<<8;case 1:c^=255&e.charCodeAt(u),c=(65535&c)*o+(((c>>>16)*o&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,r^=c}return r^=e.length,r^=r>>>16,r=2246822507*(65535&r)+((2246822507*(r>>>16)&65535)<<16)&4294967295,r^=r>>>13,r=3266489909*(65535&r)+((3266489909*(r>>>16)&65535)<<16)&4294967295,r^=r>>>16,r>>>0}var n=i;n.v2=t,n.v3=i;e.exports=n})()}),(function(e,t,i){var n=i(7);e.exports={initialize:function(){this.P={baseMap:{},eventQueue:[],lastEvent:null,initialized:!1,cleared:!1},this.on(n.UPDATE_BEHAVIOR_STORE,this.wt)},getBaseMap:function(){return this.P.baseMap},getEventQueue:function(){return this.P.eventQueue},getLastEvent:function(){return this.P.lastEvent},getCleared:function(){return this.P.cleared},getInitialized:function(){return this.P.initialized},wt:function(e){this.P[e.key]=e.value}}}),(function(e,t,i){var n=i(2),r=i(7);e.exports={initialize:function(){this.P={randomId:null,visitorIdLocator:null},this.on(r.SET_VISITOR_ID,this.k),this.on(r.DATA_LOADED,this.Ot)},getBucketingId:function(){return this.getRandomId()},getRandomId:function(){return this.P.randomId},getVisitorIdLocator:function(){return this.P.visitorIdLocator},k:function(e){n.extend(this.P,e),this.emitChange()},Ot:function(e){n.isEmpty(e.data.visitorIdLocator)||(this.P.visitorIdLocator=e.data.visitorIdLocator,this.emitChange())}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(26);e.exports={initialize:function(){this.P={variationIdMap:{},preferredLayerMap:{}},this.on(r.UPDATE_VARIATION_ID_MAP,this.Ct),this.on(r.MERGE_VARIATION_ID_MAP,this.Nt),this.on(r.UPDATE_PREFERRED_LAYER_MAP,this.Lt),this.on(r.MERGE_PREFERRED_LAYER_MAP,this.Pt)},getVariationIdMap:function(){return n.cloneDeep(this.P.variationIdMap)},getVariationIdMapString:function(){return a.stringify(this.P.variationIdMap)},Ct:function(e){var t=this.P.variationIdMap,i=t[e.layerId]||{};i[e.experimentId]!==e.variationId&&(i[e.experimentId]=e.variationId,this.P.variationIdMap[e.layerId]=i,this.emitChange())},Nt:function(e){var t=this.getVariationIdMap(),i=e.variationIdMap;n.each(t||{},(function(e,t){i[t]?n.assign(i[t],e):i[t]=e})),this.P.variationIdMap=i,this.emitChange()},getPreferredLayerMap:function(){return n.cloneDeep(this.P.preferredLayerMap)},getPreferredLayerMapString:function(){return a.stringify(this.P.preferredLayerMap)},getPreferredLayerId:function(e){return this.P.preferredLayerMap[e]},Lt:function(e){this.P.preferredLayerMap[e.groupId]!==e.layerId&&(this.P.preferredLayerMap[e.groupId]=e.layerId,this.emitChange())},Pt:function(e){var t=this.getPreferredLayerMap(),i=e.preferredLayerMap;n.assign(i,t),this.P.preferredLayerMap=i,this.emitChange()}}}),(function(e,t,i){var n=i(2),r=i(23),a=i(7),o=1e3;e.exports={initialize:function(){this.P={frames:[],defaultFrame:null,messages:[],subscribers:[],canonicalOrigins:null,disabled:!1},this.on(a.XDOMAIN_SET_DEFAULT_FRAME,this.Vt),this.on(a.XDOMAIN_ADD_FRAME,this.kt),this.on(a.XDOMAIN_SET_MESSAGE,this.xt),this.on(a.XDOMAIN_ADD_SUBSCRIBER,this.Ft),this.on(a.XDOMAIN_SET_CANONICAL_ORIGINS,this.Mt),this.on(a.XDOMAIN_SET_DISABLED,this.Ut)},getMessages:function(){return n.cloneDeep(this.P.messages)},getOffset:function(){return 0===this.P.messages.length?0:this.P.messages[0].data.id},getNextMessageId:function(){return this.P.messages.length+this.getOffset()},getMessageById:function(e){return this.P.messages[e-this.getOffset()]},getSubscribers:function(){return this.P.subscribers},getFrames:function(){return this.P.frames},getNextFrameId:function(){return this.P.frames.length},getDefaultFrame:function(){return this.P.defaultFrame},getCanonicalOrigins:function(){return n.cloneDeep(this.P.canonicalOrigins)},isDisabled:function(){return this.P.disabled},Vt:function(e){this.P.defaultFrame=e},kt:function(e){this.P.frames.push(e)},xt:function(e){for(this.P.messages[e.messageId-this.getOffset()]=e.message;this.P.messages.length>o;){var t=this.P.messages.shift();r.debug("XDomainStorage: Cleared old message: "+t.data.id)}},Ft:function(e){this.P.subscribers.push(e.subscriber)},Mt:function(e){this.P.canonicalOrigins=e.canonicalOrigins},Ut:function(e){this.P.disabled=e.disabled}}}),(function(e,t,i){var n=i(2),r=i(7),a=i(22);e.exports={initialize:function(){this.P={},this.on(r.DATA_LOADED,this.k)},k:function(e){n.isEmpty(e.data.groups)||(n.each(e.data.groups,n.bind((function(e){a.deepFreeze(e),this.P[e.id]=e}),this)),this.emitChange())},getAll:function(){return a.safeReference(n.values(this.P))},getGroupsMap:function(){return a.safeReference(this.P)},get:function(e){return a.safeReference(this.P[e])}}}),(function(e,t,i){var n=i(72);t.initializeStore=n.initialize,t.addEvent=n.addEvent,t.getEvents=n.getEvents,t.getEventCount=n.getEventCount}),(function(e,t,i){function n(e){I.dispatch(v.SET_VISITOR_EVENTS,e)}function r(e){I.dispatch(v.UPDATE_BEHAVIOR_STORE,{key:"baseMap",value:e})}function a(e){I.dispatch(v.UPDATE_BEHAVIOR_STORE,{key:"eventQueue",value:e})}function o(e){I.dispatch(v.UPDATE_BEHAVIOR_STORE,{key:"lastEvent",value:e})}function s(e){I.dispatch(v.UPDATE_BEHAVIOR_STORE,{key:"cleared",value:e})}function c(){I.dispatch(v.UPDATE_BEHAVIOR_STORE,{key:"initialized",value:!0})}function u(){return O.getEvents()}function l(){return C.getBaseMap()}function d(){return C.getEventQueue()}function f(){return C.getLastEvent()}function p(){return C.getCleared()}function g(){return C.getInitialized()}function h(){var e=u().concat(d()),t=!1;return e.length>L&&(e=e.slice(-L),t=!0),n(e),a([]),t}var _=i(2),v=i(7),E=i(24),m=i(73),I=i(9),y=i(23),S=i(74),T=t,A=i(62).Event,R=i(63),D=i(62).EventBase,b=i(89),w=i(16),O=w.get("stores/visitor_events"),C=w.get("stores/visitor_events_manager"),N={EVENTBASE:"eb",HASH:"h",TIMEBASE:"tb",TIMESTAMPS:"ts", +DELTA:"d",INDEX:"i"},L=1e3;t.initialize=function(e,t){if(!g()){T.Gt(e,t);var i=u();i.length>0&&o(i[i.length-1]);var n=d();n.length>0&&o(n[n.length-1]),c()}},t.addEvent=function(e){y.debug("Behavior store: adding event",e);var t=T.Bt(e);o(t),a(d().concat(t)),b.reindexIfNecessary(f(),u(),d()),T.zt(d())},t.getEvents=function(){return d().length>0&&(h()&&b.sessionize(u()),T.jt(u()),T.zt(d())),u()},t.getEventCount=function(){return d().length+u().length},T.Gt=function(e,t){T.Ht(e,t)&&(T.jt(u()),T.zt(d())),b.sessionize(u())},T.Ht=function(e,t){if(0===e.length&&0===t.length)return n([]),a([]),!1;var i=!1,r=e[0]||t[0];return N.EVENTBASE in r?(n(T.Kt(e)),a(T.Kt(t))):(i=!0,n(T.Yt(e)),a(T.Yt(t))),d().length>0&&(h(),i=!0),n(T._updateBaseMapAndMaybeDedupe(u())),T._migrateEventBasesAndUpdateStore()&&(i=!0),i},T.Yt=function(e){for(var t=[],i=0;i=a||i===k.AttributionTypes.LAST_TOUCH&&a>=n||b.isUndefined(n)&&a)&&(s.data=s.data||{},s.data[t]=e,a&&(s.metadata=s.metadata||{},s.metadata[t]=s.metadata[t]||{},s.metadata[t].lastModified=a))})),s}function v(e){var t=e.split("$$")[0];return t.indexOf("://")>0}function E(){var e=J.getVisitorProfile(),t=J.getVisitorProfileMetadata(),i=q.getAllPlugins(k.PluginTypes.visitorProfileProviders);if(i){var n=b.reduce(i,(function(e,t){return t.provides&&(e[t.provides]=t),e}),{});e=b.omitBy(e,(function(e,t){var i=n[t];return i&&i.isTransient}))}return{profile:e,metadata:t}}function m(e,t){C.initializeStore(e,t)}function I(e){w.dispatch(O.LOAD_PERSISTED_LAYER_STATES,{layerStates:b.filter(e,(function(e){return!!e.decision}))})}function y(e){e=b.extend({lastSessionTimestamp:0,sessionId:null},e),w.dispatch(O.LOAD_SESSION_STATE,e)}function S(e){var t,i=e.name;switch(e.type){case k.VisitorIdLocatorType.COOKIE:t=L.get(i);break;case k.VisitorIdLocatorType.JS_VARIABLE:t=j.getGlobalByPath(i);break;case k.VisitorIdLocatorType.LOCALSTORAGE:try{var n=j.getGlobal("localStorage");t=n.getItem(i)}catch(e){throw new Error("Unable to read localStorage: "+e.toString())}break;case k.VisitorIdLocatorType.QUERY:t=B.getQueryParamValue(i)}try{if(!t)throw U.error("Visitor / Customer provided visitor id cannot be found. Type:",e.type," Name:",i),new Error("Failure to obtain visitor id from "+e.type);if(!b.isString(t)&&!b.isNumber(t))throw U.error("Visitor / Customer provided visitor id is not a string or number. Type:",e.type," Name:",i," Id Type:",typeof t),new Error("Customer provided visitor id is not a string or number")}catch(e){throw W.getSampleRum()&&w.dispatch(O.RECORD_VISITOR_ID_ERROR,{isError:!0}),e}return W.getSampleRum()&&(w.dispatch(O.RECORD_VISITOR_ID_ERROR,{isError:!1}),w.dispatch(O.RECORD_VISITOR_ID_LOCATOR_USAGE,{visitorIdLocatorType:e.type,entityId:t})),String(t)}function T(){return"oeu"+P.now()+"r"+Math.random()}function A(e){var t,i,n=q.getAllPlugins(k.PluginTypes.visitorProfileProviders),r=b.filter(n,(function(e){return b.isFunction(e.restorer)}));e.profile&&e.metadata?(t=e.profile,i=e.metadata):(t=e,i={}),t=b.reduce(t,(function(e,t,i){var n=t,a=b.find(r,{provides:i});return a&&(n=a.restorer(t)),e[i]=n,e}),{}),w.dispatch(O.LOAD_EXISTING_VISITOR_PROFILE,{profile:t,metadata:i})}function R(e){try{return x.parse(e)}catch(t){return U.debug("Failed to parse: ",e,t),null}}var D,b=i(2),w=i(9),O=i(7),C=i(71),N=i(72),L=i(75),P=i(24),V=i(16),k=i(25),x=i(26),F=i(19),M=i(81).LocalStorage,U=i(23),G=i(12).Promise,B=i(84),z=i(25).VisitorStorageKeys,j=i(40);D=i(85);var H=V.get("stores/cookie_options"),K=V.get("stores/global"),Y=V.get("stores/layer"),q=V.get("stores/plugins"),W=V.get("stores/rum"),X=V.get("stores/session"),Q=V.get("stores/visitor_id"),$=V.get("stores/visitor_bucketing"),J=V.get("stores/visitor"),Z=V.get("stores/provider_status"),ee=!1;t.getOrGenerateId=function(){return{randomId:t.getCurrentId()||T()}},t.getCurrentId=function(){var e=Q.getVisitorIdLocator();return e?S(e):J.getVisitorIdFromAPI()||L.get(k.COOKIES.VISITOR_ID)},t.hasSomeData=function(){return M.keys().length>0},t.setId=function(e){var i=Q.getBucketingId();w.dispatch(O.SET_VISITOR_ID,e),Q.getBucketingId()!==i&&(c(),t.deleteOldLocalData(),D.deleteData(e));try{Q.getVisitorIdLocator()||t.maybePersistVisitorId(e)}catch(e){if(U.error("Visitor / Unable to persist visitorId, disabling tracking"),w.dispatch(O.LOAD_DIRECTIVE,{trackingDisabled:!0}),e instanceof L.MismatchError)throw U.error("Visitor / Cookie not set to correct value:",e),new Error("Cookie mismatch error while persisting visitorId");throw e}t.refreshSession()},t.getVariationIdMap=function(){return u(z.VARIATION_MAP)||{}},t.updateVariationIdMap=function(e,t,i){w.dispatch(O.UPDATE_VARIATION_ID_MAP,{layerId:e,experimentId:t,variationId:i})},t.persistVariationIdMap=function(){var e=$.getVariationIdMapString();p(z.VARIATION_MAP,e,!0)},t.getPreferredLayerMap=n,t.updatePreferredLayerMap=r,t.persistTrackerOptimizelyData=function(e){p(z.TRACKER_OPTIMIZELY,e)},t.refreshSession=function(){w.dispatch(O.REFRESH_SESSION)},t.populateEagerVisitorData=function(e,i){var n=b.filter(e,(function(e){return!e.isLazy})),r=t.populateVisitorData(n,i);return r},t.populateLazyVisitorData=function(e,i){var n=b.filter(e,(function(e){return e.isLazy}));return t.populateVisitorData(n,i)},t.populateVisitorData=function(e,t){t=t||{};var i=b.partial(s,t),n=b(e).filter({isAsync:!0}).map(i).filter().value();return b.forEach(b.filter(e,(function(e){return!e.isAsync})),i),n.length>0?G.all(n):G.resolve()},t.persistBehaviorEvents=function(e){p(z.EVENTS,e)},t.persistBehaviorEventQueue=function(e){p(z.EVENT_QUEUE,e)},t.getPersistedBehaviorEventCount=function(){var e=u(z.EVENTS)||[],t=u(z.EVENT_QUEUE)||[];return N.deserialize(e).length+N.deserialize(t).length},t.persistLayerStates=function(){var e=Y.getLayerStates(t.getNamespace());e=b.map(e,(function(e){return b.omit(e,"namespace")})),p(z.LAYER_STATES,e)},t.persistSessionState=function(){p(z.SESSION_STATE,X.getState())},t.persistVisitorProfile=function(){p(z.VISITOR_PROFILE,E())},t.persistVisitorBucketingStore=function(){t.persistVariationIdMap(),a()},t.getUserIdFromKey=function(e,i){var n;return b.includes(e,i)&&b.includes(e,"_")&&b.includes(e,"$$")&&b.includes(e.slice(e.indexOf("$$")),t.getNamespace())&&(n=e.slice(e.indexOf("_")+1,e.indexOf("$$"))),n},t.maybePersistVisitorId=function(e){e.randomId&&(H.getAutoRefresh()||t.getCurrentId()!==e.randomId?(L.set(k.COOKIES.VISITOR_ID,e.randomId),U.log("Persisting visitorId:",e.randomId)):U.log("Not persisting visitorId: value is not changed and also auto-refresh is disabled"))},t.getAttribute=function(e){return J.getAttribute(e)},t.getPendingAttributeValue=function(e){return Z.getPendingAttributeValue(e)},t.isForeignKey=v,t.checkKeyForVisitorId=function(e){var i=Q.getBucketingId()||t.getCurrentId(),n=t.getIdFromKey(e);return!n||n===i},t.getIdFromKey=function(e){var i=e.split("$$")[0],n=t.getStorageKeyFromKey(e),r=b.includes(k.StorageKeys,n);if(r)return null;var a=i.indexOf("_"),o=a===-1;return o?i:i.substring(a+1)},t.getStorageKeyFromKey=function(e){var t,i=e.split("$$").pop(),n=i.indexOf("://")>-1;if(n){var r=i.indexOf("_");t=i.substring(r+1)}else t=i;return b.includes(b.values(k.AllStorageKeys),t)?t:null},t.deleteOldLocalData=function(){var e=M.keys();b.each(e,(function(e){t.isForeignKey(e)||t.checkKeyForVisitorId(e)||M.removeItem(e)}))},t.deleteOldForeignData=function(){var e=M.keys();b.each(e,(function(e){t.isForeignKey(e)&&M.removeItem(e)}))},t.loadForeignData=function(){b.each(M.keys(),(function(e){var t=M.getItem(e);t&&h(e,t)}))},t.getNamespace=function(){return K.getNamespace()},t.serializeFieldKey=function(e){return b.isArray(e)?e.join("$$"):e},t.removeLegacySessionStateCookies=function(){var e=L.getAll();b.forEach(b.keys(e),(function(e){0===e.indexOf(k.COOKIES.SESSION_STATE+"$$")&&L.remove(e)}))}}),(function(e,t,i){function n(e,i){i!==!1&&(i=!0);for(var n,a,o=e.hostname.split("."),s=[],c=null,l=o.length-1;l>=0;l--)if(s.unshift(o[l]),n=s.join("."),!r.includes(h,n)){a={domain:i?"."+n:n};try{t.set(_,Math.random().toString(),a),t.remove(_,a),c=a.domain;break}catch(e){}}return d.dispatch(u.SET_COOKIE_DOMAIN,c),c}var r=i(2),a=i(76).create,o=i(24),s=i(80),c=i(40),u=i(7),l=i(16),d=i(9),f=l.get("stores/cookie_options"),p=t.SetError=a("CookieSetError"),g=t.MismatchError=a("CookieMismatchError");t.getAll=function(e){r.isUndefined(e)&&(e=!0);var i,n,a,o,c;i=s.getCookieString().split(/\s*;\s*/);var u={};for(a=0;a0&&(c=t.safeDecodeURIComponent(n.substring(0,o)),void 0===u[c])){var l=n.substring(o+1);e&&(l=t.safeDecodeURIComponent(l)),u[c]=l}return u},t.safeDecodeURIComponent=function(e){try{return decodeURIComponent(e)}catch(t){return e}},t.get=function(e,i){var n=t.getAll(i);return n[e]},t.set=function(e,i,a,u){a=r.extend({encodeValue:!0},a),u!==!1&&(u=!0);var l=[];if(r.isUndefined(a.domain)){var d=f.getCurrentDomain();d||(d=n(c.getLocation(),!0)),a.domain=d}if(a.domain&&l.push("domain="+a.domain),r.isUndefined(a.path)&&(a.path="/"),a.path&&l.push("path="+a.path),r.isUndefined(a.expires)){var h=r.isUndefined(a.maxAge)?f.getDefaultAgeInSeconds():a.maxAge;a.expires=new Date(o.now()+1e3*h)}if(r.isUndefined(a.expires)||l.push("expires="+a.expires.toUTCString()),a.secure&&l.push("secure"),l=l.join(";"),s.setCookie(e+"="+(a.encodeValue?encodeURIComponent(i):i)+";"+l),u){var _=a.encodeValue,v=t.get(e,_);if(v!==i){if(!v)throw new p('Failed to set cookie "'+e+'"');throw new g('Expected "'+i+'" for "'+e+'", got "'+v+'"')}}},t.remove=function(e,i){for(var n=c.getLocation().hostname.split(".");n.length>0;)t.set(e,null,r.extend({},i,{domain:"."+n.join("."),expires:new Date(0)}),!1),n.shift()};var h=["optimizely.test"],_="optimizelyDomainTestCookie"}),(function(e,t,i){var n=i(77),r=n("InternalError");t.BaseError=r,t.create=function(e){return n(e,r)}}),(function(e,t,i){function n(e,t){function i(t){if(!(this instanceof i))return new i(t);try{throw new Error(t)}catch(t){t.name=e,this.stack=t.stack}r&&this.stack&&(this.stack=a(this.stack,e,t)),this.message=t||"",this.name=e}return i.prototype=new(t||Error),i.prototype.constructor=i,i.prototype.inspect=function(){return this.message?"["+e+": "+this.message+"]":"["+e+"]"},i.prototype.name=e,i}var r=i(78)(),a=i(79);e.exports=n}),(function(e,t){"use strict";e.exports=function(){var e=new Error("yep");return!!e.stack&&"Error: yep\n"===e.stack.substr(0,11)}}),(function(e,t){"use strict";e.exports=function(e,t,i){var n=t;return i&&(n+=": "+i),e=n+e.slice(e.indexOf("\n"))}}),(function(e,t,i){function n(){return"loading"===t.getReadyState()}var r=i(16),a=r.get("stores/global");t.getDocumentElement=function(){return document.documentElement},t.getCookieString=function(){return document.cookie||""},t.setCookie=function(e){document.cookie=e},t.querySelector=function(e){return document.querySelector(e)},t.querySelectorAll=function(e){return document.querySelectorAll(e)},t.parseUri=function(e){var i=t.createElement("a");return i.href=e,i},t.childrenOf=function(e){return Array.prototype.slice.call(e.querySelectorAll("*"))},t.createElement=function(e){return document.createElement(e)},t.isReady=function(){return a.domContentLoadedHasFired()||"interactive"===document.readyState||"complete"===document.readyState},t.isLoaded=function(){return"complete"===document.readyState},t.addReadyHandler=function(e){return document.addEventListener("DOMContentLoaded",e),function(){t.removeReadyHandler(e)}},t.removeReadyHandler=function(e){return function(){document.removeEventListener("DOMContentLoaded",e)}},t.getReferrer=function(){return document.referrer},t.getReadyState=function(){return document.readyState},t.write=function(e){if(!n())throw new Error("Aborting attempt to write to already-loaded document");document.write(e)},t.appendToHead=function(e){return t.appendTo(document.head,e)},t.appendTo=function(e,t){e.appendChild(t)},t.addEventListener=function(e,t,i){return document.addEventListener(e,t,i),function(){document.removeEventListener(e,t,i)}},t.getCurrentScript=function(){if(document.currentScript)return document.currentScript},t.parentElement=function(e){for(var t=e.parentNode;t.nodeType!==Node.ELEMENT_NODE;)t=t.parentNode;return t}}),(function(e,t,i){var n,r,a="optimizely_data",o=i(76).create,s=i(82),c=i(40),u=t.Error=o("StorageError");try{r=c.getGlobal("localStorage")}catch(e){throw new u("Unable to read localStorage: "+e.toString())}if(!r)throw new u("localStorage is undefined");n=s.create(r,a),t.LocalStorage=n,t.isOptimizelyKey=function(e){return e.slice(0,a.length)===a}}),(function(e,t,i){function n(e,t){this.Zt=e,this.ei=t}var r=i(2),a=i(23),o="$$";n.prototype.ti=function(e){return[this.ei,e].join(o)},n.prototype.ii=function(e){return e.replace(this.ei+o,"")},n.prototype.setItem=function(e,t){try{this.Zt.setItem(this.ti(e),t)}catch(t){a.warn("Failed to save",e,"to localStorage:",t)}},n.prototype.removeItem=function(e){this.Zt.removeItem(this.ti(e))},n.prototype.getItem=function(e){var t=null;try{t=this.Zt.getItem(this.ti(e))}catch(e){}return t},n.prototype.keys=function(){var e=r.keys(this.Zt);return r.map(r.filter(e,r.bind((function(e){return r.includes(e,this.ei)}),this)),r.bind(this.ii,this))},n.prototype.allKeys=function(){return r.keys(this.Zt)},n.prototype.allValues=function(){return r.values(this.Zt)},e.exports={create:function(e,t){return new n(e,t)},mockStorage:{keys:function(){},getItem:function(e){},removeItem:function(e){},setItem:function(e,t){}}}}),(function(e,t,i){function n(){return c.getGlobal("performance")}var r=i(7),a=i(76).create,o=i(24),s=i(9),c=i(40),u=i(16),l=u.get("stores/rum"),d="optimizely:",f=t.Error=a("PerformanceError");t.time=function(e){if(l.getSampleRum()){var t=n();if(t&&t.mark){var i=d+e;t.clearMarks(i+"Begin"),t.mark(i+"Begin")}}},t.timeEnd=function(e){if(l.getSampleRum()){var t=n();if(t&&t.mark){var i=d+e,a=t.getEntriesByName(i+"Begin");if(0===a.length)throw new f("Called timeEnd without matching time: "+e);t.clearMarks(i+"End"),t.mark(i+"End");var o=t.getEntriesByName(i+"End"),c=e+"Time",u=o[0].startTime-a[0].startTime;s.dispatch(r.SET_PERFORMANCE_MARKS_DATA,{name:c,data:{startTime:Math.round(1e3*a[0].startTime)/1e3,duration:Math.round(1e3*u)/1e3}})}}},t.now=function(){var e=n();return e?e.now():o.now()}}),(function(e,t,i){var n=i(2),r=i(40);t.getQueryParams=function(){var e=r.getLocationSearch()||"";if(0===e.indexOf("?")&&(e=e.substring(1)),0===e.length)return[];for(var t=e.split("&"),i=[],n=0;n0&&(a=s[0]),s.length>1&&(o=s[1]),i.push([a,o])}return i},t.getQueryParamValue=function(e){for(var i=t.getQueryParams(),n=0;n=n?d.emitInternalError(new y("Message ID is greater than expected maximum ID ("+t.id+">"+n+")")):t.id<0?d.emitInternalError(new y("Message ID is < 0: "+t.id)):d.emitInternalError(new y("No stored message found for message ID: "+t.id))}else d.emitInternalError(new y("Message ID is not a number: "+t.id));return}if(!i.resolver)return void m.warn("XDomain","Message already resolved, ignoring:",t.id);i.resolver(t.response),l.dispatch(c.XDOMAIN_SET_MESSAGE,{messageId:t.id,message:{data:{id:t.id,type:i.data.type,key:i.data.key},startTime:i.startTime,endTime:p.now()}})}}function r(e,t){return t||(t=I.getDefaultFrame()),new s(function(i){var n={data:o.extend({},e,{id:I.getNextMessageId()}),resolver:i};t?I.isDisabled()||a(n,t):l.dispatch(c.XDOMAIN_SET_MESSAGE,{messageId:n.data.id,message:n})})}function a(e,t){var i=e.data;l.dispatch(c.XDOMAIN_SET_MESSAGE,{messageId:e.data.id,message:o.extend({},e,{startTime:p.now()})}),t.target.postMessage(h.stringify(i),t.origin)}var o=i(2),s=i(12).Promise,c=i(7),u=i(16),l=i(9),d=i(86),f=i(76).create,p=i(24),g=i(80),h=i(26),_=i(88),v=i(74),E=i(40),m=i(23),I=u.get("stores/xdomain"),y=t.Error=f("XDomainStorageError");t.setItem=function(e,t,i){return r({type:"PUT",key:e,value:t},i)},t.getItem=function(e,t){return r({type:"GET",key:e},t)},t.fetchAll=function(e){return r({type:"GETALL"},e)},t.deleteData=function(e,t){return r({type:"DELETE",visitorId:e},t)},t.subscribe=function(e){l.dispatch(c.XDOMAIN_ADD_SUBSCRIBER,{subscriber:e})},t.loadIframe=function(e,t){return new s(function(i){var n=g.createElement("iframe");n.src=e+t,n.hidden=!0,n.setAttribute("tabindex","-1"),n.setAttribute("title","Optimizely Internal Frame"),n.style.display="none",n.height=0,n.width=0,n.onload=function(){var r={id:I.getNextFrameId(),target:n.contentWindow,origin:e,path:t};l.dispatch(c.XDOMAIN_ADD_FRAME,r),i(r)},g.appendTo(g.querySelector("body"),n)})},t.getXDomainUserId=function(e,t){var i,n={},r=o.keys(e);return o.each(t,(function(e){n[e]=[],o.each(r,(function(t){var r=v.getUserIdFromKey(t,e);!i&&r&&(i=r),r&&!o.includes(n[e],r)&&n[e].push(r)}))})),m.debug("XDomain: Found userIds:",n),i},t.load=function(e,i){E.addEventListener("message",n);var r=function(){return!!g.querySelector("body")},s=function(){return t.loadIframe(e,i)};return _.pollFor(r).then(s).then((function(e){l.dispatch(c.XDOMAIN_SET_DEFAULT_FRAME,e),I.isDisabled()||o.each(I.getMessages(),(function(t){t.startTime||a(t,e)}))}))}}),(function(e,t,i){var n=i(87);t.emitError=function(e,t,i){var r=!0;n.emit({type:"error",name:e.name||"Error",data:{error:e,metadata:t}},i||!1,r)},t.emitInternalError=function(e,i){t.emitError(e,i,!0)},t.emitAnalyticsEvent=function(e,t){var i={type:"analytics",name:"trackEvent",data:e};n.emit(i,t)}}),(function(e,t,i){var n=i(2),r=i(5),a=i(7),o=i(86),s=i(16),c=i(9),u=i(23),l=s.get("stores/event_emitter");t.on=function(e){return e.token||(e.token=r.generate()),c.dispatch(a.ADD_EMITTER_HANDLER,e),e.token},t.off=function(e){c.dispatch(a.REMOVE_EMITTER_HANDLER,{token:e})},t.emit=function(e,t,i){var r=l.getHandlers(e,t);n.each(r,(function(n){try{n.handler.call({$di:s},e)}catch(r){!i&&n.emitErrors?(u.error("Error in handler for event:",e,r),o.emitError(r,null,t)):u.warn("Suppressed error in handler for event:",e,r)}}))}}),(function(e,t,i){var n=i(2),r=i(12).Promise,a=i(40),o=100,s=50;t.pollFor=function(e,t,i){var c,u;return n.isFunction(i)?u=i:(c=i||o,u=function(){return c--,c<-1}),t=t||s,new r(function(i,n){!(function r(){var o;if(!u()){try{var s=e();if(s)return i(s)}catch(e){o=e}return a.setTimeout(r,t)}n(o||new Error("Poll timed out"))})()})}}),(function(e,t,i){function n(e,i){var n;n=t.isInSameSession(e,i)?e.getValueOrDefault([s.FIELDS.SESSION_ID]):i.getValueOrDefault([s.FIELDS.TIME]),i.setFieldValue(s.FIELDS.SESSION_ID,n)}function r(e,i,n){var r,a=e.getValueOrDefault([s.FIELDS.SESSION_INDEX]);r=t.isInSameSession(i,e)?a:n?a+1:a-1,i.setFieldValue(s.FIELDS.SESSION_INDEX,r)}var a=i(62).Event,o=i(24),s=i(63),c=i(62).EventBase;t.CURRENT_SESSION_INDEX=0;var u=18e5;t.isInSameSession=function(e,t){var i=e.getValueOrDefault([s.FIELDS.TIME],0),n=t.getValueOrDefault([s.FIELDS.TIME],0);return Math.abs(i-n)u&&(c+=1),e[i-1].setFieldValue(s.FIELDS.SESSION_INDEX,c);for(var a=i-1;a>0;a--)r(e[a],e[a-1],!0)}},t.reindexIfNecessary=function(e,t,i){function n(e){for(var t=0;t=l?(o.dispatch(r.REMOVE_PENDING_EVENT,{id:i}),c.warn("Event ",f," could not be sent after ",l," attempts.")):(f.retryCount++,o.dispatch(r.SET_PENDING_EVENT,f),c.debug("Event ",f," failed to send, with error ",e," It will be retried ",l-s," times.")),e}))},t.sendBeacon=t.request}),(function(e,t,i){var n=i(2),r=i(7),a=i(24),o=i(16),s=i(80),c=i(25),u=i(9),l=i(23),d=o.get("stores/sandbox"),f=i(40);t.shouldSandbox=function(){return!1},t.get=function(e){if(!e)throw new Error("Name is required");if(t.shouldSandbox()){d.isInitialized()||p();var i=d.get(e);if(i)return i}return f.getGlobal(e)};var p=function(){try{var e="optimizely_"+a.now(),t=s.createElement("iframe");t.name=e,t.style.display="none",s.appendToHead(t);var i=t.contentWindow,o=t.contentDocument;o.write(""),o.close();var d=n.mapValues(c.SandboxedFunctions,(function(e){return i[e]}));u.dispatch(r.SANDBOXED_FUNCTIONS_ADDED,{sandboxedFunctions:d}),t.parentNode.removeChild(t)}catch(e){l.warn("Unable to create a sandbox: ",e)}}}),(function(e,t,i){var n=i(2),r=i(23),a=i(94),o=i(16),s=o.get("stores/plugins"),c=i(7),u=i(25),l=i(9),d=!1,f=[i(107),i(108),i(128)],p=["clientMetadata","cookieDomain","disable","load","optOut","rum"];t.push=function(e,t){var i,a,o,s;if(!n.isArray(e)&&n.isObject(e))s=n.isUndefined(e.version)?1:e.version,i=e.type,o=[e];else if(n.isArray(e))s=0,i=e[0],o=e.slice(1);else{if(!n.isString(e))return r.warn("API / Ignoring non-array/object/string argument:",e),!1;s=0,i=e,o=[]}if(f[s]&&(a=f[s][i]),t&&p.indexOf(i)===-1)return r.debug("API / Ignoring non high priority function:",i,o),!1;if(!a)return r.warn('API / No function found for "'+i+'" (v'+s+") with arguments:",o),!1;r.log('API / Executing: "'+i,'" with arguments:',o);try{a.apply(null,o),l.dispatch(c.RECORD_API_USAGE,{methodName:s?"v"+s+"."+i:i})}catch(e){r.error(e)}return!0},t.get=function(e){if(d&&"state"!==e)return void r.warn('Module "'+e+'" not found.');r.log('API / Getting module: "'+e+'"');var t=a[e];return t?n.isArray(t)&&(t=o.evaluate(t)):t=s.getPlugin(u.PluginTypes.apiModules,e),t?(l.dispatch(c.RECORD_API_USAGE,{methodName:"get."+e}),t):void r.warn('Module "'+e+'" not found.')}}),(function(e,t,i){function n(e,t,i,n){var r=e.getLayerState(n),a=t.get(n),s=i.get();if(!r||!a)return s?{layer:{name:s.layerName,id:s.layerId,policy:s.layerPolicy,integrationStringVersion:s.integrationStringVersion},experiment:{name:s.experimentName,id:s.experimentId},variation:{name:s.variationName,id:s.variationId},isLayerHoldback:!1}:null;if(l.isSingleExperimentPolicy(a.policy)&&r.decision.isLayerHoldback)return null;var c=r.decision.experimentId,u=r.decision.variationId;if(!c||!u)return null;var d,f;return(d=o.find(a.experiments,{id:c}))?(f=o.find(d.variations,{id:u}),f?{layer:{name:a.name,id:a.id,policy:a.policy,integrationStringVersion:a.integrationStringVersion},experiment:{name:d.name,id:d.id},variation:{name:f.name,id:f.id},isLayerHoldback:r.decision.isLayerHoldback}:null):null}function r(e,t,i,n,r,s){var c=[],u=e.getLayerStates();s.onlySingleExperiments&&(u=o.filter(u,(function(e){var i=t.get(e.layerId);return i&&l.isSingleExperimentPolicy(i.policy)})));var f=o.map(u,(function(e){var t=!!e.decision.variationId,i=e.decisionActivationId&&e.decisionActivationId===n.getActivationId(),r=d.getExperimentAndVariation(),a=r?r.variationId:null,s=t&&e.decision.variationId===a;return o.extend(e,{isActive:t&&i||s,visitorRedirected:s})})),p=r?o.filter(f,r):f;return o.each(p,(function(e){var n=a(e,t,i,s.includeOfferConsistency);n&&c.push(n)})),c}function a(e,t,i,n){var r,a,s=e.layerId,c=t.get(s)||{},u=o.map(c.experiments,(function(e){ +return o.pick(e,["id","name"])}));if(n||!c.decisionMetadata||!c.decisionMetadata.offerConsistency){var l={id:s,campaignName:c.name||null,experiment:null,allExperiments:u,variation:null,reason:e.decision.reason,isActive:!!e.isActive,visitorRedirected:e.visitorRedirected,isInCampaignHoldback:e.decision.isLayerHoldback};e.decision&&e.decision.experimentId&&(r=o.find(c.experiments,{id:e.decision.experimentId})),r&&(l.experiment=o.pick(r,["id","name","campaignName"])),r&&e.decision.variationId&&(a=o.find(r.variations,{id:e.decision.variationId})),a&&(l.variation=o.pick(a,["id","name"]));var d=o.map(e.decisionTicket.audienceIds,(function(e){return o.pick(i.get(e),["id","name"])}));return l.audiences=d,c.decisionMetadata&&c.decisionMetadata.offerConsistency&&(l.pageId=e.pageId),l}}var o=i(2),s=i(95),c=i(96),u=i(98),l=i(44),d=i(99);t.data=["stores/audience_data","stores/client_metadata","stores/event_data","stores/layer_data","stores/view_data","stores/group_data","stores/interest_group","stores/tag_group","stores/global",function(e,t,i,n,r,a,s,l,d){var f={},p={},g={},h={audiences:e.getAudiencesMap(),events:i.getEventsMap(),campaigns:f,pages:r.getPagesMap(),experiments:p,variations:g,projectId:d.getProjectId(),snippetId:d.getSnippetId(),accountId:d.getAccountId(),dcpServiceId:d.getDCPServiceId(),revision:d.getRevision(),clientName:t.getClientName(),clientVersion:t.getClientVersion()},_=u.dereferenceChangeId;return o.each(n.getAll(),(function(e){c.defineProperty(f,e.id,(function(){var t=o.extend({},e);return c.defineProperty(t,"changes",(function(){return o.map(e.changes,_)}),"campaign"),c.defineProperty(t,"experiments",(function(){return o.map(e.experiments,(function(e){return p[e.id]}))}),"campaign"),t}),"campaignMap","byId"),o.each(e.experiments,(function(e){c.defineProperty(p,e.id,(function(){var t=o.extend({},e);return c.defineProperty(t,"changes",(function(){return o.map(e.changes,_)}),"experiment"),c.defineProperty(t,"variations",(function(){return o.map(e.variations,(function(e){return g[e.id]}))}),"experiment"),t}),"experimentMap","byId"),o.each(e.variations,(function(e){c.defineProperty(g,e.id,(function(){var t=o.extend({},e);return c.defineProperty(t,"actions",(function(){return o.map(e.actions,(function(e){return o.extend({},e,{changes:o.map(e.changes,_)})}))}),"variation"),t}),"variationMap","byId")}))}))})),h.groups=a.getGroupsMap(),h}],t.visitor=["stores/visitor",function(e){return o.cloneDeep(e.getVisitorProfile())}],t.visitor_id=["stores/visitor_id",function(e){return{randomId:e.getRandomId()}}],t.state=["stores/audience_data","stores/layer_data","stores/layer","stores/view_data","stores/view","stores/global","stores/observed_redirect",function(e,t,i,a,c,u,f){return{getCampaignStates:function(n){var a={},s=r(i,t,e,u,n,{includeOfferConsistency:!1});return o.each(s,(function(e){a[e.id]=e})),a},getExperimentStates:function(n){var a=r(i,t,e,u,n,{includeOfferConsistency:!1,onlySingleExperiments:!0}),s=["audiences","variation","reason","visitorRedirected","isActive"],c=o.reduce(a,(function(e,t){var i=t.allExperiments[0];return e[i.id]=o.extend({},o.pick(t,s),{id:i.id,experimentName:i.name,isInExperimentHoldback:t.isInCampaignHoldback}),e}),{});return c},getCampaignStateLists:function(n){var a={},s=r(i,t,e,u,n,{includeOfferConsistency:!0});return o.each(s,(function(e){var t=e.id;a[t]||(a[t]=[]),a[t].push(e)})),a},getPageStates:function(e){var t=c.getAll(),i=o.reduce(t,(function(e,t){var i=a.get(t.id);return e[t.id]=o.extend({},o.pick(i,["id","name","apiName","category","staticConditions","tags"]),o.pick(t,["isActive","metadata"])),e[t.id].isActive=!!e[t.id].isActive,e}),{});return e?o.pickBy(i,e):i},isGlobalHoldback:function(){return u.isGlobalHoldback()},getActivationId:function(){return u.getActivationId()},getVariationMap:function(){var e=i.getLayerStates(),n={};return o.each(e,(function(e){var i=t.get(e.layerId);if(e.decision&&e.decision.experimentId&&(n[e.decision.experimentId]={id:e.decision.variationId,name:null,index:null},i)){var r=o.find(i.experiments,{id:e.decision.experimentId});if(r&&e.decision.variationId)var a=o.find(r.variations,{id:e.decision.variationId}),s=o.findIndex(r.variations,{id:e.decision.variationId});a&&(n[e.decision.experimentId]={id:e.decision.variationId,name:a.name,index:s})}})),n},getActiveExperimentIds:function(){var e={};return o.each(this.getCampaignStateLists({isActive:!0}),(function(t){o.each(t,(function(t){e[t.experiment.id]=!0}))})),o.keys(e)},getRedirectInfo:function(){var e=d.getExperimentAndVariation();return e&&(e.referrer=d.getReferrer()),e},getDecisionString:function(e){if(!e)throw new Error("Must pass a config to getDecisionString");e=o.extend({maxLength:255,shouldCleanString:!1},e);var r=n(i,t,f,e.campaignId);return r?s.generateAnalyticsString(r.layer,r.experiment,r.variation,r.isLayerHoldback,e.maxLength,e.shouldCleanString):null},getDecisionObject:function(e){if(!e)throw new Error("Must pass a config to getDecisionObject");e=o.extend({maxLength:255,shouldCleanString:!1},e);var r=n(i,t,f,e.campaignId);if(!r)return null;var a=s.formatNamesAndIdsForAnalytics(r.layer,r.experiment,r.variation,e.shouldCleanString),c=o.mapValues(a.names,(function(t,i){return s.combineAndTruncateIdAndName(t,a.idStrings[i],e.maxLength)})),u={experiment:c.experiment,variation:c.variation};return l.isSingleExperimentPolicy(r.layer.policy)||o.extend(u,{campaign:c.layer,holdback:r.isLayerHoldback}),u}}}],t.utils=i(100).create(),t.jquery=["env/jquery",function(e){return e}],t.event_emitter=i(106)}),(function(e,t,i){function n(e){return e.replace(/[^a-zA-Z0-9\.\~\!\*\(\)\']+/g,"_")}function r(e){return!c.isEmpty(e)&&c.includes(["and","or","not"],e[0])}function a(e,t){var i="";return c.isEmpty(t)?i=d:(i=c.reduce(t,(function(t,i){var r=e.get(i);return r?t+n(r.name?r.name:r.id)+",":t}),""),i=i.slice(0,-1)),i}function o(e,i,n,r,a,o){if(!_.isSingleExperimentPolicy(e.policy)||!r){var s=!_.isSingleExperimentPolicy(e.policy)&&r,u=t.formatNamesAndIdsForAnalytics(e,i,n,o),d=[u.names.experiment,u.names.variation],p=[u.idStrings.experiment,u.idStrings.variation];_.isSingleExperimentPolicy(e.policy)||(d.unshift(u.names.layer),p.unshift(u.idStrings.layer));var g=c.reduce(p,(function(e,t){return e+t.length}),0),h=d.length-1+(s?1:0),v=h*l.length,E=g+v;if(s&&(E+=f.length),E>a)throw new Error("The analytics string size is too low to send the entity IDs.");for(var m=a-E,I=d.length,y=[],S=d.length-1;S>=0;S--){var T=d[S],A=Math.min(T.length,Math.floor(m/I));m-=A,I--,y.unshift(T.substring(0,A))}var R=c.map(y,(function(e,t){return e+p[t]}));return s&&R.push(f),R.join(l)}}function s(e,i,n,r,a,o){var s=r?f:p,u=3*l.length,d=t.formatNamesAndIdsForAnalytics(e,i,n,o),g=d.names,h=d.idStrings,v=c.reduce(h,(function(e,t){return e+t.length}),0);if(v+u+s.length>a)throw new Error("The analytics string size is too low to send the campaign, experiment, and variation IDs.");var E=a-v-u-s.length,m={};m.variation=Math.min(g.variation.length,Math.floor(E/3)),E-=m.variation,m.experiment=Math.min(g.experiment.length,Math.floor(E/2)),E-=m.experiment,m.layer=E;var I={};c.each(g,(function(e,t){I[t]=e.substring(0,m[t])}));var y=[];return _.isSingleExperimentPolicy(e.policy)||y.push(I.layer+h.layer),y=y.concat([I.experiment+h.experiment,I.variation+h.variation,s]),y.join(l)}var c=i(2),u=i(16),l=":",d="everyone_else",f="holdback",p="treatment",g="",h=i(23),_=i(44);t.formatNamesAndIdsForAnalytics=function(e,t,i,o){var s={layer:e.name||g,experiment:t.name||g,variation:i.name||g};if(o&&(s=c.mapValues(s,n)),s.experiment===g&&(!e.integrationStringVersion||1===e.integrationStringVersion))if(r(t.audienceIds))s.experiment="Exp";else{var l=u.get("stores/audience_data");s.experiment=a(l,t.audienceIds)}var d={layer:"("+n(e.id)+")",experiment:"("+n(t.id)+")",variation:"("+n(i.id)+")"};return{names:s,idStrings:d}},t.combineAndTruncateIdAndName=function(e,t,i){var n=i-t.length;if(n<0&&(h.warn("maxLength must be at least long enough to fit the entity ID, which is length"+t.length+". Defaulting to only use entity ID as name."),e=g),e===g)return t;if(e.length>n){var r=Math.min(e.length,n);return e=e.substring(0,r),e+t}return e+" "+t},t.generateAnalyticsString=function(e,t,i,n,r,a){return e.integrationStringVersion&&2===e.integrationStringVersion?o(e,t,i,n,r,a):s(e,t,i,n,r,a)}}),(function(e,t,i){var n=i(97),r=i(7),a=i(9),o=i(23);t.defineProperty=function(e,t,i,s,c){n(e,t,(function(){var e=["prop",s,c||t].join(".");return o.debug('Evaluating getter: "'+e+'"'),a.dispatch(r.RECORD_API_USAGE,{methodName:e}),i()}),!0)}}),(function(e,t){"use strict";function i(e,t,i,n){Object.defineProperty(e,t,{get:function(){var e=i.call(this);return Object.defineProperty(this,t,{value:e,enumerable:!!n,writable:!0}),e},set:function(e){return Object.defineProperty(this,t,{value:e,enumerable:!!n,writable:!0}),e},enumerable:!!n,configurable:!0})}e.exports=i}),(function(e,t,i){function n(e){var i=r.cloneDeep(e);return i.changes&&(i.changes=r.map(i.changes,t.dereferenceChangeId)),i.experiments&&r.each(i.experiments,(function(e){e.changes&&(e.changes=r.map(e.changes,t.dereferenceChangeId)),e.variations&&r.each(e.variations,(function(e){e.actions&&r.each(e.actions,(function(e){e.changes&&(e.changes=r.map(e.changes,t.dereferenceChangeId))}))}))})),i}var r=i(2),a=i(16),o=i(22),s=i(96),c=a.get("stores/change_data");t.translateDecisionToCampaignDecision=function(e){return u(r.cloneDeep(e),{layerId:"campaignId",isLayerHoldback:"isCampaignHoldback"})},t.translateLayerEventToCampaignEvent=function(e){var t={};return s.defineProperty(t,"campaign",(function(){var t=n(e.data.layer);return t}),"campaignEvent"),t.decisionTicket=e.data.decisionTicket,t.decision=this.translateDecisionToCampaignDecision(e.data.decision),t.audiences=e.data.audiences,{type:"lifecycle",name:"campaignDecided",data:t}},t.translateViewActivatedToPageActivated=function(e){return{type:"lifecycle",name:"pageActivated",data:{page:e.data.view}}},t.dereferenceChangeId=function(e){var t=c.getChange(e);return t?o.safeReference(t):e};var u=function(e,t){var i=r.omit(e,r.keys(t));return r.each(t,(function(t,n){i[t]=e[n]})),i}}),(function(e,t,i){var n=i(2),r=i(16),a=r.get("stores/observed_redirect");t.getReferrer=function(){var e=a.get();return e?e.referrer:null},t.getExperimentAndVariation=function(){var e=a.get();return e&&n.isString(e.variationId)?n.pick(e,["experimentId","variationId"]):null}}),(function(e,t,i){var n=i(12).Promise,r=i(101).observeSelector,a=i(102).poll,o=i(104).waitForElement,s=i(105).waitUntil;t.create=function(){return{observeSelector:r,poll:a,Promise:n,waitForElement:o,waitUntil:s}}}),(function(e,t,i){function n(){if(f.shouldObserveChangesIndefinitely()){var e={attributes:!0,childList:!0,subtree:!0,characterData:!0},t=p.getDocumentElement(),i=new MutationObserver(function(){this.disconnect(),l.each(l.keys(E),a),this.observe(t,e)});return function(n){var r=E[n];i.observe(t,e),r.cancelObservation=function(){delete E[n],l.isEmpty(E)&&i.disconnect()}}}return function(e){var t=h.poll(l.partial(a,e));E[e].cancelObservation=function(){t(),delete E[e]}}}function r(e){var t=E[e];t&&t.cancelObservation&&t.cancelObservation()}function a(e){if(E[e]){if(o(E[e]))return 0===E[e].matchedCount&&l.isFunction(E[e].options.onTimeout)&&E[e].options.onTimeout(),void r(e);var t=document.querySelectorAll(E[e].selector);t.length&&(l.each(t,(function(t){t.ni&&t.ni[e]||E[e].callbackQueue.push(t)})),s(e))}}function o(e){var t=e.options.timeout;if(null!==t)if("function"==typeof t)try{return t()}catch(e){}else if(Date.now()-e.startTime>t)return!0;return!1}function s(e){for(;E[e]&&E[e].callbackQueue.length;){var t=E[e].callbackQueue.shift();if(c(t,e),E[e].matchedCount=E[e].matchedCount+1,E[e].callback(t),E[e]&&E[e].options.once)return void r(e)}}function c(e,t){e.ni||(e.ni={}),e.ni[t]=!0}function u(e){try{document.querySelector(e)}catch(e){return!1}return!0}var l=i(2),d=(i(7),i(16)),f=d.get("stores/directive"),p=i(80),g=(i(25),i(9),i(5).generate),h=i(102),_=i(40),v=(d.get("stores/rum"),{once:!1,onTimeout:null,timeout:null}),E={},m=function(e){(m=n())(e)};t.observeSelector=function(e,t,i){if(!u(e))throw new Error("observeSelector expects a valid css selector as its first argument");if(!l.isFunction(t))throw new Error("observeSelector expects a function as its second argument");if(i&&(!l.isObject(i)||l.isFunction(i)))throw new Error("observeSelector expects an object as its third argument");var n=g();return i=l.assign({},v,i||{}),E[n]={callback:t,callbackQueue:[],matchedCount:0,options:i,selector:e,startTime:Date.now()},m(n),_.setTimeout(l.bind(a,null,n),0),l.partial(r,n)}}),(function(e,t,i){function n(e){l[e]&&a.each(l[e].callbacks,(function(e){e.call(null)}))}function r(e,t){l[t]&&l[t].callbacks[e]&&(delete l[t].callbacks[e],a.some(l[t].callbacks)||(clearInterval(l[t].id),delete l[t]))}var a=i(2),o=(i(7),i(16)),s=(i(25),i(9),i(5).generate),c=i(40),u=i(103).DEFAULT_INTERVAL,l=(o.get("stores/rum"),{});t.poll=function(e,t){a.isNumber(t)||(t=u),l[t]||(l[t]={callbacks:{},id:c.setInterval(a.partial(n,t),t)});var i=s();return l[t].callbacks[i]=e,a.partial(r,i,t)},t.cancelAll=function(){a.each(l,(function(e,t){clearInterval(e.id),delete l[t]}))}}),(function(e,t){e.exports={DEFAULT_INTERVAL:20}}),(function(e,t,i){var n=i(12).Promise,r=i(101).observeSelector;t.waitForElement=function(e){return new n(function(t,i){r(e,t,{once:!0})})}}),(function(e,t,i){var n=i(12).Promise,r=i(102).poll;t.waitUntil=function(e){return new n(function(t,i){if(e())return void t();var n=r((function(){e()&&(n(),t())}))})}}),(function(e,t,i){var n=i(87);t.on=function(e){return e.publicOnly=!0,n.on(e)},t.off=n.off,t.emit=function(e){n.emit(e)}}),(function(e,t,i){function n(e){var t,i={};if(e)if(r(e))t=Number(e);else{if("object"!=typeof e)throw new Error("tracker","Revenue argument",e,"not a number.");if(i=a.extend({},e),"revenue"in i){if(!r(i["revenue"]))throw new Error("tracker","Revenue value",i["revenue"],"not a number.");t=Number(i["revenue"]),delete i["revenue"]}}return a.isUndefined(t)||(i.revenue=t),i}function r(e){return a.isNumber(e)||a.isString(e)&&Number(e)==e}var a=i(2),o=i(108);t.activateGeoDelayedExperiments=function(e,t){t||(t=e.lists?"odds":"cdn3"),o.dataFromSource({data:e,source:t})},t.activateSiteCatalyst=function(e){e&&e.sVariable&&o.integrationSettings({id:"adobe_analytics",settings:{sVariableReference:e.sVariable}})},t.bucketUser=t.bucketVisitor=function(e,t){if(e&&t){var i={experimentId:String(e)};t>256?i.variationId=String(t):i.variationIndex=String(t),o.bucketVisitor(i)}},t.disable=function(e){o.disable({scope:e})},t.log=function(e){a.isUndefined(e)&&(e=!0),o.log({level:e?"INFO":"OFF"})},t.optOut=function(e){a.isUndefined(e)&&(e=!0),o.optOut({isOptOut:e})},t.setCookieDomain=function(e){o.cookieDomain({cookieDomain:e})},t.setCookieExpiration=function(e){o.cookieExpiration({cookieExpirationDays:e})},t.setDimensionValue=function(e,t){var i={};i[e]=t,o.user({attributes:i})},t.setUserId=function(e){o.user({userId:e})},t.storeThirdPartyData=function(e,t){o.dataFromSource({source:e,data:t})},t.trackEvent=function(e,t){o.event({eventName:e,tags:n(t)})}}),(function(e,t,i){function n(e){var t;return e.eventId&&(t=I.create(e.eventId,e.eventName,"custom")),w.updateAllViewTags(),function(){var i=p.trackCustomEvent(e.eventName,e.tags,t);i?R.log("API / Tracking custom event:",e.eventName,e.tags):R.log("API / Not tracking custom event:",e.eventName)}}function r(e){var t;return e.eventData&&(t=I.create(e.eventData.id,e.eventData.apiName,"click",e.eventData)),function(){var e=p.trackClickEvent(t);e?R.log("API / Tracking click event:",e):R.log("API / Not tracking click event:",e)}}function a(e){var t=e.eventData,i=A.createLayerState(t.layerId,t.experimentId,t.variationId,t.isLayerHoldback),n=A.createSingle(t.layerId,t.experimentId,t.variationId);return function(){A.recordLayerDecision(i.layerId,i.decisionTicket,i.decision),R.log("API / Tracking decision event:",i),p.trackDecisionEvent(i.decision,i.decisionTicket,n)}}function o(e){var t=w.create(e.eventData.id,e.eventData.apiName),i=w.createState(t.id);return function(){var e=p.trackViewActivation(t,i);e?R.log("API / Tracking pageview event:",e):R.log("API / Not tracking pageview event:",e)}}var s=i(2),c=i(7),u=i(93),l=i(94),d=i(109),f=i(25),p=i(110),g=i(117),h=i(6),_=i(76).create,v=i(24),E=i(118),m=i(120),I=i(121),y=i(87),S=i(9),T=i(26),A=i(113),R=i(23),D=i(122),b=i(114),w=i(123),O=i(74),C=i(16),N=C.get("stores/dimension_data"),L=C.get("stores/view"),P=C.get("stores/view_data"),V=C.get("stores/visitor_id"),k=C.get("stores/layer_data"),x=C.get("stores/directive"),F=!1,M=!1,U=F||M,G=86400,B=90,z=t.ApiListenerError=_("ApiListenerError");t.event=function(e){var t;switch(e.eventType){case"click":t=r(e);break;case"decision":t=a(e);break;case"pageview":t=o(e);break;case"custom":default:t=n(e)}V.getBucketingId()?t():S.dispatch(c.ADD_CLEANUP_FN,{lifecycle:f.Lifecycle.postActivate,cleanupFn:t})},t.clientMetadata=function(e){U&&(S.dispatch(c.SET_CLIENT_NAME,e.clientName),S.dispatch(c.SET_CLIENT_VERSION,e.clientVersion)),F&&e.forceVariationIds&&S.dispatch(c.LOAD_DIRECTIVE,{forceVariationIds:e.forceVariationIds})},t.priorRedirectString=function(e){U&&b.load(e.value)},t.microsnippetError=function(e){if(U){var t=e.errorData.metadata&&e.errorData.metadata.err||{};t.name=e.errorData.code;var i={engine:e.engine,msVersion:e.errorData.msVersion,requestId:e.errorData.requestId,projectId:e.errorData.projectId,snippetKey:e.errorData.snippetKey,args:e.errorData.args};m.handleError(t,i)}},t.rum=function(e){S.dispatch(c.SET_RUM_DATA,e.eventData)},t.initialViewStates=function(e){var t=s.map(e.states,(function(e,t){return{id:t,isActive:e}}));w.registerViews(t)},t.page=function(e){var t=P.getByApiName(e.pageName);if(!t)throw new Error('Unknown page "'+e.pageName+'"');var i=!e.hasOwnProperty("isActive")||e.isActive,n=function(){i?w.activateViaAPI(t,e.tags):(w.deactivate(t),R.log("API / Deactivated Page",w.description(t)))};V.getBucketingId()?n():S.dispatch(c.ADD_CLEANUP_FN,{lifecycle:f.Lifecycle.postViewsActivated,cleanupFn:n})},t.tags=function(e){w.setGlobalTags(e.tags)},t.user=function(e){U&&e.visitorId&&(V.getBucketingId()?(R.log("API / Setting visitor Id:",e.visitorId),O.setId({randomId:e.visitorId})):(R.log("API / Setting visitor Id for activation:",e.visitorId),S.dispatch(c.SET_VISITOR_ID_VIA_API,e.visitorId))),F&&s.each(["IP","location","queryParams","url"],(function(t){e[t]&&(R.log("API / Setting",t,":",e[t]),j(t,e[t],!1))})),R.log("API / Setting visitor custom attributes:",e.attributes),s.each(e.attributes,(function(e,t){var i,n,r=t,a=N.getById(t)||N.getByApiName(t);a&&(r=a.id,i=a.apiName,n=a.segmentId||a.id);var o={id:n,value:e};i&&(o.name=i),j(r,o,!0)}))};var j=function(e,t,i){var n=[{key:i?["custom",e]:[e],value:t,metadata:{lastModified:v.now()}}],r=function(){S.dispatch(c.SET_VISITOR_ATTRIBUTES,{attributes:n})};V.getBucketingId()?r():S.dispatch(c.ADD_CLEANUP_FN,{lifecycle:f.Lifecycle.postVisitorProfileLoad,cleanupFn:r})};t.optOut=function(e){var t=!e.hasOwnProperty("isOptOut")||e.isOptOut;E.setOptOut(t)},t.cookieExpiration=function(e){var t=e.cookieExpirationDays;t');var s=n.querySelector("#"+o);if(!s)throw new Error("Document.write failed to append script");s.onload=i,s.onerror=function(n){r.warn("Failed to load script ("+e+") synchronously:",n),t.addScriptAsync(e,i)}}catch(n){r.debug("Document.write failed for "+e+": "+n.message);var c=function(e){var t=new Function(e.responseText);t(),i&&i()};return a.request({url:e,async:!1,contentType:"text/plain",success:c})["catch"]((function(n){r.error("Failed to load "+e+" via synchronous XHR: "+n.message),t.addScriptAsync(e,i)}))}}}),(function(e,t,i){function n(){var e=null;b.isNumber(e)&&0===ve.getCount()?($.log("Activating after delay of",e,"ms because no Experiments are running"),q.dispatch(L.SET_RUM_DATA,{data:{activateDfd:!0}}),ue.setTimeout(V.emitActivateEvent,e)):V.emitActivateEvent()}function r(e){Oe.handleError(e.data.error,e.data.metadata)}function a(){b.isArray(window.optimizely)&&(window.optimizely=b.filter(window.optimizely,(function(e){var t=!0;return!we.push(e,t)})))}function o(){var e=i(85),n=!!ce.getCurrentId(),r=!!n&&ce.hasSomeData();n?r?$.log("xd / Existing visitor; has data on this origin"):$.log("xd / Existing visitor; new to this origin"):$.log("xd / New visitor");var a=he.getAccountId(),o="https://a16180790160.cdn.optimizely.com".replace("__SUBDOMAIN__","a"+a+"."),c="/client_storage/a"+a+".html";e.subscribe((function(e,t){ce.checkKeyForVisitorId(e)&&Q.setItem(e,t)}));var u=e.fetchAll().then((function(t){if(!Re.getVisitorIdLocator()){var i=be.getCanonicalOrigins();if(i){var n=e.getXDomainUserId(t,i);n&&($.log("Syncing cross-origin visitor randomId:",n),ce.maybePersistVisitorId({randomId:n}))}}return ce.deleteOldForeignData(),t})).then(t.persistItemsWithId).then((function(e){if(ce.loadForeignData(),n&&!r){var t=!b.isEmpty(e);$.debug("xd / Loaded foreign data? ",t),s(t)}$.log("Loaded visitor data from foreign origins"),V.emitOriginsSyncedEvent()}),(function(e){throw n&&!r&&($.debug("xd / Failed to load foreign data:",e),s(!1,e)),e}));return ie.all([e.load(o,c)["catch"]((function(e){throw $.debug("xd / Failed to load iframe:",e),n&&!r&&s(!1,e),e})),u["catch"]((function(e){$.debug("xd / Ignored error syncing foreign data (expected if waitForOriginSync used):",e.message),$.debug("xd / Enqueuing sync to happen after visitorId set."),q.dispatch(L.ADD_CLEANUP_FN,{lifecycle:j.Lifecycle.postVisitorProfileLoad,cleanupFn:V.emitOriginsSyncedEvent})}))])}function s(e,t){q.dispatch(L.SET_RUM_DATA,{data:{extras:{xdAttempt:e,xdError:t?t.toString():void 0}}})}function c(e){var t=Se.getVisitorProfile();return ce.populateEagerVisitorData(e,t)}function u(e,t,i){e=e||[];var n=Ie.getAllPlugins(j.PluginTypes.visitorProfileProviders),r=he.getGlobalHoldbackThreshold(),a=Se.getVisitorProfile();ce.populateLazyVisitorData(n,a);var o=Re.getBucketingId();if(!o)throw new Error("bucketingId not set");var s,c=Se.getVisitorProfile();if(t&&!Pe){var u=De.getVariationIdMap();s=u[t.id]}var l={bucketingId:o,visitorProfile:c,audiences:e,globalHoldback:r,preferredVariationMap:s,layer:t};return t&&i&&U.isPageIdRelevant(t)?b.map(i,(function(e){return U.createTicket(b.extend({},l,{pageId:e}))})):[U.createTicket(l)]}function l(e){return{bucketingId:Re.getBucketingId(),preferredLayerId:De.getPreferredLayerMap()[e.id]}}function d(e){var i=ve.getAllByPageIds(e),n=ge.getForceVariationIds(),r=ge.getForceAudienceIds(),a=!b.isEmpty(n);a&&$.log("Force variations are in use. Disabling mutual exclusivity.");var o=a?{individual:i}:b.reduce(i,(function(e,t){return t.groupId?e.groups[t.groupId]||(e.groups[t.groupId]=_e.get(t.groupId)):e.individual.push(t),e}),{groups:{},individual:[]});$.log("Deciding Campaigns/Experiments for Page(s)",e);var s=b.map(o.groups,W.description).join(", ");$.log("Groups:",s);var c=b.map(o.individual,X.description).join(", ");$.log("Campaigns/Experiments not in Groups (by Campaign id):",c);var u=b.map(o.groups,b.partial(f,n,r,e))||[],l=b.map(o.individual,(function(i){var a=b.filter(i.pageIds,b.partial(b.includes,e));return t.decideAndExecuteLayerASAP(n,r,a,i)})),d=u.concat(l);return ie.all(d).then((function(t){var i=b.filter(t,(function(e){return!!e}));return $.log("All Campaigns/Experiments for Page(s) (by Campaign id)",e,"resolved:",b.map(i,X.description).join(", ")),i}))}function f(e,i,n,r){try{var a=l(r),o=U.decideGroup(r,a);if(o.reason)return $.debug("Not activating Group",W.description(r),"; reason:",o.reason),ye.getSampleRum()&&q.dispatch(L.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:r.id}),ie.resolve();var s=ve.get(o.layerId);if(!s)return $.debug("Visitor was bucketed into a Campaign ("+o.layerId+") which is not in this snippet"),ie.resolve();var c=b.filter(s.pageIds,b.partial(b.includes,n));return b.isEmpty(c)?($.debug("Not activating Group",W.description(r),"; reason: visitor was bucketed into a Campaign/Experiment not related to the currently-activating Page(s)"),ie.resolve()):(ye.getSampleRum()&&q.dispatch(L.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:r.id}),t.decideAndExecuteLayerASAP(e,i,c,s))}catch(e){return $.error("Error getting decision for Group",W.description(r),"; ",e),ie.reject(e)}}function p(e,t,i,n){return new ie(function(r,a){try{E(n,e,t,i,(function(a){b.each(a,(function(r){var a=r.pageId?[r.pageId]:i;$.debug("Deciding layer: ",n,"with decisionTicket: ",r,"and actionViewIds: ",a),g(n,e,t,a,r)})),r(n)}))}catch(e){$.error("Error getting decision for Campaign: "+X.description(n),e),a(e)}})}function g(e,i,n,r,a){var o=X.description(e);$.log("Activating Campaign",o,"on Page(s)",r),n.length&&($.log("Applying force audienceIds:",n,"to Campaign",o),a=b.cloneDeep(a),a.audienceIds=n);var s=t.decideLayer(e,a,i),c=!(!i.length&&!n.length),u=t.getActionsForDecision(e,s,c),l=D(u.actions,r);if(u.maybeExecute&&h(l,e,s,r),b.forEach(r,(function(){P.trackDecisionEvent(s,a)})),V.emitLayerDecided({layer:e,decisionTicket:a,decision:s}),s.error)throw s.error;if(ye.getSampleRum()){q.dispatch(L.RECORD_LAYER_POLICY_USAGE,{policy:e.policy,layerId:e.id});var d=v(u.actions);q.dispatch(L.RECORD_CHANGE_TYPE_USAGE,{changeTypes:b.keys(d),layerId:e.id}),b.isEmpty(e.integrationSettings)||q.dispatch(L.RECORD_INTEGRATION_USAGE,{integrations:X.getIntegrationTypes(e),layerId:e.id})}return U.isInCohort(s)?void(u.maybeExecute&&_(l,e,s,r)):void $.log("Not activating Campaign: "+X.description(e)+"; not in the cohort because:",s.reason)}function h(e,t,i,n){var r=X.description(t);$.log("Preparing actions",e,"for Campaign",r,"on Page(s)",n),b.forEach(e,N.prepareAction)}function _(e,t,i,n){var r=X.description(t);return $.log("Executing actions",e,"for Campaign",r,"on Page(s)",n),ie.all(b.map(e,(function(e){return N.executePreparedAction(e).then(b.partial(V.emitActionAppliedEvent,e))}))).then((function(){$.log("All page actions for",i,"applied:",e),V.emitActionsForDecisionAppliedEvent(i,e)}))["catch"]((function(e){$.warn("Error evaluating page actions for decision",i,"because:",e)}))}function v(e){var t={};return b.each(e,(function(e){b.each(e.changeSet,(function(e){t[e.type]||(t[e.type]=!0)}))})),t}function E(e,t,i,n,r){if(t.length||i.length)return void r(u([],void 0,n));var a=X.relatedAudienceIds(e),o=b.reduce(a,(function(e,t){var i=de.get(t);return i&&e.push(i),e}),[]),s=Ie.getAllPlugins(j.PluginTypes.audienceMatchers);if(ye.getSampleRum()){var c={};if(b.each(o,(function(e){b.extend(c,m(e.conditions,s))})),!b.isEmpty(c)){var l=b.keys(c);q.dispatch(L.RECORD_AUDIENCE_USAGE,{audienceTypes:l,layerId:e.id})}}S(o,s,X.getActivationTimeout(e),(function(){var t=u(o,e,n);b.map(t,(function(t){I(t,o,e)})),r(t)}))}function m(e,t){var i={};return b.each(e,(function(e){b.isArray(e)?b.extend(i,m(e,t)):b.isObject(e)&&t[e.type]&&(i[e.type]=!0)})),i}function I(e,t,i){var n=b.map(e.audienceIds,b.bind(de.get,de)),r=b.filter(t,(function(t){return!b.includes(e.audienceIds,t.id)}));$.log("When deciding Campaign",X.description(i),"visitor is in audiences:",y(n),"and not in audiences:",y(r))}function y(e){var t=[];return b.each(e,(function(e){t.push(e.name,e)})),t}function S(e,t,i,n){var r=b.reduce(e,(function(e,i){return b.extend(e,k.requiredAudienceFieldsForConditions(i.conditions,t))}),{}),a=b.reduce(r,(function(e,t){if(b.isUndefined(ce.getAttribute(t))){var i=ce.getPendingAttributeValue(t);b.isUndefined(i)||e.push(i)}return e}),[]);if(0===a.length)return n();var o=[].concat(e),s=ne.firstToResolve(b.map(a,(function(e){return ie.resolve(e).then((function(){var e=Se.getVisitorProfile();if(o=b.filter(o,(function(i){return b.isUndefined(k.isInAudience(e,i,t))})),!b.isEmpty(o))throw new Error("At least one audience is still pending")}))})));ie.race([s,new ie(function(e,t){ue.setTimeout(t,i)})]).then((function(){$.log("Activating Campaign after pending Audiences resolved",e),n()}),(function(){ +$.log("Activating Campaign after timeout on Audiences",e),n()}))}function T(e,t,i){var n,r=X.description(e);return n=i.length?U.getDummyLayerDecision(e,i):U.decideLayer(e,t),$.log("Recording decision for Campaign",r,t,"->",n),X.recordLayerDecision(e.id,t,n),Pe||(n.variationId&&n.experimentId&&ce.updateVariationIdMap(e.id,n.experimentId,n.variationId),e.groupId&&ce.updatePreferredLayerMap(e.groupId,e.id)),n}function A(e){var t=pe.getCleanupFns(e);if(t.length>0){for(;t.length>0;)t.shift()();q.dispatch(L.CLEAR_CLEANUP_FN,{lifecycle:e})}}function R(e,t,i){var n=X.description(e),r="NOT applying changes for Campaign",a={actions:[],maybeExecute:!1};return a.actions=[].concat(fe.getLayerActions(t.layerId)||[],fe.getExperimentActions(t.experimentId)||[],fe.getExperimentVariationActions(t.experimentId,t.variationId)||[]),!i&&he.isGlobalHoldback()?($.log(r,n,"(visitor is in global holdback)"),a):t.isLayerHoldback?($.log(r,n,"(visitor is in layer holdback)"),a):t.experimentId&&t.variationId?(a.maybeExecute=!0,$.log("Got Actions for Campaign:",n,a.actions),a):($.log(r,n,"(visitor is not eligible for any Experiments)"),a)}function D(e,t){return b.filter(e,(function(e){return b.isUndefined(e.pageId)||b.includes(t,e.pageId)}))}var b=i(2),w=i(76).create,O=t.ActivationCodeError=w("ActivationCodeError"),C=t.ProjectJSError=w("ProjectJSError"),N=i(134),L=i(7),P=i(110),V=i(117),k=i(138),x=i(86),F=i(109),M=i(24),U=i(139),G=i(16),B=i(118),z=i(80),j=i(25),H=i(87),K=i(111),Y=i(144),q=i(9),W=i(143),X=i(113),Q=i(81).LocalStorage,$=i(23),J=i(145),Z=i(83),ee=i(122),te=i(88),ie=i(12).Promise,ne=i(146),re=i(114),ae=i(116),oe=i(136),se=i(123),ce=i(74),ue=i(40),G=i(16),le=G.get("stores/session"),de=G.get("stores/audience_data"),fe=G.get("stores/action_data"),pe=G.get("stores/cleanup"),ge=G.get("stores/directive"),he=G.get("stores/global"),_e=G.get("stores/group_data"),ve=G.get("stores/layer_data"),Ee=G.get("stores/layer"),me=G.get("stores/pending_events"),Ie=G.get("stores/plugins"),ye=G.get("stores/rum"),Se=G.get("stores/visitor"),Te=G.get("stores/view_data"),Ae=G.get("stores/view"),Re=G.get("stores/visitor_id"),De=G.get("stores/visitor_bucketing"),be=G.get("stores/xdomain"),we=i(93),Oe=i(120),Ce=i(1),Ne=1e3,Le=!1,Pe=!1,Ve=!1,ke=Pe||Ve,xe=1e3,Fe=t;t.initialize=function(e){var i=e.clientData;if(F.normalizeClientData(e.clientData),H.on({filter:{type:"error"},handler:r}),q.dispatch(L.DATA_LOADED,{data:i}),$.log("Initialized with DATA:",i),a(),B.setOptOut(ge.shouldOptOut()),ge.isDisabled()||ge.shouldOptOut())return void $.log("Controller / Is disabled");if(Ce.queueBeacons(),z.isReady()?q.dispatch(L.SET_DOMCONTENTLOADED):z.addReadyHandler((function(){q.dispatch(L.SET_DOMCONTENTLOADED)})),!ke){Z.time("projectJS");var o=he.getProjectJS();if(b.isFunction(o))try{Y.apply(o)}catch(e){$.error("Error while executing projectJS: ",e),x.emitError(new C(e))}Z.timeEnd("projectJS")}b.each(e.plugins||[],(function(e){try{e(ee)}catch(e){x.emitInternalError(e)}})),b.each(he.getPlugins()||[],(function(e){try{Y.apply(e,[ee])}catch(e){x.emitError(e)}})),re.load();var s=H.on({filter:{type:"lifecycle",name:"activated"},handler:function(){Se.observe(ce.persistVisitorProfile),Ee.observe(ce.persistLayerStates),le.observe(ce.persistSessionState),me.observe(J.persistPendingEvents),Pe||De.observe(ce.persistVisitorBucketingStore),H.off(s)}});H.on({filter:{type:"lifecycle",name:"viewsActivated"},handler:t.onViewsActivated}),H.on({filter:{type:"lifecycle",name:"pageDeactivated"},handler:t.onPageDeactivated}),t.initializeApi();var c=J.getPendingEvents();if(c&&(q.dispatch(L.LOAD_PENDING_EVENTS,{events:c}),J.retryPendingEvents(c)),H.on({filter:{type:"lifecycle",name:"activate"},handler:t.activate}),V.emitInitializedEvent(),!ge.shouldActivate())return ie.resolve();var u=[];if(be.isDisabled())n();else{var l=t.initializeXDomainStorage();u.push(l);var d=Boolean(be.getCanonicalOrigins());if(d){var f=ae.makeTimeoutPromise(xe);ie.race([l,f])["catch"]((function(e){$.error("Failed to initialize xDomain storage: ",e)})).then(n)["catch"](Oe.handleError)}else n()}return ie.all(u)},t.activate=function(){try{var e=[];$.log("Activated client"),A(j.Lifecycle.preActivate);var t=M.now();q.dispatch(L.ACTIVATE,{activationId:String(t),activationTimestamp:t});var i=Te.getAll();se.registerViews(i),ce.setId(ce.getOrGenerateId()),e.push(P.trackPostRedirectDecisionEvent()),q.dispatch(L.MERGE_VARIATION_ID_MAP,{variationIdMap:ce.getVariationIdMap()}),q.dispatch(L.MERGE_PREFERRED_LAYER_MAP,{preferredLayerMap:ce.getPreferredLayerMap()}),A(j.Lifecycle.postVisitorProfileLoad),e.push(c(Ie.getAllPlugins(j.PluginTypes.visitorProfileProviders)).then((function(){$.log("Populated visitor profile")})));var n=u(),r=U.decideGlobal(n);$.log("Made global decision",n,"->",r),q.dispatch(L.RECORD_GLOBAL_DECISION,r);var a=P.trackClientActivation();a?$.log("Tracked activation event",a):$.log("Not tracking activation event");var o=Fe.setUpViewActivation(i),s=[];return Le?s=se.activateMultiple(o):b.each(o,(function(e){s=s.concat(se.activateMultiple([e]))})),Pe&&ye.getSampleRum()&&q.dispatch(L.RECORD_VIEWS_INITIALLY_ACTIVATED_COUNT,{viewsInitiallyActivatedCount:s.length}),A(j.Lifecycle.postViewsActivated),A(j.Lifecycle.postActivate),V.emitActivatedEvent(),ie.all(e).then((function(){H.emit({type:K.TYPES.LIFECYCLE,name:"activateDeferredDone"}),$.log("All immediate effects of activation resolved")}),x.emitError)}catch(e){return x.emitError(e),ie.reject(e)}},Fe.setUpViewActivation=function(e){var t=[];return b.each(e,(function(e){b.isBoolean(Ae.getViewState(e.id).isActive)&&se.isActivationTypeImmediate(e.activationType)?$.debug("Skipping page: already evaluated, presumably at the edge",se.description(e)):se.shouldTriggerImmediately(e.activationType)?t.push(e):e.activationType===j.ViewActivationTypes.callback?($.debug("Setting up conditional activation for Page",se.description(e)),Fe.activateViewOnCallback(e)):e.activationType===j.ViewActivationTypes.polling?($.debug("Setting up polling activation for Page",se.description(e)),te.pollFor(b.partial(Y.apply,e.activationCode),null,b.partial(oe.isTimedOut,M.now())).then((function(){se.activateMultiple([e])}))["catch"]((function(t){$.warn("Failed to activate view ",e,t)}))):e.activationType!==j.ViewActivationTypes.manual&&x.emitError(new Error("Unknown view activationType: "+e.activationType))})),t},Fe.activateViewOnCallback=function(e){var t=function(t){var i=b.extend({},t,{pageName:e.apiName,type:"page"});we.push(i)},i={pageId:e.id};Object.defineProperty(i,"isActive",{get:function(){return Ae.isViewActive(e.id)}});try{Y.apply(e.activationCode,[t,i])}catch(t){var n=new O("("+t.toString()+") in activationCode for "+se.description(e));x.emitError(n,{originalError:t,userError:!0})}},t.onViewsActivated=function(e){var t,i=e.data.views,n=b.map(i,"id");try{if(!Re.getBucketingId())throw new Error("View activated with no visitorId set");var r=d(n)["catch"](x.emitError);return t=ie.all(b.map(i,(function(e){var t=function(){se.parseViewTags(e);var t=P.trackViewActivation(e);t?$.log("Tracked activation for Page",se.description(e),t):$.log("Not Tracking activation for Page",se.description(e))};return z.isReady()?ie.resolve(t()):te.pollFor(z.isReady,Ne).then(t)}))),ie.all([r,t])}catch(e){x.emitError(e)}},t.onPageDeactivated=function(e){var t=e.data.page,i=fe.getAllActionIdsByPageId(t.id);b.each(i,(function(e){var i=fe.getActionState(e);i&&(b.each(i,(function(e,i){if(e.cancel)try{e.cancel(),$.debug("Controller / Canceled change",i,"observation due to deactivation of page:",t)}catch(e){$.error("Controller / Error canceling change",i,"observation upon deactivation of page.",e)}if(t.undoOnDeactivation&&e.undo)try{e.undo(),$.debug("Controller / Undid change",i,"due to deactivation of page:",t)}catch(e){$.error("Controller / Error undoing change upon deactivation of page.",e)}})),q.dispatch(L.REMOVE_ACTION_STATE,{actionId:e}),$.debug("Controller / Undid changes and/or canceled change observation due to deactivation of page:",t,e))}))},t.initializeApi=function(){var e={push:we.push};Ve||(e.get=we.get);var t=window.optimizely;b.isArray(t)&&b.each(t,(function(t){e.push(t)})),e.data={note:"Obsolete, use optimizely.get('data') instead"},e.state={},window.optimizely=e},t.persistItemsWithId=function(e){return b.each(e,(function(e,t){ce.checkKeyForVisitorId(t)&&Q.setItem(t,e)})),e},t.initializeXDomainStorage=o,t.decideAndExecuteLayerASAP=p,t.decideLayer=T,t.getActionsForDecision=R}),(function(e,t,i){function n(e,t,i){var n=v.getActionState(t.id);if(!n)return void p.warn("Action / Attempted to prepare change for inactive action: ",t);var r=v.getChangeApplier(e.id,t.id);if(!a.isUndefined(r))return void p.warn("Action / Attempted to prepare a change which is already being applied: ",e);var s={changeId:e.id,actionId:t.id,changeApplier:I.create(e,t,i)};f.dispatch(o.SET_CHANGE_APPLIER,s)}function r(e,t,i,o){if(a.includes(o,t))return void p.error("Change with id "+t+" has circular dependencies: "+o.concat(t));if(!e[t]){var u=E.getChange(t);if(!u){var d="Change with id "+t+" is absent";return o.length&&(d+=" but listed as a dependency for "+o[o.length-1]),void p.warn(d)}e[t]=new g(function(d){var f=a.map(u.dependencies||[],(function(n){return r(e,n,i,o.concat([t]))}));if(u.src){var _="change_"+u.src,m=c.makeAsyncRequest(_,(function(){return h.addScriptAsync("https://cdn.optimizely.com/public/16180790160/data"+u.src,(function(){c.resolveRequest(_)}))})).then((function(){var e=E.getChange(u.id);e||s.emitError(new S("Failed to load async change from src: "+u.src)),n(e,i,l.now())}));f.push(m)}g.all(f).then((function(){var e=l.now(),n=v.getChangeApplier(t,i.id);return n?(p.debug("Action / Applying change:",u),n.apply().then((function(t){t?p.log(t):p.debug("Action / Applied change for the first time in "+(l.now()-e)+"ms:",u),d()}))):(p.debug("Action / Not applying change ",t," - No changeApplier found."),void d())}))["catch"]((function(e){p.error("Action / Failed to apply change:",u,e),d()}))})}return e[t]}var a=i(2),o=i(7),s=i(86),c=i(6),u=i(76).create,l=i(24),d=i(16),f=i(9),p=i(23),g=i(12).Promise,h=i(132),_=d.get("stores/global"),v=d.get("stores/action_data"),E=d.get("stores/change_data"),m=d.get("stores/session"),I=i(135),y=i(136);y.initialize();var S=u("ActionError");t.prepareAction=function(e){p.debug("Action / Preparing:",e),f.dispatch(o.ACTION_EXECUTED,{actionId:e.id,sessionId:m.getSessionId(),layerId:e.layerId,pageId:e.pageId,timestamp:l.now(),activationId:_.getActivationId()});var t=l.now();a.forEach(e.changeSet,(function(i){var r=a.isObject(i)?i.id:i,s=E.getChange(r);s||(f.dispatch(o.ADD_CHANGE,i),s=E.getChange(i.id)),s.src||n(s,e,t)}))},t.executePreparedAction=function(e){p.debug("Action / Executing:",e);var t={},i=a.map(e.changeSet,(function(i){var n=a.isObject(i)?i.id:i;return r(t,n,e,[])}));return g.all(i).then((function(){p.debug("changes for action id="+e.id+" applied")}))}}),(function(e,t,i){var n=i(13).Promise,r=i(24),a=i(16),o=a.get("stores/plugins"),s=i(25),c=i(23);t.create=function(e,t,i){var a={identifier:e.id,action:t,startTime:i||r.now()};try{var u=o.getPlugin(s.PluginTypes.changeAppliers,e.type);if(!u)throw new Error("Unrecognized change type "+e.type);return new u(e,a)}catch(e){c.error("Change applier was never properly constructed:",e);var l={apply:function(){return n.reject(e)}};return l}}}),(function(e,t,i){function n(){"interactive"!==document.readyState&&"complete"!==document.readyState||(t.domReadyTime=Date.now())}var r=i(137),a=i(16).get("stores/directive");t.domReadyTime=null,t.initialize=function(){n(),document.addEventListener("readystatechange",n,!0)},t.isTimedOut=function(e){var i=Date.now();if(!t.domReadyTime||!e)return!1;var n=Math.max(e,t.domReadyTime);return a.isEditor()&&(n=t.domReadyTime),!(i-n-1)return{experimentId:e.experiments[i].id,variationId:e.experiments[i].variations[n].id};return null}function a(e){var t=y.getPlugin(h.PluginTypes.deciders,e);if(s.isEmpty(t))throw new Error("No deciders found for policy: "+e);return t}function o(e,t){var i=y.getAllPlugins(h.PluginTypes.audienceMatchers);return s.reduce(t,(function(t,n){return l.isInAudience(e,n,i)&&t.push(n.id),t}),[])}var s=i(2),c=i(7),u=i(86),l=i(138),d=i(140),f=i(141),p=i(142).DecisionError,g=i(16),h=i(25),_=i(9),v=i(143),E=i(113),m=i(23),I=i(44),y=g.get("stores/plugins"),S=g.get("stores/global"),T=g.get("stores/layer_data");t.isPageIdRelevant=function(e){if(!e)return!1;var t=a(e.policy);return s.isFunction(t.includePageIdInDecisionTicket)?t.includePageIdInDecisionTicket(e):t.includePageIdInDecisionTicket===!0},t.createTicket=function(e){var t=s.pick(e,["bucketingId","globalHoldback","preferredVariationMap","pageId"]);return s.extend(t,{audienceIds:o(e.visitorProfile,e.audiences),activationId:S.getActivationId()}),t},t.decideGlobal=function(e){var t=d.isHoldback(e.bucketingId,{id:null,holdback:e.globalHoldback});return{isGlobalHoldback:t}},t.decideGroup=n,t.decideLayer=function(e,t){m.debug("Deciding: ",e,t);var i,n,r=a(e.policy),o={layerId:e.id,experimentId:null,variationId:null,isLayerHoldback:d.isHoldback(t.bucketingId,e)};if(s.isEmpty(e.experiments))throw new p("No experiments in layer.");try{if(r.decideLayer){m.debug("Decision / Using decider's custom decideLayer.");var c=r.decideLayer(e,t);i=c.experiment,n=c.variation}else m.debug("Decision / Using default decideLayer behavior."),i=r.selectExperiment(e,t.audienceIds,t.bucketingId),n=f.selectVariation(i,t.audienceIds,t.bucketingId,t.activationId,t.preferredVariationMap)}catch(e){e instanceof p?o.reason=e.message:o.error=e}return o.experimentId=i?i.id:null,o.variationId=n?n.id:null,o.error&&(o.error.name="DecisionEngineError",u.emitError(o.error)),o},t.getDummyLayerDecision=function(e,t){var i,n=r(e,t);return n?(m.log("Decision / Applying force variation:",n.variationId,"to Campaign",E.description(e)),i={layerId:e.id,variationId:n.variationId,experimentId:n.experimentId,isLayerHoldback:!1,reason:"force"}):(m.log("No variation matches ids:",t,"in Campaign",E.description(e)),i={layerId:e.id,variationId:null,experimentId:null,isLayerHoldback:!1,reason:"force"}),i},t.isInCohort=function(e){if(!e.experimentId||!e.variationId)return!1;var t=T.get(e.layerId);return!(I.isSingleExperimentPolicy(t.policy)&&e.isLayerHoldback)}}),(function(e,t,i){var n=i(64),r=t.TOTAL_POINTS=1e4;t.bucketingNumber=function(e,t,i){var a=n.hashToInt(e+t,i,r);return a},t.isHoldback=function(e,i){return t.bucketingNumber(e,i.id,n.Seed.IGNORING)<(i.holdback||0)},t.chooseWeightedCandidate=function(e,i,r){for(var a=t.bucketingNumber(e,i,n.Seed.BUCKETING),o=0;oa)return r[o].entityId;throw new Error("Unable to choose candidate")}}),(function(e,t,i){var n=i(2),r=i(7),a=i(140),o=i(124),s=i(142).DecisionError,c=i(9),u=i(23),l="impression";t.isValidExperiment=function(e,t){var i,r=n.partial(n.includes,e);return u.groupCollapsed("Decision / Evaluating audiences for experiment:",t,e),i=!t.audienceIds||o.evaluate(t.audienceIds,r),u.groupEnd(),u.debug("Decision / Experiment",t,"is valid?",i),i},t.selectVariation=function(e,t,i,o,d){if(!e.variations||0===e.variations.length)throw new s('No variations in selected experiment "'+e.id+'"');if(!e.weightDistributions&&e.variations.length>1)throw new s('On selected experiment "'+e.id+'", weightDistributions must be defined if # variations > 1');var f;if(e.bucketingStrategy&&e.bucketingStrategy===l)if(1===e.variations.length)f=e.variations[0].id;else{var p=o;f=a.chooseWeightedCandidate(i+p,e.id,e.weightDistributions)}else if(f=1===e.variations.length?e.variations[0].id:a.chooseWeightedCandidate(i,e.id,e.weightDistributions),d&&d[e.id]){u.debug("Decision / Using preferredVariationMap to select variation for experiment:",e.id);var g=d[e.id];if(!n.find(e.variations,{id:g}))return c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"stoppedVariation",id:e.id}),u.debug("Decision / Preferred variation:",g,"not found on experiment:",e.id,". Visitor not bucketed."),null;g!==f&&(c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"preferredVariation",id:e.id}),f=g)}var h=n.find(e.variations,{id:f});if(h)return u.debug("Decision / Selected variation:",h),h;throw new s('Unable to find selected variation: "'+f+'".')},t.getExperimentById=function(e,t){var i=n.find(e.experiments,{id:t});if(i)return i;throw new s("Unable to find selected experiment.")},t.hasVariationActionsOnView=function(e,t){return u.debug("Decision / Checking variation:",e,"for actions on pageId:",t),!!n.find(e.actions,(function(e){return e.pageId===t&&!n.isEmpty(e.changes)}))}}),(function(e,t){function i(e){this.message=e}i.prototype=new Error,t.DecisionError=i}),(function(e,t,i){function n(e){return r.map(e.weightDistributions,"entityId")}var r=i(2);t.description=function(e){var t=!!e.name,i=t?'"'+e.name+'" ':"",r=n(e).join(", ");return i+"(id "+e.id+", campaigns: "+r+")"}}),(function(module,exports,__webpack_require__){var createError=__webpack_require__(77),di=__webpack_require__(16),Logger=__webpack_require__(23),CSP_MODE=!1,EXEC_WITH_JQUERY=!0,ExecError=exports.Error=createError("ExecError");exports.apply=function(e,t){t=t||[],EXEC_WITH_JQUERY&&(t=t.concat(di.get("env/jquery")));try{return e.apply(void 0,t)}catch(i){throw Logger.warn("Error applying function",e,"with args:",t,i),new ExecError(i)}},exports.eval=function(str){if(CSP_MODE)throw new ExecError("eval is not supported in CSP mode");try{return EXEC_WITH_JQUERY&&(str="var $ = optimizely.get('jquery');"+str),eval(str)}catch(e){throw Logger.warn("Error executing JS:",str,e),new ExecError(e)}}}),(function(e,t,i){var n=i(2),r=i(86),a=i(25),o=i(26),s=i(81).LocalStorage,c=i(23),u=i(91),l=i(16),d=l.get("stores/pending_events"),f=a.StorageKeys.PENDING_EVENTS;t.persistPendingEvents=function(){try{var e=d.getEventsString();s.setItem(f,e),i(85).setItem(f,e)}catch(e){c.warn("PendingEvents / Unable to set localStorage key, error was: ",e),r.emitInternalError(e)}},t.getPendingEvents=function(){try{return o.parse(s.getItem(f))}catch(e){return null}},t.retryPendingEvents=function(e){n.forOwn(e,(function(e,t){u.retryableRequest(e.data,t,e.retryCount)})),n.isEmpty(e)||c.log("Retried pending events: ",e)}}),(function(e,t,i){var n=i(2),r=i(12).Promise;t.firstToResolve=function(e){return new r(function(t){n.each(e,(function(e){r.resolve(e).then(t,(function(){}))}))})}}),(function(e,t,i){function n(e){var t=!1;if(a.isArray(window.optimizely)&&a.each(window.optimizely,(function(i){a.isArray(i)&&"verifyPreviewProject"===i[0]&&String(i[1])===e&&(t=!0)})),!t)throw new Error("Preview projectId: "+e+" does not match expected")}function r(){s.on({filter:{type:c.TYPES.ANALYTICS,name:"trackEvent"},handler:f}),s.on({filter:{type:c.TYPES.LIFECYCLE,name:"viewActivated"},handler:f}),s.on({filter:{type:c.TYPES.LIFECYCLE,name:"layerDecided"},handler:f}),s.on({filter:{type:"error"},publicOnly:!0,handler:f})}var a=i(2),o=i(16),s=i(87),c=i(111),u=i(40),l=o.get("stores/directive"),d="optimizelyPreview",f=function(e){var t=u.getGlobal(d);t.push(e)};t.initialize=function(e){l.isSlave()&&n(e),r()},t.setupPreviewGlobal=function(){u.getGlobal(d)||u.setGlobal(d,[])},t.pushToPreviewGlobal=function(e){f(e)}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(149))}}),(function(e,t){e.exports={provides:"visitorId",getter:["stores/visitor_id",function(e){return e.getRandomId()}]}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(151)),e.registerAudienceMatcher("behavior",i(153))}}),(function(e,t,i){var n=i(152);e.exports={provides:"events",isTransient:!0,getter:[function(){return n.getEvents()}]}}),(function(e,t,i){var n=i(2),r=i(72),a=i(16),o=a.get("stores/visitor_events"),s=1e3;t.getEvents=function(){var e=r.getEvents(),t=[].concat.apply([],n.values(o.getForeignEvents())),i=[].concat.apply([],n.values(o.getForeignEventQueues())),a=r.mergeAllEvents([e,t,i]);return a.slice(a.length-s)}}),(function(e,t,i){var n=i(2),r=i(26),a=i(154),o=i(155);e.exports={fieldsNeeded:["events"],match:function(e,t){var i=[],s=r.parse(t.value);return i=n.isUndefined(s.version)?[s]:a.buildFromSpecV0_1(s),n.every(i,(function(t){return o.isSatisfied(t,e.events)}))}}}),(function(e,t,i){function n(e){return e=(e||"").toString().trim(),p[e]||e}function r(e,t,i){var n={where:t};if(e.count&&(n["limit"]=e.count),e.modifier===s.FREQUENCY_FILTERS.MOST_FREQUENT){var r=s.getFieldKeyPathForSource(e.name,i),a=s.aggregate("count"),o=s.aggregateField("count"),l=s.groupField(r);return c.extend(n,{select:[{field:l}],groupBy:s.groupBy([r]),aggregate:[a],orderBy:[{field:o,direction:"DESC"}]})}return c.extend(n,{orderBy:[{field:[u.FIELDS.TIME],direction:"DESC"}]})}function a(e){var t=[];if(c.isUndefined(e))throw new Error("rule is undefined");if(!c.isObject(e))throw new Error("rule is not an Object");"0.2"!==e["version"]&&t.push('version: not "0.2"'),e["filter"]&&(c.isArray(e["filter"])?c.each(e["filter"],(function(e,i){var n=s.validateFieldKeyPathV0_2(e["field"],s.FieldPurpose.FILTER);n&&t.push("filter["+i+"]: "+n);var r=s.validateComparatorAndValue(e["comparator"],e["value"]);r&&t.push("filter["+i+"]: "+r)})):t.push("filter: not an array"));var i=[],n=[];if(e["sort"]&&(e["reduce"]&&e["reduce"]["aggregator"]&&"nth"!==e["reduce"]["aggregator"]&&t.push("sort: superfluous because we can apply aggregator "+l.stringify(e["reduce"]["aggregator"])+" to unsorted items"),c.isArray(e["sort"])?c.each(e["sort"],(function(e,r){var a=s.validateFieldKeyPathV0_2(e["field"],s.FieldPurpose.SORT);a&&t.push("sort["+r+"]: "+a),e["field"]&&"frequency"===e["field"][0]?i.push(e):n.push(e);var c=o(e["direction"]);c&&t.push("sort["+r+"]: "+c)})):t.push("sort: not an array"),i.length&&n.length&&t.push('sort: sorting by non-["frequency"] field is pointless because we are going to sort the picked values by ["frequency"]'),i.length&&!e["pick"]&&t.push('sort: sorting by ["frequency"] is impossible because no values have been picked')),e["pick"]){e["reduce"]&&"count"===e["reduce"]["aggregator"]&&t.push('pick: superfluous because we can apply aggregator "count" to raw events');var r=s.validateFieldKeyPathV0_2(e["pick"]["field"]);r&&t.push("pick: "+r)}if(e["reduce"]){var a=e["reduce"]["aggregator"],u="aggregator "+(l.stringify(a)||String(a)),d=e["reduce"]["n"],f="index "+(l.stringify(d)||String(d));c.includes(["sum","avg","max","min","count","nth"],a)||t.push("reduce: "+u+" is unknown"),c.includes(["sum","avg","max","min"],a)&&(e["pick"]||t.push("reduce: "+u+" is impossible to use because no values have been picked")),"nth"===a?((!c.isNumber(d)||isNaN(d)||parseInt(d,10)!==d||d<0)&&t.push("reduce: "+f+" is not a non-negative integer (mandated by "+u+")"),e["sort"]||t.push('reduce: aggregator "nth" is meaningless without a specific sort order')):c.isUndefined(d)||t.push("reduce: "+f+" is defined (not mandated by "+u+")")}if(t.length)throw new Error(t.join("\n"))}function o(e){var t="direction "+(l.stringify(e)||String(e));if(!c.includes(["ascending","descending"],e))return t+' is not "ascending" or "descending"'}var s=t,c=i(2),u={FIELDS:i(63).FIELDS,FIELDS_V0_2:i(63).FIELDS_V0_2},l=i(26),d=i(23),f=i(155);s.MILLIS_IN_A_DAY=864e5,s.aggregateField=function(e,t){return c.isString(t)&&(t=[t]),t=t||f.DEFAULT_FIELD,[f.generateAlias(e,t)]},s.groupField=function(e){return c.isString(e)&&(e=[e]),e=e||f.DEFAULT_FIELD,[e.join(".")]};var p={"<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","==":"eq"};s.fieldComparison=function(e,t,i){return e=n(e),c.isString(t)&&(t=[t]),"exists"===e?{op:e,args:[{field:t}]}:{op:e,args:[{field:t},{value:i}]}},s.relativeTimeComparison=function(e,t){return{op:n(e),args:[{op:"-",args:[{eval:"now"},{field:[u.FIELDS.TIME]}]},{value:t*s.MILLIS_IN_A_DAY}]}},s.rangeTimeComparison=function(e){return c.isArray(e)?{op:"between",args:[{field:[u.FIELDS.TIME]},{value:[e[0]||+new Date(0),e[1]||+new Date]}]}:(d.error("Rule builder","rangeTimeComparison passed invalid range",e),null)},s.groupBy=function(e){for(var t=[],i=0;i0)throw new Error('A "pick" clause must not be specified with "count" or "most_recent", "most_frequent" modifiers'+l.stringify(e));return[r(e.pick,t,e.source)]}return i.length>0?i:[{where:t}]},s.buildFromSpecV0_2=function(e){a(e);var t={where:{op:"and",args:c.map(e["filter"]||[],(function(e){return"age"===e["field"][0]?s.relativeTimeComparison(e["comparator"]||"eq",e["value"]/s.MILLIS_IN_A_DAY):s.fieldComparison(e["comparator"]||"eq",s.convertFieldKeyPathFromSpecV0_2(e["field"]),e["value"])}))}};if(e["reduce"]&&"count"===e["reduce"]["aggregator"])return c.extend(t,{aggregate:[{op:"count",args:[{field:["*"]}]}],select:[{field:["_count_*"]}]});var i=[],n=[];if(e["sort"]&&(c.each(e["sort"],(function(e){c.includes(["ascending","descending"],e["direction"])&&(c.includes(["time","age"],e["field"][0])&&n.push(e),"frequency"===e["field"][0]&&i.push(e))})),n.length&&!i.length&&(t["orderBy"]=c.filter(c.map(n,(function(e){return"time"===e["field"][0]?{field:s.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===e["direction"]?"ASC":"DESC"}:"age"===e["field"][0]?{field:s.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===e["direction"]?"DESC":"ASC"}:void 0}))))),e["pick"]&&e["pick"]["field"]){var r=s.convertFieldKeyPathFromSpecV0_2(e["pick"]["field"]);if(e["reduce"]&&c.includes(["avg","max","min","sum"],e["reduce"]["aggregator"]))return c.extend(t,{aggregate:[{op:e["reduce"]["aggregator"],args:[{field:r}]}],select:[{field:[f.generateAlias(e["reduce"]["aggregator"],r)]}]});t=i.length?c.extend(t,{groupBy:[{field:r}],aggregate:[{op:"count",args:[{field:["*"]}]}],orderBy:[{field:["_count_*"],direction:"ascending"===i[0]["direction"]?"ASC":"DESC"}],select:[{field:[r.join(".")]}]}):c.extend(t,{select:[{field:r}]})}if(e["reduce"]&&"nth"===e["reduce"]["aggregator"]){var o=e["reduce"]["n"];if(c.isNumber(o)&&o>=0&&Number(o)===Math.floor(Number(o)))return c.extend(t,{offset:o,limit:1})}return t},s.convertFieldKeyPathFromSpecV0_2=function(e){return"tags"===e[0]&&"revenue"===e[1]?["r"]:[u.FIELDS_V0_2[e[0]]].concat(e.slice(1))},s.FieldPurpose={FILTER:"filter",SORT:"sort",PICK:"pick"},s.validateFieldKeyPathV0_2=function(e,t){var i="field "+(l.stringify(e)||String(e));if(!c.isArray(e)||!c.every(e,c.isString))return i+" is not an array of strings";if("tags"===e[0]&&e.length>2||"tags"!==e[0]&&e.length>1)return i+" includes too many strings";if("tags"===e[0]&&e.length<2)return i+" does not specify an exact tag";if(e.length<1)return i+" does not specify a top-level field";var n=c.keys(u.FIELDS_V0_2),r=["age","frequency"];return t===s.FieldPurpose.FILTER&&(n.push("age"),r=["frequency"]),t===s.FieldPurpose.SORT&&(n=["time","age","frequency"],r=["name","type","category","tags"]),c.includes(r,e[0])?i+" is not supported here":c.includes(n,e[0])?void 0:i+" is unknown"},s.validateComparatorAndValue=function(e,t){var i="comparator "+(l.stringify(e)||String(e)),n="value "+(l.stringify(t)||String(t));if(!c.isString(e)&&!c.isUndefined(e))return i+" is not a string";switch(e){case void 0:case"eq":case"is":case"contains":break;case"lt":case"gt":case"lte":case"gte":if(!c.isNumber(t))return n+" is not a number (mandated by "+i+")";break;case"in":if(!c.isArray(t))return n+" is not an array (mandated by "+i+")";break;case"between":if(!(c.isArray(t)&&2===t.length&&c.isNumber(t[0])&&c.isNumber(t[1])&&t[0]<=t[1]))return n+" is not a pair of increasing numbers (mandated by "+i+")";break;case"regex":if(!(c.isString(t)||c.isArray(t)&&2===t.length&&c.isString(t[0])&&c.isString(t[1])))return n+" is not a pattern string or a [pattern string, flags string] array (mandated by "+i+")";break;case"exists":if(!c.isUndefined(t))return n+" is not undefined (mandated by "+i+")"; +break;default:return i+" is unknown"}}}),(function(e,t,i){var n=i(2),r=i(25),a=i(23),o=n.bind(a.log,a),s=i(24),c=i(19).getFieldValue,u=i(26),l=function(e,t,i){if(e.getValueOrDefault)return e.getValueOrDefault(t,i);if(!n.isArray(t))return i;var r=c(e,t);return"undefined"==typeof r&&(r=i),r},d=function(e){return"string"==typeof e?e.trim().toLowerCase():e};t.clause={WHERE:"where",GROUP_BY:"groupBy",AGGREGATE:"aggregate",HAVING:"having",ORDER_BY:"orderBy",SELECT:"select",OFFSET:"offset",LIMIT:"limit",FROM:"from"},t.DEFAULT_FIELD=["*"],t.booleanOperators={eq:function(e){var t=n.map(e,d);return t[0]==t[1]},is:function(e){return e[0]===e[1]},gt:function(e){return e[0]>e[1]},lt:function(e){return e[0]=e[1]},lte:function(e){return e[0]<=e[1]},"in":function(e){var t=n.map(e[1]||[],d);return n.includes(t,d(e[0]))},between:function(e){return e[1][0]<=e[0]&&e[0]<=e[1][1]},contains:function(e){var t=n.map(e,(function(e){return"string"==typeof e?e.toLowerCase():e}));return(t[0]||"").indexOf(t[1])!==-1},regex:function(e){try{var t,i;return n.isString(e[1])?(t=e[1],i="i"):(t=e[1][0]||"",i=e[1][1]||""),new RegExp(t,i).test(e[0])}catch(e){return a.error("Rules",'In operator "regex", error: '+(e.message||"invalid RegExp /"+[t,i].join("/"))),!1}},exists:function(e){return"undefined"!=typeof e[0]},and:function(e){return n.every(e,(function(e){return e}))},or:function(e){return n.some(e,(function(e){return e}))},not:function(e){return!e[0]}},t.arithmeticOperators={"+":function(e){return(e[0]||0)+(e[1]||0)},"-":function(e){return(e[0]||0)-(e[1]||0)},"/":function(e){return(e[0]||0)/(e[1]||1)},"%":function(e){return(e[0]||0)%(e[1]||1)}},t.aggregateOperators={sum:function(e,i){for(var n=e[0]||t.DEFAULT_FIELD,r=0,a=0;au)return o}return 0})):(o("Rules","groupBy rule must be an array"),t)};t.rewrite=function(e){function i(e,s){if(n.isArray(e)&&("and"!==e[0]&&"or"!==e[0]&&"not"!==e[0]&&a.error("Rules","Unexpected operation "+e[0]+". Continuing optimistically."),e={op:e[0],args:e.slice(1)}),e.hasOwnProperty("field")||e.hasOwnProperty("value")||e.hasOwnProperty("eval"))return e;if(s&&e["op"]in t.aggregateOperators){var c=(e["args"]&&e["args"][0]||{})["field"]||t.DEFAULT_FIELD,u=t.generateAlias(e["op"],c);return u in o||(r.push({op:e["op"],args:e["args"]}),o[u]=!0),{field:[u]}}for(var l=[],d=e["args"]||[],f=0;f0)&&(s[t.clause.AGGREGATE]=(e[t.clause.AGGREGATE]||[]).concat(r));for(var c=[t.clause.GROUP_BY,t.clause.ORDER_BY,t.clause.SELECT,t.clause.OFFSET,t.clause.LIMIT],u=0;u0&&(r=n.map(r,(function(e){return"Sub-rule "+i+": "+e}))),e.hasOwnProperty(t.clause.FROM)&&(r=r.concat(m(e[t.clause.FROM],i+1))),r},I=function(e,t){return n.map(t,(function(t){return n.map(e,(function(e){return g(t,e)}))}))},y=function(e,i){var r=i;if(e.hasOwnProperty(t.clause.FROM)&&(a.debug("Evaluating FROM clause:",e[t.clause.FROM]),r=y(e[t.clause.FROM],r),a.debug("Results after FROM:",r)),a.debug("Evaluating WHERE clause:",e[t.clause.WHERE]),r=n.filter(r,(function(i){return g(i,e[t.clause.WHERE])})),a.debug("Results after WHERE:",r),e.hasOwnProperty(t.clause.AGGREGATE)){a.debug("Evaluating AGGREGATE clause:",e[t.clause.AGGREGATE]);var o=h(e[t.clause.GROUP_BY],r),s=_(e[t.clause.AGGREGATE],o);r=v(o,s),a.debug("Results after AGGREGATE:",r)}e.hasOwnProperty(t.clause.HAVING)&&(a.debug("Evaluating HAVING clause:",e[t.clause.HAVING]),r=n.filter(r,(function(i){return g(i,e[t.clause.HAVING])})),a.debug("Results after HAVING:",r)),e.hasOwnProperty(t.clause.ORDER_BY)&&(a.debug("Evaluating ORDER_BY clause:",e[t.clause.ORDER_BY]),r=E(e[t.clause.ORDER_BY],r),a.debug("Results after ORDER_BY:",r));var c=0;e.hasOwnProperty(t.clause.OFFSET)&&(a.debug("Evaluating OFFSET clause:",e[t.clause.OFFSET]),c=Number(e[t.clause.OFFSET]));var u;return e.hasOwnProperty(t.clause.LIMIT)&&(a.debug("Evaluating LIMIT clause:",e[t.clause.LIMIT]),u=c+Number(e[t.clause.LIMIT])),(c>0||!n.isUndefined(u))&&(r=r.slice(c,u),a.debug("Results after OFFSET/LIMIT:",r)),e.hasOwnProperty(t.clause.SELECT)&&(a.debug("Evaluating SELECT clause:",e[t.clause.SELECT]),r=I(e[t.clause.SELECT],r),a.debug("Results after SELECT:",r)),r};t.execute=function(e,i){e=t.rewrite(e),a.shouldLog(r.LogLevel.DEBUG)&&a.groupCollapsed("Evaluating Behavioral Rule"),a.debug("Rule:",e,u.stringify(e)),a.debug("Events:",i);var n=m(e);if(n.length>0)throw new Error("Rule "+u.stringify(e)+" has violations: "+n.join("\n"));var o=y(e,i);return a.debug("Rule result:",o),a.shouldLog(r.LogLevel.DEBUG)&&a.groupEnd(),o},t.isSatisfied=function(e,i){try{return t.execute(e,i).length>0}catch(t){return a.error("Rules","Error "+t.toString()+" while evaluating rule "+u.stringify(e)),!1}}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(157))}}),(function(e,t,i){var n=i(2),r=i(158),a=i(152),o=i(26),s=i(154);e.exports={provides:"customBehavior",shouldTrack:!0,isLazy:!1,getter:["stores/global","stores/visitor_attribute_entity",function(e,t){var i=e.getProjectId(),c=n.filter(n.map(t.getCustomBehavioralAttributes(i),(function(e){try{return{id:e.id,granularity:r.GRANULARITY.ALL,rule:s.buildFromSpecV0_2(o.parse(e.rule_json))}}catch(e){return}}))),u=a.getEvents();return r.evaluate(c,u)}]}}),(function(e,t,i){function n(e){if(0===e.length)return[];for(var t=e.length-1,i=o.FIELDS.SESSION_ID,n=e[t][i];t>0&&n===e[t-1][i];)t--;return e.slice(t)}function r(e,t){if(0===e.length||t<=0)return[];var i=+new Date-t*s.MILLIS_IN_A_DAY;i-=i%s.MILLIS_IN_A_DAY;for(var n=e.length;n>0&&i<=e[n-1][o.FIELDS.TIME];)n--;return e.slice(n)}var a=i(23),o={FIELDS:i(63).FIELDS},s=i(154),c=i(155);t.GRANULARITY={ALL:"all",CURRENT_SESSION:"current_session",LAST_30_DAYS:"last_30_days",LAST_60_DAYS:"last_60_days"},t.evaluate=function(e,i){var o={};if(0===i.length){for(var s=0;s0){var t=e[0],i=a(t,[n.FIELDS.SESSION_INDEX]);return i===o}return!0}]}}),(function(e,t){e.exports={fieldsNeeded:["first_session"],match:function(e){return!!e.first_session}}}),(function(e,t,i){e.exports=function(e){e.registerApiModule("behavior",i(163))}}),(function(e,t,i){function n(e,t){var i=d.buildFromSpecV0_1(t);if(1!==i.length)throw new Error("Invalid query descriptor; verify that no aggregators are specified");return f.execute(i[0],e)}function r(e,t){return u.map(e,(function(e){return u.isFunction(e.toObject)?e.toObject(t):e}))}function a(e,t){if(!e)return["Descriptor not defined"];var i=[];return e.count&&i.push('Unexpected "count" clause specified'),e.pick&&e.pick.modifier&&t.indexOf(e.pick.modifier)===-1&&i.push('Invalid "pick" modifier "'+e.pick.modifier+'"'),u.each(e.filters,(function(e){u.isUndefined(e.modifier)||i.push('Unexpected "filter" modifier "'+e.modifier+'"')})),i.length>0?i:void 0}function o(e,t){var i,o={revenueAsTag:!1,timeAsTimestamp:!0};if(u.isUndefined(t))return i=l.getEvents(e),r(i,o);if(u.isNumber(t)){if(t<=0)throw new Error("Count must be a positive integer, got "+t);return i=l.getEvents(e),r(i.slice(-t),o)}var s=a(t,u.values(d.RECENCY_FILTERS));if(s)throw new Error(s.join("\n"));return i=l.getEvents(e),r(n(i,t),o)}function s(e,t){if(t=u.cloneDeep(t)||{},!t.pick)throw new Error('No "pick" clause provided in query descriptor');if(!t.pick.name)throw new Error('No field name provided in "pick" clause');t.pick.modifier=t.pick.modifier||d.FREQUENCY_FILTERS.MOST_FREQUENT;var i=a(t,u.values(d.FREQUENCY_FILTERS));if(i)throw new Error(i.join("\n"));var r=l.getEvents(e);return n(r,t)}function c(e,t){var i=d.buildFromSpecV0_2(t),n=l.getEvents(e),a=r(f.execute(i,n),{revenueAsTag:!0,timeAsTimestamp:!1});return(t.pick||t.reduce&&"count"===t.reduce.aggregator)&&(a=u.flatten(a)),t.reduce&&(a=a[0]),a}var u=i(2),l=i(152),d=i(154),f=i(155);e.exports=["stores/visitor_events",function(e){return{getEvents:u.partial(o,e),getByFrequency:u.partial(s,e),query:u.partial(c,e)}}]}),(function(e,t,i){e.exports=function(e){e.registerDependency("sources/browser_id",i(165)),e.registerVisitorProfileProvider(i(170)),e.registerVisitorProfileProvider(i(171)),e.registerAudienceMatcher("browser_version",i(172))}}),(function(e,t,i){var n=i(166);t.getId=function(){return n.get().browser.id},t.getVersion=function(){return n.get().browser.version}}),(function(e,t,i){var n=i(2),r=i(167),a=i(40),o=i(7),s=i(16),c=i(9),u=s.get("stores/ua_data");t.get=function(){var e=u.get();return n.isEmpty(e)&&(e=r.parseUA(a.getUserAgent()),c.dispatch(o.SET_UA_DATA,{data:e})),e}}),(function(e,t,i){function n(e){if(e=(e||"").toLowerCase(),e in c)return e;var t=a.keys(c);return a.find(t,(function(t){var i=c[t];return a.includes(i,e)}))||"unknown"}function r(e,t,i){return t?t:"unknown"===e?"unknown":i?"mobile":"desktop_laptop"}var a=i(2),o=i(168);t.parseUA=function(e){var t=new o(e),i=t.getBrowser(),a=t.getOS(),c=t.getDevice(),l=(a.name||"unknown").toLowerCase(),d=(i.name||"unknown").toLowerCase(),f=s(c.type,d,l);return{browser:{id:n(i.name),version:i.version},platform:{name:l,version:a.version},device:{model:u[c.model]||"unknown",type:r(d,c.type,f),isMobile:f}}};var s=function(e,t,i){if(a.includes(["mobile","tablet"],e))return!0;if(a.includes(["opera mini"],t))return!0;var n=["android","blackberry","ios","windows phone"];return!!a.includes(n,i)},c={gc:["chrome","chromium","silk","yandex","maxthon","chrome webview"],edge:["edge"],ie:["internet explorer","iemobile"],ff:["firefox","iceweasel"],opera:["opera","opera mini","opera tablet"],safari:["safari","mobile safari","webkit"],ucbrowser:["uc browser"]},u={iPhone:"iphone",iPad:"ipad"}}),(function(e,t,i){var n;!(function(r,a){"use strict";var o="0.7.17",s="",c="?",u="function",l="undefined",d="object",f="string",p="major",g="model",h="name",_="type",v="vendor",E="version",m="architecture",I="console",y="mobile",S="tablet",T="smarttv",A="wearable",R="embedded",D={extend:function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2===0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i},has:function(e,t){return"string"==typeof e&&t.toLowerCase().indexOf(e.toLowerCase())!==-1},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.replace(/[^\d\.]/g,"").split(".")[0]:a},trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},b={rgx:function(e,t){for(var i,n,r,o,s,c,l=0;l0?2==o.length?typeof o[1]==u?this[o[0]]=o[1].call(this,c):this[o[0]]=o[1]:3==o.length?typeof o[1]!==u||o[1].exec&&o[1].test?this[o[0]]=c?c.replace(o[1],o[2]):a:this[o[0]]=c?o[1].call(this,c,o[2]):a:4==o.length&&(this[o[0]]=c?o[3].call(this,c.replace(o[1],o[2])):a):this[o]=c?c:a;l+=2}},str:function(e,t){for(var i in t)if(typeof t[i]===d&&t[i].length>0){for(var n=0;nNumber(i[a]))return 1}}return 0}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(175)),e.registerAudienceMatcher("campaign",i(176))}}),(function(e,t,i){var n=i(119);e.exports={provides:"campaign",shouldTrack:!0,isSticky:!0,getter:[function(){return n.getQueryParamValue("utm_campaign")}]}}),(function(e,t,i){var n=i(20);e.exports={fieldsNeeded:["campaign"],match:function(e,t){return n.hasMatch(t.value,t.match,e.campaign)}}}),(function(e,t,i){e.exports=function(e){e.registerAudienceMatcher("code",i(178))}}),(function(e,t,i){var n=i(2),r=i(144);t.fieldsNeeded=[],t.match=function(e,t){if(n.isUndefined(t.value))return!0;if("function"==typeof t.value)try{return Boolean(r.apply(t.value))}catch(e){return!1}else try{return Boolean(r.eval(t.value))}catch(e){return!1}return!1}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(180)),e.registerAudienceMatcher("cookies",i(181))}}),(function(e,t,i){var n=i(2),r=i(75),a=i(16),o=a.get("stores/audience_data");e.exports={provides:"cookies",isLazy:!0,getter:[function(){var e=r.getAll(),t=o.getFeaturesNeeded("cookies");return n.reduce(e,(function(e,i,r){return n.has(t,r)&&(e[r]=i),e}),{})}]}}),(function(e,t,i){var n=i(20);e.exports={fieldsNeeded:["cookies"],match:function(e,t){var i=t.name,r=t.value,a=t.match,o=e.cookies[i];return n.hasMatch(r,a,o)}}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(183));var t=i(184);e.registerAudienceMatcher("custom_attribute",t),e.registerAudienceMatcher("custom_dimension",t)}}),(function(e,t,i){var n=i(2),r=i(25),a=i(23),o=i(16),s=o.get("stores/dimension_data");e.exports={provides:"custom",attributionType:r.AttributionTypes.LAST_TOUCH,restorer:function(e){return n.reduce(e,(function(e,t,i){var r=i,o=s.getByApiName(i),c=s.getById(i),u=c;return n.isObject(t)?(!t.id&&o&&(u=o,r=o.id,n.extend(t,{id:u.segmentId||u.id})),t.name||u&&u.apiName&&(t.name=u.apiName),t.id||u||a.warn("Unable to determine ID for custom attribute:",i,"; segmentation is disabled."),e[r]=t,e):(a.error('Unable to restore custom attribute "'+i+'" because value is not an object'),e)}),{})},shouldTrack:!0}}),(function(e,t,i){var n=i(2),r=i(20);t.match=function(e,t){var i;return e.custom&&(i=e.custom[t.name]),n.isObject(i)&&(i=i.value),r.hasMatch(t.value,t.match,i)}}),(function(e,t,i){e.exports=function(e){e.registerDependency("sources/device",i(186)),e.registerVisitorProfileProvider(i(187)),e.registerAudienceMatcher("device",i(188))}}),(function(e,t,i){var n=i(166);t.getDevice=function(){var e=n.get().device;return"unknown"!==e.model?e.model:"tablet"===e.type?"tablet":e.isMobile?"mobile":"desktop"}}),(function(e,t){e.exports={provides:"device",shouldTrack:!0,isSticky:!0,getter:["sources/device",function(e){return e.getDevice()}]}}),(function(e,t){e.exports={fieldsNeeded:["device"],match:function(e,t){return e.device===t.value}}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(190)),e.registerAudienceMatcher("device_type",i(191))}}),(function(e,t,i){var n=i(166);e.exports={provides:"device_type",shouldTrack:!0,isSticky:!0,getter:[function(){var e=n.get().device;switch(e.type){case"mobile":return"phone";case"tablet":case"desktop_laptop":return e.type;default:return"other"}}]}}),(function(e,t){e.exports={fieldsNeeded:["device_type"],match:function(e,t){return e.device_type===t.value}}}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(193)),e.registerAudienceMatcher("referrer",i(194))}}),(function(e,t,i){ +var n=i(80),r=i(99);e.exports={provides:"referrer",shouldTrack:!0,isSticky:!0,getter:[function(){var e=r.getReferrer()||n.getReferrer();return""===e&&(e=null),e}]}}),(function(e,t,i){var n=i(195);t.fieldsNeeded=["referrer"],t.match=function(e,t){return null!==e.referrer&&n(e.referrer,t)}}),(function(e,t,i){function n(e){var t=e.indexOf("?");return t!==-1&&(e=e.substring(0,t)),t=e.indexOf("#"),t!==-1&&(e=e.substring(0,t)),e}function r(e){return a(n(e))}function a(e,t){e=e.replace("/?","?"),e=e.toLowerCase().replace(/[\/&?]+$/,"");var i=l.slice(0);t||(i=i.concat(c));for(var n=i.length,r=0;r0&&(t[1]="?"+o.join("&")),r&&(t[1]+="#"+r),t.join("")}return e}var s=i(2);e.exports=function(e,t){e=o(e);var i=t.value;switch(t.match){case"exact":return e=a(e),e===a(i);case"regex":try{return Boolean(e.match(i))}catch(e){}return!1;case"simple":return e=r(e),i=r(i),e===i;case"substring":return e=a(e,!0),i=a(i,!0),e.indexOf(i)!==-1;default:return!1}};var c=["www."],u="optimizely_",l=["https?://.*?.?optimizelyedit.(com|test)/","https?://.*.?optimizelypreview.(com|test)/","https?://(edit|preview)(-hrd|-devel)?.optimizely.(com|test)/","https?://.*?.?optimizelyedit(-hrd)?.appspot.com/","https?://"]}),(function(e,t,i){e.exports=function(e){e.registerVisitorProfileProvider(i(197)),e.registerAudienceMatcher("source_type",i(199))}}),(function(e,t,i){var n=i(119),r=i(80),a=i(99),o=i(198),s=["google\\.\\w{2,3}(\\.\\w{2,3})?/(search|url)","bing\\.\\w{2,3}(\\.\\w{2,3})?/(search|url)","yahoo\\.\\w{2,3}(\\.\\w{2,3})?/search","baidu\\.\\w{2,3}(\\.\\w{2,3})?/","https://(www)?\\.google\\..*?/?$","https://search\\.yahoo\\..*?/?$","https://(www)?\\.bing\\..*?/?$"];e.exports={provides:"source_type",shouldTrack:!0,isSticky:!1,getter:[function(){return function(e,t){var i=function(){if(n.getQueryParamValue("utm_source")||n.getQueryParamValue("gclid")||n.getQueryParamValue("otm_source"))return"campaign";for(var e=a.getReferrer()||r.getReferrer(),t=0;t=s&&u<=c&&a.includes(o.days,l)}}),(function(e,t,i){function n(e){function t(e,t,i){try{c(t),e[i]=t}catch(e){N.emitError(new X("Bad value for eventTags["+i+"]: "+e.message))}return e}var i=C.keys(ie),n=C.omit(e,i),r=C.pick(e,i),a=C.reduce(n,t,{}),o=C.reduce(r,(function(e,i,n){var r=ie[n];r.excludeFeature||t(a,i,n);try{r.validate(i),e[n]=r.sanitize(i),a[n]=e[n]}catch(e){N.emitError(new X("Bad value for eventMetrics["+n+"]: "+e.message))}return e}),{});return o.tags=a,o}function r(e){var t=C.extend({entity_id:e.pageId,key:e.pageApiName,timestamp:e.timestamp,uuid:e.eventId,type:J},n(e.eventTags));return t}function a(e){return C.extend({entity_id:e.eventEntityId,key:e.eventApiName,timestamp:e.timestamp,uuid:e.eventId,type:e.eventCategory},n(e.eventTags))}function o(e){return C.extend({entity_id:e.eventEntityId,key:e.eventApiName,timestamp:e.timestamp,uuid:e.eventId,type:e.eventCategory},n(e.eventTags))}function s(e){return{entity_id:null,type:Q,uuid:e.eventId,timestamp:e.timestamp}}function c(e){if(null==e)throw new Error("Feature value is null");if("object"==typeof e){var t;try{t=x.stringify(e)}catch(e){}throw new Error('Feature value is complex: "'+t||'[object]"')}}function u(e){if(null==e)throw new Error("Metric value is null");if(!C.isNumber(e))throw new Error("Metric value is not numeric")}function l(e){return C.reduce(e,(function(e,t){try{c(t.value),e.push({entity_id:t.id||null,key:t.name,type:t.type,value:t.value})}catch(e){F.warn("Error evaluating user feature",t,e)}return e}),[])}function d(e,t,i){Y.dispatch(V.REGISTER_TRACKER_EVENT,{event:e,decisions:i}),f(t),b()}function f(e){var t=l(e);Y.dispatch(V.UPDATE_TRACKER_VISITOR_ATTRIBUTES,{attributes:t})}function p(e){var t=l(e.userFeatures),i={account_id:e.accountId,anonymize_ip:e.anonymizeIP,client_name:e.clientName,client_version:e.clientVersion,project_id:e.projectId,visitors:[{session_id:h(e.sessionId),visitor_id:e.visitorId,attributes:t,snapshots:[{decisions:[{campaign_id:e.layerId,experiment_id:e.experimentId,variation_id:e.variationId,is_campaign_holdback:e.isLayerHoldback}],events:[{uuid:e.decisionId,entity_id:e.layerId,timestamp:e.timestamp,type:$}]}]}]};Y.dispatch(V.REGISTER_PREVIOUS_BATCH,i),b()}function g(e){var t=C.isNull(q.getAnonymizeIP())?void 0:q.getAnonymizeIP(),i={account_id:e.accountId,anonymize_ip:t,client_name:e.clientName,client_version:e.clientVersion,project_id:e.projectId,visitors:[]};i.revision=e.revision,Z&&(i.enrich_decisions=!0);var n={session_id:h(e.sessionId),visitor_id:e.visitorId,attributes:[],snapshots:[]},r=w(e.layerStates);Y.dispatch(V.REGISTER_TRACKER_VISITOR,{data:i,visitor:n,decisions:r}),b()}function h(e){return oe?ae:e}function _(e){var t={entity_id:e.layerId,type:$,uuid:e.decisionId,timestamp:e.timestamp};Y.dispatch(V.REGISTER_TRACKER_DECISION,{decisionEvent:t,decisions:w(e.layerStates)}),f(e.userFeatures),b()}function v(){if(!W.canSend())return void F.debug("Not sending events (holding)");var e=W.hasEventsToSend(),t=W.hasPreviousBatchesToSend();return e||t?(t&&(C.each(W.getPreviousBatches(),E),Y.dispatch(V.RESET_TRACKER_PREVIOUS_BATCHES)),void(e&&(Y.dispatch(V.FINALIZE_BATCH_SNAPSHOT),E(W.getEventBatch()),Y.dispatch(V.RESET_TRACKER_EVENTS)))):void F.debug("Not sending events because there are no events to send")}function E(e){F.debug("Sending ticket:",e);var t=L.generate();B.retryableRequest({url:P,method:"POST",data:m(e)},t)}function m(e){var t=C.extend({},C.pick(e,["account_id","anonymize_ip","client_name","client_version","enrich_decisions","project_id","revision"]),{visitors:C.map(e.visitors,I)});return t}function I(e){return{visitor_id:e.visitor_id,session_id:ae,attributes:C.map(e.attributes,y),snapshots:C.map(e.snapshots,S)}}function y(e){return D(e,{entity_id:"e",key:"k",type:"t",value:"v"})}function S(e){var t=e.events;return t=T(t),{activationTimestamp:q.getActivationTimestamp(),decisions:C.map(e.decisions,A),events:C.map(t,R)}}function T(e){var t=C.reduce(e,(function(e,t){var i,n=t.type===J&&C.isEmpty(t.tags)&&C.isEmpty(C.pick(t,C.keys(ie)));if(i=n?t.type:t.uuid,e[i]){var r=e[i].timestamp;t.timestamp>r&&(r=t.timestamp),e[i]=C.extend({},e[i],{key:e[i].key+"-"+(t.key||""),entity_id:e[i].entity_id+"-"+t.entity_id,timestamp:r})}else e[i]=t;return e}),{});return C.values(t)}function A(e){return D(e,{campaign_id:"c",experiment_id:"x",is_campaign_holdback:"h",variation_id:"v"})}function R(e){return e.key===$&&(e.type=$,delete e.key),D(e,{entity_id:"e",key:"k",quantity:"q",revenue:"$",tags:"a",timestamp:"t",uuid:"u",value:"v",type:"y"})}function D(e,t){return C.reduce(e,(function(e,i,n){return n in t&&(e[t[n]||n]=i),e}),{})}function b(){function e(){var t=!ne||j.isLoaded();t&&v(),W.isPolling()&&G.setTimeout(e,te)}return W.shouldBatch()?void(W.isPolling()||(G.setTimeout(e,te),Y.dispatch(V.SET_TRACKER_POLLING,!0),G.setTimeout((function(){Y.dispatch(V.SET_TRACKER_BATCHING,!1),Y.dispatch(V.SET_TRACKER_POLLING,!1)}),ee))):void v()}function w(e){return C.map(e,(function(e){return{campaign_id:e.layerId,experiment_id:e.decision.experimentId,variation_id:e.decision.variationId,is_campaign_holdback:e.decision.isLayerHoldback}}))}function O(){var e=W.getPersistableState();if(e)try{F.debug("Persisting pending batch:",e),U.persistTrackerOptimizelyData(e),Y.dispatch(V.SET_TRACKER_DIRTY,!1)}catch(e){F.debug("Failed to persist pending batch:",e)}}var C=i(2),N=i(86),L=i(5),P="https://logx.optimizely.com/v1/events",V=i(7),k=i(76).create,x=i(26),F=i(23),M=i(115),U=i(74),G=i(40),B=i(91),z=i(16),j=i(80),H=i(87),K=i(111),Y=i(9),q=z.get("stores/global"),W=z.get("stores/tracker_optimizely"),X=t.Error=k("OptimizelyTrackerError"),Q="client_activation",$="campaign_activated",J="view_activated",Z=!0,ee=1e4,te=1e3,ie={revenue:{validate:u,sanitize:Math.floor,excludeFeature:!0},quantity:{validate:u,sanitize:Math.floor,excludeFeature:!0},value:{validate:u,sanitize:C.identity}},ne=!1,re=!1,ae="AUTO",oe=!0,se=function(e){e.timing===M.TrackLayerDecisionTimingFlags.postRedirectPolicy?p(e):_(e)},ce=[function(){return function(e){d(r(e),e.userFeatures,w(e.layerStates))}}],ue=[function(){return function(e){g(e),d(s(e),e.userFeatures,w(e.layerStates))}}],le=[function(){return function(e){d(o(e),e.userFeatures,w(e.layerStates))}}],de=[function(){return function(e){d(a(e),e.userFeatures,w(e.layerStates))}}],fe={trackLayerDecision:se,postRedirectPolicy:M.PostRedirectPolicies.TRACK_AFTER_SYNC,nonRedirectPolicy:M.NonRedirectPolicies.TRACK_IMMEDIATELY,onPageActivated:ce,onClientActivation:ue,onClickEvent:de,onCustomEvent:le};e.exports=function(e){e.registerAnalyticsTracker("optimizely",fe),H.on({filter:{type:K.TYPES.ANALYTICS,name:"sendEvents"},handler:function(){Y.dispatch(V.SET_TRACKER_SEND_EVENTS,!0),W.isPolling()||v()}}),H.on({filter:{type:K.TYPES.ANALYTICS,name:"holdEvents"},handler:function(){Y.dispatch(V.SET_TRACKER_SEND_EVENTS,!1)}}),Y.dispatch(V.SET_TRACKER_SEND_EVENTS,!re);var t=H.on({filter:{type:"lifecycle",name:"activated"},handler:function(){W.observe(O),H.off(t)}})}}),(function(e,t,i){e.exports=function(e){e.registerViewProvider(i(207)),e.registerViewMatcher("url",i(208))}}),(function(e,t,i){var n=i(119);e.exports={provides:"url",getter:[function(){return n.getUrl()}]}}),(function(e,t,i){var n=i(195);e.exports={fieldsNeeded:["url"],match:function(e,t){return n(e.url,t)}}}),(function(e,t,i){var n="element_present",r={match:function(e,t){return!!document.querySelector(t.value)}};e.exports=function(e){e.registerViewMatcher(n,r)}}),(function(e,t,i){var n=i(80),r=i(25),a=i(87),o=i(211),s=i(123),c="DOMChanged",u={token:void 0,setUpObserver:function(){o.createDOMChangedObserver(),this.token=a.on({filter:{type:"viewTrigger",name:"DOMChanged"},handler:function(){s.getViewsAndActivate(r.ViewActivationTypes.DOMChanged)}})},turnOffObserver:function(){a.off(this.token)}};e.exports=function(e){n.isReady()?u.setUpObserver():n.addReadyHandler(u.setUpObserver),e.registerViewTrigger(c,u)}}),(function(e,t,i){var n=i(80),r=i(87),a=i(212);t.createDOMChangedObserver=function(){var e=n.getDocumentElement(),t={type:"viewTrigger",name:"DOMChanged"},i={attributes:!0,childList:!0,subtree:!0,characterData:!0},o=a.create((function(){r.emit(t,!0)}));a.observe(o,e,i)}}),(function(e,t){t.create=function(e){return new MutationObserver(e)},t.observe=function(e,t,i){e.observe(t,i)}}),(function(e,t,i){function n(e){return"apiName: "+e.apiName+", selector: "+e.eventFilter.selector}var r=i(110),a=i(214),o=i(23),s=i(123);e.exports=function(e){var t=new a(function(e){s.updateAllViewTags();var t=r.trackClickEvent(e);t?o.log("Tracking click event:",e):o.log("Not tracking click event:",e)});e.registerEventImplementation("click",{attach:function(e){t.hasEvents()||t.listen(),t.addEvent(e),o.debug("Started listening for click event ("+n(e)+"):",e)},detach:function(e){t.removeEvent(e),t.hasEvents()||t.unlisten(),o.debug("Stopped listening for click event ("+n(e)+"):",e)}})}}),(function(e,t,i){function n(e){this.handler=e,this.events=[],this.unlistenFn=null,this.clickHandler=a.bind((function(e){a.forEach(this.events,a.bind((function(t){try{var i=t.config&&t.config.selector?t.config.selector:t.eventFilter.selector;r(e,i,t)&&this.handler(t)}catch(e){o.emitError(new l("Unable to handle click for selector"+i+":"+e.message))}}),this))}),this)}function r(e,t,i){for(var n=e.target,r=0;n;){var s;try{s=u(n,t)}catch(s){var c={typeofElementValue:typeof n,nodeName:a.result(n,["nodeName"],null),nodeType:a.result(n,["nodeType"],null),targetName:a.result(e,["target","nodeName"],null),targetType:a.result(e,["target","nodeType"],null),numParentsTraversed:r,selector:t,errorMessage:s.message,eventId:i.id};return o.emitError(new l("Unable to evaluate match for element"),c),!1}if(s)return!0;n=n.parentElement,r++}return!1}var a=i(2),o=i(86),s=i(76).create,c=i(80),u=i(215),l=t.Error=s("ClickDelegateError");n.prototype.listen=function(){this.unlistenFn=c.addEventListener("click",this.clickHandler,!0)},n.prototype.unlisten=function(){this.unlistenFn&&(this.unlistenFn(),this.unlistenFn=null)},n.prototype.hasEvents=function(){return this.events.length>0},n.prototype.addEvent=function(e){this.events.push(e)},n.prototype.removeEvent=function(e){this.events=a.filter(this.events,(function(t){return t.apiName!==e.apiName}))},e.exports=n}),(function(e,t,i){e.exports=i(216)}),(function(e,t){"use strict";function i(e,t){if(r)return r.call(e,t);for(var i=e.parentNode.querySelectorAll(t),n=0;n{"use strict";function s(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(a){e[a]=t[a]}))})),e}function i(e){return Object.prototype.toString.call(e)}function r(e){return"[object Function]"===i(e)}function o(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var n={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},u={"http:":{validate:function(e,t,a){var s=e.slice(t);return a.re.http||(a.re.http=new RegExp("^\\/\\/"+a.re.src_auth+a.re.src_host_port_strict+a.re.src_path,"i")),a.re.http.test(s)?s.match(a.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,a){var s=e.slice(t);return a.re.no_http||(a.re.no_http=new RegExp("^"+a.re.src_auth+"(?:localhost|(?:(?:"+a.re.src_domain+")\\.)+"+a.re.src_domain_root+")"+a.re.src_port+a.re.src_host_terminator+a.re.src_path,"i")),a.re.no_http.test(s)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:s.match(a.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,a){var s=e.slice(t);return a.re.mailto||(a.re.mailto=new RegExp("^"+a.re.src_email_name+"@"+a.re.src_host_strict,"i")),a.re.mailto.test(s)?s.match(a.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function l(e){var t=e.re=a(36066)(e.__opts__),s=e.__tlds__.slice();function n(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||s.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),s.push(t.src_xn),t.src_tlds=s.join("|"),t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");var u=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var a=e.__schemas__[t];if(null!==a){var s={validate:null,link:null};if(e.__compiled__[t]=s,"[object Object]"===i(a))return"[object RegExp]"!==i(a.validate)?r(a.validate)?s.validate=a.validate:c(t,a):s.validate=function(e){return function(t,a){var s=t.slice(a);return e.test(s)?s.match(e)[0].length:0}}(a.validate),void(r(a.normalize)?s.normalize=a.normalize:a.normalize?c(t,a):s.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(a)?c(t,a):u.push(t)}})),u.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var l=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(o).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+l+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function _(e,t){var a=e.__index__,s=e.__last_index__,i=e.__text_cache__.slice(a,s);this.schema=e.__schema__.toLowerCase(),this.index=a+t,this.lastIndex=s+t,this.raw=i,this.text=i,this.url=i}function h(e,t){var a=new _(e,t);return e.__compiled__[a.schema].normalize(a,e),a}function m(e,t){if(!(this instanceof m))return new m(e,t);var a;t||(a=e,Object.keys(a||{}).reduce((function(e,t){return e||n.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=s({},n,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=s({},u,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},l(this)}m.prototype.add=function(e,t){return this.__schemas__[e]=t,l(this),this},m.prototype.set=function(e){return this.__opts__=s(this.__opts__,e),this},m.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,a,s,i,r,o,n,u;if(this.re.schema_test.test(e))for((n=this.re.schema_search).lastIndex=0;null!==(t=n.exec(e));)if(i=this.testSchemaAt(e,t[2],n.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||u=0&&null!==(s=e.match(this.re.email_fuzzy))&&(r=s.index+s[1].length,o=s.index+s[0].length,(this.__index__<0||rthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=r,this.__last_index__=o)),this.__index__>=0},m.prototype.pretest=function(e){return this.re.pretest.test(e)},m.prototype.testSchemaAt=function(e,t,a){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,a,this):0},m.prototype.match=function(e){var t=0,a=[];this.__index__>=0&&this.__text_cache__===e&&(a.push(h(this,t)),t=this.__last_index__);for(var s=t?e.slice(t):e;this.test(s);)a.push(h(this,t)),s=s.slice(this.__last_index__),t+=this.__last_index__;return a.length?a:null},m.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,a){return e!==a[t-1]})).reverse(),l(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,l(this),this)},m.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},m.prototype.onCompile=function(){},e.exports=m},36066:(e,t,a)=>{"use strict";e.exports=function(e){var t={};return t.src_Any=a(29369).source,t.src_Cc=a(99413).source,t.src_Z=a(35045).source,t.src_P=a(73189).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|"),t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,3}[a-zA-Z0-9%/]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]+',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|[><|]|\\(|"+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},76134:e=>{e.exports=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"]},99413:e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},73189:e=>{e.exports=/[!-#%-\*,-/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E49\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},35045:e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},29369:e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/}}]); +//# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/1752.a348f767.chunk.js.map \ No newline at end of file diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_2A6OcWvQBoboXH2AW0LQMw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_2A6OcWvQBoboXH2AW0LQMw.png new file mode 100644 index 0000000..5ac0e2e Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_2A6OcWvQBoboXH2AW0LQMw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_3Zc12UKeiAI2--bi9F6xXw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_3Zc12UKeiAI2--bi9F6xXw.png new file mode 100644 index 0000000..a3d8c87 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_3Zc12UKeiAI2--bi9F6xXw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_4uVRY7OQNt-m7YKJRB2sVw.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_4uVRY7OQNt-m7YKJRB2sVw.jpeg new file mode 100644 index 0000000..5fe78c3 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_4uVRY7OQNt-m7YKJRB2sVw.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw(1).png new file mode 100644 index 0000000..3314564 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw.png new file mode 100644 index 0000000..1fe0393 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_62G0bnqJoqujSIO4hizzKw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Crl55Tm6yDNMoucPo1tvDg.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Crl55Tm6yDNMoucPo1tvDg.png new file mode 100644 index 0000000..bd40201 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Crl55Tm6yDNMoucPo1tvDg.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_GA72IpY7ZciGshmVvtl8kQ.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_GA72IpY7ZciGshmVvtl8kQ.png new file mode 100644 index 0000000..d03e9c4 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_GA72IpY7ZciGshmVvtl8kQ.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_NowOwxV5SQ9aLKbjdz41lQ.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_NowOwxV5SQ9aLKbjdz41lQ.png new file mode 100644 index 0000000..bc3b74b Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_NowOwxV5SQ9aLKbjdz41lQ.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_QqMD1rth7ahcS7Gc415R9w.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_QqMD1rth7ahcS7Gc415R9w.jpeg new file mode 100644 index 0000000..9ba4aaf Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_QqMD1rth7ahcS7Gc415R9w.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_UMh-U2rra06VIhkVcBi8HQ.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_UMh-U2rra06VIhkVcBi8HQ.png new file mode 100644 index 0000000..b84965f Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_UMh-U2rra06VIhkVcBi8HQ.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Uw_5AXGiULKKHqU6mEqYqg.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Uw_5AXGiULKKHqU6mEqYqg.jpeg new file mode 100644 index 0000000..2cfa481 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_Uw_5AXGiULKKHqU6mEqYqg.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw(1).png new file mode 100644 index 0000000..02c0586 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw.png new file mode 100644 index 0000000..8119787 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_VVGmi0SSqHVJPtpuOw-aVw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WGic6ivmGu1dfWtmHC865w.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WGic6ivmGu1dfWtmHC865w.jpeg new file mode 100644 index 0000000..e6b267e Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WGic6ivmGu1dfWtmHC865w.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw(1).png new file mode 100644 index 0000000..274c169 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw.png new file mode 100644 index 0000000..eba8958 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_WNkAYNV92eJNZqxc9EfcBw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_W_RAPQ62h0em559zluJLdQ.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_W_RAPQ62h0em559zluJLdQ.png new file mode 100644 index 0000000..3dceea0 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_W_RAPQ62h0em559zluJLdQ.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ(1).png new file mode 100644 index 0000000..ddd41ed Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ.png new file mode 100644 index 0000000..d0a18c9 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_XgPxsnGohRYsJZftwNNUJQ.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_aQaPAEsi6kuRWScVPOsS7Q.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_aQaPAEsi6kuRWScVPOsS7Q.jpeg new file mode 100644 index 0000000..fa670b2 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_aQaPAEsi6kuRWScVPOsS7Q.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q(1).png new file mode 100644 index 0000000..a146673 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q.png new file mode 100644 index 0000000..1fd0e11 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_ajFyjeF-1hVbmtlAsSoT2Q.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg(1).png new file mode 100644 index 0000000..b1200b7 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg.png new file mode 100644 index 0000000..32e6e7f Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_sWVAnhQvj2EmapE1UqIZDg.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_vrj_U6tBMYzLADoE37jQ4g.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_vrj_U6tBMYzLADoE37jQ4g.jpeg new file mode 100644 index 0000000..e2abb09 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_vrj_U6tBMYzLADoE37jQ4g.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_wJcVGzmj7r8ZM6XVFfdtLA.jpeg b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_wJcVGzmj7r8ZM6XVFfdtLA.jpeg new file mode 100644 index 0000000..a11293a Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_wJcVGzmj7r8ZM6XVFfdtLA.jpeg differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng(1).png new file mode 100644 index 0000000..e221b58 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng.png new file mode 100644 index 0000000..44a0971 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y-FnMby1uCDxw6Br-BeZng.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y93HRfJgLjZno0g7fb4wgw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y93HRfJgLjZno0g7fb4wgw.png new file mode 100644 index 0000000..33bfe31 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_y93HRfJgLjZno0g7fb4wgw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw(1).png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw(1).png new file mode 100644 index 0000000..7ae780f Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw(1).png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw.png b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw.png new file mode 100644 index 0000000..b3323e3 Binary files /dev/null and b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/1_zZvaEuY5-OhKB2-GYzuUdw.png differ diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2514.2c8bf092.chunk.js b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2514.2c8bf092.chunk.js new file mode 100644 index 0000000..ef36caf --- /dev/null +++ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2514.2c8bf092.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunklite=self.webpackChunklite||[]).push([[2514],{26600:(e,t,r)=>{"use strict";r.d(t,{z:()=>l,c:()=>u});var n=r(63038),a=r.n(n),i=r(67294),o=[{children:[{text:""}]}],c=i.createContext({}),l=function(e){var t=e.children,r=e.initialValue,n=i.useState(null),l=a()(n,2),u=l[0],s=l[1],d=i.useState(null),f=a()(d,2),p=f[0],m=f[1],h=i.useState(r||o),v=a()(h,2),g=v[0],y=v[1];return i.createElement(c.Provider,{value:{mode:p,setMode:m,backgroundSelection:u,setBackgroundSelection:s,value:g,setValue:y,clearValue:function(){y(o)}}},t)},u=function(){return i.useContext(c)}},25772:(e,t,r)=>{"use strict";r.d(t,{O:()=>l});var n=r(18156),a=r(67294),i=r(84792),o=r(10143),c=r(54803),l=function(e){var t=e.renderElement,r=e.renderLeaf,l=e.onFocus,u=e.onKeyDown,s=void 0===u?function(){}:u,d=e.decorate,f=e.editor,p=e.placeholder,m=void 0===p?"Share your thoughts...":p,h=a.useCallback((function(e){f&&""===i.Node.string(f)&&(0,n.default)("backspace",e)&&(0,c.oe)(f),s(e)}),[f,s]);return a.createElement(o.CX,{renderElement:t,renderLeaf:r,placeholder:m,onFocus:l,onKeyDown:h,decorate:d})}},22470:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var n=r(67294),a=r(10143),i=r(26600),o=function(e){var t=e.children,r=e.editor,o=(0,i.c)(),c=o.setValue,l=o.value;return l&&c?n.createElement(a.mH,{editor:r,value:l,onChange:c},t):null}},54803:(e,t,r)=>{"use strict";r.d(t,{AR:()=>n,wB:()=>y,T8:()=>E,Nx:()=>w,uT:()=>x,t$:()=>N,w9:()=>O,St:()=>T,th:()=>P,Cr:()=>S,oe:()=>j,J1:()=>I});var n,a=r(59713),i=r.n(a),o=r(63038),c=r.n(o),l=r(42348),u=r.n(l),s=r(84792),d=r(14391);function f(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 p(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{includeInitialDeltas:!0},r=t.includeInitialDeltas,n=[];if(r){var a=b();n=[{type:8,index:0,section:{name:a,startIndex:0}}]}var i=e.children,o=g(i);e.children=o;var c=0;if(!o[0].name&&"title"!==o[0].type){var l=b();n.push({type:1,index:0,paragraph:{name:l,type:3,text:"",markups:[]}}),c=1}var u=h(e),s=v(u,c);return n.concat(s)}function b(){return Math.round(65535*Math.random()).toString(16).padStart(4,"0")}var E=function(e,t){e.selection&&x(e,t)},w=function(e,t){var r=t||e.selection;s.Transforms.unwrapNodes(e,{match:function(e){return"link"===e.type},at:r})},x=function(e,t){(function(e){var t=s.Editor.nodes(e,{match:function(e){return"link"===e.type}});return!!c()(t,1)[0]})(e)&&w(e);var r=e.selection,n=r&&s.Range.isCollapsed(r),a={type:"link",url:t,children:n?[{text:t}]:[]};n?s.Transforms.insertNodes(e,a):(s.Transforms.wrapNodes(e,a,{split:!0}),s.Transforms.collapse(e,{edge:"end"}))},N=function(e,t,r){var n=r||e.selection,a=s.Editor.nodes(e,{match:function(e){return!0===e[t]||e.type===t},at:n,mode:"all"});return!!c()(a,1)[0]},O=function(e,t){N(e,t)?s.Editor.removeMark(e,t):s.Editor.addMark(e,t,!0)},k=function(e){switch(e){case"bq":return"bq-line";case"numbered-list":return"oli";case"bulleted-list":default:return"uli"}},T=function(){if("undefined"!=typeof window){var e=window.getSelection(),t=e&&!e.isCollapsed&&e.getRangeAt(0);return t&&t.getBoundingClientRect()}},P=function(e,t,r){var n=r||e.selection,a=N(e,t,r),i=m.includes(t),o=s.Range.isRange(n)?s.Editor.rangeRef(e,n):s.Point.isPoint(n)?s.Editor.pointRef(e,n):s.Editor.pathRef(e,n);if(s.Transforms.unwrapNodes(e,{at:n,match:function(e){return m.includes(e.type)},split:!0}),o.current&&(s.Transforms.setNodes(e,{type:a?"paragraph":i?k(t):t},{at:o.current}),!a&&i)){var c={type:t,children:[]};s.Transforms.wrapNodes(e,c,{at:o.current})}},S=function(e,t){["bold","italic"].forEach((function(r){N(e,r,t)&&s.Transforms.unsetNodes(e,r,{at:t})})),["link","numbered-list","bulleted-list","bq"].forEach((function(r){N(e,r,t)&&s.Transforms.unwrapNodes(e,{at:t,match:function(e){return e.type===r}})}))},j=function(e){if(e){var t=function(e){if(!e||!e.children.length)return!1;var t=s.Editor.point(e,[0],{edge:"start"}),r=e.children.length;return{anchor:t,focus:s.Editor.point(e,[r-1],{edge:"end"})}}(e);t&&(s.Transforms.removeNodes(e,{at:t}),s.Transforms.insertNodes(e,{children:[{text:""}]}))}},C=function(e){return"link"===e.type},I=function(e){return e.paragraphs.map((function(e){var t=e.markups,r=e.name,n=e.text;if(e.type===d.NJ.H3)return{children:[{text:n}],name:r,type:"title"};if(null==t||!t.length)return{children:[{text:n}],name:r};var a=new Set;a.add(0),a.add(n.length),t.forEach((function(e){var t=e.start,r=e.end;a.add(t),a.add(r)}));var i=Array.from(a);return{children:i.sort((function(e,t){return e-t})).slice(1).map((function(e,r,a){var o=r?a[r-1]:i[0],c=e,l=t.filter((function(e){return e.start<=o&&c<=e.end})),u={text:n.substring(o,c)};return l.forEach((function(e){var t=e.href;switch(e.type){case d.Jh.STRONG:(C(u)?u.children[0]:u).bold=!0;break;case d.Jh.EM:(C(u)?u.children[0]:u).italic=!0;break;case d.Jh.A:u={type:"link",url:t,children:[u]}}})),u})),name:r}}))}},9735:(e,t,r)=>{"use strict";r.d(t,{w1:()=>ae,rL:()=>Y,D5:()=>F,Vz:()=>J,Fm:()=>Q,lw:()=>$,Uk:()=>te,u$:()=>X,cv:()=>K,c:()=>Z});var n=r(6479),a=r.n(n),i=r(63038),o=r.n(i),c=r(67154),l=r.n(c),u=r(68337),s=r.n(u),d=r(67294),f=r(84792),p=r(86817),m=r(10143),h=r(61889),v=r(7530),g=r(28309),y=r(14391),b=r(8667),E=function(e){var t=(0,m.vt)(),r=(0,m.UE)(),n=(0,m.ui)(),a=(0,g.Iq)(),i=e.ParagraphWrapper;switch(e.element.type){case"link":return d.createElement("span",e.attributes,d.createElement(v.rU,{linkStyle:"OBVIOUS",cursor:"text",inline:!0,href:e.element.url},e.children));case"numbered-list":return d.createElement("ol",e.attributes,e.children);case"bulleted-list":return d.createElement("ul",e.attributes,e.children);case"bq":return d.createElement("div",e.attributes,d.createElement(i,l()({},e,{editor:n}),e.children));case"image":var o=(0,b.jg)({layout:y.ms.FULL_WIDTH,originalWidth:e.element.imageProps.width,originalHeight:e.element.imageProps.height}),c=o.width,u=o.strategy,s=o.otherWidths;return d.createElement("div",l()({},e.attributes,{className:a({margin:"20px 0 10px"})}),d.createElement("div",{contentEditable:!1,className:a({boxShadow:"".concat(t&&r?"0 0 0 3px #03a87c":"none")})},d.createElement(h.Z,{maxWidth:"100%",miroId:e.element.imageProps.miroId,width:c,strategy:u,otherWidths:s})),e.children);default:return d.createElement("div",e.attributes,d.createElement(i,l()({},e,{editor:n}),e.children))}},w=r(59713),x=r.n(w);function N(){return(N=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d.useMemo((function(){var t=G((0,p.VC)((0,m.BU)((0,f.createEditor)())));return e.reduce((function(e,t){return t(e)}),t)}),[]),n=d.useCallback((function(e){return d.createElement(U,e)}),[]),a=t.ParagraphWrapper||ne,i=function(e){return d.createElement(E,l()({},e,{ParagraphWrapper:a}))};return{editor:r,renderLeaf:n,renderElement:i}},U=function(e){var t=e.attributes,r=e.children,n=e.leaf;return n.bold&&(r=d.createElement("strong",null,r)),n.italic&&(r=d.createElement("em",null,r)),d.createElement("span",t,r)},W=function(e){var t=_.match(e)||[],r=o()(t,1)[0];return!!r&&r.raw===e},F=function(e){var t=_.match(e)||[],r=o()(t,1)[0];return r&&r.raw===e?r.url:null},G=function(e){var t=e.isInline,r=e.isVoid;return e.isVoid=function(e){return r(e)},e.isInline=function(e){return"link"===e.type||t(e)},e},Z=function(e){var t=e.normalizeNode;return e.normalizeNode=function(r){var n=o()(r,2),a=n[0],i=n[1];"title"===a.type&&0!==i[0]&&(0,L.th)(e,"title",i),"title"===a.type&&a.children.forEach((function(t,r){var n=i.concat(r);(0,L.Cr)(e,n)})),t([a,i])},e},$=function(e){var t=e.normalizeNode;return e.normalizeNode=function(r){var n=o()(r,2),a=n[0],i=n[1],c=!a.type||"paragraph"===a.type,l=a.children&&1===a.children.length&&f.Text.isText(a.children[0])&&("- "===f.Node.string(a)||"* "===f.Node.string(a));c&&l&&f.Editor.withoutNormalizing(e,(function(){f.Transforms.insertFragment(e,[{text:""}],{at:i}),f.Transforms.delete(e,{at:i.concat(1)}),(0,L.th)(e,"bulleted-list",i)}));var u=a.children&&1===a.children.length&&f.Text.isText(a.children[0])&&"1. "===f.Node.string(a);c&&u&&f.Editor.withoutNormalizing(e,(function(){f.Transforms.insertFragment(e,[{text:""}],{at:i}),f.Transforms.delete(e,{at:i.concat(1)}),(0,L.th)(e,"numbered-list",i)})),t([a,i])},e},K=function(e){var t=e.normalizeNode;return e.normalizeNode=function(r){var n=o()(r,2),a=n[0],i=n[1];if("bulleted-list"===a.type||"numbered-list"===a.type||"bq"===a.type){var c=a.children.length;if(c>1&&a.children.slice(-2,-1).every((function(e){return""===f.Node.string(e)}))){var l=c-2;f.Transforms.removeNodes(e,{at:i.concat(l)}),f.Transforms.setNodes(e,{type:"paragraph"},{at:i.concat(l)}),f.Transforms.liftNodes(e,{at:i.concat(l)})}}t([a,i])},e},Q=function(e){var t=e.insertData,r=e.insertText;return e.insertText=function(t){t&&W(t)?(0,L.uT)(e,t):r(t)},e.insertData=function(r){var n=r.getData("text/plain");n&&W(n)?(0,L.uT)(e,n):t(r)},e},X=function(e){var t=e.insertData,r=e.insertBreak,n=e.isVoid;return e.isVoid=function(e){return"image"===e.type||n(e)},e.insertBreak=function(){var t=f.Editor.parent(e,e.selection),n=o()(t,2),a=n[0],i=n[1];if(f.Editor.after(e,e.selection)||"image"!==a.type)r();else{var c=f.Path.next(i);f.Transforms.insertNodes(e,{children:[{text:""}]},{at:c,voids:!0}),f.Transforms.select(e,c)}},e.insertData=function(e){var r=e.getData("text/plain"),n=e.files;if(n&&n.length>0){var a,i=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(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}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 i,o=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}(n);try{for(i.s();!(a=i.n()).done;){var c=a.value,l=new FileReader,u=c.type.split("/");"image"===o()(u,1)[0]&&(l.addEventListener("load",(function(){})),l.readAsBinaryString(c))}}catch(e){i.e(e)}finally{i.f()}}else(function(e){if(!e)return!1;if(!W(e))return!1;var t=new URL(e).pathname.split(".").pop();return!!t&&["jpg","JPG","png","PNG","jpeg","JPEG"].includes(t)})(r)||t(e)},e},Y=function(e,t){var r={type:"image",imageProps:t,children:[{text:""}]};f.Transforms.insertNodes(e,r)};function ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=e.selection,n=r.anchor,a=f.Editor.before(e,n,{distance:t});if(!a)return"";var i={anchor:a,focus:r.anchor};return f.Editor.string(e,i)}var te=function(e){var t=e.insertText;return e.insertText=function(r){var n=e.selection;if(n&&f.Range.isCollapsed(n)){var a=ee(e,1);if("-"===r&&"-"===a)return f.Editor.deleteBackward(e),t("—");if(">"===r&&"-"===a)return f.Editor.deleteBackward(e),t("→");if("-"===r&&"<"===a)return f.Editor.deleteBackward(e),t("←");if('"'===r&&a.match(/\S/))return t("”");if("'"===r&&a.match(/\S/))return t("’");if("'"===r)return t("‘");if('"'===r&&!a.match(/\S/))return t("“");var i=ee(e,2);if("."===r&&".."===i)return f.Editor.deleteBackward(e),f.Editor.deleteBackward(e),t("…")}t(r)},e},re={title:H.qq.Title,oli:H.qq.OLI,uli:H.qq.ULI,bq:H.qq.BQ},ne=function(e){return d.createElement("p",null,e.children)},ae=function(e){var t=e.editor,r=a()(e,["editor"]),n=d.useRef(null),i=f.Node.first(t,[0])[0]===r.element.children[0],o=re[r.element.type]||y.NJ.P,c=function(e,t){switch(t){case"title":return 10;case"oli":case"uli":case"bq-line":return e?B.HM:B.Mk;default:return e?B.HM:B.Zf}}(i,r.element.type),l=(0,g.Iq)(),u=(0,m.vt)()&&0===f.Node.string(r.element).length;if("bq"===r.element.type){var s=l((0,M.l)({paragraphStyle:y.NJ.BQ,topSpacing:0,paragraphLayout:y.ms.FULL_WIDTH,richTextStyle:"CARD",isEmbedded:!1}));return d.createElement("blockquote",{className:s},r.children)}return d.createElement("div",null,u&&d.createElement(z,null),d.createElement(A.zZ,{hasDropCap:!1,name:"",paragraphRef:n,paragraphStyle:o,richTextStyle:"CARD",spaceTop:c},r.children))}}}]); +//# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/2514.2c8bf092.chunk.js.map \ No newline at end of file diff --git a/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2558.1ac5c4fd.chunk.js b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2558.1ac5c4fd.chunk.js new file mode 100644 index 0000000..4c3edf5 --- /dev/null +++ b/Research/MuZero_ The Walkthrough (Part 1_3) _ by David Foster _ Applied Data Science _ Medium_files/2558.1ac5c4fd.chunk.js @@ -0,0 +1,2 @@ +(self.webpackChunklite=self.webpackChunklite||[]).push([[2558],{5399:(e,n,t)=>{"use strict";t.d(n,{I:()=>i});var r=t(28655),o=t.n(r);function s(){var e=o()(["\n fragment getSlateBodyFromPostBodyModel_bodyModel on RichText {\n paragraphs {\n id\n name\n text\n type\n markups {\n type\n start\n end\n href\n anchorType\n userId\n linkMetadata {\n httpStatus\n }\n }\n }\n }\n"]);return s=function(){return e},e}var i=(0,t(71439).Ps)(s())},51176:(e,n,t)=>{"use strict";t.d(n,{Q:()=>r});var r=t(67294).createContext({isEditing:!1,setIsEditing:function(){return null},setEditingQuote:function(){return null}})},24745:(e,n,t)=>{"use strict";t.d(n,{E:()=>Re});var r=t(63038),o=t.n(r),s=t(67294),i=t(12291),a=t(24548),l=t(28309),u=function(e){var n=e.title,t=e.backgroundColor,r=(0,l.Iq)();return s.createElement("div",{className:r((function(){return{color:"white",backgroundColor:t,borderRadius:"2px",fontSize:"11px",padding:"0px 6px",height:"16px",display:"flex",alignItems:"center",marginLeft:"8px",marginTop:"2px"}}))},n)},p=t(85740),c=t(9785),d=t(98281),m=t(41832),f=t(7530),g=t(64504),v=t(27572),y=t(93394),h=t(27952),R=t(59713),P=t.n(R),b=t(28655),E=t.n(b),S=t(46829),O=t(71439),I=t(14267),x=t(2074),_=t(43522),D=t(54260);function C(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function T(e){for(var n=1;n