UNPKG

44.7 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["ison-js"]=e():t["ison-js"]=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=92)}([function(t,e,n){var r=n(25)("wks"),i=n(14),o=n(1).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e){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)},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports={version:"2.5.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(16)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(2),i=n(46),o=n(28),a=Object.defineProperty;e.f=n(5)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(7),i=n(15);t.exports=n(5)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(85),i=n(30);t.exports=function(t){return r(i(t))}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports={}},function(t,e,n){var r=n(1),i=n(3),o=n(18),a=n(8),s=n(4),c=function(t,e,n){var u,f,h,l=t&c.F,p=t&c.G,d=t&c.S,v=t&c.P,y=t&c.B,g=t&c.W,m=p?i:i[e]||(i[e]={}),w=m.prototype,b=p?r:d?r[e]:(r[e]||{}).prototype;for(u in p&&(n=e),n)(f=!l&&b&&void 0!==b[u])&&s(m,u)||(h=f?b[u]:n[u],m[u]=p&&"function"!=typeof b[u]?n[u]:y&&f?o(h,r):g&&b[u]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):v&&"function"==typeof h?o(Function.call,h):h,v&&((m.virtual||(m.virtual={}))[u]=h,t&c.R&&w&&!w[u]&&a(w,u,h)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(7).f,i=n(4),o=n(0)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(17);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=!0},function(t,e,n){"use strict";var r=n(17);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(1),i=n(3),o=n(19),a=n(23),s=n(7).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){e.f=n(0)},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(1),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,e,n){var r=n(25)("keys"),i=n(14);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e,n){var r=n(43),i=n(24);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(6),i=n(1).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(2),i=n(6),o=n(20);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r,i,o,a=n(18),s=n(55),c=n(41),u=n(29),f=n(1),h=f.process,l=f.setImmediate,p=f.clearImmediate,d=f.MessageChannel,v=f.Dispatch,y=0,g={},m=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},w=function(t){m.call(t.data)};l&&p||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},p=function(t){delete g[t]},"process"==n(10)(h)?r=function(t){h.nextTick(a(m,t,1))}:v&&v.now?r=function(t){v.now(a(m,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=w,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(a(m,t,1),0)}),t.exports={set:l,clear:p}},function(t,e,n){var r=n(2),i=n(17),o=n(0)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(10),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e){},function(t,e,n){var r=n(43),i=n(24).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){n(80);for(var r=n(1),i=n(8),o=n(11),a=n(0)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],f=r[u],h=f&&f.prototype;h&&!h[a]&&i(h,a,u),o[u]=o.Array}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(31),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(4),i=n(9),o=n(84)(!1),a=n(26)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(2),i=n(86),o=n(24),a=n(26)("IE_PROTO"),s=function(){},c=function(){var t,e=n(29)("iframe"),r=o.length;for(e.style.display="none",n(41).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},function(t,e,n){t.exports=n(8)},function(t,e,n){t.exports=!n(5)&&!n(16)(function(){return 7!=Object.defineProperty(n(29)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){"use strict";var r=n(19),i=n(12),o=n(45),a=n(8),s=n(11),c=n(87),u=n(13),f=n(82),h=n(0)("iterator"),l=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,d,v,y,g){c(n,e,d);var m,w,b,x=function(t){if(!l&&t in S)return S[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},_=e+" Iterator",P="values"==v,k=!1,S=t.prototype,O=S[h]||S["@@iterator"]||v&&S[v],E=O||x(v),j=v?P?x("entries"):E:void 0,L="Array"==e&&S.entries||O;if(L&&(b=f(L.call(new t)))!==Object.prototype&&b.next&&(u(b,_,!0),r||"function"==typeof b[h]||a(b,h,p)),P&&O&&"values"!==O.name&&(k=!0,E=function(){return O.call(this)}),r&&!g||!l&&!k&&S[h]||a(S,h,E),s[e]=E,s[_]=p,v)if(m={values:P?E:x("values"),keys:y?E:x("keys"),entries:j},g)for(w in m)w in S||o(S,w,m[w]);else i(i.P+i.F*(l||k),e,m);return m}},function(t,e,n){"use strict";var r=n(88)(!0);n(47)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(12),i=n(20),o=n(33);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){"use strict";var r=n(12),i=n(3),o=n(1),a=n(35),s=n(32);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){var r=n(0)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(1),i=n(3),o=n(7),a=n(5),s=n(0)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(8);t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},function(t,e,n){var r=n(1),i=n(34).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(10)(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve();n=function(){f.then(u)}}else n=function(){i.call(r,u)};else{var h=!0,l=document.createTextNode("");new o(u).observe(l,{characterData:!0}),n=function(){l.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(36),i=n(0)("iterator"),o=n(11);t.exports=n(3).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(11),i=n(0)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(2);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(18),i=n(58),o=n(57),a=n(2),s=n(42),c=n(56),u={},f={};(e=t.exports=function(t,e,n,h,l){var p,d,v,y,g=l?function(){return t}:c(t),m=r(n,h,e?2:1),w=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=s(t.length);p>w;w++)if((y=e?m(a(d=t[w])[0],d[1]):m(t[w]))===u||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if((y=i(v,m,d.value,e))===u||y===f)return y}).BREAK=u,e.RETURN=f},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var r,i,o,a,s=n(19),c=n(1),u=n(18),f=n(36),h=n(12),l=n(6),p=n(17),d=n(60),v=n(59),y=n(35),g=n(34).set,m=n(54)(),w=n(20),b=n(33),x=n(32),_=c.TypeError,P=c.process,k=c.Promise,S="process"==f(P),O=function(){},E=i=w.f,j=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(0)("species")]=function(t){t(O,O)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e}catch(t){}}(),L=function(t){var e;return!(!l(t)||"function"!=typeof(e=t.then))&&e},T=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(i||(2==t._h&&M(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(_("Promise-chain cycle")):(o=L(n))?o.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&C(t)})}},C=function(t){g.call(c,function(){var e,n,r,i=t._v,o=A(t);if(o&&(e=b(function(){S?P.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=S||A(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},A=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){g.call(c,function(){var e;S?P.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},I=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),T(e,!0))},F=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw _("Promise can't be resolved itself");(e=L(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,u(F,r,1),u(I,r,1))}catch(t){I.call(r,t)}}):(n._v=t,n._s=1,T(n,!1))}catch(t){I.call({_w:n,_d:!1},t)}}};j||(k=function(t){d(this,k,"Promise","_h"),p(t),r.call(this);try{t(u(F,this,1),u(I,this,1))}catch(t){I.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(53)(k.prototype,{then:function(t,e){var n=E(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?P.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(F,t,1),this.reject=u(I,t,1)},w.f=E=function(t){return t===k||t===a?new o(t):i(t)}),h(h.G+h.W+h.F*!j,{Promise:k}),n(13)(k,"Promise"),n(52)("Promise"),a=n(3).Promise,h(h.S+h.F*!j,"Promise",{reject:function(t){var e=E(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(s||!j),"Promise",{resolve:function(t){return x(s&&this===a?k:this,t)}}),h(h.S+h.F*!(j&&n(51)(function(t){k.all(t).catch(O)})),"Promise",{all:function(t){var e=this,n=E(e),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,a=1;v(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=E(e),r=n.reject,i=b(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){n(37),n(48),n(40),n(61),n(50),n(49),t.exports=n(3).Promise},function(t,e,n){t.exports={default:n(62),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(63),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t){return function(){var e=t.apply(this,arguments);return new o.default(function(t,n){return function r(i,a){try{var s=e[i](a),c=s.value}catch(t){return void n(t)}if(!s.done)return o.default.resolve(c).then(function(t){r("next",t)},function(t){r("throw",t)});t(c)}("next")})}}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag",u="object"==typeof t,f=e.regeneratorRuntime;if(f)u&&(t.exports=f);else{(f=e.regeneratorRuntime=u?t.exports:{}).wrap=b;var h="suspendedStart",l="suspendedYield",p="executing",d="completed",v={},y={};y[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(C([])));m&&m!==r&&i.call(m,a)&&(y=m);var w=k.prototype=_.prototype=Object.create(y);P.prototype=w.constructor=k,k.constructor=P,k[c]=P.displayName="GeneratorFunction",f.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===P||"GeneratorFunction"===(e.displayName||e.name))},f.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(w),t},f.awrap=function(t){return{__await:t}},S(O.prototype),O.prototype[s]=function(){return this},f.AsyncIterator=O,f.async=function(t,e,n,r){var i=new O(b(t,e,n,r));return f.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},S(w),w[c]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},f.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=C,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function b(t,e,n,r){var i=e&&e.prototype instanceof _?e:_,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=x(t,e,n);if("normal"===c.type){if(r=n.done?d:l,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=d,n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function x(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function _(){}function P(){}function k(){}function S(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function O(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var s=x(t[n],t,r);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&i.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(u).then(function(t){c.value=t,o(c)},a)}a(s.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function E(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,E(t,e),"throw"===e.method))return v;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=x(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,v;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function C(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:A}}function A(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(65),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e,n){t.exports=n(66)},function(t,e,n){n(22)("observable")},function(t,e,n){n(22)("asyncIterator")},function(t,e,n){var r=n(21),i=n(15),o=n(9),a=n(28),s=n(4),c=n(46),u=Object.getOwnPropertyDescriptor;e.f=n(5)?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(9),i=n(38).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(10);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(27),i=n(39),o=n(21);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,n){var r=n(14)("meta"),i=n(6),o=n(4),a=n(7).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(16)(function(){return c(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return u&&h.NEED&&c(t)&&!o(t,r)&&f(t),t}}},function(t,e,n){"use strict";var r=n(1),i=n(4),o=n(5),a=n(12),s=n(45),c=n(74).KEY,u=n(16),f=n(25),h=n(13),l=n(14),p=n(0),d=n(23),v=n(22),y=n(73),g=n(72),m=n(2),w=n(6),b=n(9),x=n(28),_=n(15),P=n(44),k=n(71),S=n(70),O=n(7),E=n(27),j=S.f,L=O.f,T=k.f,C=r.Symbol,A=r.JSON,M=A&&A.stringify,I=p("_hidden"),F=p("toPrimitive"),N={}.propertyIsEnumerable,R=f("symbol-registry"),z=f("symbols"),B=f("op-symbols"),G=Object.prototype,D="function"==typeof C,H=r.QObject,V=!H||!H.prototype||!H.prototype.findChild,W=o&&u(function(){return 7!=P(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=j(G,e);r&&delete G[e],L(t,e,n),r&&t!==G&&L(G,e,r)}:L,K=function(t){var e=z[t]=P(C.prototype);return e._k=t,e},Q=D&&"symbol"==typeof C.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof C},U=function(t,e,n){return t===G&&U(B,e,n),m(t),e=x(e,!0),m(n),i(z,e)?(n.enumerable?(i(t,I)&&t[I][e]&&(t[I][e]=!1),n=P(n,{enumerable:_(0,!1)})):(i(t,I)||L(t,I,_(1,{})),t[I][e]=!0),W(t,e,n)):L(t,e,n)},J=function(t,e){m(t);for(var n,r=y(e=b(e)),i=0,o=r.length;o>i;)U(t,n=r[i++],e[n]);return t},Y=function(t){var e=N.call(this,t=x(t,!0));return!(this===G&&i(z,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(z,t)||i(this,I)&&this[I][t])||e)},q=function(t,e){if(t=b(t),e=x(e,!0),t!==G||!i(z,e)||i(B,e)){var n=j(t,e);return!n||!i(z,e)||i(t,I)&&t[I][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=T(b(t)),r=[],o=0;n.length>o;)i(z,e=n[o++])||e==I||e==c||r.push(e);return r},X=function(t){for(var e,n=t===G,r=T(n?B:b(t)),o=[],a=0;r.length>a;)!i(z,e=r[a++])||n&&!i(G,e)||o.push(z[e]);return o};D||(s((C=function(){if(this instanceof C)throw TypeError("Symbol is not a constructor!");var t=l(arguments.length>0?arguments[0]:void 0),e=function(n){this===G&&e.call(B,n),i(this,I)&&i(this[I],t)&&(this[I][t]=!1),W(this,t,_(1,n))};return o&&V&&W(G,t,{configurable:!0,set:e}),K(t)}).prototype,"toString",function(){return this._k}),S.f=q,O.f=U,n(38).f=k.f=Z,n(21).f=Y,n(39).f=X,o&&!n(19)&&s(G,"propertyIsEnumerable",Y,!0),d.f=function(t){return K(p(t))}),a(a.G+a.W+a.F*!D,{Symbol:C});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)p($[tt++]);for(var et=E(p.store),nt=0;et.length>nt;)v(et[nt++]);a(a.S+a.F*!D,"Symbol",{for:function(t){return i(R,t+="")?R[t]:R[t]=C(t)},keyFor:function(t){if(!Q(t))throw TypeError(t+" is not a symbol!");for(var e in R)if(R[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),a(a.S+a.F*!D,"Object",{create:function(t,e){return void 0===e?P(t):J(P(t),e)},defineProperty:U,defineProperties:J,getOwnPropertyDescriptor:q,getOwnPropertyNames:Z,getOwnPropertySymbols:X}),A&&a(a.S+a.F*(!D||u(function(){var t=C();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(w(e)||void 0!==t)&&!Q(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Q(e))return e}),r[1]=e,M.apply(A,r)}}),C.prototype[F]||n(8)(C.prototype,F,C.prototype.valueOf),h(C,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},function(t,e,n){n(75),n(37),n(69),n(68),t.exports=n(3).Symbol},function(t,e,n){t.exports={default:n(76),__esModule:!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports=function(){}},function(t,e,n){"use strict";var r=n(79),i=n(78),o=n(11),a=n(9);t.exports=n(47)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(30);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(4),i=n(81),o=n(26)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(31),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(9),i=n(42),o=n(83);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),f=o(a,u);if(t&&n!=n){for(;u>f;)if((s=c[f++])!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(10);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(7),i=n(2),o=n(27);t.exports=n(5)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){"use strict";var r=n(44),i=n(15),o=n(13),a={};n(8)(a,n(0)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(31),i=n(30);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){n(48),n(40),t.exports=n(23).f("iterator")},function(t,e,n){t.exports={default:n(89),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(90)),i=a(n(77)),o="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===o(r.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.haveLegalTerms=e.VideoOnCanvas=e.CreateElem=e.debugo=e.click=e.tend=e.tmove=e.tstart=e.eventHandler=e.toggleClass=e.remClass=e.addClass=e.classe=e.setLeft=e.setRight=e.setBottom=e.setTop=e.setHeight=e.setWidth=e.setDim=e.setTransition=e.setPadding=e.setMargin=e.setPM=e.bkgColor=e.setZindex=e.setRel=e.setAbs=e.setFix=e.setPos=e.displayBlock=e.displayFlex=e.displayNone=e.display=e.opacity1=e.opacity0=e.opacity=e.innerTxt=e.appendToDom=e.setElem=e.create=e.have=e.S=e.selectTag=e.selectClass=e.select=e.computeSize=e.amPortrait=e.amLandscape=e.amIphone=e.getSize=e.amMraid=e.getInt=e.px=e.createNewCreative=void 0;var r,i,o=f(n(91)),a=f(n(67)),s=f(n(64)),c=(r=(0,s.default)(a.default.mark(function t(e){return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,n){var r=0,i=setInterval(function(){if(++r<=25)0!==e.offsetHeight&&(clearInterval(i),HTMLBodyElement,t({width:e.offsetWidth,height:e.offsetHeight}));else{var o=window.getComputedStyle(e,null).getPropertyValue("height"),a=window.getComputedStyle(e,null).getPropertyValue("width");void 0!==h(o)&&0!==h(o)?(clearInterval(i),t({width:h(a),height:h(o)})):(clearInterval(i),n("ERROR : I can't compute Creative Size"))}},10)}));case 1:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)}),u=(i=(0,s.default)(a.default.mark(function t(){return a.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise(function(t,e){null!=document.body&&c(document.body).then(function(e){return t(e)})}));case 1:case"end":return t.stop()}},t,this)})),function(){return i.apply(this,arguments)});function f(t){return t&&t.__esModule?t:{default:t}}var h=function(t){return parseInt(t.replace("px",""),10)},l=function(t){return document.getElementById(t)},p=function(t){return document.getElementsByClassName(t)},d=function(t){return document.getElementsByTagName(t)},v=function(t){return document.createElement(t)},y=function(t,e,n){var r=v(e);return r.id=n?""+t+n:t,r.className=n?n+" "+t:t,r},g=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.map(function(n){var r=n.classList;switch(t){case"add":r.add(e);break;case"remove":r.remove(e);break;case"toggle":r.toggle(e)}return n})}},m=g("add"),w=g("remove"),b=g("toggle"),x=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];n.map(function(e){switch(void 0===t?"undefined":(0,o.default)(t)){case"string":null!=document.body?document.body.appendChild(e):console.error("null error");break;default:t.appendChild(e)}})},_=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.map(function(e){return e.innerHTML=t})},P=function(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(function(e){return e.style.opacity=t.toString()})}},k=P(0),S=P(1),O=function(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(function(e){return e.style.display=t})}},E=O("block"),j=O("none"),L=O("flex"),T=function(t){return function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(function(e){return e.style.position=t})}},C=T("absolute"),A=T("relative"),M=T("fixed"),I=function(){for(var t=arguments.length,e=Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.map(function(t){return t.style.zIndex=r.toString()})},F=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.map(function(e){return e.style.backgroundColor=t})},N=function(t){if("auto"===t)return t;return"string"==typeof t?/vw|vh/gi.test(t)?""+t:t+"%":t+"px"},R=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=["margin","padding"].indexOf(t),a=N(e);r.map(function(t){switch(o){case 0:t.style.margin=a;break;case 1:t.style.padding=a;break;default:console.error("margin/padding")}return t})}},z=R("margin"),B=R("padding"),G=function(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=N(e);r.map(function(e){switch(t){case"width":e.style.width=o;break;case"height":e.style.height=o;break;case"top":e.style.top=o;break;case"bottom":e.style.bottom=o;break;case"right":e.style.right=o;break;case"left":e.style.left=o;break;default:console.error("dimension")}return e})}},D=G("height"),H=G("width"),V=G("top"),W=G("bottom"),K=G("right"),Q=G("left"),U=function(t,e){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.style[n]=r}};function J(t,e,n,r){this.src=t,this.container=e,this.size=n,r&&(this.opt=r,this.namePlus=r.namePlus,this.resize=r.resize,this.bkgCanvas=!!r.backgroundCanvas&&r.backgroundCanvas),this.builtVideo()}J.prototype={builtVideo:function(){this.video=document.createElement("video"),this.video.id=this.namePlus?"video"+this.namePlus:"video",this.video.classList.add("video"),this.video.style.position="absolute",this.video.style.opacity="0",this.video.preload="auto",this.video.autoplay=!0,this.video.defaultMuted=!0,this.video.muted=!0,this.video.style.width="100px",this.video.style.height="auto";var t=document.createAttribute("webkit-playsinline");this.video.setAttribute("crossorigin","anonymous"),this.video.setAttributeNode(t);var e=document.createAttribute("playsinline");this.video.setAttributeNode(e),this.container.appendChild(this.video);new ot({name:this.namePlus?"source"+this.namePlus:"source",tag:"source",src:"string"==typeof this.src?this.src:this.src.url,type:"video/mp4",append:this.video});return this.builtCanvas(),this},builtCanvas:function(){var t=this;if(this.canvas=document.createElement("canvas"),this.canvas.style.zIndex="42",this.canvas.id=this.namePlus?"canvas"+this.namePlus:"canvas",this.canvas.classList.add("canvas"),this.canvas.style.position="absolute","stretch"!==this.resize&&this.bkgCanvas&&(this.canvasBkg=document.createElement("canvas"),this.canvasBkg.id=this.namePlus?"canvasBkg"+this.namePlus:"canvasBkg",this.canvasBkg.classList.add("canvasBkg"),this.canvasBkg.style.position="absolute"),"string"==typeof this.src||null==this.src.width)console.log("console.log(): ",this.src.width),this.video.addEventListener("loadedmetadata",function(){c(t.video).then(function(e){var n=X(t.resize,e,t.size);t.canvas.width=n.width,t.canvas.height=n.height,t.canvas.style.left=n.left+"px",t.canvas.style.top=n.top+"px",t.container.appendChild(t.canvas),t.canvasBkg&&(t.canvasBkg.height=t.size.height,t.canvasBkg.width=t.size.width,t.container.appendChild(t.canvasBkg))})});else{var e=X(this.resize,{width:this.src.width,height:this.src.height},this.size);this.canvas.width=e.width,this.canvas.height=e.height,this.canvas.style.left=e.left+"px",this.canvas.style.top=e.top+"px",this.container.appendChild(this.canvas),this.canvasBkg&&(this.canvasBkg.height=this.size.height,this.canvasBkg.width=this.size.width,this.container.appendChild(this.canvasBkg))}return this},play:function(){return Y(this),this.video.play(),this},firstQuartile:function(t){return Z(this,"firstQuartile",.25,t),this},midPoint:function(t){return Z(this,"midPoint",.5,t),this},thirdQuartile:function(t){return Z(this,"thirdQuartile",.75,t),this},complete:function(t){return Z(this,"complete",.99,t),this},clickable:function(t,e){return Z(this,"clickable",t,e,!0),this},get duration(){return this.video.duration}};var Y=function(t){t.video.addEventListener("play",function(){t.canvasBkg?q(t.video,t.canvas,t.canvasBkg):q(t.video,t.canvas)})},q=function t(e,n,r){if(r){var i=n.getContext("2d"),o=r.getContext("2d");i.drawImage(e,0,0,n.width,n.height),o.drawImage(e,0,0,r.width,r.height),o.filter="blur(10px)",requestAnimationFrame(function(){t(e,n,r)})}else{n.getContext("2d").drawImage(e,0,0,n.width,n.height),requestAnimationFrame(function(){return t(e,n)})}},Z=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=void 0;t.video.addEventListener("timeupdate",function(a){a.target instanceof HTMLVideoElement&&a.target.currentTime>=a.target.duration*n&&void 0===o&&(o=new ot(i?{name:e,tag:"a",href:r,width:window.creative.size.width,height:window.creative.size.height,position:"absolute",zIndex:5e3,append:t.container}:{name:e,tag:"img",src:r,position:"absolute",visibility:"hidden",append:t.container}),console.log("%c"+e.toUpperCase(),"color: #FC1F49"))})},X=function(t,e,n){var r=e.height/e.width,i=n.height/n.width;switch(t){case"stretch":return{width:n.width,height:n.height,left:0,top:0};case"crop":return r<=i?{width:e.width*n.height/e.height,height:n.height,left:(n.width-e.width*n.height/e.height)/2,top:0}:{width:n.width,height:e.height*n.width/e.width,left:0,top:(n.height-e.height*n.width/e.width)/2};case"contain":return r<=i?{width:n.width,height:e.height*n.width/e.width,left:0,top:(n.height-e.height*n.width/e.width)/2}:{width:e.width*n.height/e.height,height:n.height,left:(n.width-e.width*n.height/e.height)/2,top:0};default:return{width:n.width,height:n.height,left:0,top:0}}},$=function(t){return function(e,n,r){n.addEventListener(t,e,r)}},tt=$("click"),et=$("touchstart"),nt=$("touchmove"),rt=$("touchend"),it=function(t){var e="",n=!0,r=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var c=a.value,u="";if("object"===(0,o.default)(t[c]))if("append"===c)u=t[c].id;else{var f=!0,h=!1,l=void 0;try{for(var p,d=Object.keys(t[c])[Symbol.iterator]();!(f=(p=d.next()).done);f=!0){var v=p.value;u+="\n"+v+" => "+t[c][v]+"\n"}}catch(t){h=!0,l=t}finally{try{!f&&d.return&&d.return()}finally{if(h)throw l}}}else u=t[c];e+=c+" => "+u+"\n"}}catch(t){r=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return console.log("%c "+e,"color: #FC1F49"),e};function ot(t){this.opt=t,this.i,this.build()}ot.prototype={build:function(){return this.i=y(this.opt.name,this.opt.tag,this.opt.index),this.opt.display&&O(this.opt.display)(this.i),this.opt.position&&T(this.opt.position)(this.i),this.opt.width&&H(this.opt.width,this.i),this.opt.height&&D(this.opt.height,this.i),this.opt.top&&V(this.opt.top,this.i),this.opt.bottom&&W(this.opt.bottom,this.i),this.opt.left&&Q(this.opt.left,this.i),this.opt.right&&K(this.opt.right,this.i),this.opt.opacity&&P(this.opt.opacity)(this.i),this.opt.zIndex&&I(this.opt.zIndex,this.i),this.opt.bkgColor&&F(this.opt.bkgColor,this.i),this.opt.innerTxt&&_(this.opt.innerTxt,this.i),this.opt.margin&&z(this.opt.margin,this.i),this.opt.padding&&B(this.opt.padding,this.i),this.opt.append&&x(this.opt.append,this.i),this.opt.class&&m(this.opt.class,this.i),this.opt.style&&U(this.i,this.opt.style),this.opt.src&&(this.i.src=this.opt.src),this.opt.href&&(this.i.href=this.opt.href),this.opt.type&&(this.i.type=this.opt.type),this.opt.tstart&&et(this.opt.tstart,this.i),this.opt.tmove&&nt(this.opt.tmove,this.i),this.opt.tend&&rt(this.opt.tend,this.i),this.opt.click&&tt(this.opt.click,this.i),this},info:function(){return it(this.opt),this},_event:function(t,e){return $(t)(e,this.i),this},_style:function(t){return U(this.i,t),this}};e.createNewCreative=function(t){var e=t.callback,n=t.name,r=t.orga,i=t.favicon;return new Promise(function(t,o){var a=window,s=document,c=a.onload;function f(){var t=s.body,o=s.head;t&&(t.style.cssText="position: fixed;top: 0;left: 0;bottom: 0;right: 0; width: 100%; height: 100%;",z(0,t),L(t));var a=v("meta");a.setAttribute("name","viewport"),a.setAttribute("content","width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=yes"),a.setAttribute("charset","utf-8");var c=v("title");if(_(n+(r?"_"+r:""),c),i){var f=v("link");f.setAttribute("rel","icon"),f.setAttribute("type","image/x-icon"),f.setAttribute("href",i),o&&x(o,f)}o&&x(o,a,c),u().then(function(t){void 0===window.creative?window.creative={size:t}:window.creative.size=t,e()}).catch(function(t){console.error(t)})}"function"!=typeof a.onload?a.onload=f:a.onload=function(){c(),f()}})},e.px="px",e.getInt=h,e.amMraid=function(){return void 0!==window.mraid},e.getSize=c,e.amIphone=function(){return navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Safari")},e.amLandscape=function(){return 90===window.orientation||-90===window.orientation},e.amPortrait=function(){return 0==window.orientation},e.computeSize=u,e.select=l,e.selectClass=p,e.selectTag=d,e.S=function(t){switch(t.charAt(0)){case".":return p(t.slice(1,t.length));case"#":return l(t.slice(1,t.length));default:return d(t)}},e.have=function(t){return void 0!==t&&null!==t},e.create=v,e.setElem=y,e.appendToDom=x,e.innerTxt=_,e.opacity=P,e.opacity0=k,e.opacity1=S,e.display=O,e.displayNone=j,e.displayFlex=L,e.displayBlock=E,e.setPos=T,e.setFix=M,e.setAbs=C,e.setRel=A,e.setZindex=I,e.bkgColor=F,e.setPM=R,e.setMargin=z,e.setPadding=B,e.setTransition=function(t,e,n){for(var r=arguments.length,i=Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=t+" "+e+"s "+n;i.map(function(t){return t.style.transition=a,t.style.setProperty("-webkit-transition",a),t})},e.setDim=G,e.setWidth=H,e.setHeight=D,e.setTop=V,e.setBottom=W,e.setRight=K,e.setLeft=Q,e.classe=g,e.addClass=m,e.remClass=w,e.toggleClass=b,e.eventHandler=$,e.tstart=et,e.tmove=nt,e.tend=rt,e.click=tt,e.debugo=it,e.CreateElem=ot,e.VideoOnCanvas=J,e.haveLegalTerms=function(t,e,n){if(void 0!==e){var r=0,i=(new ot({name:"bkgmentions",tag:"div",height:20,width:"100",position:"absolute",zIndex:999999998,top:n.height-20,bottom:0,style:{backgroundColor:"black"},append:t}).i,new ot({name:"mentions",tag:"div",height:20,display:"flex",position:"absolute",zIndex:999999999,top:n.height-20,bottom:0,innerTxt:e,style:{fontFamily:"sans-serif",color:"grey",whiteSpace:"nowrap"},append:t}).i);setInterval(function(){i.style.left=-r+"px",r++,h(i.style.left)===-i.clientWidth&&(r=-n.width,i.style.left=-r+"px")},20)}}}])});
\No newline at end of file