text: !function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){t.exports={"default":e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":20}],2:[function(e,t,r){t.exports={"default":e("core-js/library/fn/is-iterable"),__esModule:!0}},{"core-js/library/fn/is-iterable":21}],3:[function(e,t,r){t.exports={"default":e("core-js/library/fn/number/is-integer"),__esModule:!0}},{"core-js/library/fn/number/is-integer":22}],4:[function(e,t,r){t.exports={"default":e("core-js/library/fn/number/is-nan"),__esModule:!0}},{"core-js/library/fn/number/is-nan":23}],5:[function(e,t,r){t.exports={"default":e("core-js/library/fn/number/parse-float"),__esModule:!0}},{"core-js/library/fn/number/parse-float":24}],6:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":25}],7:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":26}],8:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":27}],9:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":28}],10:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":29}],11:[function(e,t,r){t.exports={"default":e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":30}],12:[function(e,t,r){t.exports={"default":e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":31}],13:[function(e,t,r){t.exports={"default":e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":32}],14:[function(e,t,r){"use strict";r.__esModule=!0,r["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],15:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var o=e("../core-js/object/define-property"),i=n(o);r["default"]=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i["default"])(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},{"../core-js/object/define-property":8}],16:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var o=e("../core-js/object/set-prototype-of"),i=n(o),s=e("../core-js/object/create"),a=n(s),u=e("../helpers/typeof"),c=n(u);r["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof t?"undefined":(0,c["default"])(t)));e.prototype=(0,a["default"])(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i["default"]?(0,i["default"])(e,t):e.__proto__=t)}},{"../core-js/object/create":7,"../core-js/object/set-prototype-of":11,"../helpers/typeof":19}],17:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var o=e("../helpers/typeof"),i=n(o);r["default"]=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"==typeof t?"undefined":(0,i["default"])(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":19}],18:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var o=e("../core-js/is-iterable"),i=n(o),s=e("../core-js/get-iterator"),a=n(s);r["default"]=function(){function e(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,u=(0,a["default"])(e);!(n=(s=u.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(c){o=!0,i=c}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if((0,i["default"])(Object(t)))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},{"../core-js/get-iterator":1,"../core-js/is-iterable":2}],19:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}r.__esModule=!0;var o=e("../core-js/symbol/iterator"),i=n(o),s=e("../core-js/symbol"),a=n(s),u="function"==typeof a["default"]&&"symbol"==typeof i["default"]?function(e){return typeof e}:function(e){return e&&"function"==typeof a["default"]&&e.constructor===a["default"]&&e!==a["default"].prototype?"symbol":typeof e};r["default"]="function"==typeof a["default"]&&"symbol"===u(i["default"])?function(e){return"undefined"==typeof e?"undefined":u(e)}:function(e){return e&&"function"==typeof a["default"]&&e.constructor===a["default"]&&e!==a["default"].prototype?"symbol":"undefined"==typeof e?"undefined":u(e)}},{"../core-js/symbol":12,"../core-js/symbol/iterator":13}],20:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":99,"../modules/es6.string.iterator":111,"../modules/web.dom.iterable":116}],21:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.is-iterable")},{"../modules/core.is-iterable":100,"../modules/es6.string.iterator":111,"../modules/web.dom.iterable":116}],22:[function(e,t,r){e("../../modules/es6.number.is-integer"),t.exports=e("../../modules/_core").Number.isInteger},{"../../modules/_core":39,"../../modules/es6.number.is-integer":102}],23:[function(e,t,r){e("../../modules/es6.number.is-nan"),t.exports=e("../../modules/_core").Number.isNaN},{"../../modules/_core":39,"../../modules/es6.number.is-nan":103}],24:[function(e,t,r){e("../../modules/es6.number.parse-float"),t.exports=parseFloat},{"../../modules/es6.number.parse-float":104}],25:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":39,"../../modules/es6.object.assign":105}],26:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":39,"../../modules/es6.object.create":106}],27:[function(e,t,r){e("../../modules/es6.object.define-property");var n=e("../../modules/_core").Object;t.exports=function(e,t,r){return n.defineProperty(e,t,r)}},{"../../modules/_core":39,"../../modules/es6.object.define-property":107}],28:[function(e,t,r){e("../../modules/es7.object.entries"),t.exports=e("../../modules/_core").Object.entries},{"../../modules/_core":39,"../../modules/es7.object.entries":113}],29:[function(e,t,r){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":39,"../../modules/es6.object.get-prototype-of":108}],30:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":39,"../../modules/es6.object.set-prototype-of":109}],31:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":39,"../../modules/es6.object.to-string":110,"../../modules/es6.symbol":112,"../../modules/es7.symbol.async-iterator":114,"../../modules/es7.symbol.observable":115}],32:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":96,"../../modules/es6.string.iterator":111,"../../modules/web.dom.iterable":116}],33:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],34:[function(e,t,r){t.exports=function(){}},{}],35:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":56}],36:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_to-length"),i=e("./_to-index");t.exports=function(e){return function(t,r,s){var a,u=n(t),c=o(u.length),l=i(s,c);if(e&&r!=r){for(;c>l;)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===r)return e||l||0;return!e&&-1}}},{"./_to-index":88,"./_to-iobject":90,"./_to-length":91}],37:[function(e,t,r){var n=e("./_cof"),o=e("./_wks")("toStringTag"),i="Arguments"==n(function(){return arguments}()),s=function(e,t){try{return e[t]}catch(r){}};t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=s(t=Object(e),o))?r:i?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":38,"./_wks":97}],38:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],39:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],40:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,o){return e.call(t,r,n,o)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":33}],41:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},{}],42:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":47}],43:[function(e,t,r){var n=e("./_is-object"),o=e("./_global").document,i=n(o)&&n(o.createElement);t.exports=function(e){return i?o.createElement(e):{}}},{"./_global":48,"./_is-object":56}],44:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],45:[function(e,t,r){var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie");t.exports=function(e){var t=n(e),r=o.f;if(r)for(var s,a=r(e),u=i.f,c=0;a.length>c;)u.call(e,s=a[c++])&&t.push(s);return t}},{"./_object-gops":71,"./_object-keys":74,"./_object-pie":75}],46:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_ctx"),s=e("./_hide"),a="prototype",u=function(e,t,r){var c,l,f,p=e&u.F,d=e&u.G,b=e&u.S,_=e&u.P,h=e&u.B,g=e&u.W,y=d?o:o[t]||(o[t]={}),m=y[a],v=d?n:b?n[t]:(n[t]||{})[a];d&&(r=t);for(c in r)l=!p&&v&&void 0!==v[c],l&&c in y||(f=l?v[c]:r[c],y[c]=d&&"function"!=typeof v[c]?r[c]:h&&l?i(f,n):g&&v[c]==f?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[a]=e[a],t}(f):_&&"function"==typeof f?i(Function.call,f):f,_&&((y.virtual||(y.virtual={}))[c]=f,e&u.R&&m&&!m[c]&&s(m,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":39,"./_ctx":40,"./_global":48,"./_hide":50}],47:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(t){return!0}}},{}],48:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],49:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],50:[function(e,t,r){var n=e("./_object-dp"),o=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,o(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":42,"./_object-dp":66,"./_property-desc":79}],51:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":48}],52:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":42,"./_dom-create":43,"./_fails":47}],53:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":38}],54:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":38}],55:[function(e,t,r){var n=e("./_is-object"),o=Math.floor;t.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},{"./_is-object":56}],56:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],57:[function(e,t,r){"use strict";var n=e("./_object-create"),o=e("./_property-desc"),i=e("./_set-to-string-tag"),s={};e("./_hide")(s,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(s,{next:o(1,r)}),i(e,t+" Iterator")}},{"./_hide":50,"./_object-create":65,"./_property-desc":79,"./_set-to-string-tag":82,"./_wks":97}],58:[function(e,t,r){"use strict";var n=e("./_library"),o=e("./_export"),i=e("./_redefine"),s=e("./_hide"),a=e("./_has"),u=e("./_iterators"),c=e("./_iter-create"),l=e("./_set-to-string-tag"),f=e("./_object-gpo"),p=e("./_wks")("iterator"),d=!([].keys&&"next"in[].keys()),b="@@iterator",_="keys",h="values",g=function(){return this};t.exports=function(e,t,r,y,m,v,j){c(r,t,y);var w,E,x,k=function(e){if(!d&&e in S)return S[e];switch(e){case _:return function(){return new r(this,e)};case h:return function(){return new r(this,e)}}return function(){return new r(this,e)}},T=t+" Iterator",O=m==h,M=!1,S=e.prototype,A=S[p]||S[b]||m&&S[m],C=A||k(m),L=m?O?k("entries"):C:void 0,P="Array"==t?S.entries||A:A;if(P&&(x=f(P.call(new e)),x!==Object.prototype&&(l(x,T,!0),n||a(x,p)||s(x,p,g))),O&&A&&A.name!==h&&(M=!0,C=function(){return A.call(this)}),n&&!j||!d&&!M&&S[p]||s(S,p,C),u[t]=C,u[T]=g,m)if(w={values:O?C:k(h),keys:v?C:k(_),entries:L},j)for(E in w)E in S||i(S,E,w[E]);else o(o.P+o.F*(d||M),t,w);return w}},{"./_export":46,"./_has":49,"./_hide":50,"./_iter-create":57,"./_iterators":60,"./_library":62,"./_object-gpo":72,"./_redefine":80,"./_set-to-string-tag":82,"./_wks":97}],59:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],60:[function(e,t,r){t.exports={}},{}],61:[function(e,t,r){var n=e("./_object-keys"),o=e("./_to-iobject");t.exports=function(e,t){for(var r,i=o(e),s=n(i),a=s.length,u=0;a>u;)if(i[r=s[u++]]===t)return r}},{"./_object-keys":74,"./_to-iobject":90}],62:[function(e,t,r){t.exports=!0},{}],63:[function(e,t,r){var n=e("./_uid")("meta"),o=e("./_is-object"),i=e("./_has"),s=e("./_object-dp").f,a=0,u=Object.isExtensible||function(){return!0},c=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),l=function(e){s(e,n,{value:{i:"O"+ ++a,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,n)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[n].i},p=function(e,t){if(!i(e,n)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[n].w},d=function(e){return c&&b.NEED&&u(e)&&!i(e,n)&&l(e),e},b=t.exports={KEY:n,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},{"./_fails":47,"./_has":49,"./_is-object":56,"./_object-dp":66,"./_uid":94}],64:[function(e,t,r){"use strict";var n=e("./_object-keys"),o=e("./_object-gops"),i=e("./_object-pie"),s=e("./_to-object"),a=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=s(e),u=arguments.length,c=1,l=o.f,f=i.f;u>c;)for(var p,d=a(arguments[c++]),b=l?n(d).concat(l(d)):n(d),_=b.length,h=0;_>h;)f.call(d,p=b[h++])&&(r[p]=d[p]);return r}:u},{"./_fails":47,"./_iobject":53,"./_object-gops":71,"./_object-keys":74,"./_object-pie":75,"./_to-object":92}],65:[function(e,t,r){var n=e("./_an-object"),o=e("./_object-dps"),i=e("./_enum-bug-keys"),s=e("./_shared-key")("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,r=e("./_dom-create")("iframe"),n=i.length,o="<",s=">";for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write(o+"script"+s+"document.F=Object"+o+"/script"+s),t.close(),c=t.F;n--;)delete c[u][i[n]];return c()};t.exports=Object.create||function(e,t){var r;return null!==e?(a[u]=n(e),r=new a,a[u]=null,r[s]=e):r=c(),void 0===t?r:o(r,t)}},{"./_an-object":35,"./_dom-create":43,"./_enum-bug-keys":44,"./_html":51,"./_object-dps":67,"./_shared-key":83}],66:[function(e,t,r){var n=e("./_an-object"),o=e("./_ie8-dom-define"),i=e("./_to-primitive"),s=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),o)try{return s(e,t,r)}catch(a){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":35,"./_descriptors":42,"./_ie8-dom-define":52,"./_to-primitive":93}],67:[function(e,t,r){var n=e("./_object-dp"),o=e("./_an-object"),i=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){o(e);for(var r,s=i(t),a=s.length,u=0;a>u;)n.f(e,r=s[u++],t[r]);return e}},{"./_an-object":35,"./_descriptors":42,"./_object-dp":66,"./_object-keys":74}],68:[function(e,t,r){var n=e("./_object-pie"),o=e("./_property-desc"),i=e("./_to-iobject"),s=e("./_to-primitive"),a=e("./_has"),u=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?c:function(e,t){if(e=i(e),t=s(t,!0),u)try{return c(e,t)}catch(r){}if(a(e,t))return o(!n.f.call(e,t),e[t])}},{"./_descriptors":42,"./_has":49,"./_ie8-dom-define":52,"./_object-pie":75,"./_property-desc":79,"./_to-iobject":90,"./_to-primitive":93}],69:[function(e,t,r){var n=e("./_to-iobject"),o=e("./_object-gopn").f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return o(e)}catch(t){return s.slice()}};t.exports.f=function(e){return s&&"[object Window]"==i.call(e)?a(e):o(n(e))}},{"./_object-gopn":70,"./_to-iobject":90}],70:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{"./_enum-bug-keys":44,"./_object-keys-internal":73}],71:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],72:[function(e,t,r){var n=e("./_has"),o=e("./_to-object"),i=e("./_shared-key")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},{"./_has":49,"./_shared-key":83,"./_to-object":92}],73:[function(e,t,r){var n=e("./_has"),o=e("./_to-iobject"),i=e("./_array-includes")(!1),s=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,a=o(e),u=0,c=[];for(r in a)r!=s&&n(a,r)&&c.push(r);for(;t.length>u;)n(a,r=t[u++])&&(~i(c,r)||c.push(r));return c}},{"./_array-includes":36,"./_has":49,"./_shared-key":83,"./_to-iobject":90}],74:[function(e,t,r){var n=e("./_object-keys-internal"),o=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,o)}},{"./_enum-bug-keys":44,"./_object-keys-internal":73}],75:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],76:[function(e,t,r){var n=e("./_export"),o=e("./_core"),i=e("./_fails");t.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],s={};s[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",s)}},{"./_core":39,"./_export":46,"./_fails":47}],77:[function(e,t,r){var n=e("./_object-keys"),o=e("./_to-iobject"),i=e("./_object-pie").f;t.exports=function(e){return function(t){for(var r,s=o(t),a=n(s),u=a.length,c=0,l=[];u>c;)i.call(s,r=a[c++])&&l.push(e?[r,s[r]]:s[r]);return l}}},{"./_object-keys":74,"./_object-pie":75,"./_to-iobject":90}],78:[function(e,t,r){var n=e("./_global").parseFloat,o=e("./_string-trim").trim;t.exports=1/n(e("./_string-ws")+"-0")!==-(1/0)?function(e){var t=o(String(e),3),r=n(t);return 0===r&&"-"==t.charAt(0)?-0:r}:n},{"./_global":48,"./_string-trim":86,"./_string-ws":87}],79:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],80:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":50}],81:[function(e,t,r){var n=e("./_is-object"),o=e("./_an-object"),i=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(o){r=!0}return function(e,t){return i(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:i}},{"./_an-object":35,"./_ctx":40,"./_is-object":56,"./_object-gopd":68}],82:[function(e,t,r){var n=e("./_object-dp").f,o=e("./_has"),i=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!o(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},{"./_has":49,"./_object-dp":66,"./_wks":97}],83:[function(e,t,r){var n=e("./_shared")("keys"),o=e("./_uid");t.exports=function(e){return n[e]||(n[e]=o(e))}},{"./_shared":84,"./_uid":94}],84:[function(e,t,r){var n=e("./_global"),o="__core-js_shared__",i=n[o]||(n[o]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":48}],85:[function(e,t,r){var n=e("./_to-integer"),o=e("./_defined");t.exports=function(e){return function(t,r){var i,s,a=String(o(t)),u=n(r),c=a.length;return u<0||u>=c?e?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):i:e?a.slice(u,u+2):(i-55296<<10)+(s-56320)+65536)}}},{"./_defined":41,"./_to-integer":89}],86:[function(e,t,r){var n=e("./_export"),o=e("./_defined"),i=e("./_fails"),s=e("./_string-ws"),a="["+s+"]",u="​",c=RegExp("^"+a+a+"*"),l=RegExp(a+a+"*$"),f=function(e,t,r){var o={},a=i(function(){return!!s[e]()||u[e]()!=u}),c=o[e]=a?t(p):s[e];r&&(o[r]=c),n(n.P+n.F*a,"String",o)},p=f.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};t.exports=f},{"./_defined":41,"./_export":46,"./_fails":47,"./_string-ws":87}],87:[function(e,t,r){t.exports="\t\n\x0B\f\r   ᠎             　\u2028\u2029\ufeff"},{}],88:[function(e,t,r){var n=e("./_to-integer"),o=Math.max,i=Math.min;t.exports=function(e,t){return e=n(e),e<0?o(e+t,0):i(e,t)}},{"./_to-integer":89}],89:[function(e,t,r){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],90:[function(e,t,r){var n=e("./_iobject"),o=e("./_defined");t.exports=function(e){return n(o(e))}},{"./_defined":41,"./_iobject":53}],91:[function(e,t,r){var n=e("./_to-integer"),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{"./_to-integer":89}],92:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":41}],93:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!n(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!n(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":56}],94:[function(e,t,r){var n=0,o=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},{}],95:[function(e,t,r){var n=e("./_global"),o=e("./_core"),i=e("./_library"),s=e("./_wks-ext"),a=e("./_object-dp").f;t.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},{"./_core":39,"./_global":48,"./_library":62,"./_object-dp":66,"./_wks-ext":96}],96:[function(e,t,r){r.f=e("./_wks")},{"./_wks":97}],97:[function(e,t,r){var n=e("./_shared")("wks"),o=e("./_uid"),i=e("./_global").Symbol,s="function"==typeof i,a=t.exports=function(e){return n[e]||(n[e]=s&&i[e]||(s?i:o)("Symbol."+e))};a.store=n},{"./_global":48,"./_shared":84,"./_uid":94}],98:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[n(e)]}},{"./_classof":37,"./_core":39,"./_iterators":60,"./_wks":97}],99:[function(e,t,r){var n=e("./_an-object"),o=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=o(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":35,"./_core":39,"./core.get-iterator-method":98}],100:[function(e,t,r){var n=e("./_classof"),o=e("./_wks")("iterator"),i=e("./_iterators");t.exports=e("./_core").isIterable=function(e){var t=Object(e);return void 0!==t[o]||"@@iterator"in t||i.hasOwnProperty(n(t))}},{"./_classof":37,"./_core":39,"./_iterators":60,"./_wks":97}],101:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),o=e("./_iter-step"),i=e("./_iterators"),s=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,r):"values"==t?o(0,e[r]):o(0,[r,e[r]])},"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":34,"./_iter-define":58,"./_iter-step":59,"./_iterators":60,"./_to-iobject":90}],102:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{isInteger:e("./_is-integer")})},{"./_export":46,"./_is-integer":55}],103:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{isNaN:function(e){return e!=e}})},{"./_export":46}],104:[function(e,t,r){var n=e("./_export"),o=e("./_parse-float");n(n.S+n.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},{"./_export":46,"./_parse-float":78}],105:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":46,"./_object-assign":64}],106:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":46,"./_object-create":65}],107:[function(e,t,r){var n=e("./_export");n(n.S+n.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":42,"./_export":46,"./_object-dp":66}],108:[function(e,t,r){var n=e("./_to-object"),o=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",function(){return function(e){return o(n(e))}})},{"./_object-gpo":72,"./_object-sap":76,"./_to-object":92}],109:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":46,"./_set-proto":81}],110:[function(e,t,r){},{}],111:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":58,"./_string-at":85}],112:[function(e,t,r){"use strict";var n=e("./_global"),o=e("./_has"),i=e("./_descriptors"),s=e("./_export"),a=e("./_redefine"),u=e("./_meta").KEY,c=e("./_fails"),l=e("./_shared"),f=e("./_set-to-string-tag"),p=e("./_uid"),d=e("./_wks"),b=e("./_wks-ext"),_=e("./_wks-define"),h=e("./_keyof"),g=e("./_enum-keys"),y=e("./_is-array"),m=e("./_an-object"),v=e("./_to-iobject"),j=e("./_to-primitive"),w=e("./_property-desc"),E=e("./_object-create"),x=e("./_object-gopn-ext"),k=e("./_object-gopd"),T=e("./_object-dp"),O=e("./_object-keys"),M=k.f,S=T.f,A=x.f,C=n.Symbol,L=n.JSON,P=L&&L.stringify,F="prototype",N=d("_hidden"),I=d("toPrimitive"),D={}.propertyIsEnumerable,B=l("symbol-registry"),R=l("symbols"),H=l("op-symbols"),U=Object[F],W="function"==typeof C,q=n.QObject,G=!q||!q[F]||!q[F].findChild,J=i&&c(function(){return 7!=E(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=M(U,t);n&&delete U[t],S(e,t,r),n&&e!==U&&S(U,t,n)}:S,Y=function(e){var t=R[e]=E(C[F]);return t._k=e,t},K=W&&"symbol"==typeof C.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof C},z=function(e,t,r){return e===U&&z(H,t,r),m(e),t=j(t,!0),m(r),o(R,t)?(r.enumerable?(o(e,N)&&e[N][t]&&(e[N][t]=!1),r=E(r,{enumerable:w(0,!1)})):(o(e,N)||S(e,N,w(1,{})),e[N][t]=!0),J(e,t,r)):S(e,t,r)},V=function(e,t){m(e);for(var r,n=g(t=v(t)),o=0,i=n.length;i>o;)z(e,r=n[o++],t[r]);return e},Q=function(e,t){return void 0===t?E(e):V(E(e),t)},X=function(e){var t=D.call(this,e=j(e,!0));return!(this===U&&o(R,e)&&!o(H,e))&&(!(t||!o(this,e)||!o(R,e)||o(this,N)&&this[N][e])||t)},$=function(e,t){if(e=v(e),t=j(t,!0),e!==U||!o(R,t)||o(H,t)){var r=M(e,t);return!r||!o(R,t)||o(e,N)&&e[N][t]||(r.enumerable=!0),r}},Z=function(e){for(var t,r=A(v(e)),n=[],i=0;r.length>i;)o(R,t=r[i++])||t==N||t==u||n.push(t);return n},ee=function(e){for(var t,r=e===U,n=A(r?H:v(e)),i=[],s=0;n.length>s;)!o(R,t=n[s++])||r&&!o(U,t)||i.push(R[t]);return i};W||(C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(H,r),o(this,N)&&o(this[N],e)&&(this[N][e]=!1),J(this,e,w(1,r))};return i&&G&&J(U,e,{configurable:!0,set:t}),Y(e)},a(C[F],"toString",function(){return this._k}),k.f=$,T.f=z,e("./_object-gopn").f=x.f=Z,e("./_object-pie").f=X,e("./_object-gops").f=ee,i&&!e("./_library")&&a(U,"propertyIsEnumerable",X,!0),b.f=function(e){return Y(d(e))}),s(s.G+s.W+s.F*!W,{Symbol:C});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)d(te[re++]);for(var te=O(d.store),re=0;te.length>re;)_(te[re++]);s(s.S+s.F*!W,"Symbol",{"for":function(e){return o(B,e+="")?B[e]:B[e]=C(e)},keyFor:function(e){if(K(e))return h(B,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!W,"Object",{create:Q,defineProperty:z,defineProperties:V,getOwnPropertyDescriptor:$,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),L&&s(s.S+s.F*(!W||c(function(){var e=C();return"[null]"!=P([e])||"{}"!=P({a:e})||"{}"!=P(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!K(e)){for(var t,r,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);return t=n[1],"function"==typeof t&&(r=t),!r&&y(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!K(t))return t}),n[1]=t,P.apply(L,n)}}}),C[F][I]||e("./_hide")(C[F],I,C[F].valueOf),f(C,"Symbol"),f(Math,"Math",!0),f(n.JSON,"JSON",!0)},{"./_an-object":35,"./_descriptors":42,"./_enum-keys":45,"./_export":46,"./_fails":47,"./_global":48,"./_has":49,"./_hide":50,"./_is-array":54,"./_keyof":61,"./_library":62,"./_meta":63,"./_object-create":65,"./_object-dp":66,"./_object-gopd":68,"./_object-gopn":70,"./_object-gopn-ext":69,"./_object-gops":71,"./_object-keys":74,"./_object-pie":75,"./_property-desc":79,"./_redefine":80,"./_set-to-string-tag":82,"./_shared":84,"./_to-iobject":90,"./_to-primitive":93,"./_uid":94,"./_wks":97,"./_wks-define":95,"./_wks-ext":96}],113:[function(e,t,r){var n=e("./_export"),o=e("./_object-to-array")(!0);n(n.S,"Object",{entries:function(e){return o(e)}})},{"./_export":46,"./_object-to-array":77}],114:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":95}],115:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":95}],116:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),o=e("./_hide"),i=e("./_iterators"),s=e("./_wks")("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=a[u],l=n[c],f=l&&l.prototype;f&&!f[s]&&o(f,s,c),i[c]=i.Array}},{"./_global":48,"./_hide":50,"./_iterators":60,"./_wks":97,"./es6.array.iterator":101}],117:[function(e,t,r){t.exports=function(e){if(e.getBoundingClientRect)return e.getBoundingClientRect();var t=0,r=0;do t+=e.offsetLeft-e.scrollLeft,r+=e.offsetTop-e.scrollTop;while(e=e.offsetParent);
  return{left:t,top:r}}},{}],118:[function(e,t,r){t.exports=function(){return window.pageYOffset?window.pageYOffset:document.documentElement.clientHeight?document.documentElement.scrollTop:document.body.scrollTop}},{}],119:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("babel-runtime/helpers/slicedToArray"),i=n(o),s=e("babel-runtime/core-js/object/entries"),a=n(s),u=e("babel-runtime/core-js/object/get-prototype-of"),c=n(u),l=e("babel-runtime/helpers/classCallCheck"),f=n(l),p=e("babel-runtime/helpers/createClass"),d=n(p),b=e("babel-runtime/helpers/possibleConstructorReturn"),_=n(b),h=e("babel-runtime/helpers/inherits"),g=n(h),y=e("./util/event-emitter"),m=e("./util/object-is"),v=e("./util/type-error-message"),j=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if((0,f["default"])(this,t),!m.ofType(e,"object")||Array.isArray(e))throw new TypeError(v.getObjectMessage(e));if(!("x"in e&&"y"in e))throw new Error(e+" should have x and y property");var i=(0,_["default"])(this,(t.__proto__||(0,c["default"])(t)).call(this));return i.wrapperElement=document.createElement("div"),i.wrapperElement.classList.add("taggd__wrapper"),i.buttonElement=document.createElement("button"),i.buttonElement.classList.add("taggd__button"),i.popupElement=document.createElement("span"),i.popupElement.classList.add("taggd__popup"),i.wrapperElement.appendChild(i.buttonElement),i.wrapperElement.appendChild(i.popupElement),i.isControlsEnabled=!1,i.inputLabelElement=void 0,i.buttonSaveElement=void 0,i.buttonDeleteElement=void 0,i.buttonSaveElementClickHandler=function(){return i.setText(i.inputLabelElement.value)},i.buttonDeleteElementClickHandler=function(){i.emit("taggd.tag.delete",i)},i.text=void 0,i.setButtonAttributes(n),i.setPopupAttributes(o),i.setPosition(e.x,e.y),i.setText(r),i.hide(),i}return(0,g["default"])(t,e),(0,d["default"])(t,[{key:"isHidden",value:function(){return"none"===this.popupElement.style.display}},{key:"show",value:function(){var e=!this.emit("taggd.tag.show",this);return e||(this.popupElement.style.display="",this.emit("taggd.tag.shown",this)),this}},{key:"hide",value:function(){var e=!this.emit("taggd.tag.hide",this);return e||(this.popupElement.style.display="none",this.emit("taggd.tag.hidden",this)),this}},{key:"setText",value:function(e){if(!m.ofType(e,"string")&&!m["function"](e))throw new TypeError(v.getMessage(e,"a string or a function"));var t=!this.emit("taggd.tag.change",this);return t||(m["function"](e)?this.text=e(this):this.text=e,this.isControlsEnabled?this.inputLabelElement.value=this.text:this.popupElement.innerHTML=this.text,this.emit("taggd.tag.changed",this)),this}},{key:"setPosition",value:function(e,r){if(!m.number(e))throw new TypeError(v.getFloatMessage(e));if(!m.number(r))throw new TypeError(v.getFloatMessage(r));var n=!this.emit("taggd.tag.change",this);if(!n){var o=t.getPositionStyle(e,r);this.wrapperElement.style.left=o.left,this.wrapperElement.style.top=o.top,this.emit("taggd.tag.changed",this)}return this}},{key:"setButtonAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!m.ofType(e,"object")||Array.isArray(e))throw new TypeError(v.getObjectMessage(e));var r=!this.emit("taggd.tag.change",this);return r||(t.setElementAttributes(this.buttonElement,e),this.emit("taggd.tag.changed",this)),this}},{key:"setPopupAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!m.ofType(e,"object")||Array.isArray(e))throw new TypeError(v.getObjectMessage(e));var r=!this.emit("taggd.tag.change",this);return r||(t.setElementAttributes(this.popupElement,e),this.emit("taggd.tag.changed",this)),this}},{key:"enableControls",value:function(){return this.isControlsEnabled=!0,this.inputLabelElement=document.createElement("input"),this.buttonSaveElement=document.createElement("button"),this.buttonDeleteElement=document.createElement("button"),this.inputLabelElement.classList.add("taggd__editor-input"),this.buttonSaveElement.classList.add("taggd__editor-button","taggd__editor-button--save"),this.buttonDeleteElement.classList.add("taggd__editor-button","taggd__editor-button--delete"),this.buttonSaveElement.innerHTML=t.LABEL_BUTTON_SAVE,this.buttonDeleteElement.innerHTML=t.LABEL_BUTTON_DELETE,this.buttonSaveElement.addEventListener("click",this.buttonSaveElementClickHandler),this.buttonDeleteElement.addEventListener("click",this.buttonDeleteElementClickHandler),this.popupElement.innerHTML="",this.popupElement.appendChild(this.inputLabelElement),this.popupElement.appendChild(this.buttonSaveElement),this.popupElement.appendChild(this.buttonDeleteElement),this.setText(this.text),this}},{key:"disableControls",value:function(){return this.isControlsEnabled=!1,this.inputLabelElement=void 0,this.buttonSaveElement=void 0,this.buttonDeleteElement=void 0,this.setText(this.text),this}},{key:"toJSON",value:function(){function e(e){var t={};return Array.prototype.forEach.call(e,function(e){"class"!==e.name&&"style"!==e.name&&(t[e.name]=e.value)}),t}return{position:{x:parseFloat(this.wrapperElement.style.left)/100,y:parseFloat(this.wrapperElement.style.top)/100},text:this.text,buttonAttributes:e(this.buttonElement.attributes),popupAttributes:e(this.popupElement.attributes)}}}],[{key:"setElementAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!m.ofType(t,"object")||Array.isArray(t))throw new TypeError(v.getObjectMessage(t));return(0,a["default"])(t).forEach(function(t){var r=(0,i["default"])(t,2),n=r[0],o=r[1];if("class"===n&&e.getAttribute(n)){var s=e.getAttribute(n)+" "+o;return void e.setAttribute(n,s)}e.setAttribute(n,o)}),e}},{key:"getPositionStyle",value:function(e,t){if(!m.number(e))throw new TypeError(v.getFloatMessage(e));if(!m.number(t))throw new TypeError(v.getFloatMessage(t));return{left:100*e+"%",top:100*t+"%"}}},{key:"createFromObject",value:function(e){return new t(e.position,e.text,e.buttonAttributes,e.popupAttributes)}}]),t}(y);j.LABEL_NEW_TAG="New tag",j.LABEL_BUTTON_SAVE="save",j.LABEL_BUTTON_DELETE="delete",t.exports=j},{"./util/event-emitter":121,"./util/object-is":122,"./util/type-error-message":123,"babel-runtime/core-js/object/entries":9,"babel-runtime/core-js/object/get-prototype-of":10,"babel-runtime/helpers/classCallCheck":14,"babel-runtime/helpers/createClass":15,"babel-runtime/helpers/inherits":16,"babel-runtime/helpers/possibleConstructorReturn":17,"babel-runtime/helpers/slicedToArray":18}],120:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("babel-runtime/core-js/number/is-integer"),i=n(o),s=e("babel-runtime/core-js/object/assign"),a=n(s),u=e("babel-runtime/core-js/object/get-prototype-of"),c=n(u),l=e("babel-runtime/helpers/classCallCheck"),f=n(l),p=e("babel-runtime/helpers/createClass"),d=n(p),b=e("babel-runtime/helpers/possibleConstructorReturn"),_=n(b),h=e("babel-runtime/helpers/inherits"),g=n(h),y=e("offset"),m=e("scrolltop"),v=e("./Tag"),j=e("./util/event-emitter"),w=e("./util/object-is"),E=e("./util/type-error-message"),x=function(e){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if((0,f["default"])(this,t),!e instanceof Element)throw new TypeError(E.getMessage(e,Element));var o=(0,_["default"])(this,(t.__proto__||(0,c["default"])(t)).call(this));return o.wrapper=document.createElement("div"),o.wrapper.classList.add("taggd"),e.classList.add("taggd__image"),e.parentElement.insertBefore(o.wrapper,e),e.parentElement.removeChild(e),o.wrapper.appendChild(e),o.image=e,o.options={},o.tags=[],o.imageClickHandler=function(e){var t=m(),r=y(o.image),n={x:(e.pageX-r.left)/o.image.width,y:(e.pageY-r.top-t)/o.image.height},i=new v(n,v.LABEL_NEW_TAG);i.enableControls(),o.addTag(i)},o.setOptions(r),o.setTags(n),o}return(0,g["default"])(t,e),(0,d["default"])(t,[{key:"setOptions",value:function(e){if(!w.ofType(e,"object")||Array.isArray(e))throw new TypeError(E.getObjectMessage(e));return this.options=(0,a["default"])(this.options,t.DEFAULT_OPTIONS,e),this}},{key:"addTag",value:function(e){var t=this;if(!w.ofInstance(e,v))throw new TypeError(E.getTagMessage(e));var r=!this.emit("taggd.tag.add",this,e),n=void 0,o=function(t){return t.target===e.buttonElement},i=function(){n&&(window.clearTimeout(n),n=void 0)};return r||(this.options.show===this.options.hide?e.buttonElement.addEventListener(this.options.show,function(t){o(t)&&(i(),e.isHidden()?e.show():e.hide())}):(e.buttonElement.addEventListener(this.options.show,function(t){o(t)&&(i(),e.show())}),e.buttonElement.addEventListener(this.options.hide,function(r){o(r)&&(i(),"mouseleave"===t.options.hide?n=window.setTimeout(function(){return e.hide()},t.options.hideDelay):e.hide())}),"mouseleave"===this.options.hide&&(e.popupElement.addEventListener("mouseover",function(){return i()}),e.popupElement.addEventListener("mouseleave",function(){return e.hide()}))),e.once("taggd.tag.delete",function(){var r=t.tags.indexOf(e);r>=0&&t.deleteTag(r)}),e.onAnything(function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];t.emit.apply(t,[e,t].concat(n))}),this.tags.push(e),this.wrapper.appendChild(e.wrapperElement),this.emit("taggd.tag.added",this,e)),this}},{key:"getTag",value:function(e){if(!(0,i["default"])(e))throw new TypeError(E.getIntegerMessage(e));return this.tags[e]}},{key:"deleteTag",value:function(e){if(!(0,i["default"])(e))throw new TypeError(E.getIntegerMessage(e));if(!this.tags[e])throw new Error("Tag at index "+e+" does not exist.");var t=this.tags[e],r=!this.emit("taggd.tag.delete",this,t);return r||(this.wrapper.removeChild(t.wrapperElement),this.tags.splice(e,1),this.emit("taggd.tag.deleted",this,t)),this}},{key:"setTags",value:function(e){return this.deleteTags(),this.addTags(e),this}},{key:"addTags",value:function(e){var t=this;if(!Array.isArray(e))throw new TypeError(E.getArrayMessage(e,"Taggd.Tag"));return e.forEach(function(e){return t.addTag(e)}),this}},{key:"getTags",value:function(){return this.tags}},{key:"deleteTags",value:function(){for(;this.tags.length>0;)this.deleteTag(0);return this}},{key:"map",value:function(e){if(!w["function"](e))throw new TypeError(E.getFunctionMessage(e));return this.tags=this.tags.map(e),this}},{key:"destroy",value:function(){var e=!this.emit("taggd.destroy",this);return e||this.deleteTags(),this}},{key:"enableEditorMode",value:function(){var e=!this.emit("taggd.editor.enable",this);return e||(this.image.addEventListener("click",this.imageClickHandler),this.getTags().forEach(function(e){return e.enableControls()})),this}},{key:"disableEditorMode",value:function(){var e=!this.emit("taggd.editor.disable",this);return e||(this.image.removeEventListener("click",this.imageClickHandler),this.getTags().forEach(function(e){return e.disableControls()})),this}}]),t}(j);x.DEFAULT_OPTIONS={show:"mouseenter",hide:"mouseleave",hideDelay:500},t.exports=x,t.exports.Tag=v,window.Taggd=t.exports},{"./Tag":119,"./util/event-emitter":121,"./util/object-is":122,"./util/type-error-message":123,"babel-runtime/core-js/number/is-integer":3,"babel-runtime/core-js/object/assign":6,"babel-runtime/core-js/object/get-prototype-of":10,"babel-runtime/helpers/classCallCheck":14,"babel-runtime/helpers/createClass":15,"babel-runtime/helpers/inherits":16,"babel-runtime/helpers/possibleConstructorReturn":17,offset:117,scrolltop:118}],121:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("babel-runtime/helpers/classCallCheck"),i=n(o),s=e("babel-runtime/helpers/createClass"),a=n(s),u="*",c=function(){function e(){(0,i["default"])(this,e),this.handlers={}}return(0,a["default"])(e,[{key:"onAnything",value:function(e){this.on(u,e)}},{key:"on",value:function(e,t){this.handlers[e]||(this.handlers[e]=[]),this.handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.handlers[e]){var r=this.handlers[e].indexOf(t);r>=0&&this.handlers[e].splice(r,1)}}},{key:"once",value:function(e,t){var r=this;this.on(e,function(){t.apply(void 0,arguments),r.off(e,t)})}},{key:"emit",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=!1;return this.handlers[u]&&this.handlers[u].forEach(function(t){var n=t.apply(void 0,[e].concat(r));o=void 0!==n&&!n||o}),this.handlers[e]&&this.handlers[e].forEach(function(e){var t=e.apply(void 0,r);o=void 0!==t&&!t||o}),!o}}]),e}();t.exports=c},{"babel-runtime/helpers/classCallCheck":14,"babel-runtime/helpers/createClass":15}],122:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}var o=e("babel-runtime/core-js/number/parse-float"),i=n(o),s=e("babel-runtime/core-js/number/is-nan"),a=n(s),u=e("babel-runtime/helpers/typeof"),c=n(u);t.exports={ofInstance:function(e,t){return e instanceof t},ofType:function(e,t){return("undefined"==typeof e?"undefined":(0,c["default"])(e))===t},"function":function(e){return"function"==typeof e},number:function(e){return!(0,a["default"])((0,i["default"])(e))}}},{"babel-runtime/core-js/number/is-nan":4,"babel-runtime/core-js/number/parse-float":5,"babel-runtime/helpers/typeof":19}],123:[function(e,t,r){"use strict";var n={getMessage:function(e,t){return e+" should be "+t},getArrayMessage:function(e,t){return t?n.getTypeErrorMessage(e,"an array of "+t):n.getTypeErrorMessage(e,"an array")},getFunctionMessage:function(e){return n.getTypeErrorMessage(e,"a function")},getIntegerMessage:function(e){return n.getTypeErrorMessage(e,"an integer")},getFloatMessage:function(e){return n.getTypeErrorMessage(e,"a floating number")},getObjectMessage:function(e){return n.getTypeErrorMessage(e,"an object")},getTagMessage:function(e){return n.getTypeErrorMessage(e,"a tag")},getTypeErrorMessage:function(e,t){return e+" is not a "+t}};t.exports=n},{}]},{},[120]);
  //# sourceMappingURL=taggd.min.js.map