{"version":3,"sources":["require.js","api.js","_cookies.js","_script.js","_figManager.js"],"names":["requirejs","require","define","global","setTimeout","commentReplace","match","singlePrefix","isFunction","it","ostring","call","isArray","each","ary","func","i","length","eachReverse","hasProp","obj","prop","hasOwn","getOwn","eachProp","mixin","target","source","force","deepStringMixin","value","RegExp","bind","fn","apply","arguments","scripts","document","getElementsByTagName","defaultOnError","err","getGlobal","g","split","part","makeError","id","msg","requireModules","e","Error","requireType","originalError","newContext","contextName","trimDots","splice","normalize","name","baseName","applyMap","pkgMain","mapValue","nameParts","j","nameSegment","lastIndex","foundMap","foundI","foundStarMap","starI","normalizedBaseParts","baseParts","map","config","starMap","nodeIdCompat","jsSuffixRegExp","test","replace","charAt","slice","concat","join","outerLoop","pkgs","removeScript","isBrowser","scriptNode","getAttribute","context","parentNode","removeChild","hasPathFallback","pathConfig","paths","shift","undef","makeRequire","skipMap","splitPrefix","prefix","index","indexOf","substring","makeModuleMap","parentModuleMap","isNormalized","url","pluginModule","suffix","parentName","originalName","isDefine","normalizedName","requireCounter","defined","nameToUrl","unnormalizedCounter","parentMap","unnormalized","getModule","depMap","mod","registry","Module","on","defineEmitComplete","error","onError","errback","ids","notified","events","emit","req","takeGlobalQueue","globalDefQueue","queueItem","defQueueMap","defQueue","push","cleanRegistry","enabledRegistry","breakCycle","traced","processed","depMaps","depId","dep","depMatched","defineDep","check","checkLoaded","usingPathFallback","waitInterval","waitSeconds","expired","startTime","Date","getTime","noLoads","reqCalls","stillLoading","needCycleCheck","inCheckLoaded","modId","enabled","inited","fetched","isWebWorker","checkLoadedTimeoutId","callGetModule","args","init","removeListener","node","ieName","detachEvent","isOpera","removeEventListener","getScriptData","evt","currentTarget","srcElement","onScriptLoad","onScriptError","intakeDefines","handlers","baseUrl","bundles","shim","undefEvents","urlFetched","bundlesMap","exports","usingExports","module","uri","this","depExports","pluginMaps","depCount","prototype","factory","options","ignore","enable","fetch","enableBuildCallback","deps","callPlugin","load","enabling","cjsModule","defining","execCb","undefined","requireMap","onResourceLoad","resLoadMaps","normalizedMap","defineEmitted","pluginMap","plugin","normalizedMod","bundleId","localRequire","fromText","text","textAlt","moduleName","moduleMap","hasInteractive","useInteractive","exec","completeLoad","handler","undefed","cb","cbs","nextTick","configure","cfg","urlArgs","objs","v","exportsFn","makeShimExports","packages","pkgObj","location","main","currDirRegExp","callback","ret","relMap","requireMod","__requireJsBuild","get","toUrl","moduleNamePlusExt","ext","lastIndexOf","segment","isRelative","specified","found","shExports","enforceDefine","skipExt","syms","parentModule","parentPath","jsExtRegExp","type","readyRegExp","readyState","interactiveScript","data","parents","key","getInteractiveScript","script","s","head","baseElement","dataMain","src","currentlyAddingScript","mainScript","subPath","version","commentRegExp","cjsRequireRegExp","op","Object","toString","hasOwnProperty","window","navigator","importScripts","platform","defContextName","opera","contexts","optional","ctx","createNode","xhtml","createElementNS","createElement","scriptType","charset","async","setAttribute","attachEvent","addEventListener","onNodeCreated","insertBefore","appendChild","skipDataMain","pop","amd","jQuery","eval","eventQueue","layout","settings","api","f","trigger","eventName","l","val","cookieOvenUrl","tld","orb","partialCookieOvenUrl","handleCookieOvenError","done","setupCookieOventXHR","xhr","XMLHttpRequest","withCredentials","onload","status","onerror","onabort","ontimeout","domainSwitcher","domain","domainFlipper","com","co.uk","unsanitisedDelete","opts","expires","path","cookie","generateCookieString","deleteEverywhere","parts","hostname","deleteOnAllPaths","pathname","getAllowedList","policy","cacheKey","JSON","stringify","policyCache","whiteList","cat","bbccookies_jars","decompilePolicyCookie","pattern","POLICYCOOKIENAME","ads","personalisation","performance","necessary","DEFAULTPOLICY","nextYear","d","setYear","getFullYear","writePolicy","isCrossDomainEnabled","policyString","currentDomain","bbccookies","_getCurrentDomain","set","crossDomainEnabled","setMonth","getMonth","POLICY_EXPIRY_COOKIENAME","getCookieName","cookieString","matches","sanitiseKey","encodeURIComponent","toUTCString","secure","contentLoaded","win","top","doc","root","documentElement","modern","add","rem","pre","poll","doScroll","frameElement","POLICY_REFRESH_DATE_MILLIS","cookieOvenRequest","open","send","cookieOvenClient","allowedXDomainCookieNames","otherTld","cookieName","isAllowed","list","allowed","readPolicy","categoryName","analyticsPolicyString","decodeURIComponent","isCookiePolicySet","setDefaultCookiesSingleDomain","_setPolicy","preferenceValue","disableCrossDomain","cookiesEnabled","cname","Math","floor","random","del","_crunch","cookies","cookieParts","keyName","trim","toLowerCase","_getPolicy","String","rtrim","onbeforeunload","uid","inject","scriptEl","jsonp","timer","timedOut","callbackName","timeout","keyParts","child","parent","clearTimeout","referrer","$1","lastHostname","fig","defaultFig","ad","ap","ck","eu","mb","tb","uk","df","overrideCookieName","cacheCookieName","figCacheCookieTTL","figFailed","figStale","figCached","figOverridden","figData","figSuccessCallbacks","figErrorCallbacks","param","onSuccess","isDefault","geo","isUK","isEU","device","isMobile","isTablet","redirect","host","currentPage","href","redirectionIsEnabled","bbcredirection","page","isDomestic","isInternational","isDesktop","user","destinationPage","devicePreference","shouldRedirect","redirectedFromCurrent","redirectedFromDestination","istats","log","updateCacheCookie","date","setTime","setData","newFigData","figSuccess","isCached","c","figError","isOverridden","isStale","overrideCookieValue","overrideCookieData","cacheCookieValue","cacheCookieData","parse","jsonpTimeout","orb_fig_blocking","orb_fig","newFig","write","figUrl"],"mappings":"AASA,GAAAA,WAAAC,QAAAC,QACA,SAAAC,OAAAC,YA4BA,QAAAC,gBAAAC,EAAAC,GACA,MAAAA,IAAA,GAGA,QAAAC,YAAAC,GACA,MAAA,sBAAAC,QAAAC,KAAAF,GAGA,QAAAG,SAAAH,GACA,MAAA,mBAAAC,QAAAC,KAAAF,GAOA,QAAAI,MAAAC,EAAAC,GACA,GAAAD,EAAA,CACA,GAAAE,EACA,KAAAA,EAAA,EAAAA,EAAAF,EAAAG,UACAH,EAAAE,KAAAD,EAAAD,EAAAE,GAAAA,EAAAF,IADAE,GAAA,KAYA,QAAAE,aAAAJ,EAAAC,GACA,GAAAD,EAAA,CACA,GAAAE,EACA,KAAAA,EAAAF,EAAAG,OAAA,EAAAD,QACAF,E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C,KAOA,OANAD,GAAAhc,QAAA,uBAAA,SAAAzE,EAAAmR,EAAA3P,GACAkf,EAAAvP,IAAA3P,IAEAwc,EAAA0C,EACA3D,EAAA6B,WACAb,GAAA,EACAhB,EAEAgB,GAAA,CAGA,IAAA4C,GAAAtO,OAAA4F,WAAApI,IAAA6N,EAEA,IAAAiD,EACA,IACA,GAAAC,GAAAjK,KAAAkK,MAAAF,EACA3C,GAAA4C,EACA7D,EAAA6B,WACAf,GAAA,EACAC,GAAA,EAEA,MAAApW,GACAoZ,aAAA,IACA9C,EAAAhB,EACAc,GAAA,MAIAgD,cAAA,IACA9C,EAAAhB,EACAc,GAAA,CAaA,QAXAzL,OAAA0O,kBAAAN,GAAAE,IAGAtO,OAAAsC,IAAAqM,QAAA,SAAAC,GACAjD,EAAAiD,GAAAjE,EACAD,EAAA+C,kBAAA9B,GACAjB,EAAA6B,YAGA7c,SAAAmf,MAAA,gBAAA7O,OAAAsC,IAAAwM,OAAA,gBAEApE,GAEAA,EAAAvS,UAMA5K,OAAA,WAAA,mBAAA,SAAAyR,GAEA,GAAA0L,GAAA1K,OAAAsC,IAAAoI,IAEA+D,EAAA,GAYA,QARA/D,EAAAsB,aAAAtB,EAAAyD,YACAnP,EAAA8K,MAAA9J,OAAAsC,IAAAwM,OAAApE,EAAAoD,YACA7D,aAAA,cACAC,QAAAuE,EACApZ,MAAAqV,EAAAuD,WAIAvD","file":"api.min.js","sourcesContent":["/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.3.2 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE\n */\n//Not using strict: uneven strict support in browsers, #392, and causes\n//problems with requirejs.exec()/transpiler plugins that may not be strict.\n/*jslint regexp: true, nomen: true, sloppy: true */\n/*global window, navigator, document, importScripts, setTimeout, opera */\n\nvar requirejs, require, define;\n(function (global, setTimeout) {\n var req, s, head, baseElement, dataMain, src,\n interactiveScript, currentlyAddingScript, mainScript, subPath,\n version = '2.3.2',\n commentRegExp = /\\/\\*[\\s\\S]*?\\*\\/|([^:\"'=]|^)\\/\\/.*$/mg,\n cjsRequireRegExp = /[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,\n jsSuffixRegExp = /\\.js$/,\n currDirRegExp = /^\\.\\//,\n op = Object.prototype,\n ostring = op.toString,\n hasOwn = op.hasOwnProperty,\n isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),\n isWebWorker = !isBrowser && typeof importScripts !== 'undefined',\n //PS3 indicates loaded and complete, but need to wait for complete\n //specifically. Sequence is 'loading', 'loaded', execution,\n // then 'complete'. The UA check is unfortunate, but not sure how\n //to feature test w/o causing perf issues.\n readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?\n /^complete$/ : /^(complete|loaded)$/,\n defContextName = '_',\n //Oh the tragedy, detecting opera. See the usage of isOpera for reason.\n isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',\n contexts = {},\n cfg = {},\n globalDefQueue = [],\n useInteractive = false;\n\n //Could match something like ')//comment', do not lose the prefix to comment.\n function commentReplace(match, singlePrefix) {\n return singlePrefix || '';\n }\n\n function isFunction(it) {\n return ostring.call(it) === '[object Function]';\n }\n\n function isArray(it) {\n return ostring.call(it) === '[object Array]';\n }\n\n /**\n * Helper function for iterating over an array. If the func returns\n * a true value, it will break out of the loop.\n */\n function each(ary, func) {\n if (ary) {\n var i;\n for (i = 0; i < ary.length; i += 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n /**\n * Helper function for iterating over an array backwards. If the func\n * returns a true value, it will break out of the loop.\n */\n function eachReverse(ary, func) {\n if (ary) {\n var i;\n for (i = ary.length - 1; i > -1; i -= 1) {\n if (ary[i] && func(ary[i], i, ary)) {\n break;\n }\n }\n }\n }\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n function getOwn(obj, prop) {\n return hasProp(obj, prop) && obj[prop];\n }\n\n /**\n * Cycles over properties in an object and calls a function for each\n * property value. If the function returns a truthy value, then the\n * iteration is stopped.\n */\n function eachProp(obj, func) {\n var prop;\n for (prop in obj) {\n if (hasProp(obj, prop)) {\n if (func(obj[prop], prop)) {\n break;\n }\n }\n }\n }\n\n /**\n * Simple function to mix in properties from source into target,\n * but only if target does not already have a property of the same name.\n */\n function mixin(target, source, force, deepStringMixin) {\n if (source) {\n eachProp(source, function (value, prop) {\n if (force || !hasProp(target, prop)) {\n if (deepStringMixin && typeof value === 'object' && value &&\n !isArray(value) && !isFunction(value) &&\n !(value instanceof RegExp)) {\n\n if (!target[prop]) {\n target[prop] = {};\n }\n mixin(target[prop], value, force, deepStringMixin);\n } else {\n target[prop] = value;\n }\n }\n });\n }\n return target;\n }\n\n //Similar to Function.prototype.bind, but the 'this' object is specified\n //first, since it is easier to read/figure out what 'this' will be.\n function bind(obj, fn) {\n return function () {\n return fn.apply(obj, arguments);\n };\n }\n\n function scripts() {\n return document.getElementsByTagName('script');\n }\n\n function defaultOnError(err) {\n throw err;\n }\n\n //Allow getting a global that is expressed in\n //dot notation, like 'a.b.c'.\n function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }\n\n /**\n * Constructs an error with a pointer to an URL with more information.\n * @param {String} id the error ID that maps to an ID on a web page.\n * @param {String} message human readable error.\n * @param {Error} [err] the original error, if there is one.\n *\n * @returns {Error}\n */\n function makeError(id, msg, err, requireModules) {\n var e = new Error(msg + '\\nhttp://requirejs.org/docs/errors.html#' + id);\n e.requireType = id;\n e.requireModules = requireModules;\n if (err) {\n e.originalError = err;\n }\n return e;\n }\n\n if (typeof define !== 'undefined') {\n //If a define is already in play via another AMD loader,\n //do not overwrite.\n return;\n }\n\n if (typeof requirejs !== 'undefined') {\n if (isFunction(requirejs)) {\n //Do not overwrite an existing requirejs instance.\n return;\n }\n cfg = requirejs;\n requirejs = undefined;\n }\n\n //Allow for a require config object\n if (typeof require !== 'undefined' && !isFunction(require)) {\n //assume it is a config object.\n cfg = require;\n require = undefined;\n }\n\n function newContext(contextName) {\n var inCheckLoaded, Module, context, handlers,\n checkLoadedTimeoutId,\n config = {\n //Defaults. Do not set a default for map\n //config to speed up normalize(), which\n //will run faster if there is no default.\n waitSeconds: 7,\n baseUrl: './',\n paths: {},\n bundles: {},\n pkgs: {},\n shim: {},\n config: {}\n },\n registry = {},\n //registry of just enabled modules, to speed\n //cycle breaking code when lots of modules\n //are registered, but not activated.\n enabledRegistry = {},\n undefEvents = {},\n defQueue = [],\n defined = {},\n urlFetched = {},\n bundlesMap = {},\n requireCounter = 1,\n unnormalizedCounter = 1;\n\n /**\n * Trims the . and .. from an array of path segments.\n * It will keep a leading path segment if a .. will become\n * the first path segment, to help with module name lookups,\n * which act like paths, but can be remapped. But the end result,\n * all paths that use this function should look normalized.\n * NOTE: this method MODIFIES the input array.\n * @param {Array} ary the array of path segments.\n */\n function trimDots(ary) {\n var i, part;\n for (i = 0; i < ary.length; i++) {\n part = ary[i];\n if (part === '.') {\n ary.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n // If at the start, or previous value is still ..,\n // keep them so that when converted to a path it may\n // still work when converted to a path, even though\n // as an ID it is less than ideal. In larger point\n // releases, may be better to just kick out an error.\n if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {\n continue;\n } else if (i > 0) {\n ary.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @param {Boolean} applyMap apply the map config to the value. Should\n * only be done if this normalization is for a dependency ID.\n * @returns {String} normalized name\n */\n function normalize(name, baseName, applyMap) {\n var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,\n foundMap, foundI, foundStarMap, starI, normalizedBaseParts,\n baseParts = (baseName && baseName.split('/')),\n map = config.map,\n starMap = map && map['*'];\n\n //Adjust any relative paths.\n if (name) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // If wanting node ID compatibility, strip .js from end\n // of IDs. Have to do this here, and not in nameToUrl\n // because node allows either .js or non .js to map\n // to same file.\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n // Starts with a '.' so need the baseName\n if (name[0].charAt(0) === '.' && baseParts) {\n //Convert baseName to array, and lop off the last part,\n //so that . matches that 'directory' and not name of the baseName's\n //module. For instance, baseName of 'one/two/three', maps to\n //'one/two/three.js', but we want the directory, 'one/two' for\n //this normalization.\n normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n name = normalizedBaseParts.concat(name);\n }\n\n trimDots(name);\n name = name.join('/');\n }\n\n //Apply map config if available.\n if (applyMap && map && (baseParts || starMap)) {\n nameParts = name.split('/');\n\n outerLoop: for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join('/');\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = getOwn(map, baseParts.slice(0, j).join('/'));\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = getOwn(mapValue, nameSegment);\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break outerLoop;\n }\n }\n }\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {\n foundStarMap = getOwn(starMap, nameSegment);\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n // If the name points to a package's name, use\n // the package main instead.\n pkgMain = getOwn(config.pkgs, name);\n\n return pkgMain ? pkgMain : name;\n }\n\n function removeScript(name) {\n if (isBrowser) {\n each(scripts(), function (scriptNode) {\n if (scriptNode.getAttribute('data-requiremodule') === name &&\n scriptNode.getAttribute('data-requirecontext') === context.contextName) {\n scriptNode.parentNode.removeChild(scriptNode);\n return true;\n }\n });\n }\n }\n\n function hasPathFallback(id) {\n var pathConfig = getOwn(config.paths, id);\n if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {\n //Pop off the first array value, since it failed, and\n //retry\n pathConfig.shift();\n context.require.undef(id);\n\n //Custom require that does not do map translation, since\n //ID is \"absolute\", already mapped/resolved.\n context.makeRequire(null, {\n skipMap: true\n })([id]);\n\n return true;\n }\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n /**\n * Creates a module mapping that includes plugin prefix, module\n * name, and path. If parentModuleMap is provided it will\n * also normalize the name via require.normalize()\n *\n * @param {String} name the module name\n * @param {String} [parentModuleMap] parent module map\n * for the module name, used to resolve relative names.\n * @param {Boolean} isNormalized: is the ID already normalized.\n * This is true if this call is done for a define() module ID.\n * @param {Boolean} applyMap: apply the map config to the ID.\n * Should only be true if this map is for a dependency.\n *\n * @returns {Object}\n */\n function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {\n var url, pluginModule, suffix, nameParts,\n prefix = null,\n parentName = parentModuleMap ? parentModuleMap.name : null,\n originalName = name,\n isDefine = true,\n normalizedName = '';\n\n //If no name, then it means it is a require call, generate an\n //internal name.\n if (!name) {\n isDefine = false;\n name = '_@r' + (requireCounter += 1);\n }\n\n nameParts = splitPrefix(name);\n prefix = nameParts[0];\n name = nameParts[1];\n\n if (prefix) {\n prefix = normalize(prefix, parentName, applyMap);\n pluginModule = getOwn(defined, prefix);\n }\n\n //Account for relative paths if there is a base name.\n if (name) {\n if (prefix) {\n if (pluginModule && pluginModule.normalize) {\n //Plugin is loaded, use its normalize method.\n normalizedName = pluginModule.normalize(name, function (name) {\n return normalize(name, parentName, applyMap);\n });\n } else {\n // If nested plugin references, then do not try to\n // normalize, as it will not normalize correctly. This\n // places a restriction on resourceIds, and the longer\n // term solution is not to normalize until plugins are\n // loaded and all normalizations to allow for async\n // loading of a loader plugin. But for now, fixes the\n // common uses. Details in #1131\n normalizedName = name.indexOf('!') === -1 ?\n normalize(name, parentName, applyMap) :\n name;\n }\n } else {\n //A regular module.\n normalizedName = normalize(name, parentName, applyMap);\n\n //Normalized name may be a plugin ID due to map config\n //application in normalize. The map config values must\n //already be normalized, so do not need to redo that part.\n nameParts = splitPrefix(normalizedName);\n prefix = nameParts[0];\n normalizedName = nameParts[1];\n isNormalized = true;\n\n url = context.nameToUrl(normalizedName);\n }\n }\n\n //If the id is a plugin id that cannot be determined if it needs\n //normalization, stamp it with a unique ID so two matching relative\n //ids that may conflict can be separate.\n suffix = prefix && !pluginModule && !isNormalized ?\n '_unnormalized' + (unnormalizedCounter += 1) :\n '';\n\n return {\n prefix: prefix,\n name: normalizedName,\n parentMap: parentModuleMap,\n unnormalized: !!suffix,\n url: url,\n originalName: originalName,\n isDefine: isDefine,\n id: (prefix ?\n prefix + '!' + normalizedName :\n normalizedName) + suffix\n };\n }\n\n function getModule(depMap) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (!mod) {\n mod = registry[id] = new context.Module(depMap);\n }\n\n return mod;\n }\n\n function on(depMap, name, fn) {\n var id = depMap.id,\n mod = getOwn(registry, id);\n\n if (hasProp(defined, id) &&\n (!mod || mod.defineEmitComplete)) {\n if (name === 'defined') {\n fn(defined[id]);\n }\n } else {\n mod = getModule(depMap);\n if (mod.error && name === 'error') {\n fn(mod.error);\n } else {\n mod.on(name, fn);\n }\n }\n }\n\n function onError(err, errback) {\n var ids = err.requireModules,\n notified = false;\n\n if (errback) {\n errback(err);\n } else {\n each(ids, function (id) {\n var mod = getOwn(registry, id);\n if (mod) {\n //Set error on module, so it skips timeout checks.\n mod.error = err;\n if (mod.events.error) {\n notified = true;\n mod.emit('error', err);\n }\n }\n });\n\n if (!notified) {\n req.onError(err);\n }\n }\n }\n\n /**\n * Internal method to transfer globalQueue items to this context's\n * defQueue.\n */\n function takeGlobalQueue() {\n //Push all the globalDefQueue items into the context's defQueue\n if (globalDefQueue.length) {\n each(globalDefQueue, function(queueItem) {\n var id = queueItem[0];\n if (typeof id === 'string') {\n context.defQueueMap[id] = true;\n }\n defQueue.push(queueItem);\n });\n globalDefQueue = [];\n }\n }\n\n handlers = {\n 'require': function (mod) {\n if (mod.require) {\n return mod.require;\n } else {\n return (mod.require = context.makeRequire(mod.map));\n }\n },\n 'exports': function (mod) {\n mod.usingExports = true;\n if (mod.map.isDefine) {\n if (mod.exports) {\n return (defined[mod.map.id] = mod.exports);\n } else {\n return (mod.exports = defined[mod.map.id] = {});\n }\n }\n },\n 'module': function (mod) {\n if (mod.module) {\n return mod.module;\n } else {\n return (mod.module = {\n id: mod.map.id,\n uri: mod.map.url,\n config: function () {\n return getOwn(config.config, mod.map.id) || {};\n },\n exports: mod.exports || (mod.exports = {})\n });\n }\n }\n };\n\n function cleanRegistry(id) {\n //Clean up machinery used for waiting modules.\n delete registry[id];\n delete enabledRegistry[id];\n }\n\n function breakCycle(mod, traced, processed) {\n var id = mod.map.id;\n\n if (mod.error) {\n mod.emit('error', mod.error);\n } else {\n traced[id] = true;\n each(mod.depMaps, function (depMap, i) {\n var depId = depMap.id,\n dep = getOwn(registry, depId);\n\n //Only force things that have not completed\n //being defined, so still in the registry,\n //and only if it has not been matched up\n //in the module already.\n if (dep && !mod.depMatched[i] && !processed[depId]) {\n if (getOwn(traced, depId)) {\n mod.defineDep(i, defined[depId]);\n mod.check(); //pass false?\n } else {\n breakCycle(dep, traced, processed);\n }\n }\n });\n processed[id] = true;\n }\n }\n\n function checkLoaded() {\n var err, usingPathFallback,\n waitInterval = config.waitSeconds * 1000,\n //It is possible to disable the wait interval by using waitSeconds of 0.\n expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),\n noLoads = [],\n reqCalls = [],\n stillLoading = false,\n needCycleCheck = true;\n\n //Do not bother if this call was a result of a cycle break.\n if (inCheckLoaded) {\n return;\n }\n\n inCheckLoaded = true;\n\n //Figure out the state of all the modules.\n eachProp(enabledRegistry, function (mod) {\n var map = mod.map,\n modId = map.id;\n\n //Skip things that are not enabled or in error state.\n if (!mod.enabled) {\n return;\n }\n\n if (!map.isDefine) {\n reqCalls.push(mod);\n }\n\n if (!mod.error) {\n //If the module should be executed, and it has not\n //been inited and time is up, remember it.\n if (!mod.inited && expired) {\n if (hasPathFallback(modId)) {\n usingPathFallback = true;\n stillLoading = true;\n } else {\n noLoads.push(modId);\n removeScript(modId);\n }\n } else if (!mod.inited && mod.fetched && map.isDefine) {\n stillLoading = true;\n if (!map.prefix) {\n //No reason to keep looking for unfinished\n //loading. If the only stillLoading is a\n //plugin resource though, keep going,\n //because it may be that a plugin resource\n //is waiting on a non-plugin cycle.\n return (needCycleCheck = false);\n }\n }\n }\n });\n\n if (expired && noLoads.length) {\n //If wait time expired, throw error of unloaded modules.\n err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);\n err.contextName = context.contextName;\n return onError(err);\n }\n\n //Not expired, check for a cycle.\n if (needCycleCheck) {\n each(reqCalls, function (mod) {\n breakCycle(mod, {}, {});\n });\n }\n\n //If still waiting on loads, and the waiting load is something\n //other than a plugin resource, or there are still outstanding\n //scripts, then just try back later.\n if ((!expired || usingPathFallback) && stillLoading) {\n //Something is still waiting to load. Wait for it, but only\n //if a timeout is not already in effect.\n if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {\n checkLoadedTimeoutId = setTimeout(function () {\n checkLoadedTimeoutId = 0;\n checkLoaded();\n }, 50);\n }\n }\n\n inCheckLoaded = false;\n }\n\n Module = function (map) {\n this.events = getOwn(undefEvents, map.id) || {};\n this.map = map;\n this.shim = getOwn(config.shim, map.id);\n this.depExports = [];\n this.depMaps = [];\n this.depMatched = [];\n this.pluginMaps = {};\n this.depCount = 0;\n\n /* this.exports this.factory\n this.depMaps = [],\n this.enabled, this.fetched\n */\n };\n\n Module.prototype = {\n init: function (depMaps, factory, errback, options) {\n options = options || {};\n\n //Do not do more inits if already done. Can happen if there\n //are multiple define calls for the same module. That is not\n //a normal, common case, but it is also not unexpected.\n if (this.inited) {\n return;\n }\n\n this.factory = factory;\n\n if (errback) {\n //Register for errors on this module.\n this.on('error', errback);\n } else if (this.events.error) {\n //If no errback already, but there are error listeners\n //on this module, set up an errback to pass to the deps.\n errback = bind(this, function (err) {\n this.emit('error', err);\n });\n }\n\n //Do a copy of the dependency array, so that\n //source inputs are not modified. For example\n //\"shim\" deps are passed in here directly, and\n //doing a direct modification of the depMaps array\n //would affect that config.\n this.depMaps = depMaps && depMaps.slice(0);\n\n this.errback = errback;\n\n //Indicate this module has be initialized\n this.inited = true;\n\n this.ignore = options.ignore;\n\n //Could have option to init this module in enabled mode,\n //or could have been previously marked as enabled. However,\n //the dependencies are not known until init is called. So\n //if enabled previously, now trigger dependencies as enabled.\n if (options.enabled || this.enabled) {\n //Enable this module and dependencies.\n //Will call this.check()\n this.enable();\n } else {\n this.check();\n }\n },\n\n defineDep: function (i, depExports) {\n //Because of cycles, defined callback for a given\n //export can be called more than once.\n if (!this.depMatched[i]) {\n this.depMatched[i] = true;\n this.depCount -= 1;\n this.depExports[i] = depExports;\n }\n },\n\n fetch: function () {\n if (this.fetched) {\n return;\n }\n this.fetched = true;\n\n context.startTime = (new Date()).getTime();\n\n var map = this.map;\n\n //If the manager is for a plugin managed resource,\n //ask the plugin to load it now.\n if (this.shim) {\n context.makeRequire(this.map, {\n enableBuildCallback: true\n })(this.shim.deps || [], bind(this, function () {\n return map.prefix ? this.callPlugin() : this.load();\n }));\n } else {\n //Regular dependency.\n return map.prefix ? this.callPlugin() : this.load();\n }\n },\n\n load: function () {\n var url = this.map.url;\n\n //Regular dependency.\n if (!urlFetched[url]) {\n urlFetched[url] = true;\n context.load(this.map.id, url);\n }\n },\n\n /**\n * Checks if the module is ready to define itself, and if so,\n * define it.\n */\n check: function () {\n if (!this.enabled || this.enabling) {\n return;\n }\n\n var err, cjsModule,\n id = this.map.id,\n depExports = this.depExports,\n exports = this.exports,\n factory = this.factory;\n\n if (!this.inited) {\n // Only fetch if not already in the defQueue.\n if (!hasProp(context.defQueueMap, id)) {\n this.fetch();\n }\n } else if (this.error) {\n this.emit('error', this.error);\n } else if (!this.defining) {\n //The factory could trigger another require call\n //that would result in checking this module to\n //define itself again. If already in the process\n //of doing that, skip this work.\n this.defining = true;\n\n if (this.depCount < 1 && !this.defined) {\n if (isFunction(factory)) {\n //If there is an error listener, favor passing\n //to that instead of throwing an error. However,\n //only do it for define()'d modules. require\n //errbacks should not be called for failures in\n //their callbacks (#699). However if a global\n //onError is set, use that.\n if ((this.events.error && this.map.isDefine) ||\n req.onError !== defaultOnError) {\n try {\n exports = context.execCb(id, factory, depExports, exports);\n } catch (e) {\n err = e;\n }\n } else {\n exports = context.execCb(id, factory, depExports, exports);\n }\n\n // Favor return value over exports. If node/cjs in play,\n // then will not have a return value anyway. Favor\n // module.exports assignment over exports object.\n if (this.map.isDefine && exports === undefined) {\n cjsModule = this.module;\n if (cjsModule) {\n exports = cjsModule.exports;\n } else if (this.usingExports) {\n //exports already set the defined value.\n exports = this.exports;\n }\n }\n\n if (err) {\n err.requireMap = this.map;\n err.requireModules = this.map.isDefine ? [this.map.id] : null;\n err.requireType = this.map.isDefine ? 'define' : 'require';\n return onError((this.error = err));\n }\n\n } else {\n //Just a literal value\n exports = factory;\n }\n\n this.exports = exports;\n\n if (this.map.isDefine && !this.ignore) {\n defined[id] = exports;\n\n if (req.onResourceLoad) {\n var resLoadMaps = [];\n each(this.depMaps, function (depMap) {\n resLoadMaps.push(depMap.normalizedMap || depMap);\n });\n req.onResourceLoad(context, this.map, resLoadMaps);\n }\n }\n\n //Clean up\n cleanRegistry(id);\n\n this.defined = true;\n }\n\n //Finished the define stage. Allow calling check again\n //to allow define notifications below in the case of a\n //cycle.\n this.defining = false;\n\n if (this.defined && !this.defineEmitted) {\n this.defineEmitted = true;\n this.emit('defined', this.exports);\n this.defineEmitComplete = true;\n }\n\n }\n },\n\n callPlugin: function () {\n var map = this.map,\n id = map.id,\n //Map already normalized the prefix.\n pluginMap = makeModuleMap(map.prefix);\n\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(pluginMap);\n\n on(pluginMap, 'defined', bind(this, function (plugin) {\n var load, normalizedMap, normalizedMod,\n bundleId = getOwn(bundlesMap, this.map.id),\n name = this.map.name,\n parentName = this.map.parentMap ? this.map.parentMap.name : null,\n localRequire = context.makeRequire(map.parentMap, {\n enableBuildCallback: true\n });\n\n //If current map is not normalized, wait for that\n //normalized name to load instead of continuing.\n if (this.map.unnormalized) {\n //Normalize the ID if the plugin allows it.\n if (plugin.normalize) {\n name = plugin.normalize(name, function (name) {\n return normalize(name, parentName, true);\n }) || '';\n }\n\n //prefix and name should already be normalized, no need\n //for applying map config again either.\n normalizedMap = makeModuleMap(map.prefix + '!' + name,\n this.map.parentMap);\n on(normalizedMap,\n 'defined', bind(this, function (value) {\n this.map.normalizedMap = normalizedMap;\n this.init([], function () { return value; }, null, {\n enabled: true,\n ignore: true\n });\n }));\n\n normalizedMod = getOwn(registry, normalizedMap.id);\n if (normalizedMod) {\n //Mark this as a dependency for this plugin, so it\n //can be traced for cycles.\n this.depMaps.push(normalizedMap);\n\n if (this.events.error) {\n normalizedMod.on('error', bind(this, function (err) {\n this.emit('error', err);\n }));\n }\n normalizedMod.enable();\n }\n\n return;\n }\n\n //If a paths config, then just load that file instead to\n //resolve the plugin, as it is built into that paths layer.\n if (bundleId) {\n this.map.url = context.nameToUrl(bundleId);\n this.load();\n return;\n }\n\n load = bind(this, function (value) {\n this.init([], function () { return value; }, null, {\n enabled: true\n });\n });\n\n load.error = bind(this, function (err) {\n this.inited = true;\n this.error = err;\n err.requireModules = [id];\n\n //Remove temp unnormalized modules for this module,\n //since they will never be resolved otherwise now.\n eachProp(registry, function (mod) {\n if (mod.map.id.indexOf(id + '_unnormalized') === 0) {\n cleanRegistry(mod.map.id);\n }\n });\n\n onError(err);\n });\n\n //Allow plugins to load other code without having to know the\n //context or how to 'complete' the load.\n load.fromText = bind(this, function (text, textAlt) {\n /*jslint evil: true */\n var moduleName = map.name,\n moduleMap = makeModuleMap(moduleName),\n hasInteractive = useInteractive;\n\n //As of 2.1.0, support just passing the text, to reinforce\n //fromText only being called once per resource. Still\n //support old style of passing moduleName but discard\n //that moduleName in favor of the internal ref.\n if (textAlt) {\n text = textAlt;\n }\n\n //Turn off interactive script matching for IE for any define\n //calls in the text, then turn it back on at the end.\n if (hasInteractive) {\n useInteractive = false;\n }\n\n //Prime the system by creating a module instance for\n //it.\n getModule(moduleMap);\n\n //Transfer any config to this other module.\n if (hasProp(config.config, id)) {\n config.config[moduleName] = config.config[id];\n }\n\n try {\n req.exec(text);\n } catch (e) {\n return onError(makeError('fromtexteval',\n 'fromText eval for ' + id +\n ' failed: ' + e,\n e,\n [id]));\n }\n\n if (hasInteractive) {\n useInteractive = true;\n }\n\n //Mark this as a dependency for the plugin\n //resource\n this.depMaps.push(moduleMap);\n\n //Support anonymous modules.\n context.completeLoad(moduleName);\n\n //Bind the value of that module to the value for this\n //resource ID.\n localRequire([moduleName], load);\n });\n\n //Use parentName here since the plugin's name is not reliable,\n //could be some weird string with no path that actually wants to\n //reference the parentName's path.\n plugin.load(map.name, localRequire, load, config);\n }));\n\n context.enable(pluginMap, this);\n this.pluginMaps[pluginMap.id] = pluginMap;\n },\n\n enable: function () {\n enabledRegistry[this.map.id] = this;\n this.enabled = true;\n\n //Set flag mentioning that the module is enabling,\n //so that immediate calls to the defined callbacks\n //for dependencies do not trigger inadvertent load\n //with the depCount still being zero.\n this.enabling = true;\n\n //Enable each dependency\n each(this.depMaps, bind(this, function (depMap, i) {\n var id, mod, handler;\n\n if (typeof depMap === 'string') {\n //Dependency needs to be converted to a depMap\n //and wired up to this module.\n depMap = makeModuleMap(depMap,\n (this.map.isDefine ? this.map : this.map.parentMap),\n false,\n !this.skipMap);\n this.depMaps[i] = depMap;\n\n handler = getOwn(handlers, depMap.id);\n\n if (handler) {\n this.depExports[i] = handler(this);\n return;\n }\n\n this.depCount += 1;\n\n on(depMap, 'defined', bind(this, function (depExports) {\n if (this.undefed) {\n return;\n }\n this.defineDep(i, depExports);\n this.check();\n }));\n\n if (this.errback) {\n on(depMap, 'error', bind(this, this.errback));\n } else if (this.events.error) {\n // No direct errback on this module, but something\n // else is listening for errors, so be sure to\n // propagate the error correctly.\n on(depMap, 'error', bind(this, function(err) {\n this.emit('error', err);\n }));\n }\n }\n\n id = depMap.id;\n mod = registry[id];\n\n //Skip special modules like 'require', 'exports', 'module'\n //Also, don't call enable if it is already enabled,\n //important in circular dependency cases.\n if (!hasProp(handlers, id) && mod && !mod.enabled) {\n context.enable(depMap, this);\n }\n }));\n\n //Enable each plugin that is used in\n //a dependency\n eachProp(this.pluginMaps, bind(this, function (pluginMap) {\n var mod = getOwn(registry, pluginMap.id);\n if (mod && !mod.enabled) {\n context.enable(pluginMap, this);\n }\n }));\n\n this.enabling = false;\n\n this.check();\n },\n\n on: function (name, cb) {\n var cbs = this.events[name];\n if (!cbs) {\n cbs = this.events[name] = [];\n }\n cbs.push(cb);\n },\n\n emit: function (name, evt) {\n each(this.events[name], function (cb) {\n cb(evt);\n });\n if (name === 'error') {\n //Now that the error handler was triggered, remove\n //the listeners, since this broken Module instance\n //can stay around for a while in the registry.\n delete this.events[name];\n }\n }\n };\n\n function callGetModule(args) {\n //Skip modules already defined.\n if (!hasProp(defined, args[0])) {\n getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);\n }\n }\n\n function removeListener(node, func, name, ieName) {\n //Favor detachEvent because of IE9\n //issue, see attachEvent/addEventListener comment elsewhere\n //in this file.\n if (node.detachEvent && !isOpera) {\n //Probably IE. If not it will throw an error, which will be\n //useful to know.\n if (ieName) {\n node.detachEvent(ieName, func);\n }\n } else {\n node.removeEventListener(name, func, false);\n }\n }\n\n /**\n * Given an event from a script node, get the requirejs info from it,\n * and then removes the event listeners on the node.\n * @param {Event} evt\n * @returns {Object}\n */\n function getScriptData(evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n var node = evt.currentTarget || evt.srcElement;\n\n //Remove the listeners once here.\n removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');\n removeListener(node, context.onScriptError, 'error');\n\n return {\n node: node,\n id: node && node.getAttribute('data-requiremodule')\n };\n }\n\n function intakeDefines() {\n var args;\n\n //Any defined modules in the global queue, intake them now.\n takeGlobalQueue();\n\n //Make sure any remaining defQueue items get properly processed.\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +\n args[args.length - 1]));\n } else {\n //args are id, deps, factory. Should be normalized by the\n //define() function.\n callGetModule(args);\n }\n }\n context.defQueueMap = {};\n }\n\n context = {\n config: config,\n contextName: contextName,\n registry: registry,\n defined: defined,\n urlFetched: urlFetched,\n defQueue: defQueue,\n defQueueMap: {},\n Module: Module,\n makeModuleMap: makeModuleMap,\n nextTick: req.nextTick,\n onError: onError,\n\n /**\n * Set a configuration for the context.\n * @param {Object} cfg config object to integrate.\n */\n configure: function (cfg) {\n //Make sure the baseUrl ends in a slash.\n if (cfg.baseUrl) {\n if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {\n cfg.baseUrl += '/';\n }\n }\n\n // Convert old style urlArgs string to a function.\n if (typeof cfg.urlArgs === 'string') {\n var urlArgs = cfg.urlArgs;\n cfg.urlArgs = function(id, url) {\n return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs;\n };\n }\n\n //Save off the paths since they require special processing,\n //they are additive.\n var shim = config.shim,\n objs = {\n paths: true,\n bundles: true,\n config: true,\n map: true\n };\n\n eachProp(cfg, function (value, prop) {\n if (objs[prop]) {\n if (!config[prop]) {\n config[prop] = {};\n }\n mixin(config[prop], value, true, true);\n } else {\n config[prop] = value;\n }\n });\n\n //Reverse map the bundles\n if (cfg.bundles) {\n eachProp(cfg.bundles, function (value, prop) {\n each(value, function (v) {\n if (v !== prop) {\n bundlesMap[v] = prop;\n }\n });\n });\n }\n\n //Merge shim\n if (cfg.shim) {\n eachProp(cfg.shim, function (value, id) {\n //Normalize the structure\n if (isArray(value)) {\n value = {\n deps: value\n };\n }\n if ((value.exports || value.init) && !value.exportsFn) {\n value.exportsFn = context.makeShimExports(value);\n }\n shim[id] = value;\n });\n config.shim = shim;\n }\n\n //Adjust packages if necessary.\n if (cfg.packages) {\n each(cfg.packages, function (pkgObj) {\n var location, name;\n\n pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;\n\n name = pkgObj.name;\n location = pkgObj.location;\n if (location) {\n config.paths[name] = pkgObj.location;\n }\n\n //Save pointer to main module ID for pkg name.\n //Remove leading dot in main, so main paths are normalized,\n //and remove any trailing .js, since different package\n //envs have different conventions: some use a module name,\n //some use a file name.\n config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')\n .replace(currDirRegExp, '')\n .replace(jsSuffixRegExp, '');\n });\n }\n\n //If there are any \"waiting to execute\" modules in the registry,\n //update the maps for them, since their info, like URLs to load,\n //may have changed.\n eachProp(registry, function (mod, id) {\n //If module already has init called, since it is too\n //late to modify them, and ignore unnormalized ones\n //since they are transient.\n if (!mod.inited && !mod.map.unnormalized) {\n mod.map = makeModuleMap(id, null, true);\n }\n });\n\n //If a deps array or a config callback is specified, then call\n //require with those args. This is useful when require is defined as a\n //config object before require.js is loaded.\n if (cfg.deps || cfg.callback) {\n context.require(cfg.deps || [], cfg.callback);\n }\n },\n\n makeShimExports: function (value) {\n function fn() {\n var ret;\n if (value.init) {\n ret = value.init.apply(global, arguments);\n }\n return ret || (value.exports && getGlobal(value.exports));\n }\n return fn;\n },\n\n makeRequire: function (relMap, options) {\n options = options || {};\n\n function localRequire(deps, callback, errback) {\n var id, map, requireMod;\n\n if (options.enableBuildCallback && callback && isFunction(callback)) {\n callback.__requireJsBuild = true;\n }\n\n if (typeof deps === 'string') {\n if (isFunction(callback)) {\n //Invalid call\n return onError(makeError('requireargs', 'Invalid require call'), errback);\n }\n\n //If require|exports|module are requested, get the\n //value for them from the special handlers. Caveat:\n //this only works while module is being defined.\n if (relMap && hasProp(handlers, deps)) {\n return handlers[deps](registry[relMap.id]);\n }\n\n //Synchronous access to one module. If require.get is\n //available (as in the Node adapter), prefer that.\n if (req.get) {\n return req.get(context, deps, relMap, localRequire);\n }\n\n //Normalize module name, if it contains . or ..\n map = makeModuleMap(deps, relMap, false, true);\n id = map.id;\n\n if (!hasProp(defined, id)) {\n return onError(makeError('notloaded', 'Module name \"' +\n id +\n '\" has not been loaded yet for context: ' +\n contextName +\n (relMap ? '' : '. Use require([])')));\n }\n return defined[id];\n }\n\n //Grab defines waiting in the global queue.\n intakeDefines();\n\n //Mark all the dependencies as needing to be loaded.\n context.nextTick(function () {\n //Some defines could have been added since the\n //require call, collect them.\n intakeDefines();\n\n requireMod = getModule(makeModuleMap(null, relMap));\n\n //Store if map config should be applied to this require\n //call for dependencies.\n requireMod.skipMap = options.skipMap;\n\n requireMod.init(deps, callback, errback, {\n enabled: true\n });\n\n checkLoaded();\n });\n\n return localRequire;\n }\n\n mixin(localRequire, {\n isBrowser: isBrowser,\n\n /**\n * Converts a module name + .extension into an URL path.\n * *Requires* the use of a module name. It does not support using\n * plain URLs like nameToUrl.\n */\n toUrl: function (moduleNamePlusExt) {\n var ext,\n index = moduleNamePlusExt.lastIndexOf('.'),\n segment = moduleNamePlusExt.split('/')[0],\n isRelative = segment === '.' || segment === '..';\n\n //Have a file extension alias, and it is not the\n //dots from a relative path.\n if (index !== -1 && (!isRelative || index > 1)) {\n ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);\n moduleNamePlusExt = moduleNamePlusExt.substring(0, index);\n }\n\n return context.nameToUrl(normalize(moduleNamePlusExt,\n relMap && relMap.id, true), ext, true);\n },\n\n defined: function (id) {\n return hasProp(defined, makeModuleMap(id, relMap, false, true).id);\n },\n\n specified: function (id) {\n id = makeModuleMap(id, relMap, false, true).id;\n return hasProp(defined, id) || hasProp(registry, id);\n }\n });\n\n //Only allow undef on top level require calls\n if (!relMap) {\n localRequire.undef = function (id) {\n //Bind any waiting define() calls to this context,\n //fix for #408\n takeGlobalQueue();\n\n var map = makeModuleMap(id, relMap, true),\n mod = getOwn(registry, id);\n\n mod.undefed = true;\n removeScript(id);\n\n delete defined[id];\n delete urlFetched[map.url];\n delete undefEvents[id];\n\n //Clean queued defines too. Go backwards\n //in array so that the splices do not\n //mess up the iteration.\n eachReverse(defQueue, function(args, i) {\n if (args[0] === id) {\n defQueue.splice(i, 1);\n }\n });\n delete context.defQueueMap[id];\n\n if (mod) {\n //Hold on to listeners in case the\n //module will be attempted to be reloaded\n //using a different config.\n if (mod.events.defined) {\n undefEvents[id] = mod.events;\n }\n\n cleanRegistry(id);\n }\n };\n }\n\n return localRequire;\n },\n\n /**\n * Called to enable a module if it is still in the registry\n * awaiting enablement. A second arg, parent, the parent module,\n * is passed in for context, when this method is overridden by\n * the optimizer. Not shown here to keep code compact.\n */\n enable: function (depMap) {\n var mod = getOwn(registry, depMap.id);\n if (mod) {\n getModule(depMap).enable();\n }\n },\n\n /**\n * Internal method used by environment adapters to complete a load event.\n * A load event could be a script load or just a load pass from a synchronous\n * load call.\n * @param {String} moduleName the name of the module to potentially complete.\n */\n completeLoad: function (moduleName) {\n var found, args, mod,\n shim = getOwn(config.shim, moduleName) || {},\n shExports = shim.exports;\n\n takeGlobalQueue();\n\n while (defQueue.length) {\n args = defQueue.shift();\n if (args[0] === null) {\n args[0] = moduleName;\n //If already found an anonymous module and bound it\n //to this name, then this is some other anon module\n //waiting for its completeLoad to fire.\n if (found) {\n break;\n }\n found = true;\n } else if (args[0] === moduleName) {\n //Found matching define call for this script!\n found = true;\n }\n\n callGetModule(args);\n }\n context.defQueueMap = {};\n\n //Do this after the cycle of callGetModule in case the result\n //of those calls/init calls changes the registry.\n mod = getOwn(registry, moduleName);\n\n if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {\n if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {\n if (hasPathFallback(moduleName)) {\n return;\n } else {\n return onError(makeError('nodefine',\n 'No define call for ' + moduleName,\n null,\n [moduleName]));\n }\n } else {\n //A script that does not call define(), so just simulate\n //the call for it.\n callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);\n }\n }\n\n checkLoaded();\n },\n\n /**\n * Converts a module name to a file path. Supports cases where\n * moduleName may actually be just an URL.\n * Note that it **does not** call normalize on the moduleName,\n * it is assumed to have already been normalized. This is an\n * internal API, not a public one. Use toUrl for the public API.\n */\n nameToUrl: function (moduleName, ext, skipExt) {\n var paths, syms, i, parentModule, url,\n parentPath, bundleId,\n pkgMain = getOwn(config.pkgs, moduleName);\n\n if (pkgMain) {\n moduleName = pkgMain;\n }\n\n bundleId = getOwn(bundlesMap, moduleName);\n\n if (bundleId) {\n return context.nameToUrl(bundleId, ext, skipExt);\n }\n\n //If a colon is in the URL, it indicates a protocol is used and it is just\n //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)\n //or ends with .js, then assume the user meant to use an url and not a module id.\n //The slash is important for protocol-less URLs as well as full paths.\n if (req.jsExtRegExp.test(moduleName)) {\n //Just a plain path, not module name lookup, so just return it.\n //Add extension if it is included. This is a bit wonky, only non-.js things pass\n //an extension, this method probably needs to be reworked.\n url = moduleName + (ext || '');\n } else {\n //A module that needs to be converted to a path.\n paths = config.paths;\n\n syms = moduleName.split('/');\n //For each module name segment, see if there is a path\n //registered for it. Start with most specific name\n //and work up from it.\n for (i = syms.length; i > 0; i -= 1) {\n parentModule = syms.slice(0, i).join('/');\n\n parentPath = getOwn(paths, parentModule);\n if (parentPath) {\n //If an array, it means there are a few choices,\n //Choose the one that is desired\n if (isArray(parentPath)) {\n parentPath = parentPath[0];\n }\n syms.splice(0, i, parentPath);\n break;\n }\n }\n\n //Join the path parts together, then figure out if baseUrl is needed.\n url = syms.join('/');\n url += (ext || (/^data\\:|^blob\\:|\\?/.test(url) || skipExt ? '' : '.js'));\n url = (url.charAt(0) === '/' || url.match(/^[\\w\\+\\.\\-]+:/) ? '' : config.baseUrl) + url;\n }\n\n return config.urlArgs && !/^blob\\:/.test(url) ?\n url + config.urlArgs(moduleName, url) : url;\n },\n\n //Delegates to req.load. Broken out as a separate function to\n //allow overriding in the optimizer.\n load: function (id, url) {\n req.load(context, id, url);\n },\n\n /**\n * Executes a module callback function. Broken out as a separate function\n * solely to allow the build system to sequence the files in the built\n * layer in the right sequence.\n *\n * @private\n */\n execCb: function (name, callback, args, exports) {\n return callback.apply(exports, args);\n },\n\n /**\n * callback for script loads, used to check status of loading.\n *\n * @param {Event} evt the event from the browser for the script\n * that was loaded.\n */\n onScriptLoad: function (evt) {\n //Using currentTarget instead of target for Firefox 2.0's sake. Not\n //all old browsers will be supported, but this one was easy enough\n //to support and still makes sense.\n if (evt.type === 'load' ||\n (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {\n //Reset interactive script so a script node is not held onto for\n //to long.\n interactiveScript = null;\n\n //Pull out the name of the module and the context.\n var data = getScriptData(evt);\n context.completeLoad(data.id);\n }\n },\n\n /**\n * Callback for script errors.\n */\n onScriptError: function (evt) {\n var data = getScriptData(evt);\n if (!hasPathFallback(data.id)) {\n var parents = [];\n eachProp(registry, function(value, key) {\n if (key.indexOf('_@r') !== 0) {\n each(value.depMaps, function(depMap) {\n if (depMap.id === data.id) {\n parents.push(key);\n return true;\n }\n });\n }\n });\n return onError(makeError('scripterror', 'Script error for \"' + data.id +\n (parents.length ?\n '\", needed by: ' + parents.join(', ') :\n '\"'), evt, [data.id]));\n }\n }\n };\n\n context.require = context.makeRequire();\n return context;\n }\n\n /**\n * Main entry point.\n *\n * If the only argument to require is a string, then the module that\n * is represented by that string is fetched for the appropriate context.\n *\n * If the first argument is an array, then it will be treated as an array\n * of dependency string names to fetch. An optional function callback can\n * be specified to execute when all of those dependencies are available.\n *\n * Make a local req variable to help Caja compliance (it assumes things\n * on a require that are not standardized), and to give a short\n * name for minification/local scope use.\n */\n req = requirejs = function (deps, callback, errback, optional) {\n\n //Find the right context, use default\n var context, config,\n contextName = defContextName;\n\n // Determine if have config object in the call.\n if (!isArray(deps) && typeof deps !== 'string') {\n // deps is a config object\n config = deps;\n if (isArray(callback)) {\n // Adjust args if there are dependencies\n deps = callback;\n callback = errback;\n errback = optional;\n } else {\n deps = [];\n }\n }\n\n if (config && config.context) {\n contextName = config.context;\n }\n\n context = getOwn(contexts, contextName);\n if (!context) {\n context = contexts[contextName] = req.s.newContext(contextName);\n }\n\n if (config) {\n context.configure(config);\n }\n\n return context.require(deps, callback, errback);\n };\n\n /**\n * Support require.config() to make it easier to cooperate with other\n * AMD loaders on globally agreed names.\n */\n req.config = function (config) {\n return req(config);\n };\n\n /**\n * Execute something after the current tick\n * of the event loop. Override for other envs\n * that have a better solution than setTimeout.\n * @param {Function} fn function to execute later.\n */\n req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {\n setTimeout(fn, 4);\n } : function (fn) { fn(); };\n\n /**\n * Export require as a global, but only if it does not already exist.\n */\n if (!require) {\n require = req;\n }\n\n req.version = version;\n\n //Used to filter out dependencies that are already paths.\n req.jsExtRegExp = /^\\/|:|\\?|\\.js$/;\n req.isBrowser = isBrowser;\n s = req.s = {\n contexts: contexts,\n newContext: newContext\n };\n\n //Create default context.\n req({});\n\n //Exports some context-sensitive methods on global require.\n each([\n 'toUrl',\n 'undef',\n 'defined',\n 'specified'\n ], function (prop) {\n //Reference from contexts instead of early binding to default context,\n //so that during builds, the latest instance of the default context\n //with its config gets used.\n req[prop] = function () {\n var ctx = contexts[defContextName];\n return ctx.require[prop].apply(ctx, arguments);\n };\n });\n\n if (isBrowser) {\n head = s.head = document.getElementsByTagName('head')[0];\n //If BASE tag is in play, using appendChild is a problem for IE6.\n //When that browser dies, this can be removed. Details in this jQuery bug:\n //http://dev.jquery.com/ticket/2709\n baseElement = document.getElementsByTagName('base')[0];\n if (baseElement) {\n head = s.head = baseElement.parentNode;\n }\n }\n\n /**\n * Any errors that require explicitly generates will be passed to this\n * function. Intercept/override it if you want custom error handling.\n * @param {Error} err the error object.\n */\n req.onError = defaultOnError;\n\n /**\n * Creates the node for the load command. Only used in browser envs.\n */\n req.createNode = function (config, moduleName, url) {\n var node = config.xhtml ?\n document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :\n document.createElement('script');\n node.type = config.scriptType || 'text/javascript';\n node.charset = 'utf-8';\n node.async = true;\n return node;\n };\n\n /**\n * Does the request to load a module for the browser case.\n * Make this a separate function to allow other environments\n * to override it.\n *\n * @param {Object} context the require context to find state.\n * @param {String} moduleName the name of the module.\n * @param {Object} url the URL to the module.\n */\n req.load = function (context, moduleName, url) {\n var config = (context && context.config) || {},\n node;\n if (isBrowser) {\n //In the browser so use a script tag\n node = req.createNode(config, moduleName, url);\n\n node.setAttribute('data-requirecontext', context.contextName);\n node.setAttribute('data-requiremodule', moduleName);\n\n //Set up load listener. Test attachEvent first because IE9 has\n //a subtle issue in its addEventListener and script onload firings\n //that do not match the behavior of all other browsers with\n //addEventListener support, which fire the onload event for a\n //script right after the script execution. See:\n //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution\n //UNFORTUNATELY Opera implements attachEvent but does not follow the script\n //script execution mode.\n if (node.attachEvent &&\n //Check if node.attachEvent is artificially added by custom script or\n //natively supported by browser\n //read https://github.com/requirejs/requirejs/issues/187\n //if we can NOT find [native code] then it must NOT natively supported.\n //in IE8, node.attachEvent does not have toString()\n //Note the test for \"[native code\" with no closing brace, see:\n //https://github.com/requirejs/requirejs/issues/273\n !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&\n !isOpera) {\n //Probably IE. IE (at least 6-8) do not fire\n //script onload right after executing the script, so\n //we cannot tie the anonymous define call to a name.\n //However, IE reports the script as being in 'interactive'\n //readyState at the time of the define call.\n useInteractive = true;\n\n node.attachEvent('onreadystatechange', context.onScriptLoad);\n //It would be great to add an error handler here to catch\n //404s in IE9+. However, onreadystatechange will fire before\n //the error handler, so that does not help. If addEventListener\n //is used, then IE will fire error before load, but we cannot\n //use that pathway given the connect.microsoft.com issue\n //mentioned above about not doing the 'script execute,\n //then fire the script load event listener before execute\n //next script' that other browsers do.\n //Best hope: IE10 fixes the issues,\n //and then destroys all installs of IE 6-9.\n //node.attachEvent('onerror', context.onScriptError);\n } else {\n node.addEventListener('load', context.onScriptLoad, false);\n node.addEventListener('error', context.onScriptError, false);\n }\n node.src = url;\n\n //Calling onNodeCreated after all properties on the node have been\n //set, but before it is placed in the DOM.\n if (config.onNodeCreated) {\n config.onNodeCreated(node, config, moduleName, url);\n }\n\n //For some cache cases in IE 6-8, the script executes before the end\n //of the appendChild execution, so to tie an anonymous define\n //call to the module name (which is stored on the node), hold on\n //to a reference to this node, but clear after the DOM insertion.\n currentlyAddingScript = node;\n if (baseElement) {\n head.insertBefore(node, baseElement);\n } else {\n head.appendChild(node);\n }\n currentlyAddingScript = null;\n\n return node;\n } else if (isWebWorker) {\n try {\n //In a web worker, use importScripts. This is not a very\n //efficient use of importScripts, importScripts will block until\n //its script is downloaded and evaluated. However, if web workers\n //are in play, the expectation is that a build has been done so\n //that only one script needs to be loaded anyway. This may need\n //to be reevaluated if other use cases become common.\n\n // Post a task to the event loop to work around a bug in WebKit\n // where the worker gets garbage-collected after calling\n // importScripts(): https://webkit.org/b/153317\n setTimeout(function() {}, 0);\n importScripts(url);\n\n //Account for anonymous modules\n context.completeLoad(moduleName);\n } catch (e) {\n context.onError(makeError('importscripts',\n 'importScripts failed for ' +\n moduleName + ' at ' + url,\n e,\n [moduleName]));\n }\n }\n };\n\n function getInteractiveScript() {\n if (interactiveScript && interactiveScript.readyState === 'interactive') {\n return interactiveScript;\n }\n\n eachReverse(scripts(), function (script) {\n if (script.readyState === 'interactive') {\n return (interactiveScript = script);\n }\n });\n return interactiveScript;\n }\n\n //Look for a data-main script attribute, which could also adjust the baseUrl.\n if (isBrowser && !cfg.skipDataMain) {\n //Figure out baseUrl. Get it from the script tag with require.js in it.\n eachReverse(scripts(), function (script) {\n //Set the 'head' where we can append children by\n //using the script's parent.\n if (!head) {\n head = script.parentNode;\n }\n\n //Look for a data-main attribute to set main script for the page\n //to load. If it is there, the path to data main becomes the\n //baseUrl, if it is not already set.\n dataMain = script.getAttribute('data-main');\n if (dataMain) {\n //Preserve dataMain in case it is a path (i.e. contains '?')\n mainScript = dataMain;\n\n //Set final baseUrl if there is not already an explicit one,\n //but only do so if the data-main value is not a loader plugin\n //module ID.\n if (!cfg.baseUrl && mainScript.indexOf('!') === -1) {\n //Pull off the directory of data-main for use as the\n //baseUrl.\n src = mainScript.split('/');\n mainScript = src.pop();\n subPath = src.length ? src.join('/') + '/' : './';\n\n cfg.baseUrl = subPath;\n }\n\n //Strip off any trailing .js since mainScript is now\n //like a module name.\n mainScript = mainScript.replace(jsSuffixRegExp, '');\n\n //If mainScript is still a path, fall back to dataMain\n if (req.jsExtRegExp.test(mainScript)) {\n mainScript = dataMain;\n }\n\n //Put the data-main script in the files to load.\n cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];\n\n return true;\n }\n });\n }\n\n /**\n * The function that handles definitions of modules. Differs from\n * require() in that a string for the module should be the first argument,\n * and the function to execute after dependencies are loaded should\n * return a value to define the module corresponding to the first argument's\n * name.\n */\n define = function (name, deps, callback) {\n var node, context;\n\n //Allow for anonymous modules\n if (typeof name !== 'string') {\n //Adjust args appropriately\n callback = deps;\n deps = name;\n name = null;\n }\n\n //This module may not have dependencies\n if (!isArray(deps)) {\n callback = deps;\n deps = null;\n }\n\n //If no name, and callback is a function, then figure out if it a\n //CommonJS thing with dependencies.\n if (!deps && isFunction(callback)) {\n deps = [];\n //Remove comments from the callback string,\n //look for require calls, and pull them into the dependencies,\n //but only if there are function args.\n if (callback.length) {\n callback\n .toString()\n .replace(commentRegExp, commentReplace)\n .replace(cjsRequireRegExp, function (match, dep) {\n deps.push(dep);\n });\n\n //May be a CommonJS thing even without require calls, but still\n //could use exports, and module. Avoid doing exports and module\n //work though if it just needs require.\n //REQUIRES the function to expect the CommonJS variables in the\n //order listed below.\n deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);\n }\n }\n\n //If in IE 6-8 and hit an anonymous define() call, do the interactive\n //work.\n if (useInteractive) {\n node = currentlyAddingScript || getInteractiveScript();\n if (node) {\n if (!name) {\n name = node.getAttribute('data-requiremodule');\n }\n context = contexts[node.getAttribute('data-requirecontext')];\n }\n }\n\n //Always save off evaluating the def call until the script onload handler.\n //This allows multiple modules to be in a file without prematurely\n //tracing dependencies, and allows for anonymous module support,\n //where the module name is not known until the script onload event\n //occurs. If no context, use the global queue, and get it processed\n //in the onscript load callback.\n if (context) {\n context.defQueue.push([name, deps, callback]);\n context.defQueueMap[name] = true;\n } else {\n globalDefQueue.push([name, deps, callback]);\n }\n };\n\n define.amd = {\n jQuery: true\n };\n\n /**\n * Executes the text. Normally just uses eval, but can be modified\n * to use a better, environment-specific call. Only used for transpiling\n * loader plugins, not for plain JS modules.\n * @param {String} text the text to execute/evaluate.\n */\n req.exec = function (text) {\n /*jslint evil: true */\n return eval(text);\n };\n\n //Set up with config info.\n req(cfg);\n}(this, (typeof setTimeout === 'undefined' ? undefined : setTimeout)));\n","\n/** @lint */\n\n/**\n * @module orb/features/api\n */\ndefine('orb/api', function () {\n 'use strict';\n\n var eventQueue = {layout: []},\n settings = {};\n\n var api = {\n /**\n Listen for changes to the layout of ORB masthead.\n */\n layout: function (f) {\n eventQueue.layout.push(f);\n },\n /**\n Trigger a custom event, such as \"layout\".\n */\n trigger: function (eventName, e) {\n if (eventQueue[eventName]) {\n for (var i = 0, l = eventQueue[eventName].length; i < l; i++) {\n eventQueue[eventName][i](e);\n }\n }\n },\n /**\n Get or set the configuration properties.\n @example\n orb.config('maxSuggestions', 3);\n */\n config: function (key, val) {\n if (arguments.length === 0) {\n return settings;\n }\n else if (arguments.length === 1) {\n return settings[key];\n }\n else {\n settings[key] = val;\n }\n }\n };\n\n return api;\n});\n","(function() {\n /**\n * Cookies module.\n * @module orb/cookies\n */\n 'use strict';\n\n var bbccookies = {};\n\n bbccookies.POLICY_REFRESH_DATE_MILLIS = new Date(2015, 4, 21, 0, 0, 0, 0).getTime();\n var POLICY_EXPIRY_COOKIENAME = 'ckns_policy_exp';\n\n var POLICYCOOKIENAME = 'ckns_policy',\n DEFAULTPOLICY = {\n ads: true,\n personalisation: true,\n performance: true,\n necessary: true\n },\n policyCache = {},\n bbccookies_jars = {\n \"personalisation\": \"ckps_.+|X-AB-iplayer-.+|ACTVTYMKR|BBC_EXAMPLE_COOKIE|BBCIplayer|BBCiPlayerM|BBCIplayerSession|BBCMediaselector|BBCPostcoder|bbctravel|CGISESSID|ed|food-view|forceDesktop|h4|IMRID|locserv|MyLang|myloc|NTABS|ttduserPrefs|V5|WEATHER|BBCScienceDiscoveryPlaylist_.+|bitratePref|correctAnswerCount|genreCookie|highestQuestionScore|incorrectAnswerCount|longestStreak|MSCSProfile|programmes-oap-expanded|quickestAnswer|score|servicePanel|slowestAnswer|totalTimeForAllFormatted|v|BBCwords|score|correctAnswerCount|highestQuestionScore|hploc|BGUID|BBCWEACITY|mstouch|myway|BBCNewsCustomisation|cbbc_anim|cbeebies_snd|bbcsr_usersx|cbeebies_rd|BBC-Latest_Blogs|zh-enc|pref_loc|m|bbcEmp.+|recs-.+|_lvd2|_lvs2|tick|_fcap_CAM1|_rcc2\",\n \"performance\": \"ckpf_.+|optimizely.*|BBCLiveStatsClick|id|_em_.+|cookies_enabled|mbox|mbox-admin|mc_.+|omniture_unique|s_.+|sc_.+|adpolicyAdDisplayFrequency|s1|ns_session|ns_cookietest|ns_ux|NO-SA|tr_pr1|gvsurvey|bbcsurvey|si_v|sa_labels|obuid|mm_.+|mmid|mmcore.+|mmpa.+\",\n \"ads\": \"ckad_.+|rsi_segs|c\",\n \"necessary\": \"ckns_.+|BBC-UID|blq\\\\.dPref|SSO2-UID|BBC-H2-User|rmRpDetectReal|bbcComSurvey|IDENTITY_ENV|IDENTITY|IDENTITY-HTTPS|IDENTITY_SESSION|BBCCOMMENTSMODULESESSID|bbcBump.+|IVOTE_VOTE_HISTORY|pulse|BBCPG|BBCPGstat|ecos\\\\.dt\"\n };\n\n bbccookies.cookieOvenRequest = function(xhr, url, done) {\n // make an xhr request to the cookieOvenUrl\n try {\n xhr.open('GET', url, true);\n xhr.send();\n } catch (error) {\n if(done){\n done(error); //edge case not handled by XMLHttpRequest\n }\n }\n };\n\n function cookieOvenUrl(tld, name, value) {\n return window.orb.partialCookieOvenUrl + '.' + tld + '/' + name + '/' + value;\n }\n\n function handleCookieOvenError(msg, done) {\n if (done) {\n done(new Error(msg));\n }\n }\n\n function setupCookieOventXHR(done){\n var xhr = new XMLHttpRequest();\n xhr.withCredentials = true;\n xhr.onload = function() {\n if (done) {\n done(null, xhr.status);\n }\n };\n xhr.onerror = function(error) {\n handleCookieOvenError('Request to cross domain cookie service encountered an error with code' + xhr.status + '. ' + error, done);\n };\n xhr.onabort = function() {\n handleCookieOvenError('Request to cross domain cookie service was aborted.', done);\n };\n xhr.ontimeout = function() {\n handleCookieOvenError('Request to cross domain cookie service timed out.', done);\n };\n return xhr;\n }\n\n function domainSwitcher(domain){\n var domainFlipper = {\n 'com': 'co.uk',\n 'co.uk': 'com'\n };\n var tld = domain.match(/(co.uk|com)/)[0];\n return domainFlipper[tld];\n }\n\n bbccookies.cookieOvenClient = function(name, value, currentDomain, done) {\n\n // only try this if we have an environment that supports XHR properly\n if ('withCredentials' in new XMLHttpRequest()) {\n var allowedXDomainCookieNames = [POLICYCOOKIENAME];\n try {\n if (!currentDomain) {\n throw new Error('Cannot make request to cross domain cookie service when domain is not set.');\n }\n if (allowedXDomainCookieNames.indexOf(name) <= -1) {\n throw new Error('Cookie name is not in the whitelist accepted by the cross domain cookie service.');\n }\n\n var otherTld = domainSwitcher(currentDomain);\n var xhr = setupCookieOventXHR(done);\n var url = cookieOvenUrl(otherTld, name, value)\n bbccookies.cookieOvenRequest(xhr, url, done);\n\n } catch (error) {\n if (done) {\n done(error);\n }\n }\n } else {\n done(new Error('Cannot make request to cross domain cookie service as this browser does not support XmlHttpRequest with credentials.'));\n }\n };\n\n /**\n * Sets a specified cookie to a value, with optional options\n * @public\n * @param {string} name - The name of the cookie to be set. When second argument (value) is not set, this parameter\n * can be used to set the cookie using a raw cookie string\n * @param {string} [value] - The value the cookie will be set to.\n * @param {object} [options] - Security (domain/path/secure) options and setting expiry time\n * @param {date} [options.expiry = End Of Session] - The date on which the cookie will be removed by the browser\n * @param {boolean} [options.secure] - If true, the cookie will be transmitted only over secure protocol as https\n * @param {string} [options.domain = Host of current document] - The domain from which the cookie will be readable.\n * E.g., \"example.com\",\".example.com\" (includes all subdomains) or \"subdomain.example.com\"; if not specified,\n * defaults to the host portion of the current document location.\n * @param {string} [options.path = current path of current document] - The path from which the cookie will be readable.\n * */\n bbccookies.set = function(name, value, options, done) {\n var cookieName, cookieString;\n if (value !== undefined) {\n // We're being used in key-value mode\n cookieName = sanitiseKey(name);\n cookieString = generateCookieString(cookieName, value, options);\n var crossDomainEnabled = options && options.crossDomainEnabled;\n if (bbccookies.isAllowed(cookieName) && crossDomainEnabled) {\n bbccookies.cookieOvenClient(name, value, options.domain, done);\n }\n } else {\n // We've been given a full cookie string ready to set\n cookieName = getCookieName(name);\n cookieString = name;\n }\n\n if (bbccookies.isAllowed(cookieName)) {\n document.cookie = cookieString;\n }\n };\n\n /**\n * Checks to see if the specified cookie name is allowed under the current browser/user's preferences.\n * @param {string} cookieName - The name of the cookie\n * @returns {boolean} True if a cookie with this name can be set under the current preferences\n */\n bbccookies.isAllowed = function(cookieName) {\n var policy,\n list,\n allowed;\n\n policy = bbccookies.readPolicy();\n list = getAllowedList(policy);\n allowed = list.test(cookieName);\n\n return allowed;\n };\n\n /**\n * Gets the current browser/user's cookie preferences\n * @param {string} [categoryName] - the category of cookie preferences to inspect. Should be \"ads\",\n * \"personalisation\", \"performance\" or \"necessary\"\n * @returns {Object|boolean} If catgeoryName is not specified, returns a preferences object, with keys \"ads\",\n * \"personalisation\", \"performance\" and \"necessary\", with a boolean value, indicating if cookies in that category\n * can be set. If categoryName is specified, returns a boolean value directly.\n */\n bbccookies.readPolicy = function(categoryName) {\n var policy = decompilePolicyCookie();\n if (categoryName) {\n return policy[categoryName];\n } else {\n return policy;\n }\n };\n\n /**\n * Gets the current browser/user's cookie preferences as a string suitable for analytics reporting\n * @returns {Object|boolean} Returns a string representing the cookie preferences\n */\n bbccookies.analyticsPolicyString = function() {\n var policy = decompilePolicyCookie();\n return 'ad' + +policy.ads + 'ps' + +policy.personalisation + 'pf' + +policy.performance\n };\n\n /**\n * Gets the value of a cookie at a specified key. If a key is not specified, returns the contents of document.cookie\n * @returns {string}\n */\n bbccookies.get = function(key) {\n if (!key) {\n return document.cookie;\n }\n return decodeURIComponent(document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + encodeURIComponent(key).replace(/[\\-\\.\\+\\*]/g, \"\\\\$&\") + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\")) || null;\n };\n\n bbccookies.isCookiePolicySet = function() {\n return bbccookies.get(POLICYCOOKIENAME) !== null;\n };\n\n\n /**\n * Set default cookie preferences for all categories on this current domain\n */\n bbccookies.setDefaultCookiesSingleDomain = function() {\n writePolicy(DEFAULTPOLICY, false);\n };\n\n /**\n * Sets the user/browser's cookie preferences for a specified category.\n * @param {string} categoryName - the name of the category\n * @param {boolean} preferenceValue - true for opt-in, false for opt-out\n * @param {boolean} disableCrossDomain - optional, true if cross-domain cookies should be disabled\n * @param {function} done - optional, callback function\n * @private\n */\n bbccookies._setPolicy = function(categoryName, preferenceValue, disableCrossDomain, done) {\n var policy = bbccookies.readPolicy();\n policy[categoryName] = !!preferenceValue;\n\n var isCrossDomainEnabled = !disableCrossDomain;\n\n writePolicy(policy, isCrossDomainEnabled, done);\n };\n\n /**\n * @method bbcookies.cookiesEnabled\n * @public\n * @returns {boolean} true if the browser has cookie support, otherwise false\n */\n bbccookies.cookiesEnabled = function() {\n var cname = 'ckns_cookietest' + Math.floor(Math.random() * 100000);\n this.set(cname, '1');\n\n if (this.get(cname)) {\n this.delete(cname);\n return true;\n }\n return false;\n }\n /**\n * Deletes a the cookie with a specified key.\n * @param {string} key - The name of cookie to remove\n * @param {string} [domain] - the domain from which to remove the cookie\n */\n bbccookies.delete = function(key, options) {\n key = sanitiseKey(key);\n unsanitisedDelete(key, options);\n }\n\n bbccookies.del = bbccookies.delete;\n\n //deletes a cookie without sanitising the key name\n function unsanitisedDelete(key, options) {\n if (key !== undefined) {\n //need to write using document.cookie as set won't allow us to set a cookie\n var opts = {}\n opts.expires = new Date(0);\n if (options) {\n opts.domain = options.domain;\n opts.path = options.path;\n }\n document.cookie = generateCookieString(key, \"removed\", opts);\n } else {\n return null;\n }\n }\n\n bbccookies._crunch = function() {\n //look through document.cookie for keys matching performance(initially), call delete on each one\n //do a find and replace, doesn't work\n deleteEverywhere('');\n var cookies = document.cookie.split(\";\");\n for (var i = 0; i < cookies.length; i++) {\n var cookieParts = cookies[i].split(\"=\");\n var keyName = cookieParts[0].trim();\n if (!this.isAllowed(keyName)) {\n deleteEverywhere(keyName);\n }\n }\n }\n\n bbccookies._getCurrentDomain = function() {\n try {\n var domain = window.location.hostname.toLowerCase();\n return domain.match(/.*(bbc\\.co\\.uk|bbc\\.com)\\/*/)[1];\n } catch (err) {\n return undefined;\n }\n };\n\n //deletes on all paths and domains as part of the crunch\n function deleteEverywhere(key) {\n var parts = window.location.hostname.split('.');\n var partsLength = parts.length;\n unsanitisedDelete(key);\n deleteOnAllPaths(key);\n while (parts.length && '|co.uk|com|'.indexOf('|' + parts.join('.') + '|') === -1) {\n if (parts.length) {\n var domain = parts.join('.');\n unsanitisedDelete(key, {\n domain: domain\n });\n deleteOnAllPaths(key, domain);\n }\n parts.shift();\n }\n }\n\n function deleteOnAllPaths(key, domain) {\n var paths = window.location.pathname.split('/');\n unsanitisedDelete(key, domain);\n while (paths.length) {\n var path = paths.join('/');\n if (path === '') path = '/';\n unsanitisedDelete(key, {\n domain: domain,\n path: path\n });\n unsanitisedDelete(key, {\n domain: '.' + domain,\n path: path\n });\n paths.pop();\n }\n }\n\n function getAllowedList(policy) {\n var cacheKey = JSON.stringify(policy);\n if (typeof(policyCache[cacheKey]) !== 'undefined') {\n return policyCache[cacheKey];\n }\n\n var whiteList = '';\n\n for (var cat in policy) {\n if (policy.hasOwnProperty(cat) && bbccookies_jars[cat]) {\n if (policy[cat] === true) {\n whiteList += (whiteList ? '|' : '') + bbccookies_jars[cat];\n }\n }\n }\n policyCache[cacheKey] = new RegExp('^(' + (whiteList ? whiteList : '.*') + ')$', 'i');\n\n return policyCache[cacheKey];\n }\n\n function decompilePolicyCookie() {\n var pattern = new RegExp('(?:^|; ?)' + POLICYCOOKIENAME + '=(\\\\d)(\\\\d)(\\\\d)($|;)'),\n parts = document.cookie.match(pattern);\n\n if (parts) {\n return {\n ads: !!+parts[1],\n personalisation: !!+parts[2],\n performance: !!+parts[3],\n necessary: true\n };\n } else {\n return DEFAULTPOLICY;\n }\n }\n\n function nextYear() {\n var d = new Date();\n d.setYear(d.getFullYear() + 1);\n return d;\n }\n\n function writePolicy(policy, isCrossDomainEnabled, done) {\n var d = nextYear();\n var policyString = '' + (policy.ads ? 1 : 0) + (policy.personalisation ? 1 : 0) + (policy.performance ? 1 : 0);\n\n var currentDomain = bbccookies._getCurrentDomain();\n bbccookies.set(POLICYCOOKIENAME, policyString, {\n domain: currentDomain,\n path: '/',\n expires: d,\n crossDomainEnabled: isCrossDomainEnabled\n }, done);\n\n // expire this cookie one month after policy cookie\n var expires = new Date(d.getTime());\n expires.setMonth(expires.getMonth() + 1);\n\n bbccookies.set(POLICY_EXPIRY_COOKIENAME, d.getTime(), {\n domain: currentDomain,\n path: '/',\n expires: expires\n });\n\n return policy;\n }\n\n function getCookieName(cookieString) {\n var matches = ('' + cookieString).match(/^([^=]+)(?==)/); //(^_^)//\n\n return (matches && matches.length ? matches[0] : '');\n }\n\n function sanitiseKey(key) {\n key = key.replace(/[^#$&+\\^`|]/g, encodeURIComponent);\n key = key.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n return key;\n }\n\n function generateCookieString(key, value, options) {\n var theDomain = (options && options.domain) ? ';domain=' + options.domain : '';\n value = (value + '').replace(/[^!#$&-+\\--:<-\\[\\]-~]/g, encodeURIComponent);\n options = options || {};\n\n var cookieString = key + '=' + value;\n cookieString += options.path ? ';path=' + options.path : '';\n cookieString += options.domain ? ';domain=' + options.domain : '';\n cookieString += options.expires ? ';expires=' + options.expires.toUTCString() : '';\n cookieString += options.secure ? ';secure' : '';\n return cookieString;\n }\n\n /*!\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n *\n */\n\n // @win window reference\n // @fn function reference\n function contentLoaded(win, fn) {\n\n var done = false,\n top = true,\n\n doc = win.document,\n root = doc.documentElement,\n modern = doc.addEventListener,\n\n add = modern ? 'addEventListener' : 'attachEvent',\n rem = modern ? 'removeEventListener' : 'detachEvent',\n pre = modern ? '' : 'on',\n\n init = function(e) {\n if (e.type === 'readystatechange' && doc.readyState != 'complete') return;\n (e.type === 'load' ? win : doc)[rem](pre + e.type, init, false);\n if (!done && (done = true)) fn.call(win, e.type || e);\n },\n\n poll = function() {\n try {\n root.doScroll('left');\n } catch (e) {\n setTimeout(poll, 50);\n return;\n }\n init('poll');\n };\n\n if (doc.readyState === 'complete') fn.call(win, 'lazy');\n else {\n if (!modern && root.doScroll) {\n try {\n top = !win.frameElement;\n } catch (e) {}\n if (top) poll();\n }\n doc[add](pre + 'DOMContentLoaded', init, false);\n doc[add](pre + 'readystatechange', init, false);\n win[add](pre + 'load', init, false);\n }\n\n }\n\n\n //this public method is deprecated but is used by the cookies settings page.\n bbccookies._getPolicy = bbccookies.readPolicy;\n\n //trim polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim\n if (!String.prototype.trim) {\n (function() {\n // Make sure we trim BOM and NBSP\n var rtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g;\n String.prototype.trim = function() {\n return this.replace(rtrim, '');\n };\n })();\n }\n //run crunch when the script is loaded\n bbccookies._crunch();\n\n contentLoaded(window, function() {\n bbccookies._crunch()\n });\n if (window.addEventListener) {\n window.addEventListener('beforeunload', function() {\n bbccookies._crunch()\n }, false);\n } else if (window.attachEvent) {\n window.attachEvent('onbeforeunload', function() {\n bbccookies._crunch()\n });\n } else {\n window.onbeforeunload = function() {\n bbccookies._crunch()\n };\n }\n\n window.bbccookies = bbccookies;\n define('orb/cookies', function() {\n return bbccookies;\n });\n})();\n","/** @lint */\n\n/**\n * @module orb/lib/_script.js\n */\ndefine('orb/lib/_script', function (undefined) {\n 'use strict';\n \n var uid = 1; // unique scriptnode name identifier\n\n var exports = {\n inject: function (src) {\n var scriptEl;\n\n scriptEl = document.createElement('script');\n scriptEl.src = src;\n document.getElementsByTagName('head')[0].appendChild(scriptEl);\n \n return scriptEl;\n },\n /**\n @param {string} url The remote URL of the service providing the JSONP data.\n @param {function} callback The function to execute once the JSON has been unwrapped from its JSONP.\n @param {object} [opts] The options.\n @param {string} [opts.callbackName] The name of the JSONP function, defaults to \"jsonpcb_#\" where # is an incrementing number.\n @param {number} [opts.timeout] The number of milliseconds to wait before giving up (and calling the error function, if one is given).\n @param {function} [opts.error] The function to call if the JSONP request times out.\n */\n jsonp: function (url, callback, opts) {\n var key,\n script,\n timer,\n timedOut = false;\n opts = opts || {};\n \n key = opts.callbackName ? opts.callbackName : 'jsonpcb' + (uid++);\n \n if (opts.timeout) {\n timer = setTimeout(function () {\n timedOut = true;\n if (opts.error) {\n opts.error();\n }\n }, opts.timeout);\n }\n\n var keyParts = key.split(\".\");\n var child = keyParts[keyParts.length-1];\n var parent = window;\n for (var i = 0, l = keyParts.length; i < l-1; i++) {\n parent = parent[keyParts[i]];\n }\n\n parent[child] = function (data) {\n clearTimeout(timer);\n if (!timedOut) {\n callback(data);\n }\n if (script && script.parentNode) {\n script.parentNode.removeChild(script);\n }\n parent[child] = undefined;\n };\n\n script = exports.inject(url + (url.indexOf('?') === -1 ? '?' : '&') + 'callback=' + key);\n }\n };\n \n return exports;\n});\n","// Pass on the referrer if we have been redirected by IGOR\nwindow.orb = window.orb || {};\nif (window.name.match(/ orb_fig_referrer=([^ ]*)/)) {\n window.orb.referrer = decodeURIComponent(RegExp.$1);\n window.name = window.name.replace(/ orb_fig_referrer=([^ ]*)/, '');\n}\n\nif (window.name.match(/ orb_fig_last_hostname=([^ ]*)/)) {\n window.orb.lastHostname = decodeURIComponent(RegExp.$1);\n window.name = window.name.replace(/ orb_fig_last_hostname=([^ ]*)/, '');\n}\n\nwindow.orb.fig = function () {\n var defaultFig = {\n ad: 0,\n ap: 0,\n ck: 1,\n eu: 1,\n mb: 0,\n tb: 0,\n uk: 1,\n df: 1 // default fig (does not exist when we get a true fig response)\n };\n var overrideCookieName = 'ckns_orb_fig';\n var cacheCookieName = 'ckns_orb_fig_cache';\n var figCacheCookieTTL = 432000000; // five days\n\n var figFailed = false;\n var figStale = false;\n var figCached = false;\n var figOverridden = false;\n var figData = defaultFig;\n var figSuccessCallbacks = [];\n var figErrorCallbacks = [];\n\n var fig = function (param) {\n return param ? figData[param] : figData;\n };\n\n // Fig API\n fig.load = function (onSuccess, onError) {\n\n if (fig.figFailed()) {\n // If the Fig JSONP has finished and already failed, then\n // we can immediately call any error callbacks\n if (onError && typeof onError === 'function') {\n onError(fig);\n }\n }\n else {\n // If the fig hasn't failed (yet) and we have default data,\n // then we need to queue up both callbacks until we know which\n // to call.\n if (fig.isDefault()) {\n if (onSuccess && typeof onSuccess === 'function') {\n figSuccessCallbacks.push(onSuccess);\n }\n if (onError && typeof onError === 'function') {\n figErrorCallbacks.push(onError);\n }\n }\n // If the fig is not failed and not default data, then we know\n // it has both finished and succeeded, so call success callbacks\n else {\n if (onSuccess && typeof onSuccess === 'function') {\n onSuccess(fig);\n }\n }\n }\n };\n\n fig.isDefault = function () {\n return figData.df ? 1 : 0;\n };\n\n fig.geo = {\n isUK: function () {\n return fig(\"uk\");\n },\n isEU: function () {\n return fig(\"eu\");\n }\n };\n\n fig.device = {\n isMobile: function () {\n return fig(\"mb\");\n },\n isTablet: function () {\n return fig(\"tb\");\n }\n };\n\n fig.redirect = function () {\n var referrer = (window.document.referrer || '').toLowerCase();\n var host = (window.location.hostname || '').toLowerCase();\n var currentPage = (window.location.href || '');\n\n var redirectionIsEnabled = (window.bbcredirection && (window.bbcredirection.geo || window.bbcredirection.device));\n if (!redirectionIsEnabled || referrer === currentPage.toLowerCase()) {\n return;\n }\n\n var page = {\n isDomestic: /(^|\\.)bbc\\.co\\.uk$/i.test(host),\n isInternational: /(^|\\.)bbc\\.com$/i.test(host),\n isMobile: /^m\\./i.test(host),\n isDesktop: /^(www|pal)\\./i.test(host)\n };\n var user = {\n isDomestic: figData.uk,\n isMobile: figData.mb\n };\n\n var destinationPage = currentPage;\n\n if (window.bbcredirection.geo) {\n if (page.isInternational && user.isDomestic) {\n destinationPage = currentPage.replace(/^(.+?bbc)\\.com/i, '$1.co.uk');\n }\n else if (page.isDomestic && !user.isDomestic) {\n destinationPage = currentPage.replace(/^(.+?bbc)\\.co\\.uk/i, '$1.com');\n }\n }\n\n if (window.bbcredirection.device) {\n var devicePreference = window.bbccookies.get('ckps_d');\n if (page.isDesktop && (devicePreference === 'm' || (!devicePreference && user.isMobile))) {\n destinationPage = destinationPage.replace(/^(https?:\\/\\/)(www|pal)\\./i, '$1m.');\n }\n else if (page.isMobile && (devicePreference === 'd' || (!devicePreference && !user.isMobile))) {\n destinationPage = destinationPage.replace(/^(https?:\\/\\/)m\\./i, '$1www.');\n }\n }\n\n // avoid redirecting to ourselves, or redirecting to the page we just came from\n var shouldRedirect = destinationPage !== currentPage && referrer !== destinationPage.toLowerCase();\n\n if (shouldRedirect) {\n var redirectedFromCurrent = window.orb.lastHostname === window.location.hostname;\n var redirectedFromDestination = window.orb.lastHostname && destinationPage.indexOf(window.orb.lastHostname) > -1;\n\n try {\n window.bbccookies.del(cacheCookieName, {domain: '.bbc.co.uk', path: '/'});\n window.bbccookies.del(cacheCookieName, {domain: '.bbc.com', path: '/'});\n\n if (!redirectedFromCurrent && !redirectedFromDestination) {\n window.name += ' orb_fig_last_hostname=' + window.location.hostname;\n window.name += ' orb_fig_referrer=' + encodeURIComponent(document.referrer);\n window.location.replace(destinationPage);\n }\n }\n catch (e) {\n require(['istats-1'], function (istats) {\n istats.log('redirection_fail', '', {});\n });\n }\n }\n };\n\n fig.updateCacheCookie = function (figData) {\n figStale = false;\n var date = new Date();\n date.setTime(date.getTime() + (figCacheCookieTTL));\n window.bbccookies.set(cacheCookieName, JSON.stringify(figData), { domain: '.bbc.co.uk', expires: date, path: '/' });\n window.bbccookies.set(cacheCookieName, JSON.stringify(figData), { domain: '.bbc.com', expires: date, path: '/' });\n };\n\n fig.setData = function (newFigData) {\n figData = newFigData;\n fig.redirect();\n };\n\n fig.figSuccess = function (newFigData) {\n fig.updateCacheCookie(newFigData);\n if (!fig.isCached()) {\n fig.setData(newFigData);\n }\n for (var c = 0, l = figSuccessCallbacks.length; c < l; c++) {\n figSuccessCallbacks[c](fig);\n }\n };\n\n fig.figError = function () {\n figFailed = true;\n // If non-default data is acquired e.g. via the cache cookie, then do\n // not inform the caller of an error by calling their error function\n // This is effectively doing a stale-if-error pattern.\n if (fig.isDefault()) {\n for (var c = 0, l = figErrorCallbacks.length; c < l; c++) {\n figErrorCallbacks[c](fig);\n }\n }\n };\n\n fig.figFailed = function () {\n return figFailed;\n };\n\n fig.isOverridden = function () {\n return figOverridden;\n };\n\n fig.isCached = function () {\n return figCached;\n };\n\n fig.isStale = function () {\n return figStale;\n };\n\n fig.init = function () {\n // Main flow\n\n var overrideCookieValue = window.bbccookies.get(overrideCookieName);\n // Set fig to the override cookie values if the cookie is present\n if (overrideCookieValue) {\n var overrideCookieData = {};\n overrideCookieValue.replace(/([a-z]{2}):([0-9]+)/g, function (match, key, value) {\n overrideCookieData[key] = +value;\n });\n figData = overrideCookieData;\n fig.redirect();\n figOverridden = true;\n return fig;\n } else {\n figOverridden = false;\n }\n\n var cacheCookieValue = window.bbccookies.get(cacheCookieName);\n // Set fig to the cached fig cookie values if the cookie is present\n if (cacheCookieValue) {\n try {\n var cacheCookieData = JSON.parse(cacheCookieValue);\n figData = cacheCookieData;\n fig.redirect();\n figStale = true;\n figCached = true;\n }\n catch (error) {\n jsonpTimeout = 3000; // shorter timeout in ms because no cached data available\n figData = defaultFig;\n figCached = false;\n }\n } else {\n // Otherwise, update the fig instance with no values (the default fig ones)\n jsonpTimeout = 3000; // shorter timeout in ms because no cached data available\n figData = defaultFig;\n figCached = false;\n }\n if (window.orb_fig_blocking && !overrideCookieValue && !cacheCookieValue) {\n // fig.js response will always call orb.orb_fig so we have to set up\n // that global function.\n window.orb.orb_fig = function (newFig) {\n figData = newFig || defaultFig;\n fig.updateCacheCookie(figData);\n fig.redirect();\n };\n\n document.write('