UNPKG

29.1 kBJavaScriptView Raw
1!function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=5)}([function(t,e,n){"use strict";function i(t){return Array.prototype.slice.call(t,1)}function s(t){var e=i(arguments);if(l)t.classList.add.apply(t.classList,e);else{var n=t.className.split(" ");e.forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),t.className=n.join(" ")}return t}function r(t,e){return e=e.replace(".",""),l?t.classList.contains(e):t.className.indexOf(e)>-1}function o(t){var e=i(arguments);if(l)t.classList.remove.apply(t.classList,e);else{var n=t.className.split(" ");e.forEach(function(t){t&&n.splice(n.indexOf(t),1)}),t.className=n.join(" ")}}function a(t,e,n){var i=!1;return l?i=t.classList.toggle(e):!1===n||r(t,e)?o(t,n):(s(t,e),i=!0),i}var l="classList"in document.createElement("_");t.exports={addClass:s,contains:r,hasClassList:l,removeClass:o,toggleClass:a}},function(t,e,n){"use strict";var i={on:function(t,e){var n=this.events=this.events||{};return n[t]=this.events[t]||[],n[t].push(e),this},off:function(t){return this.events&&this.events[t]&&delete this.events[t],this},trigger:function(t){var e=this.events||{};if(!1===e.hasOwnProperty(t))return this;for(var n=0,i=e[t].length;n<i;n++)this.events[t][n].apply(this,arguments);return this}};t.exports=i},function(t,e,n){"use strict";function i(t,e){return Function.prototype.bind?t.bind.apply(t,Array.prototype.slice.call(arguments,1)):function(){return t.apply(e,arguments)}}t.exports={bind:i}},function(t,e,n){"use strict";function i(){}var s={UP:0,RIGHT:1,DOWN:-1,LEFT:-2},r={PAGE:1,TEMPLATE:2,ORGANISM:3,MOLECULE:4,ATOM:5},o={PAGE:"p-",TEMPLATE:"t-",ORGANISM:"o-",MOLECULE:"m-",ATOM:"a-"};t.exports={DIRECTIONS:s,NO_OP_FUNCTION:i,PREFIXES:o,TYPES:r,UNDEFINED:void 0}},function(t,e,n){"use strict";function i(t,e){if("closest"in t)return t.closest(e);for(var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector,i=void 0;t;)if(n.bind(t)(e)?i=t:t=t.parentElement,i)return t;return null}t.exports={closest:i}},function(t,e,n){"use strict";n(6),n(20)},function(t,e,n){"use strict";var i=n(7);n(19),i.init()},function(t,e,n){"use strict";var i=n(0).contains,s=n(0).addClass,r=n(8).closest,o=n(0).removeClass,a=n(9),l=n(1),c=n(12),u=c.extend({transition:null,accordionEvent:null,activeAccordion:!1,classes:{targetExpanded:"o-expandable_target__expanded",targetCollapsed:"o-expandable_target__collapsed",groupAccordion:"o-expandable-group__accordion"},events:{"click .o-expandable_target":"onExpandableClick","click .o-expandable-group__accordion .o-expandable_target":"onToggleAccordion"},ui:{base:".o-expandable",target:".o-expandable_target",content:".o-expandable_content",header:".o-expandable_header"},initialize:function(){var t={BASE_CLASS:"o-expandable_content__transition",EXPANDED:"o-expandable_content__expanded",COLLAPSED:"o-expandable_content__collapsed",OPEN_DEFAULT:"o-expandable_content__onload-open"};if(this.transition=new a(this.ui.content,t).init(),null!==r(this.ui.target,"."+this.classes.groupAccordion)){var e=this.accordionClose.bind(this);l.on("CFAccordionClose",e)}i(this.ui.content,t.OPEN_DEFAULT)?s(this.ui.target,this.classes.targetExpanded):s(this.ui.target,this.classes.targetCollapsed)},accordionClose:function(){!0===this.activeAccordion&&(this.activeAccordion=!1,this.transition.collapse())},onExpandableClick:function(t){this.transition.toggleExpandable(),this.toggleTargetState(this.ui.target)},onToggleAccordion:function(t){l.trigger("CFAccordionClose"),this.activeAccordion=!0},toggleTargetState:function(t){i(t,this.classes.targetExpanded)?(s(this.ui.target,this.classes.targetCollapsed),o(this.ui.target,this.classes.targetExpanded)):(s(this.ui.target,this.classes.targetExpanded),o(this.ui.target,this.classes.targetCollapsed))}});t.exports=u},function(t,e,n){"use strict";function i(t,e){if("closest"in t)return t.closest(e);for(var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector,i=void 0;t;)if(n.bind(t)(e)?i=t:t=t.parentElement,i)return t;return null}t.exports={closest:i}},function(t,e,n){"use strict";function i(t,e){function n(){v.init();var e=o(i,this);return v.addEventListener(r.END_EVENT,e),u(function(){a(t,m.OPEN_DEFAULT)?(l(t,m.EXPANDED),t.style.maxHeight=t.scrollHeight+"px"):(E=t.scrollHeight,l(t,m.COLLAPSED))}),this}function i(){this.trigger(r.END_EVENT,{target:this}),a(t,m.EXPANDED)&&t.scrollHeight>E&&(t.style.maxHeight=t.scrollHeight+"px")}function f(){return a(t,m.COLLAPSED)?p():d(),this}function d(){return E=t.scrollHeight,t.style.maxHeight="0",l(t,m.COLLAPSED),c(t,m.EXPANDED),this}function p(){return t.style.maxHeight=E+"px",l(t,m.EXPANDED),c(t,m.COLLAPSED),this}var m=e||h,v=new r(t,m),E=void 0;return this.addEventListener=s.on,this.trigger=s.trigger,this.removeEventListener=s.off,this.animateOff=v.animateOff,this.animateOn=v.animateOn,this.halt=v.halt,this.isAnimated=v.isAnimated,this.setElement=v.setElement,this.remove=v.remove,this.init=n,this.toggleExpandable=f,this.collapse=d,this.expand=p,this}var s=n(1),r=n(10),o=n(2).bind,a=n(0).contains,l=n(0).addClass,c=n(0).removeClass,u=n(11).onReady,h={BASE_CLASS:"u-expandable-transition",EXPANDED:"u-expandable-expanded",COLLAPSED:"u-expandable-collapsed",OPEN_DEFAULT:"u-expandable-content__onload-open"};i.CLASSES=h,t.exports=i},function(t,e,n){"use strict";function i(t,e){function n(){return O=r(d,this),A=r(h,this),o(t),this}function o(t){y&&(m(),a()),y=t,y.classList.add(g.BASE_CLASS),L=E(y)}function a(){return y?(y.classList.remove(i.NO_ANIMATION_CLASS),this):this}function l(){return y?(y.classList.add(i.NO_ANIMATION_CLASS),this):this}function c(){return!!y&&!y.classList.contains(i.NO_ANIMATION_CLASS)}function u(){S&&(y.style.webkitTransitionDuration="0",y.style.mozTransitionDuration="0",y.style.oTransitionDuration="0",y.style.transitionDuration="0",y.removeEventListener(L,O),O(),y.style.webkitTransitionDuration="",y.style.mozTransitionDuration="",y.style.oTransitionDuration="",y.style.transitionDuration="")}function h(){S=!0,L?(y.addEventListener(L,O),this.trigger(i.BEGIN_EVENT,{target:this})):(this.trigger(i.BEGIN_EVENT,{target:this}),O())}function f(){y.removeEventListener(L,O)}function d(){f(),this.trigger(i.END_EVENT,{target:this}),S=!1}function p(){for(var t in g)g.hasOwnProperty(t)&&g[t]!==g.BASE_CLASS&&y.classList.contains(g[t])&&y.classList.remove(g[t])}function m(){return!!y&&(u(),y.classList.remove(g.BASE_CLASS),p(),!0)}function v(t){return!!y&&(N||(p(),N=!0),!y.classList.contains(t)&&(f(),y.classList.remove(b),b=t,A(),y.classList.add(b),!0))}function E(t){if(!t){throw new Error("Element does not have TransitionEnd event. It may be null!")}var e=void 0,n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in n)if(n.hasOwnProperty(i)&&void 0!==t.style[i]){e=n[i];break}return e}var g=e,y=void 0,b=void 0,L=void 0,O=void 0,A=void 0,S=!1,N=!1;return this.addEventListener=s.on,this.trigger=s.trigger,this.removeEventListener=s.off,this.animateOff=l,this.animateOn=a,this.applyClass=v,this.halt=u,this.init=n,this.isAnimated=c,this.remove=m,this.setElement=o,this}var s=n(1),r=n(2).bind;i.BEGIN_EVENT="transitionBegin",i.END_EVENT="transitionEnd",i.NO_ANIMATION_CLASS="u-no-animation",t.exports=i},function(t,e,n){"use strict";function i(t){return"function"!=typeof t?[]:("complete"===document.readyState?t():s.push(t),document.onreadystatechange=function(){if("complete"===document.readyState){for(var t=0,e=s.length;t<e;t++)s[t]();s.length=0}},s)}var s=[];t.exports={onReady:i}},function(t,e,n){"use strict";var i=n(13),s=n(18).TYPES,r=i.extend({TYPE:s.ORGANISM,CHILD_TYPES:[s.MOLECULE,s.ATOM]});t.exports=r},function(t,e,n){"use strict";function i(t,e){this.element=t,this.initializers=[],this.uId=this.uniqueId("ac"),s(this,e),this.processModifiers(),this.ensureElement(),this.setCachedElements(),this.initializers.push(this.initialize),this.initializers.forEach(function(t){c(t)&&t.apply(this,arguments)},this),this.trigger("component:initialized")}var s=n(14).assign,r=n(2).bind,o=n(0),a=n(15).Delegate,l=n(1),c=n(17).isFunction;s(i.prototype,l,o,{tagName:"div",processModifiers:function(){this.modifiers&&this.modifiers.forEach(function(t){o.contains(this.element,t.ui.base)&&(t.initialize&&(this.initializers.push(t.initialize),delete t.initialize),s(this,t))},this)},render:function(){return this},ensureElement:function(){if(this.element)this.setElement(this.element);else{var t=s({},this.attributes);t.id=this.id||this.u_id,this.className&&(t.class=this.className),this.setElement(document.createElement(this.tagName)),this.setElementAttributes(t)}this.element.setAttribute("data-bound",!0)},setElement:function(t){return this.element&&this.undelegateEvents(),this.element=t,this.delegateEvents(),this},setCachedElements:function(){var t,e,n=s({},this.ui);for(t in n)n.hasOwnProperty(t)&&(e=this.element.querySelectorAll(n[t]),1===e.length?n[t]=e[0]:e.length>1?n[t]=e:n[t]=null);return this.ui=n,n},destroy:function(){return this.element&&(this.element.parentNode.removeChild(this.element),this.element.view&&delete this.element.view,delete this.element),this.undelegateEvents(),this.trigger("component:destroyed"),!0},setElementAttributes:function(t){var e=void 0;for(e in t)t.hasOwnProperty(e)&&this.element.setAttribute(e,t[e])},delegateEvents:function(t){var e,n,i,s=/^(\S+)\s*(.*)$/;if(!(t=t||(t=this.events)))return this;this.undelegateEvents(),this._delegate=new a(this.element);for(e in t)n=t[e],c(this[n])&&(n=this[n]),n&&(i=e.match(s),this.delegate(i[1],i[2],r(n,this)));return this.trigger("component:bound"),this},delegate:function(t,e,n){return this._delegate.on(t,e,n),this},undelegateEvents:function(){return this._delegate&&this._delegate.destroy(),this.element.removeAttribute("data-bound"),this},uniqueId:function(t){return t+"_"+Math.random().toString(36).substr(2,9)}}),i.extend=function(t){function e(){return this._super=i.prototype,i.apply(this,arguments)}return e.prototype=Object.create(i.prototype),s(e.prototype,t),s(e,i),t.hasOwnProperty("ui")&&t.ui.hasOwnProperty("base")&&(e.selector=t.ui.base),e.constants={},e},i.init=function(){for(var t,e=document.querySelectorAll(this.selector),n=[],i=0;i<e.length;++i)t=e[i],!1===t.hasAttribute("data-bound")&&n.push(new this(t));return n},t.exports=i},function(t,e,n){"use strict";function i(t){return"[object Object]"===Object.prototype.toString.call(t)}function s(t){t=t||{};for(var e=1,n=arguments.length;e<n;e++){var r=arguments[e]||{};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o];i(a)?s(t[o]||(t[o]={}),a):t[o]=a}}return t}t.exports={assign:s}},function(t,e,n){"use strict";/**
2 * @preserve Create and manage a DOM event delegator.
3 *
4 * @version 0.3.0
5 * @codingstandard ftlabs-jsv2
6 * @copyright The Financial Times Limited [All Rights Reserved]
7 * @license MIT License (see LICENSE.txt)
8 */
9var i=n(16);t.exports=function(t){return new i(t)},t.exports.Delegate=i},function(t,e,n){"use strict";function i(t){this.listenerMap=[{},{}],t&&this.root(t),this.handle=i.prototype.handle.bind(this)}function s(t,e){return t.toLowerCase()===e.tagName.toLowerCase()}function r(t,e){return this.rootElement===window?e===document:this.rootElement===e}function o(t,e){return t===e.id}t.exports=i,i.prototype.root=function(t){var e,n=this.listenerMap;if(this.rootElement){for(e in n[1])n[1].hasOwnProperty(e)&&this.rootElement.removeEventListener(e,this.handle,!0);for(e in n[0])n[0].hasOwnProperty(e)&&this.rootElement.removeEventListener(e,this.handle,!1)}if(!t||!t.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=t;for(e in n[1])n[1].hasOwnProperty(e)&&this.rootElement.addEventListener(e,this.handle,!0);for(e in n[0])n[0].hasOwnProperty(e)&&this.rootElement.addEventListener(e,this.handle,!1);return this},i.prototype.captureForType=function(t){return-1!==["blur","error","focus","load","resize","scroll"].indexOf(t)},i.prototype.on=function(t,e,n,i){var l,c,u,h;if(!t)throw new TypeError("Invalid event type: "+t);if("function"==typeof e&&(i=n,n=e,e=null),void 0===i&&(i=this.captureForType(t)),"function"!=typeof n)throw new TypeError("Handler must be a type of Function");return l=this.rootElement,c=this.listenerMap[i?1:0],c[t]||(l&&l.addEventListener(t,this.handle,i),c[t]=[]),e?/^[a-z]+$/i.test(e)?(h=e,u=s):/^#[a-z0-9\-_]+$/i.test(e)?(h=e.slice(1),u=o):(h=e,u=a):(h=null,u=r.bind(this)),c[t].push({selector:e,handler:n,matcher:u,matcherParam:h}),this},i.prototype.off=function(t,e,n,i){var s,r,o,a,l;if("function"==typeof e&&(i=n,n=e,e=null),void 0===i)return this.off(t,e,n,!0),this.off(t,e,n,!1),this;if(o=this.listenerMap[i?1:0],!t){for(l in o)o.hasOwnProperty(l)&&this.off(l,e,n);return this}if(!(a=o[t])||!a.length)return this;for(s=a.length-1;s>=0;s--)r=a[s],e&&e!==r.selector||n&&n!==r.handler||a.splice(s,1);return a.length||(delete o[t],this.rootElement&&this.rootElement.removeEventListener(t,this.handle,i)),this},i.prototype.handle=function(t){var e,n,i,s,r,o,a=t.type,l=[];if(!0!==t.ftLabsDelegateIgnore){switch(o=t.target,3===o.nodeType&&(o=o.parentNode),i=this.rootElement,t.eventPhase||(t.target!==t.currentTarget?3:2)){case 1:l=this.listenerMap[1][a];break;case 2:this.listenerMap[0]&&this.listenerMap[0][a]&&(l=l.concat(this.listenerMap[0][a])),this.listenerMap[1]&&this.listenerMap[1][a]&&(l=l.concat(this.listenerMap[1][a]));break;case 3:l=this.listenerMap[0][a]}for(n=l.length;o&&n;){for(e=0;e<n&&(s=l[e]);e++)if(s.matcher.call(o,s.matcherParam,o)&&(r=this.fire(t,o,s)),!1===r)return t.ftLabsDelegateIgnore=!0,void t.preventDefault();if(o===i)break;n=l.length,o=o.parentElement}}},i.prototype.fire=function(t,e,n){return n.handler.call(e,t,e)};var a=function(t){if(t){var e=t.prototype;return e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector}}(Element);i.prototype.destroy=function(){this.off(),this.root()}},function(t,e,n){"use strict";function i(t){return void 0===t}function s(t){return void 0!==t}function r(t){return null!==t&&"object"===(void 0===t?"undefined":h(t))}function o(t){return"[object String]"===f.call(t)}function a(t){return"[object Number]"===f.call(t)}function l(t){return"[object Date]"===f.call(t)}function c(t){return"[object Function]"===f.call(t)}function u(t){return i(t)||null===t||o(t)&&t.length<=0||/^\s*$/.test(t)}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=Object.prototype.toString,d=Array.isArray||function(t){return"[object Array]"===f.call(t)};t.exports={isUndefined:i,isDefined:s,isObject:r,isString:o,isNumber:a,isDate:l,isArray:d,isFunction:c,isEmpty:u}},function(t,e,n){"use strict";function i(){}var s={UP:0,RIGHT:1,DOWN:-1,LEFT:-2},r={PAGE:1,TEMPLATE:2,ORGANISM:3,MOLECULE:4,ATOM:5},o={PAGE:"p-",TEMPLATE:"t-",ORGANISM:"o-",MOLECULE:"m-",ATOM:"a-"};t.exports={DIRECTIONS:s,NO_OP_FUNCTION:i,PREFIXES:o,TYPES:r,UNDEFINED:void 0}},function(t,e,n){"use strict";/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
10"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))?function(){var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():function(t){if("Element"in t){var e=t.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array.prototype.indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},o=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},a=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],s=0,r=n.length;s<r;s++)this.push(n[s]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},l=a.prototype=[],c=function(){return new a(this)};if(r.prototype=Error.prototype,l.item=function(t){return this[t]||null},l.contains=function(t){return t+="",-1!==o(this,t)},l.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",-1===o(this,t)&&(this.push(t),s=!0)}while(++n<i);s&&this._updateClassName()},l.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do{for(t=n[i]+"",e=o(this,t);-1!==e;)this.splice(e,1),r=!0,e=o(this,t)}while(++i<s);r&&this._updateClassName()},l.toggle=function(t,e){t+="";var n=this.contains(t),i=n?!0!==e&&"remove":!1!==e&&"add";return i&&this[i](t),!0===e||!1===e?e:!n},l.toString=function(){return this.join(" ")},n.defineProperty){var u={get:c,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",u)}catch(t){-2146823252===t.number&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",c)}}(window.self))},function(t,e,n){"use strict";var i=n(3),s=n(21),r=n(30),o=n(31),a=s.extend({ui:{base:".o-table"},modifiers:[r,o]});a.constants.DIRECTIONS=i.DIRECTIONS,a.init(),t.exports=a},function(t,e,n){"use strict";var i=n(22),s=n(3).TYPES,r=i.extend({TYPE:s.ORGANISM,CHILD_TYPES:[s.MOLECULE,s.ATOM]});t.exports=r},function(t,e,n){"use strict";function i(t,e){this.element=t,this.initializers=[],this.uId=this.uniqueId("ac"),s(this,e),this.processModifiers(),this.ensureElement(),this.setCachedElements(),this.initializers.push(this.initialize),this.initializers.forEach(function(t){c(t)&&t.apply(this,arguments)},this),this.trigger("component:initialized")}var s=n(23).assign,r=n(24).bind,o=n(25),a=n(26).Delegate,l=n(28),c=n(29).isFunction;s(i.prototype,l,o,{tagName:"div",processModifiers:function(){this.modifiers&&this.modifiers.forEach(function(t){o.contains(this.element,t.ui.base)&&(t.initialize&&(this.initializers.push(t.initialize),delete t.initialize),s(this,t))},this)},render:function(){return this},ensureElement:function(){if(this.element)this.setElement(this.element);else{var t=s({},this.attributes);t.id=this.id||this.u_id,this.className&&(t.class=this.className),this.setElement(document.createElement(this.tagName)),this.setElementAttributes(t)}this.element.setAttribute("data-bound",!0)},setElement:function(t){return this.element&&this.undelegateEvents(),this.element=t,this.delegateEvents(),this},setCachedElements:function(){var t,e,n=s({},this.ui);for(t in n)n.hasOwnProperty(t)&&(e=this.element.querySelectorAll(n[t]),1===e.length?n[t]=e[0]:e.length>1?n[t]=e:n[t]=null);return this.ui=n,n},destroy:function(){return this.element&&(this.element.parentNode.removeChild(this.element),this.element.view&&delete this.element.view,delete this.element),this.undelegateEvents(),this.trigger("component:destroyed"),!0},setElementAttributes:function(t){var e=void 0;for(e in t)t.hasOwnProperty(e)&&this.element.setAttribute(e,t[e])},delegateEvents:function(t){var e,n,i,s=/^(\S+)\s*(.*)$/;if(!(t=t||(t=this.events)))return this;this.undelegateEvents(),this._delegate=new a(this.element);for(e in t)n=t[e],c(this[n])&&(n=this[n]),n&&(i=e.match(s),this.delegate(i[1],i[2],r(n,this)));return this.trigger("component:bound"),this},delegate:function(t,e,n){return this._delegate.on(t,e,n),this},undelegateEvents:function(){return this._delegate&&this._delegate.destroy(),this.element.removeAttribute("data-bound"),this},uniqueId:function(t){return t+"_"+Math.random().toString(36).substr(2,9)}}),i.extend=function(t){function e(){return this._super=i.prototype,i.apply(this,arguments)}return e.prototype=Object.create(i.prototype),s(e.prototype,t),s(e,i),t.hasOwnProperty("ui")&&t.ui.hasOwnProperty("base")&&(e.selector=t.ui.base),e.constants={},e},i.init=function(){for(var t,e=document.querySelectorAll(this.selector),n=[],i=0;i<e.length;++i)t=e[i],!1===t.hasAttribute("data-bound")&&n.push(new this(t));return n},t.exports=i},function(t,e,n){"use strict";function i(t){return"[object Object]"===Object.prototype.toString.call(t)}function s(t){t=t||{};for(var e=1,n=arguments.length;e<n;e++){var r=arguments[e]||{};for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)){var a=r[o];i(a)?s(t[o]||(t[o]={}),a):t[o]=a}}return t}t.exports={assign:s}},function(t,e,n){"use strict";function i(t,e){return Function.prototype.bind?t.bind.apply(t,Array.prototype.slice.call(arguments,1)):function(){return t.apply(e,arguments)}}t.exports={bind:i}},function(t,e,n){"use strict";function i(t){return Array.prototype.slice.call(t,1)}function s(t){var e=i(arguments);if(l)t.classList.add.apply(t.classList,e);else{var n=t.className.split(" ");e.forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),t.className=n.join(" ")}return t}function r(t,e){return e=e.replace(".",""),l?t.classList.contains(e):t.className.indexOf(e)>-1}function o(t){var e=i(arguments);if(l)t.classList.remove.apply(t.classList,e);else{var n=t.className.split(" ");e.forEach(function(t){t&&n.splice(n.indexOf(t),1)}),t.className=n.join(" ")}}function a(t,e,n){var i=!1;return l?i=t.classList.toggle(e):!1===n||r(t,e)?o(t,n):(s(t,e),i=!0),i}var l="classList"in document.createElement("_");t.exports={addClass:s,contains:r,hasClassList:l,removeClass:o,toggleClass:a}},function(t,e,n){"use strict";/**
11 * @preserve Create and manage a DOM event delegator.
12 *
13 * @version 0.3.0
14 * @codingstandard ftlabs-jsv2
15 * @copyright The Financial Times Limited [All Rights Reserved]
16 * @license MIT License (see LICENSE.txt)
17 */
18var i=n(27);t.exports=function(t){return new i(t)},t.exports.Delegate=i},function(t,e,n){"use strict";function i(t){this.listenerMap=[{},{}],t&&this.root(t),this.handle=i.prototype.handle.bind(this)}function s(t,e){return t.toLowerCase()===e.tagName.toLowerCase()}function r(t,e){return this.rootElement===window?e===document:this.rootElement===e}function o(t,e){return t===e.id}t.exports=i,i.prototype.root=function(t){var e,n=this.listenerMap;if(this.rootElement){for(e in n[1])n[1].hasOwnProperty(e)&&this.rootElement.removeEventListener(e,this.handle,!0);for(e in n[0])n[0].hasOwnProperty(e)&&this.rootElement.removeEventListener(e,this.handle,!1)}if(!t||!t.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=t;for(e in n[1])n[1].hasOwnProperty(e)&&this.rootElement.addEventListener(e,this.handle,!0);for(e in n[0])n[0].hasOwnProperty(e)&&this.rootElement.addEventListener(e,this.handle,!1);return this},i.prototype.captureForType=function(t){return-1!==["blur","error","focus","load","resize","scroll"].indexOf(t)},i.prototype.on=function(t,e,n,i){var l,c,u,h;if(!t)throw new TypeError("Invalid event type: "+t);if("function"==typeof e&&(i=n,n=e,e=null),void 0===i&&(i=this.captureForType(t)),"function"!=typeof n)throw new TypeError("Handler must be a type of Function");return l=this.rootElement,c=this.listenerMap[i?1:0],c[t]||(l&&l.addEventListener(t,this.handle,i),c[t]=[]),e?/^[a-z]+$/i.test(e)?(h=e,u=s):/^#[a-z0-9\-_]+$/i.test(e)?(h=e.slice(1),u=o):(h=e,u=a):(h=null,u=r.bind(this)),c[t].push({selector:e,handler:n,matcher:u,matcherParam:h}),this},i.prototype.off=function(t,e,n,i){var s,r,o,a,l;if("function"==typeof e&&(i=n,n=e,e=null),void 0===i)return this.off(t,e,n,!0),this.off(t,e,n,!1),this;if(o=this.listenerMap[i?1:0],!t){for(l in o)o.hasOwnProperty(l)&&this.off(l,e,n);return this}if(!(a=o[t])||!a.length)return this;for(s=a.length-1;s>=0;s--)r=a[s],e&&e!==r.selector||n&&n!==r.handler||a.splice(s,1);return a.length||(delete o[t],this.rootElement&&this.rootElement.removeEventListener(t,this.handle,i)),this},i.prototype.handle=function(t){var e,n,i,s,r,o,a=t.type,l=[];if(!0!==t.ftLabsDelegateIgnore){switch(o=t.target,3===o.nodeType&&(o=o.parentNode),i=this.rootElement,t.eventPhase||(t.target!==t.currentTarget?3:2)){case 1:l=this.listenerMap[1][a];break;case 2:this.listenerMap[0]&&this.listenerMap[0][a]&&(l=l.concat(this.listenerMap[0][a])),this.listenerMap[1]&&this.listenerMap[1][a]&&(l=l.concat(this.listenerMap[1][a]));break;case 3:l=this.listenerMap[0][a]}for(n=l.length;o&&n;){for(e=0;e<n&&(s=l[e]);e++)if(s.matcher.call(o,s.matcherParam,o)&&(r=this.fire(t,o,s)),!1===r)return t.ftLabsDelegateIgnore=!0,void t.preventDefault();if(o===i)break;n=l.length,o=o.parentElement}}},i.prototype.fire=function(t,e,n){return n.handler.call(e,t,e)};var a=function(t){if(t){var e=t.prototype;return e.matches||e.matchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector}}(Element);i.prototype.destroy=function(){this.off(),this.root()}},function(t,e,n){"use strict";var i={on:function(t,e){var n=this.events=this.events||{};return n[t]=this.events[t]||[],n[t].push(e),this},off:function(t){return this.events&&this.events[t]&&delete this.events[t],this},trigger:function(t){var e=this.events||{};if(!1===e.hasOwnProperty(t))return this;for(var n=0,i=e[t].length;n<i;n++)this.events[t][n].apply(this,arguments);return this}};t.exports=i},function(t,e,n){"use strict";function i(t){return void 0===t}function s(t){return void 0!==t}function r(t){return null!==t&&"object"===(void 0===t?"undefined":h(t))}function o(t){return"[object String]"===f.call(t)}function a(t){return"[object Number]"===f.call(t)}function l(t){return"[object Date]"===f.call(t)}function c(t){return"[object Function]"===f.call(t)}function u(t){return i(t)||null===t||o(t)&&t.length<=0||/^\s*$/.test(t)}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f=Object.prototype.toString,d=Array.isArray||function(t){return"[object Array]"===f.call(t)};t.exports={isUndefined:i,isDefined:s,isObject:r,isString:o,isNumber:a,isDate:l,isArray:d,isFunction:c,isEmpty:u}},function(t,e,n){"use strict";var i=n(3),s=n(4).closest,r=i.DIRECTIONS,o=i.UNDEFINED,a={classes:{sortDown:"sorted-down",sortUp:"sorted-up"},events:{"click .sortable":"onSortableClick"},ui:{base:".o-table__sortable",tableBody:"tbody",sortButton:".sorted-up, .sorted-down"},initialize:function(){this.sortClass=o,this.sortColumnIndex=o,this.sortDirection=o,this.tableData=[],this.bindProperties(),this.ui.sortButton&&(this.sortColumnIndex=this.getColumnIndex(),this.sortDirection=this.contains(this.ui.sortButton,this.classes.sortDown)?r.DOWN:r.UP,this.updateTable())},bindProperties:function(){var t;Object.defineProperty(this,"sortDirection",{configurable:!0,get:function(){return t},set:function(e){e===r.UP?this.sortClass=this.classes.sortUp:e===r.DOWN&&(this.sortClass=this.classes.sortDown),t=e}})},getColumnIndex:function(t){return s(t||this.ui.sortButton,"td, th").cellIndex},updateTable:function(){return this.updateTableData()&&this.updateTableDom()},updateTableData:function(t){var e,n,i=this.ui.tableBody.querySelectorAll("tr");this.tableData=[],t=t||this.sortColumnIndex;for(var s=0,r=i.length;s<r;++s)e=i[s].cells[t],e&&(e=e.textContent.trim()),this.tableData.push([e,i[s]]);return n=this.ui.sortButton.getAttribute("data-sort_type"),this.tableData.sort(this.tableDataSorter(this.sortDirection,n)),this.tableData},updateTableDom:function(){for(var t,e=this.ui.tableBody;e.lastChild;)e.removeChild(e.lastChild);t=document.createDocumentFragment();for(var n=0;n<this.tableData.length;n++)t.appendChild(this.tableData[n][1]);return e.appendChild(t),this.trigger("table:updated"),e},tableDataSorter:function(t,e){return function(n,i){var s=1,o=0,a=/[^\d.-]/g;return n=n[0],i=i[0],"number"===e&&(n=Number(n.replace(a,"")),i=Number(i.replace(a,""))),t===r.DOWN&&(s=-1),n<i?o=-1*s:n>i&&(o=s),o}},onSortableClick:function(t){return this.ui.sortButton&&this.removeClass(this.ui.sortButton,this.sortClass),this.ui.sortButton===t.target?this.sortDirection=~this.sortDirection:(this.ui.sortButton=t.target,this.sortColumnIndex=this.getColumnIndex(),this.sortDirection=r.UP),this.addClass(this.ui.sortButton,this.sortClass),this.updateTable(),this}};t.exports=a},function(t,e,n){"use strict";var i=n(4).closest,s={events:{"click tbody tr":"onRowLinkClick"},ui:{base:".o-table__row-links"},onRowLinkClick:function(t){var e=t.target;if(!e||"A"!==e.tagName){e=i(t.target,"tr");var n=e.querySelector("a");n&&(window.location=n.getAttribute("href"))}}};t.exports=s}]);
\No newline at end of file