/*
 * custom-elements-builder 0.1.1 http://tmorin.github.io/custom-elements-builder
 * Custom Elements Builder (ceb) is ... a builder for Custom Elements.
 * Buil date: 2015-02-01
 * Copyright 2015-2015 Thibault Morin
 * Available under MIT license
 */

!function(a,b,c,d){"use strict";function e(a,b){for(var c=0,d=a.length;d>c;c++)n(a[c],b)}function f(a){for(var b,c=0,d=a.length;d>c;c++)b=a[c],t(b,D[h(b)])}function g(a){return function(b){J.call(T,b)&&(n(b,a),e(b.querySelectorAll(E),a))}}function h(a){var b=a.getAttribute("is"),c=a.nodeName,d=G.call(C,b?z+b.toUpperCase():y+c);return b&&d>-1&&!i(c,b)?-1:d}function i(a,b){return-1<E.indexOf(a+'[is="'+b+'"]')}function j(a){var b=a.currentTarget,c=a.attrChange,d=a.prevValue,e=a.newValue;b.attributeChangedCallback&&"style"!==a.attrName&&b.attributeChangedCallback(a.attrName,c===a.ADDITION?null:d,c===a.REMOVAL?null:e)}function k(a){var b=g(a);return function(a){b(a.target)}}function l(a,b){var c=this;V.call(c,a,b),o.call(c,{target:c})}function m(a,b){R(a,b),r?r.observe(a,X):($&&(a.setAttribute=l,a[u]=q(a),a.addEventListener(x,o)),a.addEventListener(w,j)),a.createdCallback&&(a.created=!0,a.createdCallback(),a.created=!1)}function n(a,b){var c,d=h(a),e="attached",f="detached";d>-1&&(s(a,D[d]),d=0,b!==e||a[e]?b!==f||a[f]||(a[e]=!1,a[f]=!0,d=1):(a[f]=!1,a[e]=!0,d=1),d&&(c=a[b+"Callback"])&&c.call(a))}if(!(d in b)){var o,p,q,r,s,t,u="__"+d+(1e5*Math.random()>>0),v="extends",w="DOMAttrModified",x="DOMSubtreeModified",y="<",z="=",A=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,B=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],C=[],D=[],E="",F=b.documentElement,G=C.indexOf||function(a){for(var b=this.length;b--&&this[b]!==a;);return b},H=c.prototype,I=H.hasOwnProperty,J=H.isPrototypeOf,K=c.defineProperty,L=c.getOwnPropertyDescriptor,M=c.getOwnPropertyNames,N=c.getPrototypeOf,O=c.setPrototypeOf,P=!!c.__proto__,Q=c.create||function _(a){return a?(_.prototype=a,new _):this},R=O||(P?function(a,b){return a.__proto__=b,a}:M&&L?function(){function a(a,b){for(var c,d=M(b),e=0,f=d.length;f>e;e++)c=d[e],I.call(a,c)||K(a,c,L(b,c))}return function(b,c){do a(b,c);while(c=N(c));return b}}():function(a,b){for(var c in b)a[c]=b[c];return a}),S=a.MutationObserver||a.WebKitMutationObserver,T=(a.HTMLElement||a.Element||a.Node).prototype,U=T.cloneNode,V=T.setAttribute,W=b.createElement,X=S&&{attributes:!0,characterData:!0,attributeOldValue:!0},Y=S||function(){$=!1,F.removeEventListener(w,Y)},Z=!1,$=!0;O||P?(s=function(a,b){J.call(b,a)||m(a,b)},t=m):(s=function(a,b){a[u]||(a[u]=c(!0),m(a,b))},t=s),S||(F.addEventListener(w,Y),F.setAttribute(u,1),F.removeAttribute(u),$&&(o=function(a){var b,c,d,e=this;if(e===a.target){b=e[u],e[u]=c=q(e);for(d in c){if(!(d in b))return p(0,e,d,b[d],c[d],"ADDITION");if(c[d]!==b[d])return p(1,e,d,b[d],c[d],"MODIFICATION")}for(d in b)if(!(d in c))return p(2,e,d,b[d],c[d],"REMOVAL")}},p=function(a,b,c,d,e,f){var g={attrChange:a,currentTarget:b,attrName:c,prevValue:d,newValue:e};g[f]=a,j(g)},q=function(a){for(var b,c,d={},e=a.attributes,f=0,g=e.length;g>f;f++)b=e[f],c=b.name,"setAttribute"!==c&&(d[c]=b.value);return d})),b[d]=function(a,c){if(d=a.toUpperCase(),Z||(Z=!0,S?(r=function(a,b){function c(a,b){for(var c=0,d=a.length;d>c;b(a[c++]));}return new S(function(d){for(var e,f,g=0,h=d.length;h>g;g++)e=d[g],"childList"===e.type?(c(e.addedNodes,a),c(e.removedNodes,b)):(f=e.target,f.attributeChangedCallback&&"style"!==e.attributeName&&f.attributeChangedCallback(e.attributeName,e.oldValue,f.getAttribute(e.attributeName)))})}(g("attached"),g("detached")),r.observe(b,{childList:!0,subtree:!0})):(b.addEventListener("DOMNodeInserted",k("attached")),b.addEventListener("DOMNodeRemoved",k("detached"))),b.addEventListener("readystatechange",function(){e(b.querySelectorAll(E),"attached")}),b.createElement=function(a,c){var d=W.apply(b,arguments),e=G.call(C,(c?z:y)+(c||a).toUpperCase()),f=e>-1;return c&&(d.setAttribute("is",c=c.toLowerCase()),f&&(f=i(a.toUpperCase(),c))),f&&t(d,D[e]),d},T.cloneNode=function(a){var b=U.call(this,!!a),c=h(b);return c>-1&&t(b,D[c]),a&&f(b.querySelectorAll(E)),b}),-2<G.call(C,z+d)+G.call(C,y+d))throw new Error("A "+a+" type is already registered");if(!A.test(d)||-1<G.call(B,d))throw new Error("The type "+a+" is invalid");var d,j=function(){return b.createElement(n,m&&d)},l=c||H,m=I.call(l,v),n=m?c[v].toUpperCase():d,o=C.push((m?z:y)+d)-1;return E=E.concat(E.length?",":"",m?n+'[is="'+a.toLowerCase()+'"]':n),j.prototype=D[o]=I.call(l,"prototype")?l.prototype:Q(T),e(b.querySelectorAll(E),"attached"),j}}}(window,document,Object,"registerElement"),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){"use strict";var a,b=function(a){try{a()}catch(b){return!1}return!0},c=function(a,b){try{var c=function(){a.apply(this,arguments)};return c.__proto__?(Object.setPrototypeOf(c,a),c.prototype=Object.create(a.prototype,{constructor:{value:a}}),b(c)):!1}catch(d){return!1}},d=function(){try{return Object.defineProperty({},"x",{}),!0}catch(a){return!1}},e=function(){var a=!1;if(String.prototype.startsWith)try{"/a/".startsWith(/a/)}catch(b){a=!0}return a},f=new Function("return this;"),g=f(),h=g.isFinite,i=!!Object.defineProperty&&d(),j=e(),k=Function.call.bind(String.prototype.indexOf),l=Function.call.bind(Object.prototype.toString),m=Function.call.bind(Object.prototype.hasOwnProperty),n=function(){},o=g.Symbol||{},p=o.species||"@@species",q={string:function(a){return"[object String]"===l(a)},regex:function(a){return"[object RegExp]"===l(a)},symbol:function(a){return"function"==typeof g.Symbol&&"symbol"==typeof a}},r=function(a,b,c,d){!d&&b in a||(i?Object.defineProperty(a,b,{configurable:!0,enumerable:!1,writable:!0,value:c}):a[b]=c)},s={getter:function(a,b,c){if(!i)throw new TypeError("getters require true ES5 support");Object.defineProperty(a,b,{configurable:!0,enumerable:!1,get:c})},proxy:function(a,b,c){if(!i)throw new TypeError("getters require true ES5 support");var d=Object.getOwnPropertyDescriptor(a,b);Object.defineProperty(c,b,{configurable:d.configurable,enumerable:d.enumerable,get:function(){return a[b]},set:function(c){a[b]=c}})},redefine:function(a,b,c){if(i){var d=Object.getOwnPropertyDescriptor(a,b);d.value=c,Object.defineProperty(a,b,d)}else a[b]=c}},t=function(a,b){Object.keys(b).forEach(function(c){var d=b[c];r(a,c,d,!1)})},u=Object.create||function(a,b){function c(){}c.prototype=a;var d=new c;return"undefined"!=typeof b&&t(d,b),d},v=q.symbol(o.iterator)?o.iterator:"_es6-shim iterator_";g.Set&&"function"==typeof(new g.Set)["@@iterator"]&&(v="@@iterator");var w=function(a,b){b||(b=function(){return this});var c={};c[v]=b,t(a,c),!a[v]&&q.symbol(v)&&(a[v]=b)},x=function(a){var b=l(a),c="[object Arguments]"===b;return c||(c="[object Array]"!==b&&null!==a&&"object"==typeof a&&"number"==typeof a.length&&a.length>=0&&"[object Function]"===l(a.callee)),c},y={RequireObjectCoercible:function(a,b){if(null==a)throw new TypeError(b||"Cannot call method on "+a)},TypeIsObject:function(a){return null!=a&&Object(a)===a},ToObject:function(a,b){return y.RequireObjectCoercible(a,b),Object(a)},IsCallable:function(a){return"function"==typeof a&&"[object Function]"===l(a)},ToInt32:function(a){return y.ToNumber(a)>>0},ToUint32:function(a){return y.ToNumber(a)>>>0},ToNumber:function(a){if("[object Symbol]"===l(a))throw new TypeError("Cannot convert a Symbol value to a number");return+a},ToInteger:function(a){var b=y.ToNumber(a);return Number.isNaN(b)?0:0!==b&&Number.isFinite(b)?(b>0?1:-1)*Math.floor(Math.abs(b)):b},ToLength:function(a){var b=y.ToInteger(a);return 0>=b?0:b>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:b},SameValue:function(a,b){return a===b?0===a?1/a===1/b:!0:Number.isNaN(a)&&Number.isNaN(b)},SameValueZero:function(a,b){return a===b||Number.isNaN(a)&&Number.isNaN(b)},IsIterable:function(a){return y.TypeIsObject(a)&&("undefined"!=typeof a[v]||x(a))},GetIterator:function(b){if(x(b))return new a(b,"value");var c=b[v];if(!y.IsCallable(c))throw new TypeError("value is not an iterable");var d=c.call(b);if(!y.TypeIsObject(d))throw new TypeError("bad iterator");return d},IteratorNext:function(a){var b=arguments.length>1?a.next(arguments[1]):a.next();if(!y.TypeIsObject(b))throw new TypeError("bad iterator");return b},Construct:function(a,b){var c;c=y.IsCallable(a[p])?a[p]():u(a.prototype||null),t(c,{_es6construct:!0});var d=a.apply(c,b);return y.TypeIsObject(d)?d:c}},z=function(a){if(!y.TypeIsObject(a))throw new TypeError("bad object");return a._es6construct||(a.constructor&&y.IsCallable(a.constructor[p])&&(a=a.constructor[p](a)),t(a,{_es6construct:!0})),a},A=function(){function a(a){var b=Math.floor(a),c=a-b;return.5>c?b:c>.5?b+1:b%2?b+1:b}function b(b,c,d){var e,f,g,h,i,j,k,l=(1<<c-1)-1;for(b!==b?(f=(1<<c)-1,g=Math.pow(2,d-1),e=0):1/0===b||b===-1/0?(f=(1<<c)-1,g=0,e=0>b?1:0):0===b?(f=0,g=0,e=1/b===-1/0?1:0):(e=0>b,b=Math.abs(b),b>=Math.pow(2,1-l)?(f=Math.min(Math.floor(Math.log(b)/Math.LN2),1023),g=a(b/Math.pow(2,f)*Math.pow(2,d)),g/Math.pow(2,d)>=2&&(f+=1,g=1),f>l?(f=(1<<c)-1,g=0):(f+=l,g-=Math.pow(2,d))):(f=0,g=a(b/Math.pow(2,1-l-d)))),i=[],h=d;h;h-=1)i.push(g%2?1:0),g=Math.floor(g/2);for(h=c;h;h-=1)i.push(f%2?1:0),f=Math.floor(f/2);for(i.push(e?1:0),i.reverse(),j=i.join(""),k=[];j.length;)k.push(parseInt(j.slice(0,8),2)),j=j.slice(8);return k}function c(a,b,c){var d,e,f,g,h,i,j,k,l=[];for(d=a.length;d;d-=1)for(f=a[d-1],e=8;e;e-=1)l.push(f%2?1:0),f>>=1;return l.reverse(),g=l.join(""),h=(1<<b-1)-1,i=parseInt(g.slice(0,1),2)?-1:1,j=parseInt(g.slice(1,1+b),2),k=parseInt(g.slice(1+b),2),j===(1<<b)-1?0!==k?0/0:1/0*i:j>0?i*Math.pow(2,j-h)*(1+k/Math.pow(2,c)):0!==k?i*Math.pow(2,-(h-1))*(k/Math.pow(2,c)):0>i?-0:0}function d(a){return c(a,8,23)}function e(a){return b(a,8,23)}var f={toFloat32:function(a){return d(e(a))}};if("undefined"!=typeof Float32Array){var g=new Float32Array(1);f.toFloat32=function(a){return g[0]=a,g[0]}}return f}();if(t(String,{fromCodePoint:function(){for(var a,b=[],c=0,d=arguments.length;d>c;c++){if(a=Number(arguments[c]),!y.SameValue(a,y.ToInteger(a))||0>a||a>1114111)throw new RangeError("Invalid code point "+a);65536>a?b.push(String.fromCharCode(a)):(a-=65536,b.push(String.fromCharCode((a>>10)+55296)),b.push(String.fromCharCode(a%1024+56320)))}return b.join("")},raw:function(a){var b=y.ToObject(a,"bad callSite"),c=b.raw,d=y.ToObject(c,"bad raw value"),e=d.length,f=y.ToLength(e);if(0>=f)return"";for(var g,h,i,j,k=[],l=0;f>l&&(g=String(l),h=d[g],i=String(h),k.push(i),!(l+1>=f));)h=l+1<arguments.length?arguments[l+1]:"",j=String(h),k.push(j),l++;return k.join("")}}),1!==String.fromCodePoint.length){var B=Function.apply.bind(String.fromCodePoint);r(String,"fromCodePoint",function(){return B(this,arguments)},!0)}var C={repeat:function(){var a=function(b,c){if(1>c)return"";if(c%2)return a(b,c-1)+b;var d=a(b,c/2);return d+d};return function(b){y.RequireObjectCoercible(this);var c=String(this);if(b=y.ToInteger(b),0>b||1/0===b)throw new RangeError("Invalid String#repeat value");return a(c,b)}}(),startsWith:function(a){y.RequireObjectCoercible(this);var b=String(this);if(q.regex(a))throw new TypeError('Cannot call method "startsWith" with a regex');a=String(a);var c=arguments.length>1?arguments[1]:void 0,d=Math.max(y.ToInteger(c),0);return b.slice(d,d+a.length)===a},endsWith:function(a){y.RequireObjectCoercible(this);var b=String(this);if(q.regex(a))throw new TypeError('Cannot call method "endsWith" with a regex');a=String(a);var c=b.length,d=arguments.length>1?arguments[1]:void 0,e="undefined"==typeof d?c:y.ToInteger(d),f=Math.min(Math.max(e,0),c);return b.slice(f-a.length,f)===a},includes:function(a){var b=arguments.length>1?arguments[1]:void 0;return-1!==k(this,a,b)},codePointAt:function(a){y.RequireObjectCoercible(this);var b=String(this),c=y.ToInteger(a),d=b.length;if(c>=0&&d>c){var e=b.charCodeAt(c),f=c+1===d;if(55296>e||e>56319||f)return e;var g=b.charCodeAt(c+1);return 56320>g||g>57343?e:1024*(e-55296)+(g-56320)+65536}}};t(String.prototype,C);var D=1!=="".trim().length;if(D){delete String.prototype.trim;var E=["	\n\f\r   ᠎    ","         　\u2028","\u2029﻿"].join(""),F=new RegExp("(^["+E+"]+)|(["+E+"]+$)","g");t(String.prototype,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(F,"")}})}var G=function(a){y.RequireObjectCoercible(a),this._s=String(a),this._i=0};G.prototype.next=function(){var a=this._s,b=this._i;if("undefined"==typeof a||b>=a.length)return this._s=void 0,{value:void 0,done:!0};var c,d,e=a.charCodeAt(b);return 55296>e||e>56319||b+1===a.length?d=1:(c=a.charCodeAt(b+1),d=56320>c||c>57343?1:2),this._i=b+d,{value:a.substr(b,d),done:!1}},w(G.prototype),w(String.prototype,function(){return new G(this)}),j||t(String.prototype,{startsWith:C.startsWith,endsWith:C.endsWith});var H={from:function(a){var b=arguments.length>1?arguments[1]:void 0,c=y.ToObject(a,"bad iterable");if("undefined"!=typeof b&&!y.IsCallable(b))throw new TypeError("Array.from: when provided, the second argument must be a function");var d,e,f,g,h=arguments.length>2,i=h?arguments[2]:void 0,j=y.IsIterable(c);if(j){f=0,e=y.IsCallable(this)?Object(new this):[];var k,l=j?y.GetIterator(c):null;do k=y.IteratorNext(l),k.done||(g=k.value,e[f]=b?h?b.call(i,g,f):b(g,f):g,f+=1);while(!k.done);d=f}else for(d=y.ToLength(c.length),e=y.IsCallable(this)?Object(new this(d)):new Array(d),f=0;d>f;++f)g=c[f],e[f]=b?h?b.call(i,g,f):b(g,f):g;return e.length=d,e},of:function(){return Array.from(arguments)}};t(Array,H);var I=function(){try{return 0===Array.from({length:-1}).length}catch(a){return!1}};I()||r(Array,"from",H.from,!0),a=function(a,b){this.i=0,this.array=a,this.kind=b},t(a.prototype,{next:function(){var b=this.i,c=this.array;if(!(this instanceof a))throw new TypeError("Not an ArrayIterator");if("undefined"!=typeof c)for(var d=y.ToLength(c.length);d>b;b++){var e,f=this.kind;return"key"===f?e=b:"value"===f?e=c[b]:"entry"===f&&(e=[b,c[b]]),this.i=b+1,{value:e,done:!1}}return this.array=void 0,{value:void 0,done:!0}}}),w(a.prototype);var J={copyWithin:function(a,b){var c=arguments[2],d=y.ToObject(this),e=y.ToLength(d.length);a=y.ToInteger(a),b=y.ToInteger(b);var f=0>a?Math.max(e+a,0):Math.min(a,e),g=0>b?Math.max(e+b,0):Math.min(b,e);c="undefined"==typeof c?e:y.ToInteger(c);var h=0>c?Math.max(e+c,0):Math.min(c,e),i=Math.min(h-g,e-f),j=1;for(f>g&&g+i>f&&(j=-1,g+=i-1,f+=i-1);i>0;)m(d,g)?d[f]=d[g]:delete d[g],g+=j,f+=j,i-=1;return d},fill:function(a){var b=arguments.length>1?arguments[1]:void 0,c=arguments.length>2?arguments[2]:void 0,d=y.ToObject(this),e=y.ToLength(d.length);b=y.ToInteger("undefined"==typeof b?0:b),c=y.ToInteger("undefined"==typeof c?e:c);for(var f=0>b?Math.max(e+b,0):Math.min(b,e),g=0>c?e+c:c,h=f;e>h&&g>h;++h)d[h]=a;return d},find:function(a){var b=y.ToObject(this),c=y.ToLength(b.length);if(!y.IsCallable(a))throw new TypeError("Array#find: predicate must be a function");for(var d,e=arguments.length>1?arguments[1]:null,f=0;c>f;f++)if(d=b[f],e){if(a.call(e,d,f,b))return d}else if(a(d,f,b))return d},findIndex:function(a){var b=y.ToObject(this),c=y.ToLength(b.length);if(!y.IsCallable(a))throw new TypeError("Array#findIndex: predicate must be a function");for(var d=arguments.length>1?arguments[1]:null,e=0;c>e;e++)if(d){if(a.call(d,b[e],e,b))return e}else if(a(b[e],e,b))return e;return-1},keys:function(){return new a(this,"key")},values:function(){return new a(this,"value")},entries:function(){return new a(this,"entry")}};Array.prototype.keys&&!y.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!y.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[v]&&(t(Array.prototype,{values:Array.prototype[v]}),q.symbol(o.unscopables)&&(Array.prototype[o.unscopables].values=!0)),t(Array.prototype,J),w(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&w(Object.getPrototypeOf([].values()));var K=Math.pow(2,53)-1;t(Number,{MAX_SAFE_INTEGER:K,MIN_SAFE_INTEGER:-K,EPSILON:2.220446049250313e-16,parseInt:g.parseInt,parseFloat:g.parseFloat,isFinite:function(a){return"number"==typeof a&&h(a)},isInteger:function(a){return Number.isFinite(a)&&y.ToInteger(a)===a},isSafeInteger:function(a){return Number.isInteger(a)&&Math.abs(a)<=Number.MAX_SAFE_INTEGER},isNaN:function(a){return a!==a}}),[,1].find(function(a,b){return 0===b})||r(Array.prototype,"find",J.find,!0),0!==[,1].findIndex(function(a,b){return 0===b})&&r(Array.prototype,"findIndex",J.findIndex,!0),i&&t(Object,{assign:function(a){if(!y.TypeIsObject(a))throw new TypeError("target must be an object");return Array.prototype.reduce.call(arguments,function(a,b){return Object.keys(Object(b)).reduce(function(a,c){return a[c]=b[c],a},a)})},is:function(a,b){return y.SameValue(a,b)},setPrototypeOf:function(a,b){var c,d=function(a,b){if(!y.TypeIsObject(a))throw new TypeError("cannot set prototype on a non-object");if(null!==b&&!y.TypeIsObject(b))throw new TypeError("can only set prototype to an object or null"+b)},e=function(a,b){return d(a,b),c.call(a,b),a};try{c=a.getOwnPropertyDescriptor(a.prototype,b).set,c.call({},null)}catch(f){if(a.prototype!=={}[b])return;c=function(a){this[b]=a},e.polyfill=e(e({},null),a.prototype)instanceof a}return e}(Object,"__proto__")}),Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var a=Object.create(null),b=Object.getPrototypeOf,c=Object.setPrototypeOf;Object.getPrototypeOf=function(c){var d=b(c);return d===a?null:d},Object.setPrototypeOf=function(b,d){return null===d&&(d=a),c(b,d)},Object.setPrototypeOf.polyfill=!1}();try{Object.keys("foo")}catch(L){var M=Object.keys;Object.keys=function(a){return M(y.ToObject(a))}}if(!RegExp.prototype.flags&&i){var N=function(){if(!y.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var a="";return this.global&&(a+="g"),this.ignoreCase&&(a+="i"),this.multiline&&(a+="m"),this.unicode&&(a+="u"),this.sticky&&(a+="y"),a};s.getter(RegExp.prototype,"flags",N)}var O=function(){try{return"/a/i"===String(new RegExp(/a/g,"i"))}catch(a){return!1}}();if(!O&&i){var P=RegExp,Q=function cb(a,b){return q.regex(a)&&q.string(b)?new cb(a.source,b):new P(a,b)};r(Q,"toString",P.toString.bind(P),!0),Object.setPrototypeOf&&Object.setPrototypeOf(P,Q),Object.getOwnPropertyNames(P).forEach(function(a){"$input"!==a&&(a in n||s.proxy(P,a,Q))}),Q.prototype=P.prototype,s.redefine(P.prototype,"constructor",Q),RegExp=Q,s.redefine(g,"RegExp",Q)}var R={acosh:function(a){var b=Number(a);return Number.isNaN(b)||1>a?0/0:1===b?0:1/0===b?b:Math.log(b/Math.E+Math.sqrt(b+1)*Math.sqrt(b-1)/Math.E)+1},asinh:function(a){return a=Number(a),0!==a&&h(a)?0>a?-Math.asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a},atanh:function(a){return a=Number(a),Number.isNaN(a)||-1>a||a>1?0/0:-1===a?-1/0:1===a?1/0:0===a?a:.5*Math.log((1+a)/(1-a))},cbrt:function(a){if(a=Number(a),0===a)return a;var b,c=0>a;return c&&(a=-a),b=Math.pow(a,1/3),c?-b:b},clz32:function(a){a=Number(a);var b=y.ToUint32(a);return 0===b?32:32-b.toString(2).length},cosh:function(a){return a=Number(a),0===a?1:Number.isNaN(a)?0/0:h(a)?(0>a&&(a=-a),a>21?Math.exp(a)/2:(Math.exp(a)+Math.exp(-a))/2):1/0},expm1:function(a){var b=Number(a);if(b===-1/0)return-1;if(!h(b)||0===a)return b;if(Math.abs(b)>.5)return Math.exp(b)-1;for(var c=b,d=0,e=1;d+c!==d;)d+=c,e+=1,c*=b/e;return d},hypot:function(){var a=!1,b=!0,c=!1,d=[];if(Array.prototype.every.call(arguments,function(e){var f=Number(e);return Number.isNaN(f)?a=!0:1/0===f||f===-1/0?c=!0:0!==f&&(b=!1),c?!1:(a||d.push(Math.abs(f)),!0)}),c)return 1/0;if(a)return 0/0;if(b)return 0;d.sort(function(a,b){return b-a});var e=d[0],f=d.map(function(a){return a/e}),g=f.reduce(function(a,b){return a+b*b},0);return e*Math.sqrt(g)},log2:function(a){return Math.log(a)*Math.LOG2E},log10:function(a){return Math.log(a)*Math.LOG10E},log1p:function(a){var b=Number(a);return-1>b||Number.isNaN(b)?0/0:0===b||1/0===b?b:-1===b?-1/0:1+b-1===0?b:b*(Math.log(1+b)/(1+b-1))},sign:function(a){var b=+a;return 0===b?b:Number.isNaN(b)?b:0>b?-1:1},sinh:function(a){var b=Number(a);return h(a)&&0!==a?Math.abs(b)<1?(Math.expm1(b)-Math.expm1(-b))/2:(Math.exp(b-1)-Math.exp(-b-1))*Math.E/2:a},tanh:function(a){var b=Number(a);if(Number.isNaN(a)||0===b)return b;if(1/0===b)return 1;if(b===-1/0)return-1;var c=Math.expm1(b),d=Math.expm1(-b);return 1/0===c?1:1/0===d?-1:(c-d)/(Math.exp(b)+Math.exp(-b))},trunc:function(a){var b=Number(a);return 0>b?-Math.floor(-b):Math.floor(b)},imul:function(a,b){a=y.ToUint32(a),b=y.ToUint32(b);var c=a>>>16&65535,d=65535&a,e=b>>>16&65535,f=65535&b;return d*f+(c*f+d*e<<16>>>0)|0},fround:function(a){if(0===a||1/0===a||a===-1/0||Number.isNaN(a))return a;var b=Number(a);return A.toFloat32(b)}};t(Math,R),r(Math,"tanh",R.tanh,-2e-17!==Math.tanh(-2e-17)),r(Math,"acosh",R.acosh,1/0===Math.acosh(Number.MAX_VALUE));var S=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),T=Math.round;r(Math,"round",function(a){return a>=-.5&&.5>a&&0!==a?Math.sign(0*a):T(a)},!S),-5!==Math.imul(4294967295,5)&&(Math.imul=R.imul);var U=function(){var a,b;y.IsPromise=function(a){return y.TypeIsObject(a)&&a._promiseConstructor?"undefined"==typeof a._status?!1:!0:!1};var c,d=function(a){if(!y.IsCallable(a))throw new TypeError("bad promise constructor");var b=this,c=function(a,c){b.resolve=a,b.reject=c};if(b.promise=y.Construct(a,[c]),!b.promise._es6construct)throw new TypeError("bad promise constructor");if(!y.IsCallable(b.resolve)||!y.IsCallable(b.reject))throw new TypeError("bad promise constructor")},e=g.setTimeout;"undefined"!=typeof window&&y.IsCallable(window.postMessage)&&(c=function(){var a=[],b="zero-timeout-message",c=function(c){a.push(c),window.postMessage(b,"*")},d=function(c){if(c.source===window&&c.data===b){if(c.stopPropagation(),0===a.length)return;var d=a.shift();d()}};return window.addEventListener("message",d,!0),c});var f=function(){var a=g.Promise;return a&&a.resolve&&function(b){return a.resolve().then(b)}},h=y.IsCallable(g.setImmediate)?g.setImmediate.bind(g):"object"==typeof process&&process.nextTick?process.nextTick:f()||(y.IsCallable(c)?c():function(a){e(a,0)}),i=function(a,b){if(!y.TypeIsObject(a))return!1;var c=b.resolve,d=b.reject;try{var e=a.then;if(!y.IsCallable(e))return!1;e.call(a,c,d)}catch(f){d(f)}return!0},j=function(a,b){a.forEach(function(a){h(function(){var c=a.handler,d=a.capability,e=d.resolve,f=d.reject;try{var g=c(b);if(g===d.promise)throw new TypeError("self resolution");var h=i(g,d);h||e(g)}catch(j){f(j)}})})},k=function(a,b,c){return function(e){if(e===a)return c(new TypeError("self resolution"));var f=a._promiseConstructor,g=new d(f),h=i(e,g);return h?g.promise.then(b,c):b(e)}};a=function(a){var b=this;if(b=z(b),!b._promiseConstructor)throw new TypeError("bad promise");if("undefined"!=typeof b._status)throw new TypeError("promise already initialized");if(!y.IsCallable(a))throw new TypeError("not a valid resolver");b._status="unresolved",b._resolveReactions=[],b._rejectReactions=[];var c=function(a){if("unresolved"===b._status){var c=b._resolveReactions;b._result=a,b._resolveReactions=void 0,b._rejectReactions=void 0,b._status="has-resolution",j(c,a)}},d=function(a){if("unresolved"===b._status){var c=b._rejectReactions;b._result=a,b._resolveReactions=void 0,b._rejectReactions=void 0,b._status="has-rejection",j(c,a)}};try{a(c,d)}catch(e){d(e)}return b},b=a.prototype;var l=function(a,b,c,d){var e=!1;return function(f){if(!e&&(e=!0,b[a]=f,0===--d.count)){var g=c.resolve;g(b)}}};return r(a,p,function(a){var c=this,d=c.prototype||b;return a=a||u(d),t(a,{_status:void 0,_result:void 0,_resolveReactions:void 0,_rejectReactions:void 0,_promiseConstructor:void 0}),a._promiseConstructor=c,a}),t(a,{all:function(a){var b=this,c=new d(b),e=c.resolve,f=c.reject;try{if(!y.IsIterable(a))throw new TypeError("bad iterable");for(var g=y.GetIterator(a),h=[],i={count:1},j=0;;j++){var k=y.IteratorNext(g);if(k.done)break;var m=b.resolve(k.value),n=l(j,h,c,i);i.count++,m.then(n,c.reject)}0===--i.count&&e(h)}catch(o){f(o)}return c.promise},race:function(a){var b=this,c=new d(b),e=c.resolve,f=c.reject;try{if(!y.IsIterable(a))throw new TypeError("bad iterable");for(var g=y.GetIterator(a);;){var h=y.IteratorNext(g);if(h.done)break;var i=b.resolve(h.value);i.then(e,f)}}catch(j){f(j)}return c.promise},reject:function(a){var b=this,c=new d(b),e=c.reject;return e(a),c.promise},resolve:function(a){var b=this;if(y.IsPromise(a)){var c=a._promiseConstructor;if(c===b)return a}var e=new d(b),f=e.resolve;return f(a),e.promise}}),t(b,{"catch":function(a){return this.then(void 0,a)},then:function(a,b){var c=this;if(!y.IsPromise(c))throw new TypeError("not a promise");var e=this.constructor,f=new d(e);y.IsCallable(b)||(b=function(a){throw a}),y.IsCallable(a)||(a=function(a){return a});var g=k(c,a,b),h={capability:f,handler:g},i={capability:f,handler:b};switch(c._status){case"unresolved":c._resolveReactions.push(h),c._rejectReactions.push(i);break;case"has-resolution":j([h],c._result);break;case"has-rejection":j([i],c._result);break;default:throw new TypeError("unexpected")}return f.promise}}),a}();g.Promise&&(delete g.Promise.accept,delete g.Promise.defer,delete g.Promise.prototype.chain),t(g,{Promise:U});var V=c(g.Promise,function(a){return a.resolve(42)instanceof a}),W=function(){try{return g.Promise.reject(42).then(null,5).then(null,n),!0}catch(a){return!1}}(),X=function(){try{Promise.call(3,n)}catch(a){return!0}return!1}();V&&W&&X||(Promise=U,r(g,"Promise",U,!0));var Y=function(a){var b=Object.keys(a.reduce(function(a,b){return a[b]=!0,a},{}));return a.join(":")===b.join(":")},Z=Y(["z","a","bb"]),$=Y(["z",1,"a","3",2]);if(i){var _=function(a){if(!Z)return null;var b=typeof a;return"string"===b?"$"+a:"number"===b?$?a:"n"+a:null},ab=function(){return Object.create?Object.create(null):{}},bb={Map:function(){function a(a,b){this.key=a,this.value=b,this.next=null,this.prev=null}function b(a,b){this.head=a._head,this.i=this.head,this.kind=b}function c(b){var c=this;if(!y.TypeIsObject(c))throw new TypeError("Map does not accept arguments when called as a function");if(c=z(c),!c._es6map)throw new TypeError("bad map");var d=new a(null,null);if(d.next=d.prev=d,t(c,{_head:d,_storage:ab(),_size:0}),"undefined"!=typeof b&&null!==b){var e=y.GetIterator(b),f=c.set;if(!y.IsCallable(f))throw new TypeError("bad map");for(;;){var g=y.IteratorNext(e);if(g.done)break;var h=g.value;if(!y.TypeIsObject(h))throw new TypeError("expected iterable of pairs");f.call(c,h[0],h[1])}}return c}var d={};a.prototype.isRemoved=function(){return this.key===d},b.prototype={next:function(){var a,b=this.i,c=this.kind,d=this.head;if("undefined"==typeof this.i)return{value:void 0,done:!0};for(;b.isRemoved()&&b!==d;)b=b.prev;for(;b.next!==d;)if(b=b.next,!b.isRemoved())return a="key"===c?b.key:"value"===c?b.value:[b.key,b.value],this.i=b,{value:a,done:!1};return this.i=void 0,{value:void 0,done:!0}}},w(b.prototype);var e=c.prototype;return r(c,p,function(a){var b=this,c=b.prototype||e;return a=a||u(c),t(a,{_es6map:!0}),a}),s.getter(c.prototype,"size",function(){if("undefined"==typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}),t(c.prototype,{get:function(a){var b=_(a);if(null!==b){var c=this._storage[b];return c?c.value:void 0}for(var d=this._head,e=d;(e=e.next)!==d;)if(y.SameValueZero(e.key,a))return e.value},has:function(a){var b=_(a);if(null!==b)return"undefined"!=typeof this._storage[b];for(var c=this._head,d=c;(d=d.next)!==c;)if(y.SameValueZero(d.key,a))return!0;return!1},set:function(b,c){var d,e=this._head,f=e,g=_(b);if(null!==g){if("undefined"!=typeof this._storage[g])return this._storage[g].value=c,this;d=this._storage[g]=new a(b,c),f=e.prev}for(;(f=f.next)!==e;)if(y.SameValueZero(f.key,b))return f.value=c,this;return d=d||new a(b,c),y.SameValue(-0,b)&&(d.key=0),d.next=this._head,d.prev=this._head.prev,d.prev.next=d,d.next.prev=d,this._size+=1,this},"delete":function(a){var b=this._head,c=b,e=_(a);if(null!==e){if("undefined"==typeof this._storage[e])return!1;c=this._storage[e].prev,delete this._storage[e]}for(;(c=c.next)!==b;)if(y.SameValueZero(c.key,a))return c.key=c.value=d,c.prev.next=c.next,c.next.prev=c.prev,this._size-=1,!0;return!1},clear:function(){this._size=0,this._storage=ab();for(var a=this._head,b=a,c=b.next;(b=c)!==a;)b.key=b.value=d,c=b.next,b.next=b.prev=a;a.next=a.prev=a},keys:function(){return new b(this,"key")},values:function(){return new b(this,"value")},entries:function(){return new b(this,"key+value")},forEach:function(a){for(var b=arguments.length>1?arguments[1]:null,c=this.entries(),d=c.next();!d.done;d=c.next())b?a.call(b,d.value[1],d.value[0],this):a(d.value[1],d.value[0],this)}}),w(c.prototype,function(){return this.entries()}),c}(),Set:function(){var a=function(a){var b=this;if(!y.TypeIsObject(b))throw new TypeError("Set does not accept arguments when called as a function");if(b=z(b),!b._es6set)throw new TypeError("bad set");if(t(b,{"[[SetData]]":null,_storage:ab()}),"undefined"!=typeof a&&null!==a){var c=y.GetIterator(a),d=b.add;if(!y.IsCallable(d))throw new TypeError("bad set");for(;;){var e=y.IteratorNext(c);if(e.done)break;var f=e.value;d.call(b,f)}}return b},b=a.prototype;r(a,p,function(a){var c=this,d=c.prototype||b;return a=a||u(d),t(a,{_es6set:!0}),a});var c=function(a){if(!a["[[SetData]]"]){var b=a["[[SetData]]"]=new bb.Map;Object.keys(a._storage).forEach(function(a){a=36===a.charCodeAt(0)?a.slice(1):"n"===a.charAt(0)?+a.slice(1):+a,b.set(a,a)}),a._storage=null}};return s.getter(a.prototype,"size",function(){if("undefined"==typeof this._storage)throw new TypeError("size method called on incompatible Set");return c(this),this["[[SetData]]"].size}),t(a.prototype,{has:function(a){var b;return this._storage&&null!==(b=_(a))?!!this._storage[b]:(c(this),this["[[SetData]]"].has(a))},add:function(a){var b;return this._storage&&null!==(b=_(a))?(this._storage[b]=!0,this):(c(this),this["[[SetData]]"].set(a,a),this)},"delete":function(a){var b;if(this._storage&&null!==(b=_(a))){var d=m(this._storage,b);return delete this._storage[b]&&d}return c(this),this["[[SetData]]"]["delete"](a)},clear:function(){this._storage?this._storage=ab():this["[[SetData]]"].clear()},values:function(){return c(this),this["[[SetData]]"].values()},entries:function(){return c(this),this["[[SetData]]"].entries()},forEach:function(a){var b=arguments.length>1?arguments[1]:null,d=this;c(d),this["[[SetData]]"].forEach(function(c,e){b?a.call(b,e,e,d):a(e,e,d)})}}),r(a,"keys",a.values,!0),w(a.prototype,function(){return this.values()}),a}()};t(g,bb),(g.Map||g.Set)&&("function"!=typeof g.Map.prototype.clear||0!==(new g.Set).size||0!==(new g.Map).size||"function"!=typeof g.Map.prototype.keys||"function"!=typeof g.Set.prototype.keys||"function"!=typeof g.Map.prototype.forEach||"function"!=typeof g.Set.prototype.forEach||b(g.Map)||b(g.Set)||!c(g.Map,function(a){var b=new a([]);return b.set(42,42),b instanceof a}))&&(g.Map=bb.Map,g.Set=bb.Set),g.Set.prototype.keys!==g.Set.prototype.values&&r(g.Set.prototype,"keys",g.Set.prototype.values,!0),w(Object.getPrototypeOf((new g.Map).keys())),w(Object.getPrototypeOf((new g.Set).keys()))}return g}),function(a,b){"use strict";"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define("ceb",[],b):a.ceb=b()}(this,function(){"use strict";function a(){return function(){}}function b(a){return Object.keys(a).map(function(b){return a[b]})}function c(a){return a.split(/(?=[A-Z])/).map(function(a){return a.charAt(0).toLowerCase()+a.slice(1)}).join("-")}function d(a,b){return a.level-b.level}function e(a,b,c,d){d?c&&!a.hasAttribute(b)?a.setAttribute(b,""):!c&&a.hasAttribute(b)&&a.removeAttribute(b):null!==c&&void 0!==c||!a.hasAttribute(b)?null!==c&&void 0!==c&&a.getAttribute(b)!==c&&a.setAttribute(b,c):a.removeAttribute(b)}function f(a,b){var c=a.sort(d);return function(){var a=this;return c.reduce(function(b,c){return c.bind(a,b,a)},b.bind(a,a)).apply(a,arguments)
}}function g(a,b,c){return function(d,f){var g=f;b&&(g=b.call(d,d,f)),e(d,a,g,c)}}function h(a,b,c){return function(d){var e=c?d.hasAttribute(a):d.getAttribute(a);return b&&(e=b.call(d,d,e)),e}}function i(a,b){var c=a.sort(d);return function(){var a=this;return c.reduce(function(b,c){return c.bind(a,function(c){return b.apply(a,Array.prototype.slice.call(c).slice(2,c.length))},a)},b.bind(a,a)).apply(a,arguments)}}function j(b){return b.prototype=b.prototype||Object.create(HTMLElement.prototype),b.features=b.features||[],b.interceptors=b.interceptors||[],b.wrappers=b.wrappers||[],b.listeners=b.listeners||[],b.properties=b.properties||{},b.methods=Object.assign({createdCallback:a(),attachedCallback:a(),detachedCallback:a(),attributeChangedCallback:a()},b.methods),b}function k(a){var b=u(a.tagName,{struct:a,registered:!0});a.features.sort(d).forEach(function(c){c.fn&&c.fn.setup&&c.fn.setup(a,b,c.options)})}function l(a){return b(a.properties).filter(function(a){return a.attName}).reduce(function(a,b){return a[b.attName]=b,a},{})}function m(a){return b(a.properties).map(function(b){var c={configurable:!1,enumerable:!0};if(b.attribute?(b.set=g(b.attName,b.setter,!!b.attribute["boolean"]),b.get=h(b.attName,b.getter,!!b.attribute["boolean"])):b.hasOwnProperty("value")&&b.hasOwnProperty("writable")&&!b.writable?(c.value=b.value,c.writable=!1,b.hasOwnProperty("enumerable")&&(c.enumerable=b.enumerable)):b.set||b.get||(c.writable=!0),!c.hasOwnProperty("writable")){var d=a.interceptors[b.propName]||{};if(b.set){var e=d.set||[];c.set=f(e,b.set)}if(b.get){var i=d.get||[];c.get=f(i,b.get)}}return Object.assign(b,{property:c})}).reduce(function(a,b){return a[b.propName]=b.property,a},{})}function n(a){return Object.keys(a.methods).map(function(b){var c=a.wrappers[b]||[],d=a.methods[b];return{methName:b,fn:i(c,d)}}).reduce(function(a,b){return a[b.methName]=b.fn,a},{})}function o(a){j(a),k(a),a.attributes=l(a);var b=m(a);Object.defineProperties(a.prototype,b);var c=n(a);return Object.assign(a.prototype,c),document.registerElement(a.tagName,a)}function p(a,b,c,d){b(d);var f=c.querySelector(a.delegate.target);if(f){var g=a.delegate.property,h=a.delegate.attribute;g||h||(g=a.propName,h=a.attName);var i=a.attribute&&!!a.attribute["boolean"];a.delegate.hasOwnProperty("boolean")&&(i=a.delegate["boolean"]),h?e(f,h,d,i):f[g]=d}}function q(a,b,c,d){var e=b(d),f=c.querySelector(a.delegate.target);if(f){var g=a.delegate.property,h=a.delegate.attribute;g||h||(g=a.propName,h=a.attName);var i=a.attribute&&!!a.attribute["boolean"];a.delegate.hasOwnProperty("boolean")&&(i=a.delegate["boolean"]),e=h?i?f.hasAttribute(h):f.getAttribute(h):f[g]}return e}function r(a,b,c){b(a,c)}function s(){return{properties:{},methods:{},wrappers:[],interceptors:[],listeners:[],features:[{fn:w}]}}function t(a){return a.attribute&&(a.attName=c(a.attribute.name||a.propName)),a.writable=a.hasOwnProperty("writable")?a.writable:!0,a}function u(a,b){var c=b&&b.struct?j(b.struct):s();c.tagName=a;var d=b&&b.hasOwnProperty("registered")?b.registered:!1,e={};return e.wrap=function(a,b,d){return c.wrappers[a]||(c.wrappers[a]=[]),b.level=isNaN(d)?0:d,c.wrappers[a].push(b),e},e.intercept=function(a,b,d,f){return c.interceptors[a]||(c.interceptors[a]={set:[],get:[]}),b&&(b.level=isNaN(f)?0:f,c.interceptors[a].set.push(b)),d&&(d.level=isNaN(f)?0:f,c.interceptors[a].get.push(d)),e},e["extends"]=function(a){return c["extends"]=a,e},e.prototype=function(a){return c.prototype=a,e},e.properties=function(a){var b=Object.keys(a).map(function(b){return Object.assign(a[b],{propName:b})}).map(t).reduce(function(a,b){return a[b.propName]=b,a},{});return Object.assign(c.properties,b),e},e.methods=function(a){return Object.assign(c.methods,a),e},e.listen=function(a,b){return a.trim().split(",").map(function(a){var c=a.trim().split(" ");return{event:c[0].trim(),target:(c[1]||"").trim(),fn:b}}).forEach(function(a){c.listeners.push(a)}),e},e.feature=function(a,b,d){return c.features.push({fn:a,options:b||{},level:isNaN(d)?0:d}),e},e.register=function(){return d?void 0:(d=!0,o(c))},e.get=function(){return c},e}function v(a){var b={};return b.name=function(b){return u(b,a)},b}"assign"in Object||Object.defineProperty(Object,"assign",{configurable:!0,enumerable:!1,writable:!0,value:function(){return Array.prototype.reduce.call(arguments,function(a,b){return Object.keys(Object(b)).reduce(function(a,c){return a[c]=b[c],a},a)})}});var w=a();return w.setup=function(c,d){b(c.properties).filter(function(a){return a.delegate}).forEach(function(b){b.attName||(b.set=b.set||a(),b.get=b.get||a()),d.intercept(b.propName,p.bind(this,b),q.bind(this,b))}),d.wrap("createdCallback",function(a,d){a(arguments),b(c.properties).forEach(function(a){a.attName?d.hasAttribute(a.attName)?d[a.propName]=a.attribute["boolean"]?!0:d.getAttribute(a.attName):a.hasOwnProperty("value")&&e(d,a.attName,a.value,a.attribute["boolean"]):a.hasOwnProperty("value")&&a.writable&&(d[a.propName]=a.value)})}),d.wrap("attachedCallback",function(a,b){a(arguments),b.__eventHandlers=c.listeners.map(function(a){var c=a.target?b.querySelector(a.target):b,d=r.bind(b,b,a.fn);return c.addEventListener(a.event,d,!0),{event:a.event,target:c,callback:d}})}),d.wrap("detachedCallback",function(a,b){(b.__eventHandlers||[]).forEach(function(a){a.target.removeEventListener(a.event,a.callback,!0)}),b.__eventHandlers=null,a(arguments)}),d.wrap("attributeChangedCallback",function(a,b,d,e,f){var g=c.attributes[d];if(g){var h=f;g.attribute["boolean"]&&(h="string"==typeof f?!0:!1),b[g.propName]=h}a(arguments)})},v});
//# sourceMappingURL=ceb.legacy.min.js.map