\n
\n You're watching a daily free preview\n \n
\n Preview expires in 00:00\n \n \n \n Subscribe\n \n \n",OVERLAY_STYLE="\n .freeview-overlay {\n position: absolute;\n top: 20px;\n right: 20px;\n background: rgba(12, 12, 12, 0.9);\n color: #fff;\n z-index: 5;\n display: flex;\n align-items: center;\n padding: 12px 15px;\n border-radius: 4px;\n }\n\n .freeview-overlay__cta {\n background: #f13a3a;\n font-size: 13px;\n line-height: 36px;\n padding: 0 16px;\n text-align: center;\n border-radius: 4px;\n font-weight: bold;\n margin-left: 25px;\n cursor: pointer;\n }\n\n .freeview-overlay__t1-copy, .freeview-overlay__t2-copy {\n margin: 0;\n line-height: 18px;\n }\n\n .freeview-overlay__t1-copy {\n font-weight: bold;\n font-size: 13px;\n }\n\n .freeview-overlay__t2-copy {\n font-size: 12px;\n }\n";module.exports=PreviewOverlay;
}, {"10":10,"11":11,"12":12}];
window.modules["3478"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_defineProperty2=_interopRequireDefault(require(18)),_objectWithoutProperties2=_interopRequireDefault(require(165)),_excluded=["regPromoPath","loginPromoPath","sourceBase","isSubwall"];function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t
2&&void 0!==arguments[2]&&arguments[2],o=t.template(RegWallTemplate)(e);return r?o:ClientTemplate.createElementFromHTML(o)},triggerRegWall=function(e,t,r){var o,n,l,c=t.regPromoPath,a=t.loginPromoPath,i=t.sourceBase,u=t.isSubwall,p=(0,_objectWithoutProperties2.default)(t,_excluded);e.classList.add("user-account-reg-wall--activated"),null===(o=window.google)||void 0===o||null===(n=o.accounts)||void 0===n||null===(l=n.id)||void 0===l||l.cancel();var s=encodeURIComponent(new URL(window.location).href),g=u?"/subscription?source=".concat(i,"&redirect=").concat(s):"/account/register/".concat(c,"?source=").concat(i,"&redirect=").concat(s),m="/account/log-in/".concat(a,"?source=").concat(i,"&redirect=").concat(s),b=ClientTemplate.createHandlebarsEnvironment({helpers:{},partials:{button:ButtonTemplate}}),d=createRegWallComponent(_objectSpread({ctaLink:g,cta2Link:m,source:i,isSubwall:u},p),b);document.querySelector("body").appendChild(d),UserAccountRegWallClient(d,r)};module.exports={triggerRegWall:triggerRegWall,createRegWallComponent:createRegWallComponent};
}, {"10":10,"18":18,"61":61,"82":82,"165":165,"384":384,"user-account-reg-wall.client":"user-account-reg-wall.client"}];
window.modules["3479"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_defineProperty2=_interopRequireDefault(require(18)),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12));function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function _objectSpread(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};try{var t=window.localStorage.getItem(this.key);return null!==t?JSON.parse(t):e}catch(t){return console.error(t),e}}},{key:"updateStorage",value:function(){var e=new Date;this.data[this.lastViewedDateKey]=e.toISOString(),window.localStorage.setItem(this.key,JSON.stringify(this.data))}},{key:"getInstancePosition",value:function(e){return this.data[this.wallStatsKey][e]}},{key:"searchData",value:function(e){return e in this.data[this.wallStatsKey]}},{key:"updateData",value:function(e){this.checkResetStorage();var t=this.data;this.data[this.wallFiredCountKey]||(t[this.wallFiredCountKey]=0);var r=this.data[this.wallStatsKey];(!r||Object.keys(r).length=t,s=getCanonicalId(window.CNN.contentModel)||window.CNN.contentModel.pageStellarId;i.updateData(addCustomKey(s)),i.updateStorage();var o=i.getInstancePosition(s),l=!(o&&o<=t)&&n;return a&&l&&i.incrementWallCount(),{shouldRestrict:l,wallCount:i.data[i.wallFiredCountKey]}};module.exports={MeterController:MeterController,getIdFromUrl:getIdFromUrl,addCustomKey:addCustomKey,delCurrId:delCurrId,delLastEntry:delLastEntry,getMeterData:getMeterData,payMeterConfig:payMeterConfig};
}, {"5":5,"10":10,"11":11,"12":12,"18":18,"155":155,"2802":2802,"2831":2831,"2931":2931,"2933":2933,"3469":3469}];
window.modules["3480"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),throttle=require(28),_require=require(44),authClient=_require.authClient,getPreAuthEntitlements=_require.getPreAuthEntitlements,isSubscriber=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var t,r,n;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,getPreAuthEntitlements(authClient.getToken(),!1);case 2:return t=e.sent,r=t.preAuthorizedEntitlements,n=(void 0===r?[]:r).find(function(e){return"cnn_subs"===e.universalProductIndicator}),e.abrupt("return",!!n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),defaultManageWallVisibility=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.displayScrollDepthPercentage,n=void 0===r?15:r,i=t.contentSelector,u=document.documentElement.scrollHeight-document.documentElement.clientHeight,o=throttle(function(){var t=Math.round(u*(n/100));window.scrollY>=t&&e()},250),a=document.querySelector(i);a?new IntersectionObserver(function(t,r){t.forEach(function(t){t.isIntersecting&&(e(),r.disconnect())})},{threshold:.01}).observe(a):window.addEventListener("scroll",o)}};module.exports={isSubscriber:isSubscriber,defaultManageWallVisibility:defaultManageWallVisibility};
}, {"10":10,"24":24,"25":25,"28":28,"44":44}];
window.modules["3493"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_objectWithoutProperties2=_interopRequireDefault(require(165)),_excluded=["apiVersion","mediaType","servingHost"],_compact=require(3348),_get=require(1);function addCropAndSizeOptions(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.crop,i=void 0===r?{}:r,t=o.ratioSize,a=void 0===t?{}:t,n=o.rawQuery,c=o.extraCropCommands,u=void 0===c?[]:c,d=[],p=[],s=a.h,l=a.w,h=i.x,m=i.y,v=i.height,_=i.width,g=e.includes("?c="),b=e.includes("?q=")&&!g;b||g||(v&&d.push("h_".concat(v)),_&&d.push("w_".concat(_)),void 0!==h&&d.push("x_".concat(h)),void 0!==m&&d.push("y_".concat(m)),(h||m)&&d.push("c_crop")),s&&p.push("h_".concat(s)),l&&p.push("w_".concat(l)),b||d.length||!p.length||p.push("c_fill");var q=n||_compact([d.join(","),p.join(","),u.join(",")]).join("/")||"",x="?q=";return g?x="&q=":b&&(x="/"),_compact([e,q]).join(x)}function buildUrl(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.ratio,i=void 0===r?"original":r,t=o.ratioSize,a=void 0===t?{}:t,n=o.rawQuery,c=o.servingHost,u=o.damDocumentType,d=o.extraCropCommands,p=_get(e,["data","crops",i],_get(e,["crops",i],{})),s=p.uri||e.uri;return addCropAndSizeOptions(s&&"".concat(c,"/api/v1/").concat(u).concat(s)||e.url||"",{crop:p,ratioSize:a,rawQuery:n,extraCropCommands:d})}function buildUrlFromUri(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o.apiVersion,i=void 0===r?"v1":r,t=o.mediaType,a=void 0===t?"images":t,n=o.servingHost,c=(0,_objectWithoutProperties2.default)(o,_excluded);return addCropAndSizeOptions("".concat(n,"/api/").concat(i,"/").concat(a).concat(e),c)}module.exports.buildUrl=buildUrl,module.exports.buildUrlFromUri=buildUrlFromUri;
}, {"1":1,"10":10,"165":165,"3348":3348}];
window.modules["3494"] = [function(require,module,exports){"use strict";const htmlTags=require(3658),basic=/\s?|(]*>|]*>|]+>)+/i,full=new RegExp(htmlTags.map(t=>`<${t}\\b[^>]*>`).join("|"),"i");module.exports=(t=>basic.test(t)||full.test(t));
}, {"3658":3658}];
window.modules["3500"] = [function(require,module,exports){"use strict";var isFinite=require(3360),isString=require(334),isBoolean=require(3358);function propertyValue(r,e,i){var o,t;if(null==r||null===(o=r.trim)||void 0===o||null===(t=o.call(r))||void 0===t||!t.length)throw new Error("Invalid propertyId provided: (".concat(r,", ").concat(e,")"));if(!isValidPropertyValueArgs(r,e))throw new Error("Invalid propertyValue provided: (".concat(r,", ").concat(e,")"));return{"@type":"PropertyValue",propertyID:r,name:i||r,value:e}}function isValidPropertyValueArgs(r,e){return!!(isFinite(e)||isString(e)||isBoolean(e))}module.exports={isValidPropertyValueArgs:isValidPropertyValueArgs,propertyValue:propertyValue};
}, {"334":334,"3358":3358,"3360":3360}];
window.modules["3501"] = [function(require,module,exports){"use strict";module.exports={of:"Ù",for:"Ù","https://www.cnn.com":"https://arabic.cnn.com","See More Videos":"شاÙد اÙÙ
زÙد","minute read":"Ùراءة دÙÙÙØ©",Published:" ",Updated:" ","Draft - created":"Ù
سÙدة - تÙ
Ø¥ÙشاؤÙا",Clear:"ÙاضØ",Displaying:"عرض","results out of":"اÙÙتائج Ù
Ù","Sort by":"Ùرز Øسب","Sorting by":"اÙÙرز Øسب",Newest:"اÙØ£Øدث",Relevancy:"اÙصÙØ©","Your search for":"بØث٠عÙ","did not match any results":"ÙÙ
تتطاب٠Ù
ع Ø£Ù Ùتائج","A few suggestions":"بعض اÙاÙتراØات","Make sure all words are spelled correctly":"تأÙد Ù
Ù Ùتابة جÙ
Ùع اÙÙÙÙ
ات بشÙ٠صØÙØ","Try different keywords":"جرب ÙÙÙ
ات رئÙسÙØ© Ù
ختÙÙØ©","Try more general keywords":"ØاÙ٠استخداÙ
ÙÙÙ
ات رئÙسÙØ© Ø£Ùثر عÙ
ÙÙ
ÙØ©",Prev:"اÙسابÙ",Next:"اÙتاÙÙ",Everything:"Ù٠شئ",Stories:"Ùصص",Videos:"اÙÙÙدÙÙÙات",Photos:"اÙصÙر",Source:"Ù
صدر","Now playing":"تشغÙ٠اÙØ¢Ù"};
}, {}];
window.modules["3502"] = [function(require,module,exports){"use strict";module.exports={of:"de",for:"para","https://www.cnn.com":"https://cnnespanol.cnn.com","See More Videos":"Ver Más","minute read":"min de lectura",Published:" ",Updated:" ","Draft - created":"Borrador - creado",Clear:"Limpiar búsqueda",Displaying:"Mostrando","results out of":"resultados de","Sort by":"Ordenar por","Sorting by":"Ordenando por",Newest:"Lo más reciente",Relevancy:"Relevancia","Your search for":"Tu búsqueda de","did not match any results":"no coincide con ningún resultado","A few suggestions":"Algunas sugerencias","Make sure all words are spelled correctly":"Asegúrate de que todas las palabras estén escritas correctamente","Try different keywords":"Prueba diferentes palabras clave","Try more general keywords":"Prueba palabras clave más generales",Prev:"Anterior",Next:"Siguiente",Everything:"Todo",Stories:"ArtÃculos",Videos:"Videos",Photos:"Fotos",Source:"Fuente","Now playing":"En curso","Hide description":"Ocultar descripción","Show description":"Mostrar descripción"};
}, {}];
window.modules["3525"] = [function(require,module,exports){"use strict";exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var e=o.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function byteLength(o){var r=getLens(o),e=r[0],t=r[1];return 3*(e+t)/4-t}function _byteLength(o,r,e){return 3*(r+e)/4-e}function toByteArray(o){var r,e,t=getLens(o),n=t[0],u=t[1],p=new Arr(_byteLength(o,n,u)),a=0,h=u>0?n-4:n;for(e=0;e>16&255,p[a++]=r>>8&255,p[a++]=255&r;return 2===u&&(r=revLookup[o.charCodeAt(e)]<<2|revLookup[o.charCodeAt(e+1)]>>4,p[a++]=255&r),1===u&&(r=revLookup[o.charCodeAt(e)]<<10|revLookup[o.charCodeAt(e+1)]<<4|revLookup[o.charCodeAt(e+2)]>>2,p[a++]=r>>8&255,p[a++]=255&r),p}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,n=[],u=r;up?p:u+16383));return 1===t?(r=o[e-1],n.push(lookup[r>>2]+lookup[r<<4&63]+"==")):2===t&&(r=(o[e-2]<<8)+o[e-1],n.push(lookup[r>>10]+lookup[r>>4&63]+lookup[r<<2&63]+"=")),n.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63;
}, {}];
window.modules["3587"] = [function(require,module,exports){exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
}, {}];
window.modules["3657"] = [function(require,module,exports){module.exports=[
"a",
"abbr",
"address",
"area",
"article",
"aside",
"audio",
"b",
"base",
"bdi",
"bdo",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"cite",
"code",
"col",
"colgroup",
"data",
"datalist",
"dd",
"del",
"details",
"dfn",
"dialog",
"div",
"dl",
"dt",
"em",
"embed",
"fieldset",
"figcaption",
"figure",
"footer",
"form",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"kbd",
"label",
"legend",
"li",
"link",
"main",
"map",
"mark",
"math",
"menu",
"menuitem",
"meta",
"meter",
"nav",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"param",
"picture",
"pre",
"progress",
"q",
"rb",
"rp",
"rt",
"rtc",
"ruby",
"s",
"samp",
"script",
"section",
"select",
"slot",
"small",
"source",
"span",
"strong",
"style",
"sub",
"summary",
"sup",
"svg",
"table",
"tbody",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"track",
"u",
"ul",
"var",
"video",
"wbr"
]
}, {}];
window.modules["3658"] = [function(require,module,exports){"use strict";module.exports=require(3657);
}, {"3657":3657}];
window.modules["content-recs.client"] = [function(require,module,exports){(function (__filename){(function (){
"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_slicedToArray2=_interopRequireDefault(require(36)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(109),getRelatedContent=_require.getRelatedContent,getPersonalizedContent=_require.getPersonalizedContent,getPopularContent=_require.getPopularContent,EnvVars=require(5),createContainer=require(110),_require2=require(108),lineClamp=_require2.lineClamp,_require3=require(107),trackMetrics=_require3.trackMetrics,_require4=require(97),setAdobeAnalyticsGenericDataCookie=_require4.setAdobeAnalyticsGenericDataCookie,log=require(35).setup({file:__filename}),_require5=require(29),getCookie=_require5.getCookie,_require6=require(2),getComponentInstance=_require6.getComponentInstance,_require7=require(37),addComponentLoadedAnalytics=_require7.addComponentLoadedAnalytics,addZJSClickAttributes=_require7.addZJSClickAttributes,contentRecsInstance="up-next-v1";function getLocationOnPage(e){var t={inline:function(){return document.querySelector(".layout__main")},"article end":function(){return document.querySelector(".layout__end")},"right rail":function(){return document.querySelector(".layout__rail")}};return Object.keys(t).find(function(n){var r;return null===(r=t[n]())||void 0===r?void 0:r.contains(e)})||""}function setupTrackingMetrics(e,t){var n=e.dataset,r=n.recsModel,i=n.title,o=n.uri,a=getLocationOnPage(e),c=new IntersectionObserver(function(e){e.forEach(function(e){var n=e.isIntersecting,l=e.intersectionRatio,u=e.target;n&&l>=.5&&l<1&&(fireTrackingMetrics({recsModel:r,title:i,numberOfItems:t,componentStellarId:o,locationOnPage:a}),c.unobserve(u))})},{threshold:.5});c.observe(e),Array.from(e.querySelectorAll("a[href]")).forEach(function(e,n){var c,l=null===(c=e.querySelector(".container__headline-text"))||void 0===c?void 0:c.innerHTML;setAdobeAnalyticsGenericDataCookie(e,["content rec",i,r,a,t,n+1,l,o])})}function fireTrackingMetrics(e){var t=e.recsModel,n=e.title,r=e.numberOfItems,i=e.componentStellarId,o=e.locationOnPage;try{trackMetrics({type:"user-interaction",data:{interaction:"module load",componentName:n,componentStellarId:i,componentAttributes:{type:"content rec",apiType:t,locationOnPage:o,numberOfItems:r,title:n}}})}catch(e){log("error",e.message,{stack:e.stack})}}function shouldRun(e){return getComponentInstance(e)!==contentRecsInstance||"active"===getCookie("_endrecirc_testing")}function displayCards(e,t,n,r,i){createContainer(e,t,"content-recs",n,r);var o=t.querySelectorAll('[data-uri*="/card/"]');if(o.length>0&&(setupTrackingMetrics(t,i),o.forEach(function(n){n.querySelectorAll("a").forEach(function(n){var i,o,a,c;addZJSClickAttributes(n,{page_stellar_id:null===(i=window)||void 0===i?void 0:null===(o=i.CNN)||void 0===o?void 0:null===(a=o.contentModel)||void 0===a?void 0:a.pageStellarId,component_type:"content rec",component_id:t.dataset.uri,component_text:r,location:getLocationOnPage(t),stellar_id:null===(c=e.find(function(e){return e.url===n.href}))||void 0===c?void 0:c.stellarId})})})),"container_list-headlines-ranked"===n){var a=document.createElement("div");a.classList.add("".concat(n,"__field-links--col-1"));var c=document.createElement("div");c.classList.add("".concat(n,"__field-links--col-2"));var l=i%2==0;o.forEach(function(e,t){l&&t<=i/2-1||!l&&t<=Math.floor(i/2)?a.append(e):c.append(e)}),t.querySelector(".container__field-links").append(a,c)}"container_list-headlines-with-read-times"!==n&&o.forEach(function(e){var t=e.querySelector('[data-editable="headline"]');lineClamp(t,5," ...")})}function launchContentRecs(e){return _launchContentRecs.apply(this,arguments)}function _launchContentRecs(){return(_launchContentRecs=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var n,r,i,o,a,c,l,u,s,d,p,v,_,f,m,g,C,q,y,h,b,k,R,A,I,w,S,M,T;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.dataset,r=n.recsModel,i=n.title,o=n.numberOfItems,a=void 0===o?1:o,c=n.contentTypes,l=void 0===c?"article":c,u=n.sections,s=void 0===u?"":u,d=n.layout,p=void 0===d?"container_list-headlines-with-images":d,v=l.split(","),_=(0,_slicedToArray2.default)(v,1),f=_[0],m=""===s?[]:s.split(","),C=(g={related:function(e,t){return getRelatedContent(e,t)},personalized:function(e,t){return getPersonalizedContent(e,t)},popularity:function(e,t,n){return getPopularContent(e,t,n)}})[r]||g.related,e.prev=5,e.next=8,C(a,f,m);case 8:S=e.sent,M=S.recommendations,T=S.tenantId,displayCards(M,t,p,i,a),addComponentLoadedAnalytics({componentType:"content rec",componentId:t.dataset.uri,traits:{page_stellar_id:null===(q=window)||void 0===q?void 0:null===(y=q.CNN)||void 0===y?void 0:null===(h=y.contentModel)||void 0===h?void 0:h.pageStellarId,canonical_url:null===(b=window)||void 0===b?void 0:null===(k=b.CNN)||void 0===k?void 0:null===(R=k.contentModel)||void 0===R?void 0:R.canonicalUrl,cms_id:null===(A=window)||void 0===A?void 0:null===(I=A.CNN)||void 0===I?void 0:null===(w=I.contentModel)||void 0===w?void 0:w.cmsId,recommendation_ids:M.map(function(e){return e.stellarId}),tenant_id:T,component_text:i,item_count:a,location:getLocationOnPage(t),layout:p}}),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(5),log("error",e.t0.message,{stack:e.t0.stack});case 18:case"end":return e.stop()}},e,null,[[5,15]])}))).apply(this,arguments)}module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var n;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(EnvVars.get("ENABLE_CONTENT_RECS")){e.next=2;break}return e.abrupt("return");case 2:if(window.CNN.launchContentRecs||(window.CNN.launchContentRecs=launchContentRecs),!shouldRun(null===(n=t.dataset)||void 0===n?void 0:n.uri)){e.next=6;break}return e.next=6,launchContentRecs(t);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();
}).call(this)}).call(this,"/components/content-recs/client.js")}, {"2":2,"5":5,"10":10,"24":24,"25":25,"29":29,"35":35,"36":36,"37":37,"97":97,"107":107,"108":108,"109":109,"110":110}];
window.modules["container.client"] = [function(require,module,exports){"use strict";var _require=require(97),setAdobeAnalyticsCookie=_require.setAdobeAnalyticsCookie,showDomNode=function(e){e.classList.remove("hide")},hideDomNode=function(e){e.classList.add("hide")};module.exports=function(e){["container_headline-carousel","container_ribbon","container_shelf-carousel","container_event-tray"].forEach(function(t){var o=e.querySelector(".".concat(t,"__field-links")),n=e.querySelector(".".concat(t,"__cards-wrapper")),r=document.createElement("div"),i=document.createElement("div");r.classList.add("".concat(t,"__carousel-button-prev"),"hide","carousel-button-prev"),i.classList.add("".concat(t,"__carousel-button-next"),"carousel-button-next");var a=function(e){var n,i,a=o.scrollLeft,c=o.offsetWidth,s=r.offsetWidth,l=c-s,d=o.children[0].offsetWidth,u=parseInt(window.getComputedStyle(o).gap,10)||0;"left"===e?n="container_event-tray"===t?(i=Math.floor(a/(d+u)))*(d+u)-s:((i=Math.floor(a/d))-Math.floor(l/d)+1)*d-s:(i=Math.floor((a+l)/d),n="container_event-tray"===t?a+(d+u-(a+c-i*(d+u)))+3:i*d-s);o.scrollTo({left:n,behavior:"smooth"})};!function(){if(e.classList.contains(t)){if("container_ribbon"===t){var c=e.querySelectorAll(".card");c.forEach(function(e,o){var n=e.querySelector("a[href]"),r={zone_position_number:1,zone_total_number:1,container_position_number:1,container_name:t,container_total_number:1,card_name:n.innerText,card_position_number:o+1,card_total_number:c.length};setAdobeAnalyticsCookie(n,r)})}n.insertBefore(r,n.firstChild),n.appendChild(i),o.addEventListener("scroll",function(){var e,t,n;e=Math.round(o.scrollLeft),t=o.scrollWidth,n=o.clientWidth,0===e?hideDomNode(r):(showDomNode(r),t-n<=e?hideDomNode(i):showDomNode(i))}),r.addEventListener("click",function(){a("left")}),i.addEventListener("click",function(){a("right")}),o.scrollWidth===o.clientWidth?i.classList.add("hide"):"container_ribbon"===t&&(o.style.justifyContent="normal")}}()})};
}, {"97":97}];
window.modules["card.client"] = [function(require,module,exports){"use strict";var elementResizeObserver=require(68),seconds=1e3,minutes=60*seconds,hours=60*minutes,recentLimit=1*minutes,fairlyRecentLimit=1*hours,hoursAgoLimit=4*hours;module.exports=function(e){var t=e.querySelector(".container__item-media-wrapper");t&&elementResizeObserver.observe(t);var i=e.querySelector(".card__timestamp"),r=e.querySelector(".container__text");if(i&&i.dataset.publishedTime){var s=Date.now()-Date.parse(i.dataset.publishedTime),a=function(e){r.classList.add("card__headline-with-timestamp"),e.includes("h")||i.classList.add("card__timestamp-recent"),i.textContent=e};switch(!0){case s=recentLimit&&s=fairlyRecentLimit&&s',n.convoEl=n.convoWrapper.querySelector(".".concat(n.baseClass,"__placeholder")),e.parentNode.insertBefore(n.convoWrapper,e)}),(0,_defineProperty2.default)(this,"insertAd",function(){var e=document.createElement("div");e.classList.add("".concat(n.baseClass,"__ad")),e.setAttribute("data-openweb-ad",""),e.setAttribute("data-row",1),e.setAttribute("data-column",1);var t=document.querySelector(".layout-with-rail__rail");if(n.isMobileView||!t){var r=n.convoWrapper.querySelector(".".concat(n.baseClass,"__placeholder"));n.convoWrapper.insertBefore(e,r)}else t.appendChild(e)}),(0,_defineProperty2.default)(this,"init",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.SSOEnabled){e.next=3;break}return e.next=3,n.setupSSO();case 3:return document.addEventListener("spot-im-conversation-viewed",function(){var e;n.trackAnalytics({interaction:"module load",componentName:"commenting module",componentStellarId:(null===(e=n.el.dataset)||void 0===e?void 0:e.uri)||""})}),document.addEventListener("spot-im-show-more-comments-clicked",function(){n.trackAnalytics({interaction:"commenting:load more comments"})}),document.addEventListener("spot-im-current-user-sent-message-succeed",function(e){var t=e.detail.message_type;n.trackAnalytics({interaction:"commenting:message success:".concat("comment"===t?"post":"reply")})}),document.addEventListener("spot-im-user-up-vote-click",function(){n.trackAnalytics({interaction:"commenting:upvote comment"})}),document.addEventListener("spot-im-user-down-vote-click",function(){n.trackAnalytics({interaction:"commenting:downvote comment"})}),document.addEventListener("ow-open-custom-user-profile",function(){window.location.assign("/account/settings")}),n.openwebCommentCounter=new OpenwebCommentCounter({ssoEnabled:n.SSOEnabled,convoEl:n.convoEl,convoAboveOBR:n.convoAboveOBR,convoWrapper:n.convoWrapper,ctaTracking:n.trackAnalytics,isMobileView:n.isMobileView}),e.next=12,n.openwebCommentCounter.init();case 12:n.adEnabled&&subscribe(actions.ADS.SET_AD_VARIANT,function(e){e.adVariant===AD_VARIANTS.DEFAULT&&n.insertAd()});case 13:case"end":return e.stop()}},e)}))),(0,_defineProperty2.default)(this,"setupSSO",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var t,r,o,a;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.el.dataset,r=t.registerRedirect,o=t.loginRedirect,document.addEventListener("spot-im-signup-start",function(){window.location.assign("".concat(o||"/account/log-in/commenting","?redirect=").concat(window.location.pathname))}),document.addEventListener("spot-im-login-start",function(){window.location.assign("".concat(r||"/account/register/commenting","?redirect=").concat(window.location.pathname))}),document.addEventListener("spot-im-api-ready",function(){n.spotIM=window.SPOTIM}),!authClient.tokenWithAuthn()){e.next=15;break}if(document.addEventListener("spot-im-renew-sso",n.startOWSSO,!1),null===(a=window.SPOTIM)||void 0===a||!a.startSSO){e.next=11;break}return e.next=9,n.startOWSSO();case 9:e.next=12;break;case 11:document.addEventListener("spot-im-api-ready",n.startOWSSO,!1);case 12:document.addEventListener("spot-im-user-logout",function(){authClient.tokenWithAuthn()&&(dispatch(ACCOUNT_NAV.LOGOUT_SUCCESS),trackMetrics({type:"user-account",data:{action:"logout_success",component:"openweb-convo",method:"spotImEventListener_user-logged-out"}}))}),e.next=16;break;case 15:n.logoutOW();case 16:subscribe(ACCOUNT_NAV.LOGOUT_SUCCESS,function(){n.logoutOW()});case 17:case"end":return e.stop()}},e)}))),(0,_defineProperty2.default)(this,"startOWSSO",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var t,r;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t,r){var n,o;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,authClient.openwebSSO({codeA:t},authClient.getToken());case 3:n=e.sent,o=n.data,r(o.codeB),e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(0),log("error","Error starting OpenWeb SSO",e.t0),r(null,e.t0),e.abrupt("return");case 13:case"end":return e.stop()}},e,null,[[0,8]])}));return function(t,r){return e.apply(this,arguments)}}(),e.prev=1,e.next=4,null===(r=n.spotIM)||void 0===r?void 0:r.startSSO({callback:t,userId:authClient.getStoredUID()});case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),log("error","Error starting OpenWeb SSO",e.t0);case 9:case"end":return e.stop()}},e,null,[[1,6]])}))),(0,_defineProperty2.default)(this,"logoutOW",function(){n.spotIM&&n.spotIM.logout?n.spotIM.logout():document.addEventListener("spot-im-api-ready",function(){n.spotIM.logout()},!1)}),(0,_defineProperty2.default)(this,"trackAnalytics",function(e){try{trackMetrics({type:"user-interaction",data:e})}catch(e){log("error","Could not track metrics",e)}}),this.el=t,this.baseClass="openweb-convo",this.SSOEnabled=EnvVars.get("ENABLE_OPENWEB_SSO"),this.adEnabled=EnvVars.get("ENABLE_OPENWEB_AD"),this.spotIM=window.SPOTIM,this.convoEl=t.querySelector(".".concat(this.baseClass,"__placeholder")),this.convoWrapper=t.querySelector(".".concat(this.baseClass,"__placeholder-wrapper")),this.convoPlacements={ABOVE_OBR:"above-obr",INLINE:"inline"},mediumMaxWidthListener(function(e){n.isMobileView=e});var o=EnvVars.get("OPENWEB_LAUNCHER_SRC"),a=EnvVars.get("OPENWEB_SSO_LAUNCHER_SRC"),i=null===(r=window.CNN)||void 0===r?void 0:r.contentModel,s=this.el.dataset,c=s.displayMessageCount,u=s.sortBy,l=s.openwebPlacement;this.convoAboveOBR=l===this.convoPlacements.ABOVE_OBR,this.convoAboveOBR&&this.insertConvoModule(),addScriptTag({src:this.SSOEnabled?a:o,async:!0,id:"openweb-launcher-script",data:{"spotim-module":"spotim-launcher","post-url":(null==i?void 0:i.canonicalUrl)||window.location.href,"article-tags":(null==i?void 0:i.pageTags)||"","post-id":(null==i?void 0:i.pageStellarId)||"","spotim-autorun":"false","display-message-count":c,"sort-by":u,"custom-section":null==i?void 0:i.section}},!0)});module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var r,n,o,a;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=["iab","data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","measure-ads","product-develop"],o="true"===t.dataset.showModule||(null===(r=window.optimizelyTest)||void 0===r?void 0:r.showCommentModule),!(checkGeoCountry("US")&&window.WM.UserConsent.inUserConsentState(n)&&o)){e.next=6;break}return a=new OpenwebConvo(t),e.next=6,a.init();case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();
}).call(this)}).call(this,"/components/openweb-convo/client.js")}, {"5":5,"9":9,"10":10,"11":11,"12":12,"16":16,"17":17,"18":18,"24":24,"25":25,"29":29,"35":35,"44":44,"107":107,"253":253}];
window.modules["headline.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),rest=require(30);module.exports=function(e){var r=e.getAttribute("data-request-headline-data"),t=function(r,t){for(var a in e.classList.add("".concat(e.classList[0],"--updating")),r)if(t){var n=r[a],i=t[n.responseField],o=e.querySelector(n.selector);o&&(o.innerText=i)}};if(r)var a=JSON.parse(r),n=a.endpoint,i=a.elementsToUpdate,o=setInterval((0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var r;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,rest.get(n);case 3:(r=e.sent).length&&(t(i,r[0]),clearInterval(o)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error("Error fetching profile data for headline: ".concat(e.t0));case 10:case"end":return e.stop()}},e,null,[[0,7]])})),5e3)};
}, {"10":10,"24":24,"25":25,"30":30}];
window.modules["article.client"] = [function(require,module,exports){"use strict";var _require=require(37),addScrollDepthAnalytics=_require.addScrollDepthAnalytics,EnvVars=require(5),_require2=require(39),initActivation=_require2.initActivation,_require3=require(38),isPaywallEnabled=_require3.isPaywallEnabled,paywallTypes=_require3.paywallTypes;function addAnalytics(e){addScrollDepthAnalytics(e,{"scroll-25":.25,"scroll-50":.5,"scroll-75":.75,"scroll-100":1},{event_type:"article_scroll",author:window.CNN.contentModel.author,cms_id:window.CNN.contentModel.cmsId,headline:window.CNN.contentModel.headline,source_id:window.CNN.contentModel.sourceId,subsection:window.CNN.contentModel.subsection,view_name:window.CNN.contentModel.canonicalUrl})}module.exports=function(e){var l=isPaywallEnabled(paywallTypes.METERED)&&"true"!==e.dataset.paywallDisabled,i=isPaywallEnabled(paywallTypes.EXCLUSIVE)&&"true"==e.dataset.subscriptionOnly;(EnvVars.get("REGWALL_FEATURE_ENABLED")&&"true"!==e.dataset.regwallDisabled||i||l)&&initActivation(e,l,i),document.addEventListener("init-wall-activation",function(l){var i,a,n,t,r=null===(i=null===(a=l.detail)||void 0===a?void 0:a.paywallEnabled)||void 0===i||i,o=null===(n=null===(t=l.detail)||void 0===t?void 0:t.isSubOnlyWall)||void 0===n||n;initActivation(e,r,o,!0)}),addAnalytics(e)};
}, {"5":5,"37":37,"38":38,"39":39}];
window.modules["user-account-reg-wall.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_createClass2=_interopRequireDefault(require(12)),_classCallCheck2=_interopRequireDefault(require(11)),_defineProperty2=_interopRequireDefault(require(18)),_require=require(44),authClient=_require.authClient,_require2=require(37),zionEventHandler=_require2.zionEventHandler,_require3=require(107),trackMetrics=_require3.trackMetrics,_require4=require(242),suppressToasts=_require4.suppressToasts,_require5=require(46),defaultManageWallVisibility=_require5.defaultManageWallVisibility,_require6=require(17),smallMaxWidthListener=_require6.smallMaxWidthListener,UserAccountRegWall=(0,_createClass2.default)(function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return function(){return defaultManageWallVisibility(e)()}};(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"init",function(){var e,t;n.userIsLoggedIn=authClient.tokenWithAuthn();var i=n.el.dataset,l=i.source,o=i.componentId,r=i.componentName,a=i.dismissible,s=i.componentStellarId,c=i.interactionBase,u=i.wallCount,d=i.wallMax;n.componentId=o,n.source=l,n.wallCount=null!=u?u:1,n.wallMax=null!=d?d:1,n.signUpBtn=n.el.querySelector("#regwall-cta-btn"),n.signInLink=n.el.querySelector("#regwall-cta-link"),n.tooltip=n.el.querySelector(".".concat(n.class,"__info")),n.componentName=r,n.componentStellarId=s,n.interactionBase=c,n.dismissible=a,n.wallCountAnalyticsValue=n.wallCount?":".concat(n.wallCount):"";var p=document.querySelector(n.class);p&&p.remove(),n.el.querySelector(".".concat(n.class,"__content")).addEventListener("click",function(e){var t=e.target,i=t===n.signInLink;if(i||t===n.signUpBtn){var l=i?"sign in":"sign up";trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.interactionBase,":").concat(l).concat(n.wallCountAnalyticsValue)}})}},!0),null===(e=n.tooltip)||void 0===e||e.addEventListener("mouseover",function(){trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.interactionBase,":what-is-this").concat(n.wallCountAnalyticsValue)}})}),a&&n.el.querySelectorAll(".".concat(n.class,"__dismiss, .").concat(n.class,"__overlay")).forEach(function(e){return e.addEventListener("click",function(){n.handleClose()})}),null===(t=n.manageWallVisibility)||void 0===t||t.call(n,n.showWall)()}),(0,_defineProperty2.default)(this,"triggerZionTracking",function(){zionEventHandler({component_id:n.componentId,component_type:"banner",traits:{source:n.source}},"ComponentOnScreen")}),(0,_defineProperty2.default)(this,"restrictView",function(){n.updateInitialOverflow(),document.documentElement.style.overflow="hidden",smallMaxWidthListener(function(e){e&&!n.dismissible&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.height="100vh")}),n.istyle=document.createElement("style"),n.istyle.type="text/css",n.istyle.id="cnnrwhideiframe",n.istyle.appendChild(document.createTextNode(".obp-rec { display: none !important; }")),document.head.appendChild(n.istyle)}),(0,_defineProperty2.default)(this,"showWall",function(){n.open||(suppressToasts(),n.handleOpen(),n.restrictView(),n.triggerZionTracking(),trackMetrics({type:"user-interaction",data:{interaction:"module load",componentStellarId:n.componentStellarId,componentViewCount:n.wallCount,componentName:n.componentName,componentType:n.componentType}}))}),(0,_defineProperty2.default)(this,"handleOpen",function(){n.el.classList.remove(n.hideClass),n.open=!0}),(0,_defineProperty2.default)(this,"handleClose",function(){var e;trackMetrics({type:"user-interaction",data:{interaction:"".concat(n.componentType,":").concat(n.componentName,":dismiss").concat(n.wallCountAnalyticsValue)}}),n.el.classList.add(n.hideClass),n.open=!1,null===(e=document.getElementById(n.istyle.id))||void 0===e||e.remove(),document.documentElement.style.overflowX=n.initialOverflowX,document.documentElement.style.overflowY=n.initialOverflowY,smallMaxWidthListener(function(e){e&&!n.dismissible&&(document.body.style.overflow="unset",document.body.style.position="unset",document.body.style.height="unset")})}),(0,_defineProperty2.default)(this,"updateInitialOverflow",function(){n.initialOverflowX=document.documentElement.style.overflowX,n.initialOverflowY=document.documentElement.style.overflowY}),this.el=t,this.manageWallVisibility=i,this.class="user-account-reg-wall",this.componentType="regwall",this.hideClass="".concat(this.class,"--hide"),this.open=!1});module.exports=function(e,t){var n=new UserAccountRegWall(e,t);return n.init(),n};
}, {"10":10,"11":11,"12":12,"17":17,"18":18,"37":37,"44":44,"46":46,"107":107,"242":242}];
window.modules["bizdev-medianet.client"] = [function(require,module,exports){"use strict";var _require=require(9),AD_VARIANTS=_require.AD_VARIANTS,_require2=require(16),subscribe=_require2.subscribe,actions=_require2.actions,ucStates=["iab","data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","content-person-prof","content-person","measure-ads","measure-content","measure-market","product-develop"],addScript=!0;module.exports=function(e){subscribe(actions.ADS.SET_AD_VARIANT,function(n){if(n.adVariant===AD_VARIANTS.DEFAULT){var t=e.dataset.size;addScript&&(addScript=!1,window.WM.UserConsent.addScript({src:"//contextual.media.net/dmedianet.js?cid=8CUIG2452",async:!0,onload:function(){window.dispatchEvent(new CustomEvent("medianet.loaded"))}},ucStates));!function e(){window._mNHandle&&window._mNHandle.queue&&window._mNDetails&&window._mNDetails.loadTag?window._mNHandle.queue.push(function(){return window._mNDetails.loadTag("medianet",t,"medianet")}):window.addEventListener("medianet.loaded",e,{once:!0})}()}})};
}, {"9":9,"16":16}];
window.modules["ad-feedback.client"] = [function(require,module,exports){"use strict";var _require=require(7),AdFeedback=_require.AdFeedback,_require2=require(6),ENABLE_AD_FEEDBACK_DISPLAY_ADS=_require2.ENABLE_AD_FEEDBACK_DISPLAY_ADS,ENABLE_AD_FEEDBACK_VIDEO_ADS=_require2.ENABLE_AD_FEEDBACK_VIDEO_ADS,_require3=require(6),shouldHideAdFeedbackLink=_require3.shouldHideAdFeedbackLink;if((ENABLE_AD_FEEDBACK_DISPLAY_ADS||ENABLE_AD_FEEDBACK_VIDEO_ADS)&&!shouldHideAdFeedbackLink){var adFeedback=new AdFeedback;adFeedback.initialize()}
}, {"6":6,"7":7}];
window.modules["ad-slot-header.client"] = [function(require,module,exports){"use strict";var throttle=require(28),_require=require(17),mediumMaxWidthListener=_require.mediumMaxWidthListener,_require2=require(16),subscribe=_require2.subscribe,actions=_require2.actions,_require3=require(9),AD_VARIANTS=_require3.AD_VARIANTS;module.exports=function(e){subscribe(actions.ADS.SET_AD_VARIANT,function(t){if(t.adVariant===AD_VARIANTS.DEFAULT){var r,i=e.querySelector(".ad-slot"),n=e.querySelector(".adSlotHeaderContainer");if(!i)return;var a=function(){"mobile"===r&&(e.style.height="".concat(i.clientHeight,"px"),n.style.height="".concat(i.clientHeight,"px"))};document.addEventListener("GPTRenderComplete",function(e){var t=e.detail;t&&t.divId===(r&&i&&i.dataset["".concat(r,"SlotId")])&&a()}),function(){var e=document.createElement("iframe");e.className="resizeListenerIframe",e.src="about:blank",e.tabIndex=-1,e.frameBorder=0,e.setAttribute("aria-hidden",!0),i.appendChild(e);try{e.contentDocument.defaultView.addEventListener("resize",throttle(a,100))}catch(e){a()}}(),mediumMaxWidthListener(function(e){r=e?"mobile":"desktop",a()})}})};
}, {"9":9,"16":16,"17":17,"28":28}];
window.modules["alerts.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_typeof2=_interopRequireDefault(require(19)),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12)),_get=require(1),rest=require(30),STORAGE_KEY="CLOSED_ALERTS",_require=require(16),dispatch=_require.dispatch,_require2=require(31),STICKY_HEADER=_require2.STICKY_HEADER,Alerts=function(){function e(t){var r=this;(0,_classCallCheck2.default)(this,e),_get(window,"kiln.locals",!0)&&(this.banner=t,this.check(),setInterval(function(){return r.check()},3e4))}return(0,_createClass2.default)(e,[{key:"check",value:function(){var e=this,t=this.storageGet();rest.get("/public/api/alerts").then(function(r){r.alerts.filter(function(e){return!t.includes(e.hash)}).forEach(function(t){e.add(t)}),e.banner.childNodes.length?e.showBanner():e.hideBanner(),dispatch(STICKY_HEADER.RECALCULATE)})}},{key:"alertExists",value:function(e){return!!this.banner.querySelector("#".concat(this.instance(e)))}},{key:"instance",value:function(e){return e.uri.split("/").pop().split("@").shift()}},{key:"add",value:function(e){this.alertExists(e)?e.hash!==this.banner.firstChild.getAttribute("data-alert-hash")&&this.banner.replaceChild(this.create(e),this.banner.firstChild):this.banner.appendChild(this.create(e))}},{key:"create",value:function(e){var t=this,r=function(e,t,r){var i=document.createElement("div");return i.className=e,"string"==typeof t&&(i.innerHTML=t),"object"===(0,_typeof2.default)(t)&&i.appendChild(t),r&&(i.id=r),i},i=r("alerts__close","",this.instance(e)),n=r("alerts__container",i);e.title&&n.appendChild(r("alerts__title",e.title)),n.appendChild(r("alerts__content",e.content));var a=r("alerts__item",n);return a.setAttribute("data-alert-hash",e.hash),i.addEventListener("click",function(r){var i=r.target;return t.close(i.id,e.hash)}),a}},{key:"showBanner",value:function(){this.banner.classList.add("alerts--visible")}},{key:"hideBanner",value:function(){this.banner.classList.remove("alerts--visible")}},{key:"close",value:function(e,t){for(var r=this.banner.querySelector("#".concat(e));"alerts__item"!==r.className;)r=r.parentNode;r.parentNode.removeChild(r),this.storageSet(t),dispatch(STICKY_HEADER.RECALCULATE)}},{key:"storageGet",value:function(){var e=window.sessionStorage.getItem(STORAGE_KEY);return e?e.split(",").filter(function(e){return null!=e&&""!=e}):[]}},{key:"storageSet",value:function(e){var t=this.storageGet().join(",");window.sessionStorage.setItem(STORAGE_KEY,t.concat(",",encodeURIComponent(e)))}}]),e}();module.exports=function(e){return new Alerts(e)};
}, {"1":1,"10":10,"11":11,"12":12,"16":16,"19":19,"30":30,"31":31}];
window.modules["ad-slot-client-injector.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_typeof2=_interopRequireDefault(require(19)),_toConsumableArray2=_interopRequireDefault(require(23)),_defineProperty2=_interopRequireDefault(require(18));function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;tu}).map(function(e){return e>u?e+1:e}),a++)};e.forEach(function(t,l){0===l&&(u(t,0),o=t);var s=e.find(function(e){return e>=o+r});s&&a=l&&bt+f.buffer-1;m&&y&&p.push(b)}s=p}}),q=s,O&&(S(s,r),o&&document.addEventListener("live-story.updated",function(){_(h)})),document.dispatchEvent(new CustomEvent("QuantumPlacementComplete",{detail:{openSlots:q}})))},_=function(e){var t=(null==p?void 0:p.adSlotIdPattern)||"";if("object"===(0,_typeof2.default)(e)&&!Array.isArray(e)&&t){var r=document.querySelectorAll('[data-ad-id^="'.concat(t,'"]'))||[];r.length&&r.forEach(function(e){var t,r;null===(t=window.AdFuel)||void 0===t||t.destroySlots([null===(r=e.dataset)||void 0===r?void 0:r.adId]),e.remove()}),g(e),O&&w().setupIntersectObserver()}};if(b(function(e){m=e?"mobile":"desktop"}),window.CNN.ads&&(window.CNN.ads.quantum={updateAdSlotPositions:_,toggleShowAdsOnDesktop:function(){y=!y,O=!0,w().init()},getOpenSlots:function(){return q}}),"mobile"!==m||"true"!==e.dataset.enabled)return!1;O=!0,w().init()};module.exports=function(e){subscribe(actions.ADS.SET_AD_VARIANT,function(t){t.adVariant===AD_VARIANTS.DEFAULT&&client(e)})};
}, {"9":9,"10":10,"16":16,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23}];
window.modules["social-share.client"] = [function(require,module,exports){"use strict";var _require=require(107),trackMetrics=_require.trackMetrics;module.exports=function(e){var t=e.classList.contains("social-share_compact"),c=e.querySelector("[data-type=open]"),a=e.querySelector("[data-type=close]"),r=e.querySelector("[data-type=facebook]"),n=e.querySelector("[data-type=x]"),i=e.querySelector("[data-type=email]"),o=e.querySelector("[data-type=share-links]"),s=e.querySelector("[data-type=copy]"),l=e.querySelector("[data-type=message]"),d=function(){t&&a.click()};s.addEventListener("click",function(){var e=document.createElement("input");e.value=s.dataset.url,s.parentNode.appendChild(e),e.select(),document.execCommand("copy"),s.parentNode.removeChild(e),l.classList.add("show"),u("link","copy"),setTimeout(function(){l.classList.remove("show"),d()},1e3)}),[r,n].forEach(function(e){e.addEventListener("click",function(){window.open(e.dataset.url,"_blank","width=600,height=600,scrollbars=no,resizable=no,noopener,noreferrer"),u(e.dataset.type,"share"),d()})}),i.addEventListener("click",function(){u("email","share"),d()}),c.addEventListener("click",function(){return[c,a,o].forEach(function(e){return e.classList.add("active")})}),a.addEventListener("click",function(){return[c,a,o].forEach(function(e){return e.classList.remove("active")})});var u=function(e,t){try{trackMetrics({type:"social-click",data:{clickObj:{component:"sharing",socialType:e,action:t}}})}catch(e){return}}};
}, {"107":107}];
window.modules["paragraph.client"] = [function(require,module,exports){"use strict";var _require=require(167),initProductClickEventListener=_require.initProductClickEventListener;module.exports=function(e){initProductClickEventListener(e)};
}, {"167":167}];
window.modules["footer.client"] = [function(require,module,exports){"use strict";var enableUserConsentLink=function(e){var n=e.querySelector(".footer__links .uclink");window.WM&&window.WM.UserConsent&&0!==window.WM.UserConsent.getLinkTitle().length&&n&&(n.text=window.WM.UserConsent.getLinkTitle(),n.onclick=window.WM.UserConsent.getLinkAction(),n.style.display="block",n.style.textAlign="center")};module.exports=function(e){enableUserConsentLink(e)};
}, {}];
window.modules["header.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_slicedToArray2=_interopRequireDefault(require(36)),_toConsumableArray2=_interopRequireDefault(require(23)),_asyncToGenerator2=_interopRequireDefault(require(24)),HEADER_ICON_IDS=["headerMenuIcon","headerSearchIcon","headerCloseIcon"],MORE_DROPDOWN_LINK_ID="moreDropdown",_require=require(161),calculateNavLeftMaxWidth=_require.calculateNavLeftMaxWidth,isSubscriber=_require.isSubscriber,_require2=require(145),calculatePageStickyThreshold=_require2.calculatePageStickyThreshold,_get=require(1),_require3=require(29),checkGeoCountry=_require3.checkGeoCountry,getCookie=_require3.getCookie,_require4=require(107),trackMetrics=_require4.trackMetrics,_require5=require(97),setAdobeAnalyticsDataForCookie=_require5.setAdobeAnalyticsDataForCookie,EnvVars=require(5),initializeMenu=function(e){var r=e.classList;HEADER_ICON_IDS.map(function(e){return document.getElementById(e)}).filter(function(e){return e}).forEach(function(e){e.addEventListener("click",function(){r.toggle("header--active");var e=window.document.body;if(r.contains("header--active"))e.style.top="-".concat(window.scrollY,"px"),e.classList.toggle("menu-opened");else{e.classList.toggle("menu-opened");var t=e.style.top;e.style.top="",window.scrollTo(0,-1*parseInt(t||"0"))}})})};function fireTrackingMetrics(e){var r=e.interaction,t=e.type;trackMetrics({type:void 0===t?"user-interaction":t,data:{interaction:r}})}var moreDropdownLink,moreSection,moreCaret,hoverStartTime,updateSubscribeView=function(){var e=(0,_asyncToGenerator2.default)(function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _regenerator.default.mark(function t(){var n,o;return _regenerator.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=6;break}return t.next=3,isSubscriber();case 3:n=t.sent,e.style.display=n?"none":"block",r&&(o=e.closest(".header"),formatNavBar(o));case 6:case"end":return t.stop()}},t)})()});return function(r){return e.apply(this,arguments)}}(),initializeSubscribeButton=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){var t,n,o;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.querySelector(".header__subscribe-button"),n=checkGeoCountry("US"),o=getCookie(EnvVars.get("APP_VIEW_COOKIE")),!t||o||!n){e.next=11;break}return r.querySelector(".header__inner").classList.add("header__inner--subscription"),e.next=8,updateSubscribeView(t);case 8:t.addEventListener("click",function(e){var t="".concat(window.location.protocol,"//").concat(window.location.hostname,"/subscription");window.zion_analytics.track(new window.ZION_SDK.GenericLinkClick({href:t,type:e.target.tagName,customAttributes:{Component_id:r.dataset.uri,Component_text:e.target.innerText.trim(),Component_type:"button",Container_type:"navigation"}})),fireTrackingMetrics({interaction:"nav:subscribe"});var n=new URL(t);n.searchParams.append("source","sub_web_nav"),n.searchParams.append("redirect",window.location.href),window.location.href=n.href}),document.addEventListener("login",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,updateSubscribeView(t,!0);case 2:case"end":return e.stop()}},e)}))),document.addEventListener("logout",(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,updateSubscribeView(t,!0);case 2:case"end":return e.stop()}},e)})));case 11:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}(),initializeAccordion=function(e){e.querySelectorAll(".header__nav-item-accordion").forEach(function(e){e.addEventListener("click",function(){var r;e.classList.toggle("header__nav-item-accordion--open"),null===(r=e.querySelector(".header__nav-item-dropdown"))||void 0===r||r.classList.toggle("header__nav-item-dropdown--open")})})},initializeEditionizers=function(e){var r=e.querySelectorAll(".header__editionizer"),t=e.querySelectorAll(".header__editionizer-button");(0,_toConsumableArray2.default)(t).forEach(function(e){return e.addEventListener("click",function(){e.setAttribute("aria-expanded","true"===e.getAttribute("aria-expanded")?"false":"true"),(0,_toConsumableArray2.default)(r).forEach(function(e){return e.classList.toggle("header__editionizer--active")})})})},formatNavBar=function(e){var r=e.querySelector(".header__right");if(e.getBoundingClientRect().width<960)r&&(r.style.visibility="visible");else if(!window.location.pathname.startsWith("/webview")){var t=function(e){return e.style.display="block"},n=function(e){return e.style.display="none"},o=function(){return e.querySelector(".header__left").getBoundingClientRect().width},i=function(e){d.querySelectorAll(".header__nav-item:nth-child(n+".concat(d.childElementCount-e,")")).forEach(n)},a=e.querySelector(".header__nav");a&&(a.style.visibility="hidden");var c=e.querySelector(".header__nav-more"),u=e.querySelector(".header__nav-more > .header__nav-item-dropdown"),d=e.querySelector(".header__left .header__nav-container");if(d){d.querySelectorAll(".header__nav-item").forEach(t),u.querySelectorAll(".header__nav-item-dropdown-item").forEach(n),n(c);for(var s=calculateNavLeftMaxWidth(e),l=o(),v=!1,_=1;l>s;)v=!0,i(_),l=o(),_++;v&&(t(c),(l=o())>s&&(i(_),l=o(),_++));var m=d.querySelector(".promotion-link")?0:1;u.querySelectorAll(".header__nav-item-dropdown-item:nth-child(n+".concat(d.childElementCount-_+m,")")).forEach(t),a&&(a.style.visibility="visible"),r&&(r.style.visibility="visible")}}},moreDropdownLinkZJSAttrs={},onMoreDropdownMouseEnter=function(){hoverStartTime=Date.now()},onMoreDropdownMouseLeave=function(){hoverStartTime&&(window.zion_analytics.track(new window.ZION_SDK.GenericHover({traits:{canonical_url:_get(window,"CNN.contentModel.canonicalUrl",null),component_id:moreDropdownLinkZJSAttrs.zjsComponent_id,cms_id:moreDropdownLinkZJSAttrs.zjsContainer_id,component_text:moreDropdownLinkZJSAttrs.zjsComponent_text,component_type:moreDropdownLinkZJSAttrs.zjsComponent_type,hover_time:Date.now()-hoverStartTime}})),hoverStartTime=0)},updateMoreDropdownHoverEvent=function(e){e?(moreDropdownLink.addEventListener("mouseenter",onMoreDropdownMouseEnter,!0),moreDropdownLink.addEventListener("mouseleave",onMoreDropdownMouseLeave,!0)):(moreDropdownLink.removeEventListener("mouseenter",onMoreDropdownMouseEnter,!0),moreDropdownLink.removeEventListener("mouseleave",onMoreDropdownMouseLeave,!0))},mediaQueryHoverNone=window.matchMedia("(any-hover: none)"),convertDatasetToAttributeName=function(e){return"data-".concat(e.split(/(?=[A-Z])/).join("-").toLowerCase())},updateMoreDropdownZJS=function(){var e=mediaQueryHoverNone.matches;if(updateMoreDropdownHoverEvent(!e),e)for(var r=0,t=Object.entries(moreDropdownLinkZJSAttrs);r=u||c===t?(o.classList.remove("hide"),i.classList.remove("header__subnav-mount--scrolled")):(o.classList.add("hide"),i.classList.add("header__subnav-mount--scrolled"))})})}module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.addEventListener("click",setNavigationAdobeAnalytics),initializeMenu(r),e.next=4,initializeSubscribeButton(r);case 4:initializeEditionizers(r),initializeAccordion(r),initializeMoreDropdown(),calculatePageStickyThreshold(),formatNavBar(r),initializeNavBorderStyleUpdate(r),window.addEventListener("resize",function(){formatNavBar(r)});case 11:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}();
}, {"1":1,"5":5,"10":10,"23":23,"24":24,"25":25,"29":29,"36":36,"97":97,"107":107,"145":145,"161":161}];
window.modules["video-resource.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12)),_assertThisInitialized2=_interopRequireDefault(require(176)),_inherits2=_interopRequireDefault(require(14)),_possibleConstructorReturn2=_interopRequireDefault(require(13)),_getPrototypeOf2=_interopRequireDefault(require(15)),_defineProperty2=_interopRequireDefault(require(18));function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function _objectSpread(e){for(var t=1;t=.5&&i<1&&(r.faveInstance.mute(),r.faveInstance.play(void 0,{autostart:!0}),n.unobserve(a))})},{threshold:.5});"scroll"===e.dataset.autostart&&"tve"!==e.dataset.customExperience&&n.observe(e)})}),(0,_defineProperty2.default)((0,_assertThisInitialized2.default)(r),"playTVEVideo",function(e){var t=_objectSpread(_objectSpread({},e),{},{mediaMetadata:{headline:null==e?void 0:e.assetDescription,mediumId:null==e?void 0:e.assetId,id:null==e?void 0:e.assetId}});return setAnalyticsMetadata(e),r.setPlayerVisibility(!0),authorizeAndPlay(t)}),r.el=e;var n,a=e.dataset.featuredVideo,s=e.dataset.customExperience,o=convertToBoolean(e.dataset.hasVideoPlayer),l=isAuthVideo(s);!a&&!l||o||(!l||null!==(n=window.TOP)&&void 0!==n&&n.Auth||document.getElementById("script-top-auth")?window.FAVE?r.renderPlayer(r.el):window.addEventListener("fave.loaded",function(){r.renderPlayer(r.el)}):(r.loadExternalScript(topAuthSrc,"top-auth"),r.loadExternalScript(topFreeviewSrc,"top-freeview")));if(isPageType(PAGE_TYPES.VIDEO)){var u=e.querySelector(".video-resource__description-toggle"),c=e.querySelector(".video-resource__description");u&&c&&u.addEventListener("click",function(){c.classList.toggle("video-resource__description--hidden"),u.classList.toggle("video-resource__description-toggle--hidden")})}return r.bind(".auth-player-container__back-player-icon-container","click",r.handlePlayerBackClick),r}return(0,_createClass2.default)(i,[{key:"verticalPlaybackRequest",value:function(e){var t=this.faveInstance.getMediaState();e.videoId&&(e.videoId=null),e.muted?this.faveInstance.mute():this.faveInstance.unmute(),"PAUSED"!=t&&"PLAYING"!=t?(this.faveInstance.prepare(),this.faveInstance.play(null,e)):"PLAYING"!=t&&this.faveInstance.resume()}},{key:"handlePlayerBackClick",value:function(){this.setPlayerVisibility(!1),this.faveInstance.stop()}},{key:"setPlayerVisibility",value:function(e){var t;e?(this.el.style.display="block",null===(t=this.el.querySelector(".auth-player-container"))||void 0===t||t.classList.add("fave-player-container_inline-full-bleed"),document.body.style.overflow="hidden"):(this.el.style.display="none",document.body.style.overflow="auto")}}]),i}(ClientModel);module.exports=initializeOnExec(VideoResource);
}, {"5":5,"6":6,"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"29":29,"45":45,"76":76,"155":155,"176":176,"352":352,"408":408,"419":419}];
window.modules["subnav.client"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_slicedToArray2=_interopRequireDefault(require(36)),_asyncToGenerator2=_interopRequireDefault(require(24));module.exports=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){var t,a,n,i,o,u,l,s,c;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t={},a={zjsNavigationLocation:"header,footer"},n=0,i=Object.entries(a);n0?t.length:"",r=e.closest("[data-".concat(DATA_ATTRIBUTE_PREFIX,"-collection]"))||document.body,o=r===document.body?"body":r.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Collection")],i="";o===ZONE_COMPONENT_NAME&&(i=t.indexOf(r));var a=Array.from(r.querySelectorAll('[data-uri*="/_components/"]')),c=a.length;return{collection_type:o,collection_type_index:i,collection_type_length:n,collection_item_index:a.indexOf(e),collection_item_length:c}}function getWordCount(e){return e.innerText?e.innerText.match(/\w+/g).length:0}function getAggregateComponentElement(e){return e.closest("[data-".concat(DATA_ATTRIBUTE_PREFIX,'-aggregate-events="true"]'))}function trackZionEvent(e){window.zion_analytics&&window.zion_analytics.track(e)}function initializeOnOffEvents(){if(EnvVars.get("ENABLE_ZION_ANALYTICS_ON_OFF_EVENTS")){var e=function(e){window.ZION_SDK&&e.forEach(function(e){var t=e.target,n=e.isIntersecting,r=t.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")];if(r===COMPONENT_ON_EVENT&&n||r===COMPONENT_OFF_EVENT&&!n){var o=n?window.ZION_SDK.ComponentOnScreen:window.ZION_SDK.ComponentOffScreen,i=t.dataset.uri,a=function(){return setTimeout(function(){return trackZionEvent(new o({component_type:getComponentName(i),component_id:getComponentInstance(i),traits:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},getCommonEventProperties()),getCollectionProperties(t)),getOptionalOnOffProperties(t)),{},{word_count:getWordCount(t)})}))},1500)};window.requestIdleCallback?window.requestIdleCallback(a,{timeout:500}):a(),t.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")]=n?COMPONENT_OFF_EVENT:COMPONENT_ON_EVENT}})},t=Object.keys(OBSERVED_COMPONENT_THRESHOLDS).reduce(function(t,n){return _objectSpread(_objectSpread({},t),{},(0,_defineProperty2.default)({},n,new IntersectionObserver(e,{threshold:OBSERVED_COMPONENT_THRESHOLDS[n]})))},{});ZION_ON_OFF_OBSERVED_COMPONENTS.forEach(function(e){document.querySelectorAll('[data-uri*="/_components/'.concat(e,'/"]')).forEach(function(n){n.dataset["".concat(DATA_ATTRIBUTE_PREFIX,"Observe")]=COMPONENT_ON_EVENT,t[e]?t[e].observe(n):t.default.observe(n)})})}}function initializeClickEvents(){EnvVars.get("ENABLE_ZION_ANALYTICS_CLICK_EVENTS")&&document.body.addEventListener("click",function(e){var t="",n="",r="",o=e.target,i=o.closest("a[href]"),a=o.closest("[data-uri]"),c=getAggregateComponentElement(o);i&&i.href&&(r=i.href);var _=_objectSpread(_objectSpread({},getCustomProperties(o=c||a)),c?getCustomProperties(a):{}),s=e.target!==o?getCustomProperties(e.target):{};if(o){if(n=o.dataset.uri,"gallery"===(t=getComponentName(n))){var l,E=e.target.classList[0];E.includes("next")?l=_.carousel_item_index===_.carousel_item_length?1:_.carousel_item_index+1:E.includes("prev")&&(l=1===_.carousel_item_index?_.carousel_item_length:_.carousel_item_index-1),_.carousel_item_index=l}ZION_CLICK_OBSERVED_COMPONENTS.includes(t)&&trackZionEvent(new window.ZION_SDK.GenericClick({component_id:getComponentInstance(n),component_type:getComponentName(n),traits:_objectSpread(_objectSpread(_objectSpread(_objectSpread({},getCommonEventProperties()),getCollectionProperties(o)),_objectSpread(_objectSpread({},s),_)),{},{word_count:getWordCount(o),destination_url:r})}))}})}function initializeAnalyticsEvents(){isPageVariant(ZION_BEHAVIOURAL_ENABLED_PAGE_VARIANTS)&&(initializeOnOffEvents(),initializeClickEvents())}window.ZION_SDK?initializeAnalyticsEvents():window.addEventListener("zion.loaded",initializeAnalyticsEvents);
}, {"2":2,"5":5,"10":10,"18":18,"44":44,"89":89,"241":241}];
window.modules["article-scroll-metrics.legacy"] = [function(require,module,exports){"use strict";var _require=require(107),trackMetrics=_require.trackMetrics,METRICS=[{value:1,type:"article-start",data:{interaction:"article start"}},{value:25,type:"article-twentyfive",data:{interaction:"article 25"}},{value:50,type:"article-fifty",data:{interaction:"article 50"}},{value:75,type:"article-seventyfive",data:{interaction:"article 75"}},{value:100,type:"article-complete",data:{interaction:"article complete"}}],TRACK_PERCENTAGES=METRICS.map(function(e){return e.value}),_values=[].concat(METRICS);function manageMetrics(e){TRACK_PERCENTAGES.forEach(function(t){if(e>=t){if(i=t,!_values.find(function(e){return e.value===i}))return;var a=METRICS.find(function(e){return e.value===t}),r=a.type,n=a.data;trackMetrics({type:r,data:n}),_values=_values.filter(function(e){return e.value!==t})}var i})}function trackPercentageSeen(e){var t=e.querySelectorAll("p.paragraph"),a=t.length,r=Math.round(.25*a),n=Math.round(.5*a),i=Math.round(.75*a),c=new IntersectionObserver(function(e,t){e.forEach(function(e){if(e.isIntersecting){var c=e.target.para_index;c===a||1===a?(manageMetrics(100),t.disconnect()):c===i?manageMetrics(75):c===n?manageMetrics(50):c===r?manageMetrics(25):1===c&&manageMetrics(1),t.unobserve(e.target)}})});t.forEach(function(e,t){e.para_index=t+1,c.observe(e)})}window.addEventListener("load",function(){var e=document.querySelector(".article__content");e&&trackPercentageSeen(e)});
}, {"107":107}];
window.modules["bizdev-wunderkind.legacy"] = [function(require,module,exports){"use strict";var _require=require(9),AD_VARIANTS=_require.AD_VARIANTS,_require2=require(16),subscribe=_require2.subscribe,actions=_require2.actions,EnvVars=require(5),_require3=require(29),isEditionPage=_require3.isEditionPage,isEspanolPage=_require3.isEspanolPage,_require4=require(428),isEligibleForFocusMode=_require4.isEligibleForFocusMode,ucStates=["iab","data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","measure-ads","measure-market","product-develop"],initWunderkind=function(){var e=isEspanolPage()?EnvVars.get("ENABLE_WUNDERKIND_ES"):EnvVars.get("ENABLE_WUNDERKIND"),i=!!isEspanolPage()&&EnvVars.get("WUNDERKIND_SRC_ES")||(isEditionPage()?EnvVars.get("WUNDERKIND_SRC_EDITION"):EnvVars.get("WUNDERKIND_SRC"));e&&window.WM.UserConsent.addScript({src:i,id:"wunderkind_script",async:!0},ucStates)},waitForAdVariant=function(){subscribe(actions.ADS.SET_AD_VARIANT,function(e){e.adVariant===AD_VARIANTS.DEFAULT&&initWunderkind()})};isEligibleForFocusMode()?waitForAdVariant():initWunderkind();
}, {"5":5,"9":9,"16":16,"29":29,"428":428}];
window.modules["campaign-promo-events.legacy"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(44),authClient=_require.authClient,NewsletterClient=require(250),campaignPromos=document.createElement("campaignPromos"),newsletterClient=new NewsletterClient(authClient),trackCampaignPromoEvent=function(e,n){var t=n.campaign_id,r=n.campaign_type,a=n.campaign_name,i=n.campaign_objective;window.zion_analytics.track(new e({component_id:"promo_body",component_type:"".concat(r,"_promo"),traits:{campaign_id:t,campaign_type:r,campaign_name:a,campaign_objective:i}}))};campaignPromos.addEventListener("close",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentOffScreen,n)}),campaignPromos.addEventListener("impression",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentOnScreen,n)}),campaignPromos.addEventListener("submission",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.GenericSubmit,n)}),campaignPromos.addEventListener("activation",function(e){var n=e.detail;trackCampaignPromoEvent(window.ZION_SDK.ComponentLoaded,n)}),campaignPromos.getSubscribedNewsletters=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){var n;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,newsletterClient.retrieveSubscriptions({useCache:!0});case 2:return n=e.sent,e.abrupt("return",n.filter(function(e){return e.subscribed}).map(function(e){return e.newsletterName}));case 4:case"end":return e.stop()}},e)})),window.CNN.campaignPromos=campaignPromos,window.dispatchEvent(new CustomEvent("CNN.campaignPromos.loaded"));
}, {"10":10,"24":24,"25":25,"44":44,"250":250}];
window.modules["chartbeat-setup.legacy"] = [function(require,module,exports){"use strict";var _interopRequireDefault=require(10),_classCallCheck2=_interopRequireDefault(require(11)),_createClass2=_interopRequireDefault(require(12)),_defineProperty2=_interopRequireDefault(require(18)),_require=require(45),isSection=_require.isSection,SECTIONS=_require.SECTIONS,isStrategyRegistered=!1,CnnChartbeatVideoStrategy=function(){function e(t){var i=this;(0,_classCallCheck2.default)(this,e),(0,_defineProperty2.default)(this,"_cbPlayer",null),(0,_defineProperty2.default)(this,"_currentAdPosition",null),(0,_defineProperty2.default)(this,"_ready",!1),(0,_defineProperty2.default)(this,"_strategyName","CNN"),(0,_defineProperty2.default)(this,"_videoPlayed",!1),(0,_defineProperty2.default)(this,"_videoStartTime",null),(0,_defineProperty2.default)(this,"_viewStartTime",this._now()),(0,_defineProperty2.default)(this,"_onPlaybackReady",function(){i._ready=!0}),(0,_defineProperty2.default)(this,"_onVideoPlaying",function(){i._videoPlayed||(i._videoStartTime=i._now(),i._videoPlayed=!0)}),this._cbPlayer=t,this._subscribeEvents()}return(0,_createClass2.default)(e,[{key:"_now",value:function(){return(new Date).getTime()}},{key:"_subscribeEvents",value:function(){this._cbPlayer.readyState>2&&this._onPlaybackReady(),this._cbPlayer.currentTime>0&&!this._cbPlayer.paused&&!this._cbPlayer.ended&&this._onVideoPlaying(),this._cbPlayer.canplay.add(this._onPlaybackReady),this._cbPlayer.playing.add(this._onVideoPlaying)}},{key:"getAdPosition",value:function(){return this._cbPlayer.getAdPosition()}},{key:"getAutoplayType",value:function(){return this._cbPlayer.getAutoplayType()}},{key:"getBitrate",value:function(){return this._cbPlayer.getBitrate()}},{key:"getContentType",value:function(){return this._cbPlayer.getContentType()}},{key:"getCurrentPlayTime",value:function(){return this._cbPlayer.getCurrentPlayTime()}},{key:"getPlayerType",value:function(){return this._cbPlayer.getPlayerType()}},{key:"getSections",value:function(){return this._cbPlayer.getSections()}},{key:"getState",value:function(){return this._cbPlayer.getState()}},{key:"getStrategyName",value:function(){return this._strategyName}},{key:"getThumbnailPath",value:function(){return this._cbPlayer.getThumbnailPath()}},{key:"getTitle",value:function(){return this._cbPlayer.getTitle()}},{key:"getTotalDuration",value:function(){return this._cbPlayer.getTotalDuration()}},{key:"getVideoPath",value:function(){return this._cbPlayer.getVideoPath()}},{key:"getViewAdPlayTime",value:function(){return this.timeElapsed(this._viewStartTime)}},{key:"getViewPlayTime",value:function(){if(this._videoPlayed)return this.timeElapsed(this._viewStartTime)}},{key:"getViewStartTime",value:function(){return this.timeElapsed(this._viewStartTime)||0}},{key:"isReady",value:function(){return this._ready}},{key:"timeElapsed",value:function(e){return void 0===e?0:this._now()-e}}]),e}();function registerChartbeatVideoStrategy(){!0!==isStrategyRegistered&&(window._cbv_strategies=window._cbv_strategies||[],window._cbv_strategies.push(CnnChartbeatVideoStrategy),isStrategyRegistered=!0)}(0,_defineProperty2.default)(CnnChartbeatVideoStrategy,"verify",function(e){return"function"==typeof e.fromFave}),function(){function e(){window.WM.UserConsent.addScript({src:"//static.chartbeat.com/js/chartbeat_video.js",async:!0},["data-store","content-person","measure-content"])}var t=(window.CNN||{}).contentModel||{},i=(window.CNN||{}).omniture||{};registerChartbeatVideoStrategy();var n,r,a,o,l=window._sf_async_config=window._sf_async_config||{};l.uid=37612,l.domain=(o="cnn.com","es"===(null===(n=window.CNN.contentModel)||void 0===n?void 0:n.brandSite)&&(o="cnnespanol.".concat(o)),-1!=window.location.hostname.indexOf("edition")&&(o="edition.".concat(o)),"prod"!=(null===(r=window.CNN)||void 0===r?void 0:null===(a=r.contentModel)||void 0===a?void 0:a.environment)&&(o="dev.".concat(o)),o),l.sections=t.vertical,l.authors=i.cap_author,l.title=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return isSection(SECTIONS.HOMEPAGE)?e.replace(" Desktop","").replace(" Mobile",""):e}(i.headline),l.flickerControl=!1,l.articleBlockSelector="div.card,div.container__item,p.paragraph>a",l.autoDetect=!1,l.path=function(){var e,t,i=window.location.hostname,n=null===(e=(t=document.querySelector("[rel=canonical]")).getAttribute)||void 0===e?void 0:e.call(t,"href");try{return i+new URL(n).pathname}catch(e){return i+document.location.pathname}}(),window.WM.UserConsent?e():window.addEventListener("user-consent.loaded",e)}(),module.exports={CnnChartbeatVideoStrategy:CnnChartbeatVideoStrategy};
}, {"10":10,"11":11,"12":12,"18":18,"45":45}];
window.modules["focus-mode-gpt-service.legacy"] = [function(require,module,exports){"use strict";var focusModeEventTimeout,_interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),EnvVars=require(5),_require=require(428),FOCUS_MODE_EVENT=_require.FOCUS_MODE_EVENT,FOCUS_MODE_CONFIGS=_require.FOCUS_MODE_CONFIGS,isEligibleForFocusMode=_require.isEligibleForFocusMode,_require2=require(29),getCookie=_require2.getCookie,FOCUS_MODE_TIMEOUT=EnvVars.get("FOCUS_MODE_TIMEOUT"),PRISM_SCRIPT_SRC=EnvVars.get("PRISM_SRC"),GPT_SCRIPT_SRC=EnvVars.get("FOCUS_MODE_GPT_SCRIPT_SRC"),ENABLE_FOCUS_MODE=EnvVars.get("ENABLE_FOCUS_MODE"),FOCUS_MODE_UC_STATES=["data-store","ads-contextual","ads-person-prof","ads-person","vendor"],GPT_SCRIPT_ID="GPTScript",FOCUS_MODE_CLASS="focus-mode-sponsored",FOCUS_MODE_STYLES="\nhtml[data-layout-uri*='layout-with-rail'] .".concat(FOCUS_MODE_CLASS,' .ad-slot:not(.adSlotLoaded)[data-uri*="/_components/ad-slot/"]:not([data-desktop-slot-id="ad_focus_btf_01"]),\nhtml[data-layout-uri*=\'layout-with-rail\'] .').concat(FOCUS_MODE_CLASS," .ad-qtm,\nhtml[data-layout-uri*='layout-with-rail'] .").concat(FOCUS_MODE_CLASS," [data-uri*=\"/_components/bizdev\"],\nhtml[data-layout-uri*='layout-with-rail'] .").concat(FOCUS_MODE_CLASS," .teads-inread,\nhtml .").concat(FOCUS_MODE_CLASS," .ad-slot-rail {\n display: none;\n}\nhtml .").concat(FOCUS_MODE_CLASS," .ad-slot-dynamic[data-uri*='cnn-focus-mode-inline-ad'] {\n display: flex;\n}\n"),SECTION=window.CNN.contentModel.section,isEdition=window.CNN.contentModel.edition,RECIRC_DATA={pageElement:{wrapperClassName:"layout__end",elementClassName:"content-recs"},upNext:{recsmodel:"related",title:"Up next",numberOfItems:5,contentTypes:"article",layout:"container_list-headlines-with-read-times"},mostRead:{recsmodel:"popularity",title:"Most read",numberOfItems:10,contentTypes:"article",layout:"container_list-headlines-ranked"}},sendCustomEventOnce=function(e){void 0===window.CNN.ads.isFocusMode&&(document.dispatchEvent(new CustomEvent(FOCUS_MODE_EVENT,{detail:{isFocusMode:e}})),window.CNN.ads.isFocusMode=e)},injectGpt=function(){window.googletag=window.googletag||{cmd:[]},document.querySelector("#".concat(GPT_SCRIPT_ID))?console.warn("Focus Mode: GPT script already exists"):window.WM.UserConsent.addScript({src:GPT_SCRIPT_SRC,async:!0,id:GPT_SCRIPT_ID},FOCUS_MODE_UC_STATES)},insertFocusModeStyles=function(){var e=document.createElement("style");e.textContent=FOCUS_MODE_STYLES,document.head.appendChild(e)},getLimitedAdsParam=function(){var e,t=null===(e=getUrlParam("adsqa"))||void 0===e?void 0:e.split("=");return Boolean(t&&"status"===t[0]&&"limited_ads"===t[1])},getCDPID=function(){return new Promise(function(e){var t=getCookie("CDPID");if(t){var n=JSON.parse(t).cdpId;e(n)}else window.addEventListener("message",function(t){var n,o=null===(n=document.getElementById("prism_toolkit"))||void 0===n?void 0:n.contentWindow;t.source==o&&e(t.data)}),window.WM.UserConsent.addScript({src:PRISM_SCRIPT_SRC},FOCUS_MODE_UC_STATES)})},defineAdSlot=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t){var n,o,a,r,i,s,d,c,u,l,_,S,g,C,p,m,E,O,f,T;return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.networkId,o=t.adDimensions,a=t.elementId,r=t.targeting,i=SECTION?"".concat(n,"/").concat(SECTION):n,s=window.CNN.cep_topics||{},d=s.cep_brsf,c=void 0===d?[]:d,u=s.cep_iabt,l=void 0===u?[]:u,_=s.cep_sent,S=void 0===_?[]:_,g=s.cep_tags,C=void 0===g?[]:g,p=s.short_source_id,m=void 0===p?"":p,E=s.source_id,O=void 0===E?"":E,getLimitedAdsParam()&&(r.status=["limited_ads"]),(f=document.createElement("div")).id=a,f.classList.add("focus-mode-top-ad"),document.querySelector(".ad-slot-header__container").appendChild(f),e.next=10,getCDPID();case 10:T=e.sent,googletag.cmd.push(function(){r.status?googletag.defineSlot(i,o,a).setTargeting("pos",r.pos).setTargeting("status",r.status).addService(googletag.pubads()):googletag.defineSlot(i,o,a).setTargeting("pos",r.pos).addService(googletag.pubads()),googletag.pubads().setTargeting("cep_brsf",c).setTargeting("cep_iabt",l).setTargeting("cep_sent",S).setTargeting("cep_tags",C).setTargeting("short_source_id",m).setTargeting("source_id",O).setPublisherProvidedId(T).collapseEmptyDivs(),googletag.enableServices()});case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),handleSlotRenderEnded=function(e,t,n){if(e.slot.getSlotElementId()===t){var o=e.slot.getTargeting("pos"),a=e.isEmpty,r=o.includes(n[0])&&!a;r&&(insertFocusModeStyles(),document.body.classList.add(FOCUS_MODE_CLASS),clearTimeout(focusModeEventTimeout),sendCustomEventOnce(r),isEdition||(insertRecircModule("mostRead"),insertRecircModule("upNext")))}},checkSponsoredSession=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(t,n){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise(function(e){window.googletag&&googletag.apiReady?e():googletag.cmd.push(e)});case 2:googletag.cmd.push(function(){googletag.display(t)}),googletag.cmd.push(function(){googletag.pubads().addEventListener("slotRenderEnded",function(e){handleSlotRenderEnded(e,t,n)})});case 4:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),getUrlParam=function(e){return new URLSearchParams(window.location.search).get(e)},insertRecircModule=function(e){if(RECIRC_DATA[e]){var t=document.querySelector(".".concat(RECIRC_DATA.pageElement.wrapperClassName)),n=document.createElement("div"),o="recirc-module-".concat(e.replace(/[\s-]+/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase());Object.keys(RECIRC_DATA[e]).forEach(function(t){n.dataset[t]=RECIRC_DATA[e][t]}),n.classList.add(o,RECIRC_DATA.pageElement.elementClassName),t.prepend(n),window.CNN.launchContentRecs(document.querySelector(".".concat(o)))}},isOptedOut=function(){var e=getUrlParam("focus_mode");return!isEligibleForFocusMode()||"false"===e||null===e&&!getLimitedAdsParam()&&!1===ENABLE_FOCUS_MODE},handleOptInRedirect=function(){var e=getUrlParam("focus_mode"),t=getUrlParam("adsqa");"true"!==e||t||(window.location.search+="".concat(window.location.search?"&":"","adsqa=status%3Dlimited_ads"))},initGptService=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!isOptedOut()){e.next=4;break}sendCustomEventOnce(!1),e.next=10;break;case 4:return handleOptInRedirect(),focusModeEventTimeout=setTimeout(function(){var e=getLimitedAdsParam();sendCustomEventOnce(e)},FOCUS_MODE_TIMEOUT),injectGpt(),e.next=9,defineAdSlot(FOCUS_MODE_CONFIGS.gptSlot);case 9:checkSponsoredSession(FOCUS_MODE_CONFIGS.gptSlot.elementId,FOCUS_MODE_CONFIGS.gptSlot.targeting.pos);case 10:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();initGptService(),module.exports={FOCUS_MODE_CLASS:FOCUS_MODE_CLASS,GPT_SCRIPT_ID:GPT_SCRIPT_ID};
}, {"5":5,"10":10,"24":24,"25":25,"29":29,"428":428}];
window.modules["relevance-user.legacy"] = [function(require,module,exports){"use strict";var _require=require(421),trackUserViewedContent=_require.trackUserViewedContent;trackUserViewedContent(window.CNN.contentModel);
}, {"421":421}];
window.modules["shared-arkose-newsletters.legacy"] = [function(require,module,exports){"use strict";var nlArkoseEnforcement,daexData,_interopRequireDefault=require(10),_regenerator=_interopRequireDefault(require(25)),_asyncToGenerator2=_interopRequireDefault(require(24)),_require=require(251),createArkoseScript=_require.createArkoseScript,getDaexData=_require.getDaexData,enforcementOnError=_require.enforcementOnError,MAX_RETRY_COUNT=_require.MAX_RETRY_COUNT,retryCount=0,setupCbName="setupArkoseDualNewsletters",nlLoadedEvent="cnn-nl-arkose-loaded",setArkoseConfig=function(e){var r=e.arkoseOnReady,n=e.arkoseOnCompleted,t=e.arkoseOnError,a=e.setBy;nlArkoseEnforcement.setConfig({data:daexData&&{blob:daexData}||{},onReady:function(){r&&r({enforcement:nlArkoseEnforcement})},onCompleted:n,onError:function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return retryCount++,e.next=3,enforcementOnError({enforcementInstance:nlArkoseEnforcement,callbackFnName:setupCbName,retryTimes:retryCount});case 3:retryCount===MAX_RETRY_COUNT&&t&&t();case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()}),window.arkoseEnforcementCNN.lastSetBy=a,nlArkoseEnforcement.reset()},resetArkoseConfig=function(){var e=(0,_asyncToGenerator2.default)(_regenerator.default.mark(function e(r){return _regenerator.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(daexData){e.next=4;break}return e.next=3,getDaexData("NEWSLETTERS");case 3:daexData=e.sent;case 4:nlArkoseEnforcement?setArkoseConfig(r):(createArkoseScript({srcEnvVar:"ARKOSE_NEWSLETTERS_SRC",callbackFnName:setupCbName,id:"arkose-newsletters-script"}),document.addEventListener(nlLoadedEvent,function(){setArkoseConfig(r)}));case 5:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}();window.arkoseEnforcementCNN={},window[setupCbName]=function(e){nlArkoseEnforcement=e,document.dispatchEvent(new CustomEvent(nlLoadedEvent))},window.arkoseEnforcementCNN.enforcementSetup=resetArkoseConfig;
}, {"10":10,"24":24,"25":25,"251":251}];
window.modules["zeta.legacy"] = [function(require,module,exports){"use strict";var clientHashKey=window.zeta.client_hash_key,partnerHashKey=window.zeta.partner_hash_key,tagShortName=window.zeta.tag_short_name,siteId=window.zeta.site_id,resourceId=window.CNN.contentModel.sourceId,resourceType=window.CNN.contentModel.pageType,section=window.CNN.contentModel.section,cacheBuster=Date.now(),src="https://live.rezync.com/sync?"+"c=".concat(clientHashKey)+"&p=".concat(partnerHashKey)+"&k=".concat(tagShortName)+"&zmpID=".concat(siteId)+"&custom1=".concat(resourceId)+"&custom2=".concat(resourceType)+"&custom3=".concat(section)+"&cache_buster=".concat(cacheBuster),async=!0,ucStates=["data-share","data-sell","data-store","ads-contextual","ads-person-prof","ads-person","content-person-prof","content-person","measure-ads","measure-content","measure-market","product-develop"];function init(){window.WM.UserConsent.addScript({src:src,async:async},ucStates)}window.WM.UserConsent?init():window.addEventListener("user-consent.loaded",init);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/))
.forEach((key) => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules)
.filter((key) => typeof key === 'string' && key.match(/\.client$/))
.forEach((key) => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `production` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = 'production';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]