Skip to content

Instantly share code, notes, and snippets.

@dmarman
Created April 5, 2022 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmarman/1faecb89a6ea3a459a972d12640dce00 to your computer and use it in GitHub Desktop.
Save dmarman/1faecb89a6ea3a459a972d12640dce00 to your computer and use it in GitHub Desktop.
/*! For license information please see tuemilio-modal.js.LICENSE.txt */
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=225)}({19:function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var r=n(3),o=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var r=n(5);function o(e,t,n,r,o){var a=i.apply(this,arguments);return e.addEventListener(n,a,o),{destroy:function(){e.removeEventListener(n,a,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return a(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=o()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=o()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),l=n.n(c),u=n(2),f=n.n(u),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.resolveOptions(n),r.listenClick(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),h(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=f()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return y("action",e)}},{key:"defaultTarget",value:function(e){var t=y("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return y("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(l.a);function y(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=p}]).default},e.exports=r()},199:function(e,t){e.exports='<div>\n <div class="t-form-group">\n <input id="t-email" class="t-input t-email t-input-color" type="email" name="email" autocomplete="email" placeholder="name@email.com" required>\n <div class="t-message t-feedback-email"></div>\n </div>\n <button type="button" id="t-button-submit" class="t-button t-button-submit">Request early access</button>\n</div>'},200:function(e,t){e.exports='<div class="t-gdpr-content t-d-none">\n <p class="t-gdpr-title"></p>\n <p class="t-gdpr-description"></p>\n <div class="t-marketing-permissions"></div>\n <p class="t-gdpr-legal-text"></p>\n <div class="t-gdpr-policy">\n <svg width="60" height="60" viewBox="0 0 290 290" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M145 62C177 76 177 76 210 89C213 103 214 118 213 133C211 148 208 162 202 175C195 188 187 199 177 208C168 217 156 224 145 228C133 224 121 217 112 208C102 199 94 188 87 175C81 162 78 148 76 133C75 118 76 103 79 89C112 76 112 77 145 62Z" fill="#A6A7A8" stroke="#A6A7A8" stroke-width="3.25" />\n <path d="M152 106V120C152 121 152 122 153 123C154 123 155 124 156 124H170" stroke="white" stroke-width="7"/>\n <path d="M163 172H126C124 172 122 171 121 169C120 168 119 166 119 164V113C119 111 120 109 121 108C122 106 124 106 126 106H152L170 124V164C170 166 169 168 168 169C167 171 165 172 163 172Z" stroke="white" stroke-width="7"/>\n <path d="M208 46.5L197 51L199 40L191 32L202 30L207 20L213 30L224 32L216 40L218 51L208 46Z" fill="#A6A7A8"/>\n <path d="M253 91.5L242 96L244 85L236 77L247 75L252 65L258 75L269 77L261 85L263 96L253 91Z" fill="#A6A7A8"/>\n <path d="M270 154.5L259 159L261 148L253 140L264 138L269 128L275 138L286 140L278 148L280 159L270 154Z" fill="#A6A7A8"/>\n <path d="M253 217.5L242 222L244 211L236 203L247 201L252 191L258 201L269 203L261 211L263 222L253 217Z" fill="#A6A7A8"/>\n <path d="M208 262.5L197 267L199 256L191 248L202 246L207 236L213 246L224 248L216 256L218 267L208 262Z" fill="#A6A7A8"/>\n <path d="M145 279.5L134 284L136 273L128 265L139 263L144 253L150 263L161 265L153 273L155 284L145 279Z" fill="#A6A7A8"/>\n <path d="M82 262.5L71 267L73 256L65 248L76 246L81 236L87 246L98 248L90 256L92 267L82 262" fill="#A6A7A8"/>\n <path d="M37 217.5L26 222L28 211L20 203L31 201L36 191L42 201L53 203L45 211L47 222L37 217" fill="#A6A7A8"/>\n <path d="M20 154.5L9 159L11 148L3 140L14 138L19 128L25 138L36 140L28 148L30 159L20 154Z" fill="#A6A7A8"/>\n <path d="M37 91L26.7 96L28 85L20 77L31 75L36 65L42 75L53 77L45 85L47 96L37 91Z" fill="#A6A7A8"/>\n <path d="M82 46L71.7 51L73 40L65 32L76 30L81 20L87 30L98 32L90 40L92 51L82 46Z" fill="#A6A7A8"/>\n <path d="M145 29L134.7 34L136 23L128 15L139 13L144 3L150 13L161 15L153 23L155 34L145 29Z" fill="#A6A7A8"/>\n <line x1="92" y1="203" x2="202" y2="203" stroke="white" stroke-width="6"/>\n </svg>\n <p class="t-tuemilio-disclaimer">We use Tuemilio for our waitlist. By clicking below to join this waitlist, you acknowledge that your information will be transferred to Tuemilio for processing. Learn more about Tuemilio\'s privacy practices <a target="_blank" href="https://tuemilio.com/privacy">here</a>.</p>\n </div>\n</div>'},201:function(e,t){e.exports='<label class="t-marketing-label">\n <input type="checkbox" class="t-form-checkbox" data-consent="true">\n <span class="t-marketing-permission-name"></span>\n</label>'},202:function(e,t){e.exports='<div class="t-spacer"></div>\n<div class="t-dashboard" style="display: block;">\n <div class="t-container">\n \n <div class="t-hero-text"></div>\n\n <div class="t-row">\n <div class="t-col-12 t-col-lg-6">\n <div class="t-row t-left"></div>\n </div>\n\n <div class="t-col-12 t-col-lg-6">\n <div class="t-row t-right"></div>\n </div>\n </div>\n\n <div class="t-footer-text"></div>\n\n </div>\n</div>'},203:function(e,t){e.exports='<div class="t-col-12">\n <div class="t-card">\n <div class="t-card-header">\n <h2 class="t-title"></h2>\n </div>\n <div class="t-card-body">\n <p class="t-paragraph"></p>\n <div class="t-content"></div>\n </div>\n </div>\n</div>'},204:function(e,t){e.exports='<div class="t-countdown-container">\n <div>\n <div class="t-days"></div>\n <div class="t-text-days"></div>\n </div>\n <div>\n <div class="t-hours"></div>\n <div class="t-text-hours"></div>\n </div>\n <div>\n <div class="t-minutes"></div>\n <div class="t-text-minutes"></div>\n </div>\n <div>\n <div class="t-seconds"></div>\n <div class="t-text-seconds"></div>\n </div>\n</div>'},205:function(e,t){e.exports='<div>\n <div class="t-share-link">\n <div class="t-share-input">\n <input type="text" class="t-form-control t-modal-share-input" onClick="this.setSelectionRange(0, this.value.length)" id="input-dashboard">\n </div>\n <div class="t-share-button">\n <button type="submit" class="t-modal-copy-btn t-primary-color" data-clipboard-target="#input-dashboard">\n <span class="t-text-task-copy-button"></span>\n <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="15px" height="15px" viewBox="0 0 561 561" xml:space="preserve" data-lt-installed="true"><g class="currentLayer"><path d="M395.25,0h-306c-28.05,0-51,22.95-51,51v357h51V51h306V0z M471.75,102h-280.5c-28.05,0-51,22.95-51,51v357 c0,28.05,22.95,51,51,51h280.5c28.05,0,51-22.95,51-51V153C522.75,124.95,499.8,102,471.75,102z M471.75,510h-280.5V153h280.5V510 z" id="svg_1" class="selected t-primary-color" fill="#ffffff" fill-opacity="1"/></g></svg>\n </button>\n </div>\n </div>\n\n <div class="t-share-social">\n <div class="t-text-task-outro"></div>\n <a class="t-btn-social t-btn-twitter">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="Twitter" role="img" viewBox="0 0 512 512" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#1da1f3"/><path fill="#fff" d="M437 152a72 72 0 0 1-40 12 72 72 0 0 0 32-40 72 72 0 0 1-45 17 72 72 0 0 0-122 65 200 200 0 0 1-145-74 72 72 0 0 0 22 94 72 72 0 0 1-32-7 72 72 0 0 0 56 69 72 72 0 0 1-32 1 72 72 0 0 0 67 50 200 200 0 0 1-105 29 200 200 0 0 0 309-179 200 200 0 0 0 35-37"/></svg>\n </a>\n <a class="t-btn-social t-btn-facebook">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="Facebook" role="img" viewBox="0 0 512 512" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#3b5998"/><path fill="#fff" d="M330 512V322h64l9-74h-73v-47c0-22 6-36 37-36h39V99c-7-1-30-3-57-3-57 0-95 34-95 98v54h-64v74h64v190z"/></svg>\n </a>\n <a class="t-btn-social t-btn-linkedin">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="LinkedIn" role="img" viewBox="0 0 512 512" fill="#fff" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#0077b5"/><circle cx="142" cy="138" r="37"/><path stroke="#fff" stroke-width="66" d="M244 194v198M142 194v198"/><path d="M276 282c0-20 13-40 36-40 24 0 33 18 33 45v105h66V279c0-61-32-89-76-89-34 0-51 19-59 32"/></svg>\n </a>\n <a class="t-btn-social t-btn-email">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="Email" role="img" viewBox="0 0 512 512" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="teal"/><rect width="356" height="256" x="78" y="128" fill="#fff" rx="8%"/><path fill="none" stroke="teal" stroke-width="20" d="M434 128L269 292c-7 8-19 8-26 0L78 128m0 256l129-128m227 128L305 256"/></svg>\n </a>\n <a class="t-btn-social t-btn-whatsapp">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="WhatsApp" role="img" viewBox="0 0 512 512" fill="#fff" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#45d354"/><path d="M308 273c-3-2-6-3-9 1l-12 16c-3 2-5 3-9 1-15-8-36-17-54-47-1-4 1-6 3-8l9-14c2-2 1-4 0-6l-12-29c-3-8-6-7-9-7h-8c-2 0-6 1-10 5-22 22-13 53 3 73 3 4 23 40 66 59 32 14 39 12 48 10 11-1 22-10 27-19 1-3 6-16 2-18"/><path d="M264 384c-41 0-72-22-72-22l-49 13 12-48s-20-31-20-70c0-72 59-132 132-132 68 0 126 53 126 127 0 72-58 131-129 132m-159 29l83-23a158 158 0 0 0 230-140c0-86-68-155-154-155a158 158 0 0 0-137 236"/></svg>\n </a>\n <a class="t-btn-social t-btn-reddit">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="Reddit" role="img" viewBox="0 0 512 512" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#f40"/><g fill="#fff"><ellipse cx="256" cy="307" rx="166" ry="117"/><circle cx="106" cy="256" r="42"/><circle cx="407" cy="256" r="42"/><circle cx="375" cy="114" r="32"/></g><g stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="m256 196 23-101 73 15" stroke="#fff" stroke-width="16"/><path d="m191 359c33 25 97 26 130 0" stroke="#f40" stroke-width="13"/></g><g fill="#f40"><circle cx="191" cy="287" r="31"/><circle cx="321" cy="287" r="31"/></g></svg>\n </a>\n <a class="t-btn-social t-btn-wechat">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="WeChat" role="img" viewBox="0 0 512 512" fill="#fff" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#00c70a"/><path d="m402 369c23-17 38-42 38-70 0-51-50-92-111-92s-110 41-110 92 49 92 110 92c13 0 25-2 36-5 4-1 8 0 9 1l25 14c3 2 6 0 5-4l-6-22c0-3 2-5 4-6m-110-85a15 15 0 1 1 0-29 15 15 0 0 1 0 29m74 0a15 15 0 1 1 0-29 15 15 0 0 1 0 29"/><path d="m205 105c-73 0-132 50-132 111 0 33 17 63 45 83 3 2 5 5 4 10l-7 24c-1 5 3 7 6 6l30-17c3-2 7-3 11-2 26 8 48 6 51 6-24-84 59-132 123-128-10-52-65-93-131-93m-44 93a18 18 0 1 1 0-35 18 18 0 0 1 0 35m89 0a18 18 0 1 1 0-35 18 18 0 0 1 0 35"/></svg>\n </a>\n <a class="t-btn-social t-btn-telegram">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="Telegram" role="img" viewBox="0 0 512 512" data-lt-installed="true"><rect width="512" height="512" rx="15%" fill="#37aee2"/><path fill="#c8daea" d="M199 404c-11 0-10-4-13-14l-32-105 245-144"/><path fill="#a9c9dd" d="M199 404c7 0 11-4 16-8l45-43-56-34"/><path fill="#f6fbfe" d="M204 319l135 99c14 9 26 4 30-14l55-258c5-22-9-32-24-25L79 245c-21 8-21 21-4 26l83 26 190-121c9-5 17-3 11 4"/></svg>\n </a>\n <a class="t-btn-social t-btn-line">\n <svg xmlns="http://www.w3.org/2000/svg" aria-label="LINE" role="img" viewBox="0 0 512 512"><rect width="512" height="512" rx="15%" fill="#00B900"/><path d="m443 231c-2 45-21 76-51 103-53 47-137 105-148 96-11-14 21-47-20-52-88-12-155-74-155-147 0-82 85-150 188-150s189 68 186 150z" fill="#fff"/><path d="m371 232h-34m34-36h-36v72h36m-123 0v-72l54 72v-72m-89 72v-72m-66 0v72h37" fill="none" stroke="#00B900" stroke-linecap="round" stroke-linejoin="round" stroke-width="21"/></svg>\n </a>\n </div>\n</div>'},206:function(e,t){e.exports='<div>\n <p class="t-points">\n <span class="t-modal-dashboard-points"></span>\n <span class="t-text-units"></span>\n </p>\n <p class="t-text-objective-paragraph"></p>\n <div class="t-bar-wrapper">\n <div class="t-bar">\n <span class="t-granted t-modal-bar-width" style="width: 0%;"></span>\n </div>\n <div class="t-legend">\n <div class="t-granted">\n <i></i>\n <span class="t-text-objective-completed t-label"></span>\n </div>\n <div class="t-future">\n <i></i>\n <span class="t-text-objective-uncompleted t-label"></span>\n </div>\n </div>\n </div>\n</div>\n'},207:function(e,t){e.exports='<div>\n <div class="t-scroll">\n <div class="t-referred-list"></div>\n </div>\n</div>'},208:function(e,t){e.exports='<div class="t-waitlist-row">\n <div class="t-waitlist-position" style="opacity: 1;">\n <svg xmlns="http://www.w3.org/2000/svg" class="t-lock-icon" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="#495057" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <rect x="5" y="11" width="14" height="10" rx="2" />\n <circle cx="12" cy="16" r="1" />\n <path d="M8 11v-4a4 4 0 0 1 8 0v4" />\n </svg>\n <svg xmlns="http://www.w3.org/2000/svg" class="t-circle-check-icon" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="#00b341" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <circle cx="12" cy="12" r="9" />\n <path d="M9 12l2 2l4 -4" />\n </svg>\n </div>\n <div class="t-milestone-title"></div>\n <div class="t-milestone-target t-flex-col">\n <div class="t-milestone-points-number"></div>\n <div class="t-milestone-points-text"></div>\n </div>\n</div>\n'},209:function(e,t){e.exports='<div>\n <label for="invite-input" class="t-text-invite-email-address-label"></label>\n <div class="t-share-link">\n <div class="t-share-input">\n <input type="email" class="t-form-control t-modal-invite-input" id="invite-input">\n </div>\n <div class="t-share-button">\n <button type="submit" class="t-modal-invite-btn t-primary-color">\n <span class="t-text-invite-send-button"></span>\n <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-send" width="16" height="16" viewBox="0 0 24 24" stroke-width="2" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <line x1="10" y1="14" x2="21" y2="3" />\n <path d="M21 3l-6.5 18a0.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a0.55 .55 0 0 1 0 -1l18 -6.5" />\n </svg>\n </button>\n </div>\n </div>\n <div class="t-invite-feedback"></div>\n <div>\n <div class="t-text-invite-outro"></div>\n </div>\n</div>'},210:function(e,t){e.exports='<div id="t-modal" class="t-modal t-form-modal">\n <div class="t-modal-content">\n <span class="t-modal-close">\n <svg width="14" height="14"><path d="M13.978 12.637l-1.341 1.341L6.989 8.33l-5.648 5.648L0 12.637l5.648-5.648L0 1.341 1.341 0l5.648 5.648L12.637 0l1.341 1.341L8.33 6.989l5.648 5.648z" fill-rule="evenodd"></path></svg>\n </span>\n <div class="t-modal-elements"></div>\n </div>\n</div>'},211:function(e,t){e.exports='<button type="button" class="t-button t-button-dashboard t-hidden"></button>'},212:function(e,t){e.exports='<div class="t-card t-toast">\n <div class="t-card-body">\n <div class="t-f-avatar">\n <div class="connecting-circle"></div>\n </div>\n <div class="t-wrap-content">\n <div class="t-title">this is the title</div>\n <div class="t-content">and thats the content</div>\n <div class="t-time-diff"></div>\n </div>\n </div>\n</div>'},225:function(e,t,n){e.exports=n(443)},3:function(e,t,n){"use strict";var r={};!function(){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},t={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,ticks:200,x:.5,y:.5,zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"]};function n(){}function o(e,n,r){return function(e,t){return t?t(e):e}(e&&null!=e[n]?e[n]:t[n],r)}function i(e){return parseInt(e,16)}function a(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function s(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function c(t,o,i,c,l){var u=o.slice(),f=t.getContext("2d"),d=t.width,h=t.height,p=i?a:s;function y(){d=h=null}var b,m=(b=function(n){e((function r(){d||h||(p(t),d=t.width,h=t.height),f.clearRect(0,0,d,h),(u=u.filter((function(e){return function(e,t){t.x+=Math.cos(t.angle2D)*t.velocity,t.y+=Math.sin(t.angle2D)*t.velocity+3,t.wobble+=.1,t.velocity*=t.decay,t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+5,t.wobbleX=t.x+10*Math.cos(t.wobble),t.wobbleY=t.y+10*Math.sin(t.wobble);var n=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,o=t.y+t.random*t.tiltSin,i=t.wobbleX+t.random*t.tiltCos,a=t.wobbleY+t.random*t.tiltSin;return e.fillStyle="rgba("+t.color.r+", "+t.color.g+", "+t.color.b+", "+(1-n)+")",e.beginPath(),e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(o)),e.lineTo(Math.floor(i),Math.floor(a)),e.lineTo(Math.floor(r),Math.floor(t.wobbleY)),e.closePath(),e.fill(),t.tick<t.totalTicks}(f,e)}))).length?e(r):(c&&window.removeEventListener("resize",y),l(),n())}))},r.exports.Promise?new r.exports.Promise(b):(b(n,n),null));return c&&window.addEventListener("resize",y,!1),{addFettis:function(e){return u=u.concat(e),m},canvas:t,promise:m}}function l(e,t){var n,r=!e,l=!!o(t||{},"resize"),u=!1;return function(t){var f=o(t,"particleCount",Math.floor),d=o(t,"angle",Number),h=o(t,"spread",Number),p=o(t,"startVelocity",Number),y=o(t,"decay",Number),b=o(t,"colors"),m=o(t,"ticks",Number),v=o(t,"zIndex",Number),g=function(e){var t=o(e,"origin",Object);return t.x=o(t,"x",Number),t.y=o(t,"y",Number),t}(t),w=f,k=[];r?e=n?n.canvas:function(e){var t=document.createElement("canvas");return a(t),t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.pointerEvents="none",t.style.zIndex=e,t}(v):l&&!u&&(s(e),u=!0);for(var S,x,L,E,T,C=e.width*g.x,_=e.height*g.y;w--;)k.push((S={x:C,y:_,angle:d,spread:h,startVelocity:p,color:b[w%b.length],ticks:m,decay:y},x=void 0,L=void 0,E=void 0,T=void 0,E=S.angle*(Math.PI/180),T=S.spread*(Math.PI/180),{x:S.x,y:S.y,wobble:10*Math.random(),velocity:.5*S.startVelocity+Math.random()*S.startVelocity,angle2D:-E+(.5*T-Math.random()*T),tiltAngle:Math.random()*Math.PI,color:(x=S.color,L=String(x).replace(/[^0-9a-f]/gi,""),L.length<6&&(L=L[0]+L[0]+L[1]+L[1]+L[2]+L[2]),{r:i(L.substring(0,2)),g:i(L.substring(2,4)),b:i(L.substring(4,6))}),tick:0,totalTicks:S.ticks,decay:S.decay,random:Math.random()+5,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0}));return n?n.addFettis(k):(r&&document.body.appendChild(e),(n=c(e,k,r,r||l,(function(){n=null,r&&document.body.removeChild(e)}))).promise)}}r.exports=l(),r.exports.create=l,r.exports.Promise=window.Promise||null}(),t.a=r.exports;r.exports.create},443:function(e,t,n){"use strict";n.r(t);var r=n(199),o=n.n(r),i=n(200),a=n.n(i),s=n(201),c=n.n(s);function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.eventName=t,this.callbacks=[]}var t,n,r;return t=e,(n=[{key:"registerCallback",value:function(e){this.callbacks.push(e)}},{key:"unregisterCallback",value:function(e){var t=this.callbacks.indexOf(e);t>-1&&this.callbacks.splice(t,1)}},{key:"fire",value:function(e){this.callbacks.slice(0).forEach((function(t){t(e)}))}}])&&l(t.prototype,n),r&&l(t,r),e}();function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.events={},this.firedEvents=[],this.logging=!1}var t,n,r;return t=e,(n=[{key:"dispatch",value:function(e,t){this.logging&&console.log("%cEvent: "+this.constructor.name+" "+e,"color:green;");var n=this.events[e];n&&(n.fire(t),this.firedEvents.push(e))}},{key:"on",value:function(e,t){var n=this.events[e];n||(n=new u(e),this.events[e]=n),n.registerCallback(t)}},{key:"off",value:function(e,t){var n=this.events[e];n&&n.callbacks.indexOf(t)>-1&&(n.unregisterCallback(t),0===n.callbacks.length&&delete this.events[e])}},{key:"setLoggin",value:function(e){this.logging=e}}])&&f(t.prototype,n),r&&f(t,r),e}(),h='<svg class="t-button-spinner" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid"><circle class="t-button" cx="50" cy="50" fill="none" ng-attr-stroke="white" ng-attr-stroke-width="white" ng-attr-r="white" ng-attr-stroke-dasharray="white" stroke="white" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(23.5094 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animateTransform></circle></svg>';function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function b(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(s,e);var t,n,r,i=k(s);function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=i.call(this)).id=window[window.TuemilioObject].id,e.wrappers=document.querySelectorAll(".t-signup"),e.config={},e.startTime=new Date,e.forms=[],e}return t=s,(n=[{key:"init",value:function(e){var t=this;if(this.config=e,!this.config.disabled){if(0===this.wrappers.length&&!this.config.disabled)throw alert('You forgot to add `<div id="t-signup"></div>` where you need to place your signup form'),Error('You forgot to add `<div id="t-signup"></div>` where you need to add your signup form');this.wrappers.forEach((function(e){t.forms.push({wrapper:e,skeleton:t.createElementFromHTML(o.a),emailElement:null,emailInput:null,emailButton:null,dashboardButton:null,inputs:null,feedbackElement:null,spinner:null})})),this.forms.forEach((function(e){if(t._loadCustomFormElements(e),e.skeleton.classList.add("t-form"),t.config.style&&t.config.style.inline&&e.skeleton.classList.add("t-form-inline"),e.emailInput=e.wrapper.querySelector(".t-email"),e.submitButton=e.wrapper.querySelector(".t-button-submit"),e.dashboardButton=e.wrapper.querySelector(".t-button-dashboard"),e.inputs=b(e.wrapper.getElementsByTagName("input")).filter((function(e){return!e.dataset.consent})),t._loadGdprContent(e),e.emailInput){var n,r=y(e.inputs);try{var o=function(){var r=n.value;r.onkeydown=function(n){"Enter"===(n=n||window.event).key?t._submit(e):(t.removeFeedback("email"),r.style.borderColor="#dbe2e8")}};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}if(e.consentInputs){var i,a=y(e.consentInputs);try{var s=function(){var e=i.value;e.addEventListener("change",(function(){e.style.borderColor="inherit"}))};for(a.s();!(i=a.n()).done;)s()}catch(e){a.e(e)}finally{a.f()}}e.submitButton&&e.submitButton.addEventListener("click",(function(){t._submit(e)})),e.submitButton.innerText=t.config.button.texts.CTA;var c=t.config.input.texts.placeholder;e.emailElement&&(c=e.emailElement.placeholder),e.emailInput.placeholder=c}))}}},{key:"_submit",value:function(e){var t=this;e.emailInput.value=e.emailInput.value.trim();var n,r=!1,o=y(e.inputs);try{for(o.s();!(n=o.n()).done;){var i=n.value;i.required&&""===i.value&&this.config.validationActive&&(i.style.borderColor="#d91b1b",r=!0)}}catch(e){o.e(e)}finally{o.f()}if(""===e.emailInput.value&&this.config.validationActive&&(this.addFeedback("email",this.config.feedback.texts.empty),e.emailInput.disabled=!1,this.dispatch("emptyEmail"),r=!0),this.config.gdpr&&e.consentInputs&&this.config.validationActive){var a=this.config.gdpr.texts.default.marketingPermissions;e.consentInputs.forEach((function(e,t){a[t].required&&!e.checked&&(e.style.borderColor="#d91b1b",e.nextElementSibling.style.color="#d91b1b",r=!0)}))}if(!r){if(!1===this.validateEmail(e.emailInput.value)&&this.config.validationActive)return this.addFeedback("email",this.config.feedback.texts.invalidEmail),e.emailInput.disabled=!1,this.dispatch("invalidEmail",e.emailInput.value),void(e.emailInput.style.borderColor="#d91b1b");var s={address:e.emailInput.value.toLowerCase(),action:"subscribe",custom_fields:{},consents:{}};b(e.inputs).forEach((function(e){"email"!==e.name&&("radio"!==e.type&&(s.custom_fields[e.name]=e.value),"radio"===e.type&&e.checked&&(s.custom_fields[e.name]=e.value)),e.disabled=!0})),e.consentInputs&&b(e.consentInputs).forEach((function(e,n){s.consents[e.name]={name:e.name,consented:e.checked,documentId:t.config.gdpr.documentId,linked_to_automations:t.config.gdpr.texts.default.marketingPermissions[n].linked_to_automations,source:"email-form"}})),this.setSubmitButtonAsLoading(),this.dispatch("submit",s)}}},{key:"_loadCustomFormElements",value:function(e){if(!this.config.disabled){for(var t=e.wrapper.children,n=t.length,r=0;r<n;r++){"INPUT"===t[0].tagName&&(t[0].type="text",t[0].classList.add("t-input"),t[0].classList.add("t-input-color"),t[0].classList.add("t-"+t[0].name.replace(/\s+/g,"_").toLowerCase()),"email"===t[0].name&&(this.removeSkeletonEmail(e),t[0].type="email",t[0].required=!0,e.emailElement=t[0]));var o=t[0].name;e.skeleton.getElementsByClassName("t-form-group")[0].appendChild(t[0]),void 0!==o&&e.skeleton.getElementsByClassName("t-form-group")[0].appendChild(this.createFeedbackMessageElement(o))}e.wrapper.appendChild(e.skeleton)}}},{key:"_loadGdprContent",value:function(e){if(this.config.gdpr.enabled){var t=this.createElementFromHTML(a.a);if(this.config.style&&this.config.style.inline){var n=e.wrapper.querySelector(".t-form-group").offsetWidth+e.submitButton.offsetWidth;t.style.maxWidth=n,t.style.margin="0 auto",e.wrapper.appendChild(t)}else e.wrapper.querySelector(".t-form-group").appendChild(t);e.gdprContent=e.wrapper.querySelector(".t-gdpr-content"),e.gdprContent.classList.remove("t-d-none"),e.gdprContent.querySelector(".t-gdpr-title").innerText=this.config.gdpr.texts.default.gdprTitle,e.gdprContent.querySelector(".t-gdpr-description").innerText=this.config.gdpr.texts.default.gdprDescription,e.gdprContent.querySelector(".t-gdpr-legal-text").innerText=this.config.gdpr.texts.default.gdprLegalText,/^de\b/.test(navigator.language)&&(e.gdprContent.querySelector(".t-tuemilio-disclaimer").innerHTML='Wir verwenden Tuemilio für unsere Warteliste. Indem Sie unten klicken, um sich dieser Warteliste anzuschließen, bestätigen Sie, dass Ihre Informationen zur Bearbeitung an Tuemilio übertragen werden. Erfahren Sie <a target="_blank" href="https://tuemilio.com/privacy">hier</a> mehr über die Datenschutzpraktiken von Tuemilio.'),this.config.gdpr.texts.default.marketingPermissions.forEach((function(t){var n=document.createElement("div");n.innerHTML=c.a,n.querySelector(".t-marketing-permission-name").innerText=t.name,n.querySelector("input").name=t.name.replace(/[^0-9a-zA-Z]/g,"_").toLowerCase(),e.gdprContent.querySelector(".t-marketing-permissions").appendChild(n)})),e.consentInputs=b(e.wrapper.getElementsByTagName("input")).filter((function(e){return e.dataset.consent}))}}},{key:"createFeedbackMessageElement",value:function(e){var t=document.createElement("div");return t.classList.add("t-message"),t.classList.add("t-feedback-"+e.replace(/\s+/g,"_").toLowerCase()),t}},{key:"removeSkeletonEmail",value:function(e){e.skeleton.getElementsByClassName("t-email")[0].parentElement.removeChild(e.skeleton.getElementsByClassName("t-email")[0]),e.skeleton.getElementsByClassName("t-message")[0].parentElement.removeChild(e.skeleton.getElementsByClassName("t-message")[0])}},{key:"createElementFromHTML",value:function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild}},{key:"addFeedback",value:function(e,t){if(!this.config.disabled)return this.addPaddingButton("7px"),this.writeFeedback(e,t)}},{key:"removeFeedback",value:function(e){this.config.disabled||(this.addPaddingButton("16px"),this.writeFeedback(e,""))}},{key:"writeFeedback",value:function(e,t){var n=this;if(!this.config.disabled){var r=[];return this.forms.forEach((function(o){var i=o.wrapper.querySelector(".t-feedback-"+e);n.config.style&&n.config.style.inline&&n.insertAfter(i,o.wrapper.querySelector(".t-form")),i.innerHTML="",i.innerHTML=t,i.classList.add("roll-down"),r.push(i)})),r}}},{key:"validateEmail",value:function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}},{key:"setSubmitButtonAsLogin",value:function(){var e=this;this.config.disabled||(this.addPaddingButton("16px"),this.forms.forEach((function(t){t.submitButton.disabled=!1,t.submitButton.style.cursor="pointer",t.submitButton.innerHTML=e.config.button.texts.login})),this.enableInputs())}},{key:"setSubmitButtonAsLoading",value:function(){var e=this;this.config.disabled||this.forms.forEach((function(t){t.submitButton.querySelectorAll("svg").length>0||(t.submitButton.previousElementSibling.classList.contains("t-hidden")&&(t.submitButton.style.marginTop="0"),t.submitButton.innerHTML=h+e.config.button.texts.loading,t.submitButton.disabled=!0,t.submitButton.style.cursor="auto",t.spinner=t.wrapper.getElementsByClassName("t-button-spinner")[0],t.spinner.style.verticalAlign="sub",t.spinner.style.marginRight="8px")}))}},{key:"setSubmitButtonAsNotLoading",value:function(){var e=this;this.config.disabled||this.forms.forEach((function(t){t.submitButton.innerHTML=e.config.button.texts.CTA,t.submitButton.disabled=!1,t.submitButton.style.cursor="pointer",e.enableInputs()}))}},{key:"enableInputs",value:function(){this.config.disabled||this.forms.forEach((function(e){b(e.inputs).forEach((function(e){e.disabled=!1}))}))}},{key:"hideSubmitButton",value:function(){this.config.disabled||this.forms.forEach((function(e){e.submitButton.classList.add("t-hidden")}))}},{key:"showSubmitButton",value:function(){this.config.disabled||this.forms.forEach((function(e){e.submitButton.classList.remove("t-hidden")}))}},{key:"hideForm",value:function(){this.config.disabled||(document.querySelectorAll(".t-form-group").forEach((function(e){e.classList.add("t-hidden")})),this.hideGdprContent())}},{key:"showForm",value:function(){this.config.disabled||(document.querySelectorAll(".t-form-group").forEach((function(e){e.classList.remove("t-hidden")})),this.showGdprContent())}},{key:"hideCustomFields",value:function(){this.config.disabled||this.forms.forEach((function(e){b(e.inputs).forEach((function(e){"email"!==e.name&&e.classList.add("t-hidden")}));for(var t=e.wrapper.querySelectorAll("label"),n=0;n<t.length;n++)"email"!==t[n].htmlFor&&t[n].classList.add("t-hidden")}))}},{key:"hideGdprContent",value:function(){this.config.disabled||this.forms.forEach((function(e){e.gdprContent&&e.gdprContent.classList.add("t-hidden")}))}},{key:"showGdprContent",value:function(){this.config.disabled||this.forms.forEach((function(e){e.gdprContent&&e.gdprContent.classList.remove("t-hidden")}))}},{key:"hideEmailInput",value:function(){this.config.disabled||this.forms.forEach((function(e){e.emailInput.classList.add("t-hidden")}))}},{key:"hideTextElements",value:function(){this.config.disabled||this.forms.forEach((function(e){e.skeleton.querySelectorAll(".t-form-group > div, .t-form-group > p, .t-form-group > span").forEach((function(e){e.classList.contains("t-message")||e.classList.add("t-hidden")}))}))}},{key:"populateInputWithFakeEmail",value:function(){var e=this;if(!this.config.disabled){var t=new XMLHttpRequest;t.onloadend=function(){200===t.status&&""!==t.response&&(e.dispatch("fake-email-loaded",t.response),form.emailInput.value=t.response)},t.open("GET","https://tuemilio.test/api/v2/public/email/fake"),t.send()}}},{key:"addPaddingButton",value:function(e){this.config.style&&this.config.style.inline||this.forms.forEach((function(t){t.submitButton.style.marginTop=e}))}},{key:"insertAfter",value:function(e,t){t.parentNode.insertBefore(e,t.nextSibling)}}])&&g(t.prototype,n),r&&g(t,r),s}(d)),E=n(202),T=n.n(E),C=n(203),_=n.n(C);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}(i,e);var t,n,r,o=A(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).element=e.createElementFromHTML(_.a),e.card=e.element.querySelector(".t-card"),e.header=e.element.querySelector(".t-card-header"),e.body=e.element.querySelector(".t-card-body"),e.paragraph=e.element.querySelector(".t-paragraph"),e}return t=i,(n=[{key:"className",value:function(e){return this.element.classList.add(e),this}},{key:"setHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.header.innerHTML=e,this}},{key:"title",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.element.querySelector(".t-title").innerHTML=e,this}},{key:"setParagraph",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.paragraph.innerHTML=e,this}},{key:"setContent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.element.querySelector(".t-content").innerHTML=e,this}},{key:"appendContent",value:function(e){return this.element.querySelector(".t-content").appendChild(e),this}},{key:"clickableTitle",value:function(){var e=this;return this.header.style.cursor="pointer",this.header.addEventListener("click",(function(){"block"===e.body.style.display?(e.body.style.display="none",e.element.classList.add("t-translate-1")):(e.body.style.display="block",e.element.classList.remove("t-translate-1"))})),this.element.classList.add("t-translate-1"),this.body.style.display="none",this}},{key:"removeHeader",value:function(){return this.card.removeChild(this.header),this}},{key:"removeBody",value:function(){return this.card.removeChild(this.body),this}},{key:"appendNoFrame",value:function(e){return this.removeHeader(),this.removeBody(),this.element.querySelector(".t-card").appendChild(e),this}},{key:"getCard",value:function(){return""===this.paragraph.innerHTML&&(this.paragraph.style.margin="0"),this.element}},{key:"createElementFromHTML",value:function(e){var t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild}},{key:"setContentTexts",value:function(e){var t=this;this.content.querySelectorAll("[class^=t-text]").forEach((function(n){var r=n.classList[0].split("-").slice(2).map((function(e,n){return 0===n?e:t.ucfirst(e)})).join("");n.innerHTML=e[r]}))}},{key:"ucfirst",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"inject",value:function(e,t){this[t]=e}}])&&j(t.prototype,n),r&&j(t,r),i}(d),B=n(204),q=n.n(B);function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=z(e);if(t){var o=z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){return!t||"object"!==D(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&H(e,t)}(i,e);var t,n,r,o=U(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=e.createElementFromHTML(q.a),e}return t=i,(n=[{key:"render",value:function(e,t){this.createCountdown(this.content,e.config.ends_at);var n=e.config.texts;return this.setContentTexts(n),this.className("t-countdown").title(n.countdownTitle).setParagraph(n.countdownParagraph).appendContent(this.content).getCard()}},{key:"createCountdown",value:function(e,t){var n=new Date(t).getTime(),r=setInterval((function(){var t=(new Date).getTime(),o=n-t,i=Math.floor(o/864e5).toString(),a=Math.floor(o%864e5/36e5).toString(),s=Math.floor(o%36e5/6e4).toString(),c=Math.floor(o%6e4/1e3).toString();e.querySelector(".t-days").innerHTML=i.length>1?i:"0"+i,e.querySelector(".t-hours").innerHTML=a.length>1?a:"0"+a,e.querySelector(".t-minutes").innerHTML=s.length>1?s:"0"+s,e.querySelector(".t-seconds").innerHTML=c.length>1?c:"0"+c,o<0&&(clearInterval(r),document.querySelector(".t-countdown").innerHTML="")}),100)}}])&&F(t.prototype,n),r&&F(t,r),i}(R),G=n(205),W=n.n(G),Y=n(19),Z=n.n(Y);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ee(e);if(t){var o=ee(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){return!t||"object"!==Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(i,e);var t,n,r,o=$(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=e.createElementFromHTML(W.a),e}return t=i,(n=[{key:"render",value:function(e,t){var n=this,r=e.config.texts;return this.buildShareable(e,t),this.setContentTexts(r),new Z.a(".t-modal-copy-btn").on("success",(function(e){var t=n.content.querySelector(".t-modal-copy-btn"),o=t.innerHTML;t.innerHTML=r.taskCopiedButton,setTimeout((function(){t.innerHTML=o}),1e3),n.GoogleAnalytics.sendEvent("subscriber","shared","link")})),this.className("t-current-task").title(r.taskTitle).setParagraph(r.taskParagraph).appendContent(this.content).getCard()}},{key:"showShareButtons",value:function(){this.shareSocial&&this.shareSocial.classList.remove("hidden"),this.shareLink&&this.shareLink.classList.remove("hidden")}},{key:"buildShareable",value:function(e,t){var n=this,r=t.dashboard.social.texts;this.shareSocial=this.content.querySelectorAll(".t-share-social")[0],this.shareLink=this.content.querySelectorAll(".t-share-link")[0];var o=t.dashboard.social.buttons;this.shareSocial&&function(t){var i=["facebook","twitter","linkedin","whatsapp","wechat","reddit","telegram","line"];if(e.config.current_task.model){i.forEach((function(i){var a=t.querySelector(".t-btn-"+i);a&&(a.href=n[i+"Link"](e.subscriber.referral_link,r[i+"Quote"],r.hashTags),a.addEventListener("click",(function(){n.GoogleAnalytics.sendEvent("subscriber","shared",i)})),o[i]||a.classList.add("t-hidden"))}));var a=t.querySelector(".t-btn-email");a&&(a.href=n.emailLink(e.subscriber.referral_link,r.emailSubject,r.emailBody),a.addEventListener("click",(function(){n.GoogleAnalytics.sendEvent("subscriber","shared","email")})),o.email||a.classList.add("t-hidden"))}else{i.forEach((function(r){var o=t.querySelector(".t-btn-"+r);o&&(o.href=n[r+"Link"](e.subscriber.referral_link,e.config.current_task.message),o.addEventListener("click",(function(){n.GoogleAnalytics.sendEvent("subscriber","shared",r)})),e.config.current_task.platforms[r]||o.classList.add("t-hidden"))}));var s=t.querySelector(".t-btn-email");s&&(s.href=n.emailLink(e.subscriber.referral_link,"",e.config.current_task.message),s.addEventListener("click",(function(){n.GoogleAnalytics.sendEvent("subscriber","shared","email")})),e.config.current_task.platforms.email||s.classList.add("t-hidden"))}}(this.shareSocial),this.shareLink&&(""!==t.host?this.shareLink.querySelector("input").value=t.host+"?r="+e.subscriber.referral_id:this.shareLink.querySelector("input").value=e.subscriber.referral_link),this.showShareButtons()}},{key:"popUpLinkBuilder",value:function(e){return"javascript:window.open('"+(e=encodeURI(e))+"', '_blank', 'width=600,height=500');void(0);"}},{key:"linkBuilder",value:function(e){return e}},{key:"facebookLink",value:function(e,t){return this.popUpLinkBuilder("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e)+"&quote="+this.encodeURL(t))}},{key:"twitterLink",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return this.popUpLinkBuilder("https://twitter.com/intent/tweet?url="+encodeURIComponent(e)+"&text="+this.encodeURL(t)+"&hashtags="+n)}},{key:"linkedinLink",value:function(e){return this.popUpLinkBuilder("https://www.linkedin.com/sharing/share-offsite/?url="+encodeURIComponent(e))}},{key:"whatsappLink",value:function(e,t){return this.popUpLinkBuilder("https://api.whatsapp.com/send?text="+this.encodeURL(t+" "+e)+"&q=q")}},{key:"wechatLink",value:function(e){return this.popUpLinkBuilder("https://chart.apis.google.com/chart?cht=qr&chs=154x154&chld=Q%7C0&chl="+encodeURIComponent(e))}},{key:"redditLink",value:function(e,t){return this.popUpLinkBuilder("https://reddit.com/submit?title="+this.encodeURL(t)+"&url="+encodeURIComponent(e))}},{key:"telegramLink",value:function(e,t){return this.popUpLinkBuilder("https://t.me/share?url="+encodeURIComponent(e)+"&text="+this.encodeURL(t))}},{key:"lineLink",value:function(e,t){return this.popUpLinkBuilder("https://line.me/R/share?text="+this.encodeURL(t+" ")+encodeURIComponent(e))}},{key:"emailLink",value:function(e,t,n){return"mailto:?subject="+t+"&body="+n+"%0D%0A%0D%0A"+e}},{key:"encodeURL",value:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)}}])&&X(t.prototype,n),r&&X(t,r),i}(R);function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ce=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(i,e);var t,n,r,o=ie(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this)}return t=i,(n=[{key:"render",value:function(e,t){if(e.config.positions.hidden.includes("gif"))return document.createElement("span");var n=document.createElement("img");return n.src=e.config.gif_url,n.style.width="100%",null===e.config.gif_url?(console.warn("No gif/image link provided. Please set one in Dashboard > Settings"),this.title("GIF Error").setParagraph('<span style="color: red">No gif/image link provided. Please set one in Dashboard > Settings</span>').getCard()):this.className("t-gif").appendNoFrame(n).getCard()}}])&&re(t.prototype,n),r&&re(t,r),i}(R));function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pe(e);if(t){var o=pe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return he(this,n)}}function he(e,t){return!t||"object"!==le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pe(e){return(pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ye=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fe(e,t)}(i,e);var t,n,r,o=de(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this)}return t=i,(n=[{key:"render",value:function(e,t){if(e.config.positions.hidden.includes("video"))return document.createElement("span");if(null===e.config.video_url)return console.warn("No Youtube/Vimeo link provided. Please set one in Dashboard > Settings"),this.title("Video Error").setParagraph('<span style="color: red">No Youtube/Vimeo link provided. Please set one in Dashboard > Settings</span>').getCard();var n=document.createElement("iframe");return n.src=this.url.createVideoUrlEmbed(e.config.video_url),this.className("t-video").appendNoFrame(n).getCard()}}])&&ue(t.prototype,n),r&&ue(t,r),i}(R));function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ve(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xe(e);if(t){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Se(this,n)}}function Se(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}(i,e);var t,n,r,o=ke(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this)}return t=i,(n=[{key:"render",value:function(e,t){var n=this;if(null===e.config.video_url)return console.warn("No Typeform link provided. Please set one in Dashboard > Settings"),this.title("Typeform Error").setParagraph('<span style="color: red">No Typeform link provided. Please set one in Dashboard > Settings</span>').getCard();var r=e.rates.survey_point_rate;return""!==t.dashboard.survey.secondURL&&(r*=2),this.setHeader('<h2 class="t-text-survey-title">'+e.config.texts.surveyTitle+'</h2><div class="t-survey-points-wrapper" style="opacity: 0.4;"><div class="t-flex"><span class="t-survey-pending">'+e.config.texts.referredsPending+'</span><div class="t-survey-points t-primary-color">+ '+r+"</div></div></div>"),"click"===e.config.survey_header&&this.clickableTitle(),"none"===e.config.survey_header&&this.removeHeader(),0===e.subscriber.surveys.length?"typeform"===t.dashboard.survey.type&&this.createSurvey(t,e,(function(){n.createFirstSurvey(t,e)})):1===e.subscriber.surveys.length&&""!==t.dashboard.survey.secondURL?this.createSurvey(t,e,(function(){document.querySelector(".t-survey-points-wrapper").style.opacity=1,document.querySelector(".t-survey-points").innerHTML="+ "+e.rates.survey_point_rate,n.createSecondSurvey(t,e)})):(this.setParagraph(e.config.texts.surveyCompleted),"none"!==e.config.survey_header?(this.element.querySelector(".t-survey-points-wrapper").style.opacity=1,this.element.querySelector(".t-survey-pending").innerHTML="",this.element.querySelector(".t-survey-points").classList.add("jello-horizontal")):this.card.style.paddingTop="1.25rem"),this.className("t-survey").getCard()}},{key:"createSurvey",value:function(e,t,n){var r=document.createElement("script");this.body.classList.add("t-typeform"),r.onload=n,r.src="https://embed.typeform.com/embed.js",document.head.appendChild(r)}},{key:"createFirstSurvey",value:function(e,t){var n=this,r="";t.subscriber.custom_fields.referral_link=t.subscriber.referral_link,t.subscriber.custom_fields.dashboard_link=t.subscriber.dashboard_link,t.subscriber.custom_fields.position=t.subscriber.position,t.subscriber.custom_fields.points=t.subscriber.points,t.subscriber.custom_fields.subscribers_count=t.subscribers_count;for(var o=0,i=Object.entries(t.subscriber.custom_fields);o<i.length;o++){var a=me(i[o],2),s=a[0],c=a[1];r+="&".concat(s,"=").concat(c)}typeformEmbed.makeWidget(this.body,t.config.typeform_url+"#email="+t.subscriber.address+r,{hideHeaders:!0,hideFooter:!0,opacity:100,buttonText:"Take the survey!",onSubmit:function(){"none"!==t.config.survey_header&&(document.querySelector(".t-survey-points-wrapper").style.opacity=1,document.querySelector(".t-survey-pending").innerHTML="",document.querySelector(".t-survey-points").classList.add("jello-horizontal")),n.dispatch("submitted",{type:"typeform"}),n.GoogleAnalytics.sendEvent("subscriber","took survey","typeform"),""!==e.dashboard.survey.secondURL&&("none"!==t.config.survey_header&&(document.querySelector(".t-survey-pending").innerHTML=t.config.texts.referredsPending,document.querySelector(".t-survey-points").innerHTML="+ "+t.rates.survey_point_rate),n.createSecondSurvey(e,t)),t.config.positions.hidden.includes("objective")||n.updateObjectivePoints(e,t)}})}},{key:"createSecondSurvey",value:function(e,t){var n=this;setTimeout((function(){document.querySelector(".t-survey-points").classList.remove("jello-horizontal")}),1e3),typeformEmbed.makeWidget(this.body,e.dashboard.survey.secondURL+"#email="+t.subscriber.address,{hideHeaders:!0,hideFooter:!0,opacity:100,buttonText:"Take the survey!",onSubmit:function(){"none"!==t.config.survey_header&&(document.querySelector(".t-survey-points").innerHTML="+ "+2*t.rates.survey_point_rate,document.querySelector(".t-survey-points").classList.add("jello-horizontal"),document.querySelector(".t-survey-pending").innerHTML=""),n.dispatch("submitted",{type:"typeform"}),n.GoogleAnalytics.sendEvent("subscriber","took survey","typeform"),t.config.positions.hidden.includes("objective")||n.updateObjectivePoints(e,t)}})}},{key:"updateObjectivePoints",value:function(e,t){var n=document.querySelector(".t-objective .t-modal-dashboard-points"),r=parseInt(n.innerHTML)+t.rates.survey_point_rate;n.innerHTML=r,document.querySelector(".t-objective .t-modal-bar-width").style.width=e.dashboard.objective.offset+100*r/t.config.objective_max+"%"}}])&&ge(t.prototype,n),r&&ge(t,r),i}(R),Ee=n(206),Te=n.n(Ee);function Ce(e){return(Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ae(e);if(t){var o=Ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){return!t||"object"!==Ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Me=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(i,e);var t,n,r,o=je(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=e.createElementFromHTML(Te.a),e}return t=i,(n=[{key:"render",value:function(e,t){var n=e.config.texts;return this.setContentTexts(n),this.content.querySelector(".t-modal-dashboard-points").innerHTML=e.subscriber.points,this.content.querySelector(".t-modal-bar-width").style.width=t.dashboard.objective.offset+100*e.subscriber.points/e.config.objective_max+"%",this.className("t-objective").title(n.objectiveTitle).appendContent(this.content).getCard()}}])&&_e(t.prototype,n),r&&_e(t,r),i}(R)),Ie={facebook:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path fill="#3B5999" fill-rule="evenodd" d="M14.035 20l-.001-7.467h2.59l.387-3.008h-2.976v-1.92c0-.87.241-1.463 1.49-1.463h1.592v-2.69a21.61 21.61 0 0 0-2.32-.119c-2.296 0-3.867 1.401-3.867 3.975v2.217H8.333v3.007h2.597V20H2.5A2.5 2.5 0 0 1 0 17.5v-15A2.5 2.5 0 0 1 2.5 0h15A2.5 2.5 0 0 1 20 2.5v15a2.5 2.5 0 0 1-2.5 2.5h-3.465z"/></svg>',linkedin:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <g fill="none" fill-rule="evenodd"> <rect width="20" height="20" fill="#0274B3" rx="2"/> <path fill="#FFF" d="M10.75 17h-3V7.5h3v1.271c.623-1.143 1.733-1.521 2.772-1.521 1.556 0 3.478.737 3.478 3.847V17h-2.956v-4.238c0-2.021-.125-2.895-1.534-2.895-1.457 0-1.76.76-1.76 2.895V17zM4.5 6.25a1.75 1.75 0 1 1 0-3.5 1.75 1.75 0 0 1 0 3.5zM3 7.5h3V17H3V7.5z"/> </g></svg>',reddit:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <g fill="none" fill-rule="evenodd"> <circle cx="10" cy="10" r="10" fill="#FF4500"/> <path fill="#FFF" fill-rule="nonzero" d="M13.241 4.583a1 1 0 1 1-.088.492l-2.193-.463-.693 3.142c1.524.049 2.893.51 3.882 1.227a1.5 1.5 0 1 1 1.581 2.44c.014.109.02.218.02.329 0 2.21-2.574 4-5.75 4s-5.75-1.79-5.75-4c0-.11.006-.22.02-.329a1.5 1.5 0 1 1 1.58-2.44c.994-.72 2.372-1.183 3.905-1.227l.77-3.492a.25.25 0 0 1 .296-.19l2.42.51zM12.3 12.05a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-4.6 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-.127 1.774c.605.48 1.419.717 2.433.717 1.015 0 1.829-.237 2.434-.717a.25.25 0 0 0-.31-.392c-.51.404-1.214.61-2.124.61-.909 0-1.614-.206-2.123-.61a.25.25 0 1 0-.31.392z"/> </g></svg>',telegram:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <path fill="#00A7E6" fill-rule="evenodd" d="M10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10zM5.063 8.312a1 1 0 0 0-.199 1.807l2.922 1.752a1 1 0 0 1 .343.343l1.752 2.922a1 1 0 0 0 1.807-.199l2.68-8.04a1 1 0 0 0-1.265-1.265l-8.04 2.68z"/> </svg>',twitter:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <path fill="#1DA1F1" fill-rule="nonzero" d="M17.015 4.797a3.79 3.79 0 0 0 1.673-2.088c-.747.44-1.563.75-2.415.916a3.813 3.813 0 0 0-2.776-1.191c-1.161 0-2.26.525-2.981 1.428a3.75 3.75 0 0 0-.724 3.205 10.827 10.827 0 0 1-7.839-3.942 3.733 3.733 0 0 0-.516 1.896c-.001 1.262.634 2.44 1.692 3.14a3.811 3.811 0 0 1-1.723-.47v.047a3.783 3.783 0 0 0 3.051 3.7 3.838 3.838 0 0 1-1.718.064 3.803 3.803 0 0 0 3.553 2.62 7.67 7.67 0 0 1-4.724 1.616 7.96 7.96 0 0 1-.907-.053 10.828 10.828 0 0 0 5.83 1.695c6.996 0 10.821-5.75 10.821-10.735 0-.165-.003-.327-.01-.489A7.697 7.697 0 0 0 19.2 4.203c-.682.3-1.415.503-2.185.594z"/> </svg>',star:'<svg class="feather-star" xmlns="http://www.w3.org/2000/svg" width="1rem" height="1rem" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>',badge:'<svg class="feather feather-award sc-dnqmqq jxshSx" xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="8" r="7"></circle><polyline points="8.21 13.89 7 23 12 20 17 23 15.79 13.88"></polyline></svg>',user:'<svg style="margin-bottom: 4px;" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-reactid="1321"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>'};function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qe(e,t){return(qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var o=He(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qe(e,t)}(i,e);var t,n,r,o=De(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=document.createElement("div"),e}return t=i,(n=[{key:"render",value:function(e,t){var n=this,r=e.config.texts;this.setContentTexts(r);var o=0;return e.waiters.forEach((function(r){var i=document.createElement("div");i.classList.add("t-waitlist-row");var a=1===r.position.toString().length?"0"+r.position:r.position,s=document.createElement("div");s.classList.add("t-waitlist-position");var c=document.createElement("div");c.classList.add("t-waitlist-address");var l=document.createElement("div");l.classList.add("t-waitlist-points"),e.subscriber.address===r.address?(i.classList.add("t-waitlist-row-self"),s.style.opacity="1",l.style.color="#FD527E",l.style.opacity="1"):i.style.margin="8px 15px",r.position<=3&&(a=Ie.badge,s.style.opacity=1),1==r.position&&(s.style.color="gold"),2==r.position&&(s.style.color="#a5a4c5"),3==r.position&&(s.style.color="brown"),s.innerHTML=a,c.innerHTML=r.address,l.innerHTML=Ie.star+r.points,i.appendChild(s),i.appendChild(c),i.appendChild(l),n.content.appendChild(i),i.style.opacity="0",t.dashboard.listAnimation?setTimeout((function(){i.classList.add("roll-down"),i.style.opacity="1"}),100*o++):i.style.opacity="1"})),this.className("t-leaderboard").title(r.leaderboardTitle).setParagraph(r.leaderboardParagraph).appendContent(this.content).getCard()}}])&&Be(t.prototype,n),r&&Be(t,r),i}(R);function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return(Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ye(e);if(t){var o=Ye(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return We(this,n)}}function We(e,t){return!t||"object"!==Ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ze=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ve(e,t)}(i,e);var t,n,r,o=Ge(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=document.createElement("div"),e}return t=i,(n=[{key:"render",value:function(e,t){var n=this;if(e.config.positions.hidden.includes("shareOn"))return document.createElement("span");var r=e.config.share_on,o=0;Object.keys(r).forEach((function(i){if(r[i]){var a=document.createElement("div");a.classList.add("t-shareon-row"),a.innerHTML=Ie[i]+'<div class="t-shareon-platform">'+i+'</div><div class="t-shareon-points-wrapper" style="opacity: .4"><div class="t-flex"><span class="t-shareon-pending">'+e.config.texts.shareOnPending+'</span><div class="t-shareon-points t-primary-color">+ '+e.rates.shareon_point_rate+"</div></div></div>",e.shareds.forEach((function(e){e.name.toLowerCase()===i&&(a.querySelector(".t-shareon-points-wrapper").style.opacity=1,a.querySelector(".t-shareon-pending").innerHTML="")})),n.content.appendChild(a),a.style.opacity="0",t.dashboard.listAnimation?setTimeout((function(){a.classList.add("roll-down"),a.style.opacity="1"}),100*o++):a.style.opacity="1"}}));var i=e.config.texts;return this.setContentTexts(i),this.className("t-share-on").title(i.shareOnTitle).setParagraph(i.shareOnParagraph).appendContent(this.content).getCard()}}])&&ze(t.prototype,n),r&&ze(t,r),i}(R)),Qe=n(207),Xe=n.n(Qe);function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nt(e);if(t){var o=nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}function tt(e,t){return!t||"object"!==Je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nt(e){return(nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rt=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ke(e,t)}(i,e);var t,n,r,o=et(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=e.createElementFromHTML(Xe.a),e.colors=[{background:"#c8d9f1",color:"#467fcf"},{background:"#c7e6fb",color:"#45aaf2"},{background:"#fee0c7",color:"#fd9644"},{background:"#fbedb7",color:"#f1c40f"},{background:"#f0bcbc",color:"#cd201f"},{background:"#cfeab3",color:"#5eba00"},{background:"#b9e3ea",color:"#17a2b8"},{background:"#bfefea",color:"#2bcbba"}],e}return t=i,(n=[{key:"render",value:function(e,t){var n=this;if(e.config.positions.hidden.includes("referreds"))return document.createElement("span");0===e.referreds_count&&this.setContent('<div class="t-shareon-row">'+Ie.user+'<div class="t-shareon-platform" style="text-transform:none">'+e.config.texts.referredsUnit+'</div><div class="t-shareon-points-wrapper" style="opacity:0.4;"><div class="t-flex"><span class="t-shareon-pending">'+e.config.texts.referredsPending+'</span><div class="t-shareon-points t-primary-color">+ '+e.rates.referrer_point_rate+"</div></div></div></div>");var r=0;e.referreds.forEach((function(o){var i=document.createElement("div");i.classList.add("t-shareon-row"),i.innerHTML='<div class="t-avatar">'+o.user.slice(0,2)+"</div><div><span>"+o.user+' · <span style="opacity:0.5">'+Ie.star+o.points+'</span></span></div><div class="t-referred-points"><div class="t-shareon-points t-primary-color jello-horizontal">+ '+e.rates.referrer_point_rate+"</div></div>",i.getElementsByClassName("t-avatar")[0].style.backgroundColor=n.colors[r%n.colors.length].background,i.getElementsByClassName("t-avatar")[0].style.color=n.colors[r%n.colors.length].color,i.style.opacity="0",n.content.querySelector(".t-referred-list").appendChild(i),t.dashboard.listAnimation?setTimeout((function(){i.classList.add("roll-down"),i.style.opacity="1"}),100*r++):i.style.opacity="1"}));var o=e.config.texts;return this.setContentTexts(o),this.className("t-referreds").title(e.referreds_count+" "+o.referredsTitle).setParagraph(o.referredsParagraph).appendContent(this.content).getCard()}}])&&$e(t.prototype,n),r&&$e(t,r),i}(R)),ot=n(208),it=n.n(ot);function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ft(e);if(t){var o=ft(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ut(this,n)}}function ut(e,t){return!t||"object"!==at(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}(i,e);var t,n,r,o=lt(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=document.createElement("div"),e}return t=i,(n=[{key:"render",value:function(e,t){var n=this,r=e.config.texts;return this.setContentTexts(r),r.milestones&&r.milestones.forEach((function(o,i){var a=document.createElement("div");a.appendChild(n.createElementFromHTML(it.a)),a.querySelector(".t-milestone-title").innerHTML=o.title,a.querySelector(".t-milestone-points-number").innerHTML=o.points,a.querySelector(".t-milestone-points-text").innerHTML=r.milestonesPoints,e.subscriber.points>=parseInt(o.points)?a.querySelector(".t-lock-icon").classList.add("t-d-none"):a.querySelector(".t-circle-check-icon").classList.add("t-d-none"),n.content.appendChild(a),t.dashboard.listAnimation?setTimeout((function(){a.classList.add("roll-down"),a.style.opacity="1"}),100*i):a.style.opacity="1"})),this.className("t-leaderboard").title(r.milestonesTitle).setParagraph(r.milestonesParagraph).appendContent(this.content).getCard()}}])&&st(t.prototype,n),r&&st(t,r),i}(R),ht=n(209),pt=n.n(ht);function yt(e){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mt(e,t){return(mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wt(e);if(t){var o=wt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return gt(this,n)}}function gt(e,t){return!t||"object"!==yt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wt(e){return(wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mt(e,t)}(i,e);var t,n,r,o=vt(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).content=e.createElementFromHTML(pt.a),e.inviteBtn=e.content.querySelector(".t-modal-invite-btn"),e.inviteInput=e.content.querySelector("#invite-input"),e.data={},e.isSending=!1,e}return t=i,(n=[{key:"render",value:function(e,t){var n=this,r=e.config.texts;this.data=e,this.setContentTexts(r);var o=this.inviteBtn.innerHTML;return this.inviteInput.placeholder=r.inviteInputPlaceholder,this.inviteBtn.addEventListener("click",(function(){n.sendInvitation(e)})),this.inviteInput.addEventListener("input",(function(){n.setInputDefault(e)})),this.inviteInput.addEventListener("keypress",(function(e){"Enter"!==e.key||n.isSending||n.sendInvitation()})),Tuemilio("onInvitationSent",(function(e){n.inviteInput.value="",n.updateButton(r.inviteSentButton,o),n.isSending=!1})),Tuemilio("onInvalidInvitationAddress",(function(e){n.setInputError(),n.removeButtonLoading(o),n.isSending=!1})),Tuemilio("onSubscriberInvitedExists",(function(e){n.inviteInput.value="",n.updateButton(r.inviteSentButton,o),n.isSending=!1})),Tuemilio("onTooManyInvitations",(function(e){n.setInputError(),n.removeButtonLoading(o),n.isSending=!1,alert("Slow down. Too many subscriptions.")})),Tuemilio("onInvitationError",(function(e){n.setInputError(),n.removeButtonLoading(o),n.isSending=!1})),this.className("t-invite").title(r.inviteTitle).setParagraph(r.inviteParagraph).appendContent(this.content).getCard()}},{key:"sendInvitation",value:function(e){this.isSending=!0,this.setButtonLoading();var t=this.inviteInput.value.trim();this.inviteInput.value=t,Tuemilio("sendInvitation",{address:t,referrer_uuid:this.data.subscriber.uuid})}},{key:"updateButton",value:function(e,t){var n=this;this.inviteBtn.innerHTML=e,setTimeout((function(){n.removeButtonLoading(t)}),1500)}},{key:"setButtonLoading",value:function(){var e=this.inviteBtn.offsetWidth;this.inviteBtn.innerHTML='<span style="padding:5px">'.concat(h,"</span>"),this.inviteBtn.disabled=!0,this.inviteBtn.style.cursor="auto",this.inviteBtn.style.width=e+"px"}},{key:"removeButtonLoading",value:function(e){this.inviteBtn.innerHTML=e,this.inviteBtn.disabled=!1,this.inviteBtn.style.cursor="pointer"}},{key:"setInputError",value:function(){this.inviteInput.style.borderColor="red",this.inviteInput.style.color="red"}},{key:"setInputDefault",value:function(){this.inviteInput.style.borderColor="#ced4da",this.inviteInput.style.color="#495057"}}])&&bt(t.prototype,n),r&&bt(t,r),i}(R);function St(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var xt=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"parseUrlParams",value:function(e){for(var t=e.split("&"),n={},r=0;r<t.length;r++){var o=t[r].split("="),i=decodeURIComponent(o[0]),a=decodeURIComponent(o[1]);if(void 0===n[i])n[i]=decodeURIComponent(a);else if("string"==typeof n[i]){var s=[n[i],decodeURIComponent(a)];n[i]=s}else n[i].push(decodeURIComponent(a))}return n}},{key:"parameter",value:function(e){var t=window.location.search.substring(1),n=this.parseUrlParams(t);return void 0===n[e]?"":n[e].replace(/\//g,"")}},{key:"getReferrerId",value:function(){return this.parameter("referrerId")||this.parameter("referrerid")||this.parameter("referrerID")||this.parameter("rid")||this.parameter("r")}},{key:"getEmail",value:function(){return this.parameter("email")}},{key:"getUuid",value:function(){return this.parameter("uuid")}},{key:"isDashboard",value:function(){return""!==this.getUuid()||""!==this.getEmail()}},{key:"createVideoUrlEmbed",value:function(e){return this.isYoutube(e)?"https://www.youtube.com/embed/"+this.getYoutubeId(e):this.isVimeo(e)?"https://player.vimeo.com/video/"+this.getVimeoId(e)+"?title=0&byline=0&portrait=0":void 0}},{key:"getYoutubeId",value:function(e){return this.parseUrlParams(e.split("?")[1]).v}},{key:"getVimeoId",value:function(e){return e.substr(e.lastIndexOf("/")+1)}},{key:"isYoutube",value:function(e){return e.includes("youtube")}},{key:"isVimeo",value:function(e){return e.includes("vimeo")}},{key:"getWithoutParameters",value:function(){return location.protocol+"//"+location.host+location.pathname}}])&&St(t.prototype,n),r&&St(t,r),e}());function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Et(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ct(e,t){return(Ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jt(e);if(t){var o=jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ot(this,n)}}function Ot(e,t){return!t||"object"!==Lt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jt(e){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pt=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ct(e,t)}(i,e);var t,n,r,o=_t(i);function i(){return Et(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"init",value:function(e,t){this.element="",this.config=e,this.wrapper=document.getElementById("t-dashboard"),this.loaded=!1,this.googleAnalytics=t}},{key:"render",value:function(e){var t=this;this.element=document.createElement("div"),this.element.innerHTML=T.a;var n=this.mergeTags(this.element.querySelector(".t-hero-text"),e,e.config.hero_html),r=this.mergeTags(this.element.querySelector(".t-footer-text"),e,e.config.footer_html),o=new te;o.inject(this.googleAnalytics,"GoogleAnalytics"),ye.inject(xt,"url");var i=new Le;i.inject(this.googleAnalytics,"GoogleAnalytics"),i.on("submitted",(function(){t.dispatch("surveySubmitted",{type:"typeform"})}));var a={countdown:new V,currentTask:o,gif:ce,video:ye,survey:i,objective:Me,leaderboard:new Ue,shareOn:Ze,referreds:rt,milestones:new dt,invite:new kt};return e.config.positions.left.forEach((function(n){void 0!==a[n]&&t.element.querySelector(".t-left").appendChild(a[n].render(e,t.config))})),e.config.positions.right.forEach((function(n){void 0!==a[n]&&t.element.querySelector(".t-right").appendChild(a[n].render(e,t.config))})),n.querySelectorAll(".t-card-current_task").forEach((function(n){var r=new te;r.inject(t.googleAnalytics,"GoogleAnalytics"),n.appendChild(r.render(e,t.config))})),n.querySelectorAll(".t-card-leaderboard").forEach((function(n){var r=new Ue;n.appendChild(r.render(e,t.config))})),n.querySelectorAll(".t-card-survey").forEach((function(n){var r=new Le;r.inject(t.googleAnalytics,"GoogleAnalytics"),n.appendChild(r.render(e,t.config))})),n.querySelectorAll(".t-card-countdown").forEach((function(n){var r=new V;n.appendChild(r.render(e,t.config))})),r.querySelectorAll(".t-card-current_task").forEach((function(n){var r=new te;r.inject(t.googleAnalytics,"GoogleAnalytics"),n.appendChild(r.render(e,t.config))})),r.querySelectorAll(".t-card-leaderboard").forEach((function(n){var r=new Ue;n.appendChild(r.render(e,t.config))})),r.querySelectorAll(".t-card-survey").forEach((function(n){var r=new Le;r.inject(t.googleAnalytics,"GoogleAnalytics"),n.appendChild(r.render(e,t.config))})),r.querySelectorAll(".t-card-countdown").forEach((function(n){var r=new V;n.appendChild(r.render(e,t.config))})),this.config.dashboard.texts&&Object.keys(this.config.dashboard.texts).forEach((function(e){var n="tu-text-"+e.split(/(?=[A-Z])/).map((function(e){return e.toLowerCase()})).join("-");"object"===Lt(t.config.dashboard.texts[e])?Object.keys(t.config.dashboard.texts[e]).forEach((function(r){t.element.getElementsByClassName(n+"-"+r)[0]&&(t.element.getElementsByClassName(n+"-"+r)[0].innerHTML=t.config.dashboard.texts[e][r])})):t.element.getElementsByClassName(n)[0]&&(t.element.getElementsByClassName(n)[0].innerHTML=t.config.dashboard.texts[e])})),this.loaded=!0,this.element}},{key:"show",value:function(){this.wrapper.classList.remove("t-hidden")}},{key:"hide",value:function(){this.wrapper.classList.add("t-hidden")}},{key:"mergeTags",value:function(e,t,n){var r=this,o=e;o.innerHTML=n;var i=t.subscriber.custom_fields,a=function(e){o.querySelectorAll(".t-text-"+e).forEach((function(t){i.hasOwnProperty(e)&&(t.innerHTML=i[e])}))};for(var s in i)a(s);return o.querySelectorAll(".t-text-email").forEach((function(e){e.innerHTML=t.subscriber.address})),o.querySelectorAll(".t-text-position").forEach((function(e){e.innerHTML=t.subscriber.position})),o.querySelectorAll(".t-text-total_subscribers").forEach((function(e){e.innerHTML=t.subscribers_count})),o.querySelectorAll(".t-text-points").forEach((function(e){e.innerHTML=t.subscriber.points})),o.querySelectorAll(".t-text-referreds").forEach((function(e){e.innerHTML=t.referreds_count})),o.querySelectorAll(".t-text-referral_link").forEach((function(e){e.innerHTML='<a href="'.concat(t.subscriber.referral_link,'">').concat(t.subscriber.referral_link,"</a>")})),o.querySelectorAll(".t-text-dashboard_link").forEach((function(e){""!==r.config.host?e.innerHTML='<a href="'.concat(r.config.host,"?uuid=").concat(t.subscriber.uuid,'">').concat(r.config.host,"?uuid=").concat(t.subscriber.uuid,"</a>"):e.innerHTML='<a href="'.concat(t.subscriber.dashboard_link_uuid,'">').concat(t.subscriber.dashboard_link_uuid,"</a>")})),o}}])&&Tt(t.prototype,n),r&&Tt(t,r),i}(d));function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function It(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rt(e,t){return(Rt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dt(e);if(t){var o=Dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qt(this,n)}}function qt(e,t){return!t||"object"!==At(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dt(e){return(Dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rt(e,t)}(i,e);var t,n,r,o=Bt(i);function i(){return Mt(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"post",value:function(e,t,n){this.request("POST",e,t,n)}},{key:"get",value:function(e,t){this.request("GET",e,{},t)}},{key:"request",value:function(e,t,n,r){var o=this,i=new XMLHttpRequest;i.open(e,t),i.setRequestHeader("Content-Type","application/json"),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.send(JSON.stringify(n)),i.onloadend=function(){o.respond(i.response,i.status),r&&r(i)},i.onerror=function(){o.dispatch("error")}}},{key:"respond",value:function(e,t){var n=JSON.parse(e);this.dispatch(t,n)}}])&&It(t.prototype,n),r&&It(t,r),i}(d);function Ht(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vt(e,t){return(Vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yt(e);if(t){var o=Yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wt(this,n)}}function Wt(e,t){return!t||"object"!==Ut(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zt=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vt(e,t)}(i,e);var t,n,r,o=Gt(i);function i(){return Nt(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"set",value:function(e,t,n){var r="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),r="; expires="+o.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/"}},{key:"get",value:function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return null}},{key:"erase",value:function(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}},{key:"isEnabled",value:function(){if(navigator.cookieEnabled)return!0;document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}},{key:"detectPrivateMode",value:function(){var e=this;this.isPrivateMode((function(t){t?e.dispatch("isPrivateMode",!0):e.dispatch("isPrivateMode",!1)}))}},{key:"isPrivateMode",value:function(e){var t,n=e.bind(null,!0),r=e.bind(null,!1);window.webkitRequestFileSystem?webkitRequestFileSystem(0,0,r,n):"MozAppearance"in document.documentElement.style?((t=indexedDB.open("test")).onerror=n,t.onsuccess=r):/constructor/i.test(window.HTMLElement)||window.safari?function(){try{localStorage.length||(localStorage.x=1,localStorage.removeItem("x")),r()}catch(e){navigator.cookieEnabled?n():r()}}():window.indexedDB||!window.PointerEvent&&!window.MSPointerEvent?r():n()}}])&&zt(t.prototype,n),r&&zt(t,r),i}(d)),Qt=n(210),Xt=n.n(Qt),Jt=n(211),$t=n.n(Jt);function Kt(e){return(Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tn(e,t){return(tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=on(e);if(t){var o=on(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return rn(this,n)}}function rn(e,t){return!t||"object"!==Kt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function on(e){return(on=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var an=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tn(e,t)}(i,e);var t,n,r,o=nn(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).config="",e.span="",e.element="",e.dashboard="",e.initialized=!1,e.dashboardButtons=[],e}return t=i,(n=[{key:"init",value:function(e){this.config=e,this.dashboard=""}},{key:"render",value:function(e){var t=this;return this.dashboard=e,this.element=document.createElement("div"),this.element.style.display="none",this.element.innerHTML=Xt.a,this.element.getElementsByClassName("t-modal-elements")[0].appendChild(this.dashboard),this.span=this.element.getElementsByClassName("t-modal-close")[0],this.forms=document.querySelectorAll(".t-signup"),0===this.forms.length&&console.warn("The dashboard button is loaded, but no place to show it. Please add <div class=\"t-signup\"></div> in your website. If you are planning to add a full custom dashboard, disable the native dashboard when initializing Tuemilio like this: \n \n Tuemilio('init', {\n dashboard: {\n disabled: true\n }\n });"),this.forms.forEach((function(e){var n=t.createElementFromHTML($t.a);n.innerText=t.config.form.button.texts.checkDashboard,t.dashboardButtons.push(n),e.appendChild(n)})),this.span.onclick=function(){t.close()},window.onclick=function(e){e.target===t.element.firstChild&&t.close()},document.onkeydown=function(e){"Escape"===(e=e||window.event).key&&t.close()},this.initialized=!0,this.element}},{key:"show",value:function(){this.element.style.display="block",document.getElementsByClassName("t-modal")[0].classList.remove("fade-out"),document.getElementsByClassName("t-modal")[0].classList.add("fade-in");for(var e=document.getElementsByClassName("t-card"),t=0;t<e.length;t++)e.item(t).classList.add("roll-down")}},{key:"close",value:function(){var e=this;document.getElementsByClassName("t-modal")[0].classList.remove("fade-in"),document.getElementsByClassName("t-modal")[0].classList.add("fade-out"),setTimeout((function(){e.element.style.display="none"}),180),this.dispatch("closed")}},{key:"showDashboardButton",value:function(){this.dashboardButtons.forEach((function(e){e.classList.remove("t-hidden")}))}},{key:"hideDashboardButton",value:function(){this.dashboardButtons.forEach((function(e){e.classList.add("t-hidden")}))}},{key:"setDashboardButtonAsLoading",value:function(){var e=this;this.dashboardButtons.forEach((function(t){t.querySelectorAll("svg").length>0||(t.innerHTML=h+e.config.form.button.texts.loading,t.disabled=!0,t.style.cursor="auto",e.spinner=t.querySelector(".t-button-spinner"),e.spinner.style.verticalAlign="sub",e.spinner.style.marginRight="8px")}))}},{key:"createElementFromHTML",value:function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild}}])&&en(t.prototype,n),r&&en(t,r),i}(d)),sn={host:"",remoteUpdated:!1,form:{disabled:!1,customSubmit:!1,validationActive:!0,loginFormOnUserIdentified:!1,forceLoginForm:!1,style:{inline:!1},input:{texts:{placeholder:"name@email.com"}},button:{texts:{CTA:"Request early access",loading:"Loading",checkDashboard:"Dashboard",login:"Login"}},feedback:{disabled:!1,texts:{empty:"Don't forget your email!",invalidEmail:"Wrong email!",success:"Thanks!",unaccepted:"We do not accept that email",unauthorized:"You did not subscribe with that email",resentConfirmationEmail:"Sent"}},gdpr:{enabled:!1,documentId:null,texts:{default:{gdprTitle:"",gdprDescription:"",gdprLegalText:"",marketingPermissions:[]}}}},dashboard:{disabled:!1,hideButton:!1,objective:{offset:1,max:5},type:"modal",url:"",gif:{type:"card",url:""},video:{type:"card",url:""},survey:{type:"typeform",url:"",header:"default",secondURL:""},shareOn:{facebook:!0,twitter:!0,telegram:!0,linkedin:!0,reddit:!0},loadOnUserIdentified:!0,modal:{preventShowAfterSubscribing:!1,preventShowAfterLogin:!1,disabled:!1},listAnimation:!0,texts:{taskTitle:"Current Task",taskParagraph:"Invite people you know personally and go up on the waiting list.",taskCopyButton:"Copy",taskCopiedButton:"Copied!",taskOutro:"Or share with:",leaderboardTitle:"Leaderboard",leaderboardParagraph:"This is your position on the list",leaderboardPosition:"Position",leaderboardAddress:"Address",referredsTitle:"Friends invited",referredsParagraph:"",referredsEmpty:"No friends",referredsPending:"Pending",referredsUnit:"Each Friend Invited",objectiveTitle:"Objective",objectiveSubtitle:"Out of your possible 10",objectiveCompleted:"Completed",objectiveUncompleted:"To be done",units:"Points",surveyTitle:"Complete the Survey",surveyCompleted:"Thanks for completing the survey, you got 10 extra points.",surveyPending:"Pending",countdownTitle:"Launching soon",countdownParagraph:"You still have this time to share with your friends",days:"Days",hours:"Hours",minutes:"Minutes",seconds:"Seconds",shareOnTitle:"Shared on",shareOnParagraph:"",shareOnPending:"Pending"},social:{buttons:{twitter:!0,facebook:!0,linkedin:!0,email:!0,whatsapp:!0,reddit:!0,wechat:!1,telegram:!0},texts:{facebookQuote:"I just joined this awesome waiting list!",twitterQuote:"I just joined this awesome waiting list!",hashTags:"tuemilio,PH",whatsappQuote:"I joined this, do it to:",redditQuote:"I just joined this awesome waiting list!",telegramQuote:"I just joined this awesome waiting list!",emailBody:"Here is my link",emailSubject:"I just joined this awesome waiting list!",linkQuote:"Share the link below"}}},redirectURL:"",cookies:{disabled:!1},user:{identified:!1},googleAnalytics:{disabled:!1},confetti:{type:"cannons",disabled:!1,length:1,colors:["#ED0154","#F78801","#1872CB","#F8CE26"]},logging:!1};function cn(e){return(cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function un(e,t){return(un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hn(e);if(t){var o=hn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dn(this,n)}}function dn(e,t){return!t||"object"!==cn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hn(e){return(hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pn=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&un(e,t)}(i,e);var t,n,r,o=fn(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).loaded=!1,e}return t=i,(n=[{key:"init",value:function(){var e=this;this.isAvailable().then((function(){e.loaded=!0,e.dispatch("loaded")}))}},{key:"isAvailable",value:function(){return new Promise((function(e,t){var n=Date.now();!function t(){Date.now()-n>5e3||(window.ga&&ga.create?e(ga):setTimeout(t,500))}()}))}},{key:"sendEvent",value:function(e,t,n){this.loaded?"undefined"!=typeof gtag?gtag("event",t,{event_category:e,event_label:n}):ga("send","event",e,t,n):this.on("loaded",(function(){"undefined"!=typeof gtag?gtag("event",t,{event_category:e,event_label:n}):ga("send","event",e,t,n)}))}},{key:"getClientId",value:function(){return this.loaded?ga.getAll()[0].get("clientId"):null}}])&&ln(t.prototype,n),r&&ln(t,r),i}(d)),yn=n(3);function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var mn=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config={}}var t,n,r;return t=e,(n=[{key:"init",value:function(e){this.config=e}},{key:"fireOnce",value:function(){localStorage.getItem("Tuemilio.confettiFired")!==Zt.get("tu")&&(this.fire(),localStorage.setItem("Tuemilio.confettiFired",Zt.get("tu")))}},{key:"fire",value:function(){switch(this.config.type){case"cannons":this.cannons();break;case"fireworks":this.fireworks();break;case"snow":this.snow()}}},{key:"cannons",value:function(){var e=Date.now()+1e3*this.config.length;!function t(){Object(yn.a)({particleCount:5,angle:60,spread:60,origin:{x:0},zIndex:100001,colors:["#ED0154","#F78801","#1872CB","#F8CE26"],startVelocity:80}),Object(yn.a)({particleCount:5,angle:120,spread:60,origin:{x:1},zIndex:100001,colors:["#ED0154","#F78801","#1872CB","#F8CE26"],startVelocity:80}),Date.now()<e&&requestAnimationFrame(t)}()}},{key:"fireworks",value:function(){var e=Date.now()+1.5*this.config.length*1e3,t=setInterval((function(){if(Date.now()>e)return clearInterval(t);Object(yn.a)({startVelocity:30,spread:360,ticks:60,origin:{x:Math.random(),y:Math.random()-.2},colors:["#ED0154","#F78801","#1872CB","#F8CE26"],zIndex:100001})}),200)}},{key:"snow",value:function(){var e=Date.now()+1e3*this.config.length;!function t(){Object(yn.a)({particleCount:1,startVelocity:0,ticks:300,origin:{x:Math.random(),y:Math.random()-.2},zIndex:100001,colors:["#ED0154","#F78801","#1872CB","#F8CE26"]}),Object(yn.a)({particleCount:1,startVelocity:0,ticks:300,origin:{x:Math.random(),y:Math.random()-.2},zIndex:100001,colors:["#F78801","#1872CB","#F8CE26"]}),Object(yn.a)({particleCount:1,startVelocity:0,ticks:300,origin:{x:Math.random(),y:Math.random()-.2},zIndex:100001,colors:["#1872CB","#F8CE26"]}),Date.now()<e&&requestAnimationFrame(t)}()}}])&&bn(t.prototype,n),r&&bn(t,r),e}()),vn=n(212),gn=n.n(vn);function wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var kn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.wrapper=document.createElement("div"),this.wrapper.classList.add("t-toast-wrapper"),this.wrapper.classList.add("t-hidden"),this.wrapper.innerHTML=gn.a,document.body.appendChild(this.wrapper)}var t,n,r;return t=e,(n=[{key:"hide",value:function(){this.wrapper.classList.remove("bounceBottom-enter-active"),this.wrapper.classList.add("bounceBottom-leave-active")}},{key:"show",value:function(e){this.wrapper.classList.remove("bounceBottom-leave-active"),this.wrapper.classList.remove("t-hidden"),this.wrapper.classList.add("bounceBottom-enter-active"),this.wrapper.querySelector(".t-content").innerHTML=e.content,this.wrapper.querySelector(".t-title").innerHTML=e.title,e.timeDiff&&(this.wrapper.querySelector(".t-time-diff").innerHTML=e.timeDiff)}}])&&wn(t.prototype,n),r&&wn(t,r),e}();function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var xn=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"tuemilio.test"===window.location.hostname?this.url="https://tuemilio.test/api/v2/":this.url="https://tuemilio.com/api/v2/",this.config="",this.messages=[]}var t,n,r;return t=e,(n=[{key:"init",value:function(e){this.config=e,this.ping(),setInterval((function(){}),4e3),this.toast=new kn}},{key:"buildInitialMessages",value:function(e){var t=this;e.online>0&&this.messages.push({title:"",content:e.online+" more people are viewing the site.",count:e.online,type:"online"}),e.subscribed.forEach((function(e){t.messages.push({title:"Someone",content:"just subscribed from ",timeDiff:e.time_diff,type:"subscribed"})})),e.lastDaySubscribers.forEach((function(e){t.messages.push({title:"Someone",content:"Subscribed today",timeDiff:e.time_diff,type:"lastDaySubscribers"})}))}},{key:"startAutoCaroussel",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.toast.show(this.messages[t]),setTimeout((function(){e.toast.hide(),setTimeout((function(){++t<=e.messages.length-1&&e.startAutoCaroussel(t)}),1e3*e.config.fomo_interval)}),1e3*this.config.fomo_length)}},{key:"ping",value:function(){var e=this,t=new Ft;t.get(this.url+"public/lists/"+window[window.TuemilioObject].id+"/fomo"),t.on(200,(function(t){e.buildInitialMessages(t),e.messages.length>0&&e.startAutoCaroussel()}))}}])&&Sn(t.prototype,n),r&&Sn(t,r),e}());function Ln(e){return(Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function En(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tn(e,t){return(Tn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jn(e);if(t){var o=jn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _n(this,n)}}function _n(e,t){return!t||"object"!==Ln(t)&&"function"!=typeof t?On(e):t}function On(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jn(e){return(jn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pn=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tn(e,t)}(i,e);var t,n,r,o=Cn(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).id=window[window.TuemilioObject].id,e.supportedAPI=["init","sendVisit","createSubscriber","onInvalidEmail","onEmptyEmail","onVisitCreated","onSubscriberIdentified","onError","onDashboardData","onSubscriberCreated","getDashboard","showDashboard","closeModal","redirect","confetti","onDashboardShown","onDashboardClosed","onSurveySubmitted","createSurveyed","onSubscriberUnauthorized","onSubscriberUnaccepted","onSubscriberUnidentified","onFormSubmitted","onSubscriberUnverified","onResendConfirmationEmail","sendInvitation","onInvitationSent","onInvalidInvitationAddress","onSubscriberInvitedExists","onTooManyInvitations","onInvitationError"],e.config=sn,e.subscriber={},e.executedCommands=[],e.queue=[],e.startTime=Date.now(),"tuemilio.test"===window.location.hostname?e.url="https://tuemilio.test/api/v2/":e.url="https://tuemilio.com/api/v2/",e.testing="tuemilio.test"===window.location.hostname||"tuemilio.com"===window.location.hostname;new Ft;return e.handler=e.handler.bind(On(e)),e}return t=i,(n=[{key:"handler",value:function(e,t){var n=this;switch(this.validate(e),this.executedCommands.push(e),this.config.logging&&(console.log("%cHandler: "+this.constructor.name+" "+e,"color:orange;"),this.setLoggin(!0)),e){case"init":t=t||{},this.extendConfig(this.config,t),Zt.isPrivateMode((function(e){e?n.cookieStatus="not-available":!n.config.cookies.disabled&&Zt.isEnabled()?Zt.get("tu")?n.cookieStatus="available":(Zt.set("tu",Ht(),99999),Zt.get("tu")&&(n.cookieStatus="new")):n.cookieStatus="not-available",setTimeout((function(){n.dispatch("cookie")}),400)})),xt.getReferrerId()&&(Zt.set("tu-referrer-id",xt.getReferrerId(),365),localStorage.setItem("tu-referrer-id",xt.getReferrerId())),L.init(this.config.form),this.config.disabled&&L.hide(),L.on("invalidEmail",(function(e){return n.dispatch("invalidEmail",e)})),L.on("emptyEmail",(function(e){return n.dispatch("emptyEmail",e)})),L.on("submit",(function(e){n.config.form.loginFormOnUserIdentified&&n.subscriber&&(e.action="login"),(n.config.form.forceLoginForm||"page"===n.config.dashboard.type)&&(e.action="login"),sn.form.customSubmit?n.dispatch("formSubmitted",e):n.handler("createSubscriber",e)})),this.config.form.disabled&&(L.hideForm(),L.hideSubmitButton()),"page"===this.config.dashboard.type&&(L.hideForm(),L.setSubmitButtonAsLoading()),this.config.form.forceLoginForm&&(L.setSubmitButtonAsLogin(),L.hideCustomFields()),this.on("configReceived",(function(e){if(e.ga_enabled&&pn.init(),e.fomo&&xn.init(e),e.subscriber&&Zt.set("tu",e.subscriber.cookie_uuid,99999),n.config.redirect=e.redirect,n.config.redirectURL=e.redirect_url,n.config.confetti.disabled=!e.confetti,mn.init(n.config.confetti),xt.isDashboard()){var t={address:xt.getEmail(),uuid:xt.getUuid()};if(n.config.redirect&&xt.getWithoutParameters()!==n.config.redirectURL)return void n.handler("redirect",n.config.redirectURL);n.dispatch("subscriberIdentifiedFromDashboardLink",t),n.handler("getDashboard",t)}})),this.on("subscriberUnidentified",(function(){"page"===n.config.dashboard.type&&(L.hideCustomFields(),L.setSubmitButtonAsLogin(),L.showForm());var e="";e=""===xt.getReferrerId()?"not referred":"referred",pn.sendEvent("visitor","visited",e)})),this.on("subscriberUnaccepted",(function(e){L.addFeedback("email",n.config.form.feedback.texts.unaccepted),L.setSubmitButtonAsLogin(),n.testing&&window.alert("This is development alert will only show in this page: "+e.message)})),this.on("subscriberUnauthorized",(function(){xt.isDashboard()&&(L.showForm(),L.hideCustomFields()),L.showForm(),L.hideCustomFields(),L.addFeedback("email",n.config.form.feedback.texts.unauthorized),L.setSubmitButtonAsLogin()})),this.on("subscriberUnverified",(function(e){L.addFeedback("email",e.message).forEach((function(e){e.querySelectorAll("a").forEach((function(e){e.href.includes("tuemilio")&&e.addEventListener("click",(function(t){t.preventDefault(),n.dispatch("resendConfirmationEmail",e)}))}))})),L.hideSubmitButton(),L.hideEmailInput(),L.hideCustomFields(),L.hideTextElements()})),this.on("subscriberIdentified",(function(e){n.subscriber=e,n.config.dashboard.loadOnUserIdentified&&(L.hideForm(),L.setSubmitButtonAsLoading()),n.config.form.loginFormOnUserIdentified&&(L.setSubmitButtonAsLogin(),L.hideCustomFields(),L.emailInput.value=n.subscriber.address),n.config.form.forceLoginForm&&(L.emailInput.value=n.subscriber.address);var t="";t=xt.isDashboard()?"dashboard link":"direct",pn.sendEvent("subscriber","revisited",t)})),this.on("subscriberIdentifiedFromForm",(function(){L.hideForm(),n.config.dashboard.modal.preventShowAfterLogin||n.config.dashboard.disabled||n.handler("showDashboard")})),this.on("subscriberIdentifiedFromDashboardLink",(function(){L.hideForm(),n.config.dashboard.modal.preventShowAfterLogin||n.config.dashboard.disabled||n.handler("showDashboard")})),this.on("subscriberCreated",(function(e){n.subscriber=e,L.hideForm(),n.config.dashboard.modal.preventShowAfterSubscribing||n.config.dashboard.disabled||n.handler("showDashboard");var t="";t=""===xt.getReferrerId()?"not referred":"referred",pn.sendEvent("visitor","converted",t),pn.sendEvent("subscriber","joined",t)})),this.on("dashboard",(function(e){if(n.config.dashboard.loadOnUserIdentified&&Zt.set("tu",e.subscriber.cookie_uuid,99999),!n.config.dashboard.disabled){L.hideSubmitButton(),L.hideGdprContent();var t=document.getElementsByTagName("body")[0];Pt.init(n.config,pn),Pt.on("surveySubmitted",(function(e){n.dispatch("surveySubmitted"),n.handler("createSurveyed",e)}));var r=Pt.render(e);if("page"===n.config.dashboard.type&&(Pt.hide(),Pt.wrapper?Pt.wrapper.appendChild(r):L.wrapper?L.wrapper.appendChild(r):t.insertBefore(r,t.firstChild),n.handler("showDashboard")),"modal"===n.config.dashboard.type){an.init(n.config);var o=an.render(r);t.insertBefore(o,t.firstChild),n.config.dashboard.hideButton||an.showDashboardButton(),an.on("closed",(function(){n.dispatch("dashboardClosed")})),an.dashboardButtons.forEach((function(e){e.addEventListener("click",(function(){n.handler("showDashboard")}))}))}}})),this.on("resendConfirmationEmail",(function(e){o=new Ft,e.style.pointerEvents="none",e.style.textDecoration="none",o.post(e.href),o.on(200,(function(){e.href="#",e.style.color="green",e.innerText=L.config.feedback.texts.resentConfirmationEmail})),o.on(401,(function(){e.href="#",e.style.color="red",e.innerText="Oops, something went wrong."})),o.on(500,(function(){e.href="#",e.style.color="red",e.innerText="Oops, something went wrong."})),o.on(429,(function(){e.href="#",e.style.color="red",e.innerText="Oops, too many clicks, try later."}))})),this.on("redirecting",(function(){})),"page"!==this.config.dashboard.type||this.isQueued("sendVisit")||this.handler("getDashboard",{address:xt.getEmail()||"unknown"}),this.subscriber;break;case"sendInvitation":Pt.element.querySelector(".t-invite-feedback").innerText="",(o=new Ft).post(this.url+"public/lists/"+this.id+"/invite",t),o.on(200,(function(e){n.dispatch("invitationSent",e)})),o.on(402,(function(e){n.dispatch("invitationError",e),alert("Sending invitations only works for premium users in founder or startup plan.")})),o.on(422,(function(e){n.dispatch("invalidInvitationAddress",e)})),o.on(303,(function(e){n.dispatch("subscriberInvitedExists",e)})),o.on(427,(function(e){})),o.on(429,(function(e){n.dispatch("tooManyInvitations",e)})),o.on(404,(function(e){n.dispatch("error",e.message),n.dispatch("invitationError",e),console.warn(e.message)})),o.on(500,(function(e){n.dispatch("error",e.message),n.dispatch("invitationError",e),console.warn(e.message)}));break;case"createSubscriber":var r=Zt.get("tu");this.config.dashboard.loadOnUserIdentified||(r=Ht()),t.cookie_status=this.cookieStatus,t.referrerUrl=document.referrer,t.timezone=(new Date).getTimezoneOffset()/60,t.clickTime=(new Date-this.startTime)/1e3,t.epoch=Date.now(),t.origin_url=window.location.href,t.cookie_uuid=r,t.referrer_id=t.referralId||xt.getReferrerId()||Zt.get("tu-referrer-id")||localStorage.getItem("tu-referrer-id"),t.ga_id=pn.getClientId(),"object"===Ln(t.custom_fields)&&(t.custom_fields=JSON.stringify(t.custom_fields)),(o=new Ft).post(this.url+"public/lists/"+this.id+"/emails",t),o.on(201,(function(e){n.dispatch("subscriberCreated",e.subscriber),n.dispatch("dashboard",e)})),o.on(200,(function(e){n.dispatch("subscriberIdentifiedFromForm"),n.dispatch("subscriberIdentified",e.subscriber),n.dispatch("dashboard",e)})),o.on(401,(function(e){n.dispatch("subscriberUnauthorized",e)})),o.on(422,(function(e){n.dispatch("subscriberUnaccepted",e)})),o.on(427,(function(e){n.dispatch("subscriberUnverified",e)})),o.on(429,(function(e){})),o.on(404,(function(e){n.dispatch("error",e.message),console.warn(e.message)}));break;case"sendVisit":this.on("cookie",(function(){var e=new Ft;e.post(n.url+"public/lists/"+n.id+"/visits",{address:xt.getEmail()||"",listing:n.id,epoch:Date.now(),referrerUrl:document.referrer,timezone:(new Date).getTimezoneOffset()/60,cookie_uuid:Zt.get("tu"),cookie_status:n.cookieStatus,origin_url:window.location.href,referrer_id:xt.getReferrerId()}),e.on(201,(function(e){e.subscriber?(n.dispatch("visitCreated",e),n.dispatch("subscriberIdentified",e.subscriber),n.config.dashboard.loadOnUserIdentified&&!xt.isDashboard()&&n.handler("getDashboard",e.subscriber)):(n.dispatch("visitCreated",e),xt.isDashboard()||n.dispatch("subscriberUnidentified")),n.dispatch("configReceived",e)})),e.on(427,(function(e){n.dispatch("subscriberUnverified",e)})),e.on(429,(function(e){})),e.on(404,(function(e){n.dispatch("error",e.message),console.warn(e.message)}))}));break;case"createSurveyed":(o=new Ft).post(this.url+"public/lists/"+this.id+"/emails/"+this.subscriber.id+"/surveyed",{type:t.type}),o.on(201,(function(e){}));break;case"getDashboard":var o=new Ft,i="";i=t.uuid?this.url+"public/lists/"+this.id+"/emails/dashboard?uuid="+encodeURIComponent(t.uuid):this.url+"public/lists/"+this.id+"/emails/dashboard?email="+encodeURIComponent(t.address),o.get(i),o.on(200,(function(e){n.dispatch("dashboard",e)})),o.on(400,(function(e){n.dispatch("subscriberUnauthorized",e),n.dispatch("error",e.message)})),o.on(401,(function(e){n.dispatch("subscriberUnauthorized",e),n.dispatch("error",e.message)})),o.on(404,(function(e){n.dispatch("error",e.message),console.warn(e.message)})),o.on(427,(function(e){n.dispatch("subscriberUnverified",e)})),o.on(429,(function(e){}));break;case"showDashboard":if(this.config.dashboard.disabled)return;if("modal"===this.config.dashboard.type)if(an.initialized){if(this.config.redirect&&xt.getWithoutParameters()!==this.config.redirectURL)return void this.handler("redirect",this.config.redirectURL);this.config.confetti.disabled||this.config.dashboard.disabled||this.config.redirect||mn.fireOnce(),an.show()}else this.on("dashboard",(function(){n.config.redirect&&xt.getWithoutParameters()!==n.config.redirectURL?n.handler("redirect",n.config.redirectURL):(n.config.confetti.disabled||n.config.dashboard.disabled||n.config.redirect||mn.fireOnce(),an.show())}));if("page"===this.config.dashboard.type)if(Pt.loaded){if(this.config.redirect&&xt.getWithoutParameters()!==this.config.redirectURL)return void this.handler("redirect",this.config.redirectURL);this.config.confetti.disabled||this.config.dashboard.disabled||this.config.redirect||mn.fireOnce(),Pt.show()}else this.on("dashboard",(function(){n.config.redirect&&xt.getWithoutParameters()!==n.config.redirectURL?n.handler("redirect",n.config.redirectURL):(n.config.confetti.disabled||n.config.dashboard.disabled||n.config.redirect||mn.fireOnce(),Pt.show())}));this.dispatch("onDashboardShown");break;case"closeModal":"modal"===this.config.dashboard.type&&(an.initialized?an.close():this.on("dashboard",(function(){an.close()}))),this.dispatch("dashboardClosed");break;case"redirect":if(t===window.location.href)break;this.dispatch("redirecting"),window.location.href=t;break;case"confetti":mn.fire();break;case"onInvalidEmail":this.on("invalidEmail",t);break;case"onEmptyEmail":this.on("emptyEmail",t);break;case"onVisitCreated":this.on("visitCreated",t);break;case"onSubscriberIdentified":this.on("subscriberIdentified",t);break;case"onDashboardData":this.on("dashboard",t);break;case"onSubscriberCreated":this.on("subscriberCreated",t);break;case"onDashboardShown":this.on("onDashboardShown",t);break;case"onDashboardClosed":this.on("dashboardClosed",t);break;case"onSurveySubmitted":this.on("surveySubmitted",t);break;case"onSubscriberUnauthorized":this.on("subscriberUnauthorized",t);break;case"onSubscriberUnaccepted":this.on("subscriberUnaccepted",t);break;case"onSubscriberUnidentified":this.on("subscriberUnidentified",t);break;case"onSubscriberUnverified":this.on("subscriberUnverified",t);break;case"onFormSubmitted":this.on("formSubmitted",t);break;case"onError":this.on("error",t);break;case"onResendConfirmationEmail":this.on("resendConfirmationEmail",t);break;case"onInvitationSent":this.on("invitationSent",t);break;case"onInvalidInvitationAddress":this.on("invalidInvitationAddress",t);break;case"onSubscriberInvitedExists":this.on("subscriberInvitedExists",t);break;case"onTooManyInvitations":this.on("tooManyInvitations",t);break;case"onInvitationError":this.on("invitationError",t);break;default:console.warn("No handler defined for ".concat(e))}}},{key:"validate",value:function(e){if(!e)throw Error("API method required");if(-1===this.supportedAPI.indexOf(e))throw Error("Method ".concat(e," is not supported"))}},{key:"extendConfig",value:function(e,t){for(var n in e)"object"===Ln(e[n])&&t.hasOwnProperty(n)?(t[n].length>0&&(e[n]=t[n]),null===e[n]&&(e[n]=t[n]),this.extendConfig(e[n],t[n])):void 0!==t[n]&&(e[n]=t[n])}},{key:"isQueued",value:function(e){var t=!1;return this.queue.forEach((function(n){n[0]===e&&(t=!0)})),t}}])&&En(t.prototype,n),r&&En(t,r),i}(d));function An(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"app",value:function(e){var t=e[e.TuemilioObject].q;if(Pn.queue=t,t)for(var n=0;n<t.length;n++)Pn.handler(t[n][0],t[n][1]);e.Tuemilio=Pn.handler,e.Tuemilio.config=Pn.config,e.Tuemilio.id=Pn.id,console.info("Tuemilio v4.0.18")}}])&&An(t.prototype,n),r&&An(t,r),e}())).app(window)}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment