PageSourceSearch

https://www.thetalkmoney.com/js/embed.js

js thetalkmoney.com collected 2026-10-02 15:54:06 UTC 180,696 bytes, 3 lines download raw bytes

1/*! For license information please see embed-6841cd65537556838753.js.LICENSE.txt */
2!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="https://assets.supercast.com/packs/",r(r.s=74)}({1:function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(window.amplitude){var r=l(),n=r.subdomain,o=r.path;amplitude.getInstance().logEvent(t,a(a({},e),{},{subdomain:n,path:o})),s(t,e)}}function s(t,e){window.location.hostname.endsWith(".test")&&console.log("Amplitude event: ".concat(t),e)}function l(){var t=n(window.location.hostname.split("."));return{subdomain:t[0],path:t.slice(1).join(".")}}r.d(e,"a",(function(){return u}))},10:function(t,e){},11:function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&h())}function h(){if(!l){var t=c(p);l=!0;for(var e=s.length;e;){for(u=s,s=[];++f<e;)u&&u[f].run();f=-1,e=s.length}u=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new d(t,e)),1!==s.length||l||c(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},13:function(t,e){function r(t,e,r){var n,o,i,a,c;function u(){var s=Date.now()-a;s<e&&s>=0?n=setTimeout(u,e-s):(n=null,r||(c=t.apply(i,o),i=o=null))}null==e&&(e=100);var s=function(){i=this,o=arguments,a=Date.now();var s=r&&!n;return n||(n=setTimeout(u,e)),s&&(c=t.apply(i,o),i=o=null),c};return s.clear=function(){n&&(clearTimeout(n),n=null)},s.flush=function(){n&&(c=t.apply(i,o),i=o=null,clearTimeout(n),n=null)},s}r.debounce=r,t.exports=r},17:function(t,e,r){"use strict";r.d(e,"a",(function(){return g}));var n=r(4);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i="https://js.stripe.com/v3",a=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,c="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",u=null,s=function(t){return null!==u||(u=new Promise((function(e,r){if("undefined"!==typeof window)if(window.Stripe&&t&&console.warn(c),window.Stripe)e(window.Stripe);else try{var n=function(){for(var t=document.querySelectorAll('script[src^="'.concat(i,'"]')),e=0;e<t.length;e++){var r=t[e];if(a.test(r.src))return r}return null}();n&&t?console.warn(c):n||(n=function(t){var e=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");
vendor: 4,712 bytes, line 2
2r.src="".concat(i).concat(e);var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r}(t)),n.addEventListener("load",(function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))})),n.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(o){return void r(o)}else e(null)}))),u},l=function(t,e){if(null===t)return null;var r=t.apply(void 0,o(e));return function(t){t&&t._registerWrapper&&t._registerWrapper({name:"stripe-js",version:"1.8.0"})}(r),r},f=Promise.resolve().then((function(){return s(null)})),p=!1;f.catch((function(t){p||console.warn(t)}));var h=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return p=!0,f.then((function(t){return l(t,e)}))},d=r(1);function y(){y=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(L){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&r.call(m,o)&&(d=m);var b=h.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=h,c(b,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
vendor: 4,852 bytes, line 2
2ise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(b),c(b,a,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function v(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){v(i,n,o,a,c,"next",t)}function c(t){v(i,n,o,a,c,"throw",t)}a(void 0)}))}}function b(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var g=function(){function t(e){var r=e.stripeAccount,n=e.publicKey,o=e.intentSecret,i=e.intentType,a=e.plan,c=e.price,u=e.paymentMethod,s=e.currency,l=void 0===s?"usd":s,f=e.rootElement,p=void 0===f?document:f;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ALL_SECTIONS=[".name-container",".signup-button-container",".credit-card-container",".payment-request-container"],this.CARD_SECTIONS=[".name-container",".signup-button-container",".credit-card-container"],this.PAYMENT_REQUEST_SECTIONS=[".payment-request-container"],this.EXISTING_CARD_SECTIONS=[".signup-button-container"],this.stripeAccount=r,this.publicKey=n,this.intentSecret=o,this.intentType=i,this.plan=a,this.price=c,this.currency=l,this.canUsePaymentButton=!1,this.rootElement=p,this.existingPaymentMethod=u}var e,r,o,i,a,c,u,s;return e=t,r=[{key:"setup",value:(s=m(y().mark((function t(){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,h(this.publicKey,{stripeAccount:this.stripeAccount});case 3:this.stripe=t.sent,this.elements=this.stripe.elements(),this.setDefaultPaymentMethod(),this.setupCard(),this.setupPaymentButton(),this.listenForPaymentButtonCompletion(),this.listenForFormSubmission(),this.setupPaymentMethodSwitch(),this.setupUseExistingSwitch(),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(0),this.rootElement.querySelector("#new-subscription").innerHTML="\n        <div class='text-left'>\n          <h3>Sorry, something went wrong!</h3>\n\n          <p>\n            Unfortunately, we couldn't load this form for you. You can try closing this window\n            and opening it again.\n          </p>\n          <p>\n            If you're still running into problems, please <a data-action='click->
2beacon-link#open' data-controller='beacon-link' href='mailto:[email protected]'>get in touch</a>.\n          </p>\n        </div>\n      ",n.a.sendError(t.t0,(function(t){t.setAction("setup")}));case 18:case"end":return t.stop()}}),t,this,[[0,14]])}))),function(){return s.apply(this,arguments)})},{key:"setDefaultPaymentMethod",value:function(){this.currentPaymentMethod="card"}},{key:"setupUseExistingSwitch",value:function(){var t=this;this.rootElement.querySelectorAll("input[name='use_existing_payment_method']").forEach((function(e){e.addEventListener("click",t.setPaymentVisibility.bind(t))}))}},{key:"setPaymentVisibility",value:function(){var t=this.rootElement.querySelector("#signup-button");this.toggleSections(this.ALL_SECTIONS,"none"),this.useExistingCard()?(this.toggleSections(this.EXISTING_CARD_SECTIONS,"block"),t.disabled=!1):"button"==this.currentPaymentMethod?(this.toggleSections(this.PAYMENT_REQUEST_SECTIONS,"block"),t.disabled=!0):(this.toggleSections(this.CARD_SECTIONS,"block"),t.disabled=!0)}},{key:"toggleSections",value:function(t,e){var r=this;t.forEach((function(t){var n=r.rootElement.querySelector(t);n&&(n.style.display=e)}))}},{key:"setupCard",value:function(){this.card=this.elements.create("card"),this.card.mount("#credit_card"),this.listenForCardErrors()}},{key:"listenForCardErrors",value:function(){var t=this.rootElement.querySelector("#payment-errors"),e=this.rootElement.querySelector("#signup-button");this.card.addEventListener("change",(function(r){r.error?(Object(d.a)("Payment - Card Error",{message:r.error.message}),t.textContent=r.error.message,t.style.display="block",e.disabled=!0):r.complete&&(Object(d.a)("Payment - Card Input Successful"),t.style.display="none",e.disabled=!1)}))}},{key:"listenForCompleteUserInfo",value:function(t){var e=this;t.querySelectorAll("[required]").forEach((function(t){t.value.length<1||"checkbox"==t.type&&!t.checked?e.addInlineError(t,"This field is required"):e.removeInlineError(t)})),t.querySelectorAll("input[type='number'][min]").forEach((function(t){""!==t.value&&t.value<t.min?e.addInlineError(t,"This field must be at least ".concat(t.min)):e.removeInlineError(t)}));var r=t.querySelector(".email-input"),n=/^(([^<>()[\]\\.,;:\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,}))$/;return r&&(n.test(r.value.toLowerCase())?this.removeInlineError(r):this.addInlineError(r,"Email is not a valid email")),t.querySelectorAll("input[type='email']").forEach((function(t){n.test(t.value.toLowerCase())?e.removeInlineError(t):e.addInlineError(t,"Email is not a valid email")})),t.querySelectorAll("[data-notmatch]").forEach((function(t){document.querySelector(t.dataset.notmatch).value==t.value&&e.addInlineError(t,t.dataset.notmatchMessage||"".concat(t.value," is invalid"))})),null!==t.querySelector(".inline-error")}},{key:"addInlineError",value:function(t,e){var r=t.parentNode.querySelector(".inline-error");t.classList.add("input-error"),null===r&&t.insertAdjacentHTML("afterend","<small class='inline-error text-red-500 text-sm'>".concat(e,"</small>"))}},{key:"removeInlineError",value:function(t){var e=t.parentNode.querySelector(".inline-error");null!==e&&e.remove(),t.classList.remove("input-error")}},{key:"listenForPaymentButtonCompletion",value:function(){var t=this;this.paymentRequest.on("paymentmethod",(function(e){e.complete("success"),t.paymentButtonPaymentMethod=e.paymentMethod,t.fillFormFromPaymentMethod(e)}))}},{key:"fillFormFromPaymentMethod",value:(u=m(y().mark((function t(e){var r,n,o;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.rootElement.querySelector(".stripe-form"),e.payerName&&e.payerName.indexOf(" ")>-1&&(n=e.payerName.trim(),r.querySelector(".first-name-input").value=n.substring(0,n.lastIndexOf(" ")),r.querySelector(".last-name-input").value=n.substring(n.lastIndexOf(" ")+1,n.length)),e.payerEmail&&e.payerEmail.length>1&&(r.querySelector(".email-input").value=e.payerEmail),0!==r.querySelector(".first-name-input").value.length&&0!==r.querySelector(".last-name-input").value.length&&0!==r.querySelector(".email-input").value.length){t.next=6;break}return r.querySelector(".name-container").style.display="block",t.abrupt("return");case 6:if(!r.elements.terms_of_use_accepted||!1!==r.elements.terms_of_use_accepted.checked){t.next=14;break}return r.querySelector(".signup-button-container").style.display="block",r.querySelector(".payment-request-container").style.display="none",r.querySelector("#signup-button").disabled=!1,(o=this.rootElement.querySelector("#payment-errors")).textContent="Please accept the Supercast Terms of Use and Privacy Policy before continuing.",o.style.display="block",t.abrupt("return");case 14:return t.next=16,this.completeSubscription(r);case 16:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"getCurrencyAndAmount",value:(c=m(y().mark((function t(){var e;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("payment"!=this.intentType){t.next=7;break}return t.next=3,this.stripe.retrievePaymentIntent();case 3:return e=t.sent,t.abrupt("return",{amount:e.amount,currency:e.currency});case 7:this.plan&&this.price;case 8:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"setupPaymentButton",value:(a=m(y().mark((function t(){var e,r;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.paymentRequest=this.stripe.paymentRequest({total:{label:"Total",amount:this.price||0}
2,country:"US",currency:this.currency||"usd",requestPayerName:!0,requestPayerEmail:!0,disableWallets:["link"]}),this.paymentButton=this.elements.create("paymentRequestButton",{paymentRequest:this.paymentRequest}),t.next=4,this.paymentRequest.canMakePayment();case 4:(null!==(r=t.sent)&&void 0!==r&&r.applePay||null!==r&&void 0!==r&&r.googlePay)&&(this.canUsePaymentButton=!0,this.currentPaymentMethod="button",this.paymentButton.mount("#payment-request-button")),null===(e=this.rootElement.querySelector("#payment-request-button"))||void 0===e||e.addEventListener("click",(function(){Object(d.a)("Payment - Clicked Payment Button")})),this.setPaymentVisibility();case 8:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"useExistingCard",value:function(){return this.existingPaymentMethod&&this.rootElement.querySelector("#use_existing").checked}},{key:"setupPaymentMethodSwitch",value:function(){var t=this;this.rootElement.querySelector(".alt-payment-text a").addEventListener("click",(function(e){Object(d.a)("Payment - Switching to existing card"),e.preventDefault(),t.currentPaymentMethod="card",t.setPaymentVisibility()}))}},{key:"listenForFormSubmission",value:function(){var t=this;this.rootElement.querySelector("#signup-button").addEventListener("click",function(){var e=m(y().mark((function e(r){var n,o;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.preventDefault(),n=r.target.closest("form"),null===!(o=t.rootElement.querySelector("#existing-user-error"))&&0!==o.textContent.length){e.next=6;break}return e.next=6,t.completeSubscription(n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"completeSubscription",value:(i=m(y().mark((function t(e){var r,o,i,a;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,Object(d.a)("Payment - Completing Subscription",{paymentMethod:this.currentPaymentMethod}),!this.listenForCompleteUserInfo(e)){t.next=4;break}return t.abrupt("return",!1);case 4:if(this.rootElement.querySelector("#signup-button").disabled=!0,this.rootElement.querySelector(".purchase-progress")&&(e.style.display="none",this.rootElement.querySelector(".purchase-progress").style.display="block"),window.setTimeout(this.abortCompletion.bind(this),6e4),r=e.querySelector(".first-name-input").value,o=e.querySelector(".last-name-input").value,i=this.useExistingCard()?this.existingPaymentMethod.id:"card"==this.currentPaymentMethod?{card:this.card,billing_details:{name:r+" "+o}}:this.paymentButtonPaymentMethod.id,"setup"!=this.intentType){t.next=17;break}return t.next=14,this.stripe.confirmCardSetup(this.intentSecret,{payment_method:i});case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,this.stripe.confirmCardPayment(this.intentSecret,{payment_method:i,setup_future_usage:"off_session"});case 19:t.t0=t.sent;case 20:(a=t.t0).error?this.showPaymentError(a.error.message):e.submit(),t.next=30;break;case 24:return t.prev=24,t.t1=t.catch(0),this.showPaymentError("Sorry! We were unable to complete your purchase. Please try again or <a href='https://support.supercast.com' data-controller='beacon-link' data-action='beacon-link#open'>contact us</a> for help."),console.log("Error when submitting payment",t.t1),n.a.sendError(t.t1,(function(t){t.setAction("completeSubscription")})),t.abrupt("return",!1);case 30:case"end":return t.stop()}}),t,this,[[0,24]])}))),function(t){return i.apply(this,arguments)})},{key:"showPaymentError",value:function(t){var e=this.rootElement.querySelector(".stripe-form"),r=this.rootElement.querySelector("#payment-errors"),n=this.rootElement.querySelector("#signup-button");this.rootElement.querySelector(".purchase-progress")&&(e.style.display="block",this.rootElement.querySelector(".purchase-progress").style.display="none"),r.innerHTML=t,r.style.display="block",window.supercast&&window.supercast.trigger("pageload"),n.disabled=!1}},{key:"abortCompletion",value:function(){this.showPaymentError("Sorry! Your purchase could not be completed. Please try again or <a href='https://support.supercast.com' data-controller='beacon-link' data-action='beacon-link#open'>contact us</a> for help.")}}],r&&b(e.prototype,r),o&&b(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}()},2:function(t,e,r){"use strict";function n(t,e){var r,n;switch(e){case"development":r="supercast.test",n=!0;break;case"test":r="lvh.me:31337",n=!1;break;case"staging":r="staging.supercast.tech",n=!0;break;case"production":r="supercast.com",n=!0}
2return"".concat(n?"https":"http","://").concat(t||"app",".").concat(r)}r.d(e,"a",(function(){return n}))},4:function(t,e,r){"use strict";var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(e){i(e)}}function c(t){try{u(n.throw(t))}catch(e){i(e)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))}function a(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(c){i=[6,c],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function c(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(c){o={error:c}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}Object.create;function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?function(t){return t}:1===t.length?t[0]:t.reduce((function(t,e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t(e.apply(void 0,s(r)))}}))}function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t){if(t)return Object.keys(t).forEach((function(e){"string"!==typeof t[e]&&"boolean"!==typeof t[e]&&"number"!==typeof t[e]&&(t[e]=JSON.stringify(t[e]))})),t}function h(t){if("undefined"!==typeof t.stacktrace||"undefined"!==typeof t["opera#sourceloc"]){var e=t.stacktrace;return(void 0===e?"":e).split("\n").filter((function(t){return""!==t}))}if(t.stack){var r=t.stack;return(void 0===r?"":r).split("\n").filter((function(t){return""!==t}))}return["No stacktrace available"]}var d=r(7);r(9);var y=function(){function t(t){this._data=t}return t.prototype.toJSON=function(){return JSON.stringify(this._data)},t.prototype.serialize=function(){return this._data},t}(),v=function(){function t(){}return t.serialize=function(){return{transport:this.transport(),origin:this.origin()}},t.origin=function(){var t=Object(d.a)();return!t.navigator||"ReactNative"===t.navigator.product&&!t.location?"":t.location.origin||t.location.protocol+"//"+t.location.hostname},t.transport=function(){var t=Object(d.a)();return Object(d.b)()&&"undefined"===typeof jest?"NodeHTTP":t.XDomainRequest?"XDomainRequest":t.XMLHttpRequest&&!t.fetch?"XMLHttpRequest":"fetch"},t.supportsPromises=function(){var t,e=Object(d.a)();return"Promise"in e&&"resolve"in e.Promise&&"reject"in e.Promise&&"all"in e.Promise&&"race"in e.Promise&&(new e.Promise((function(e){t=e})),"function"===typeof t)},t}(),m=function(){function t(t){this.url=t}return t.prototype.send=function(t){var e=this;
2return new Promise((function(r,n){var o,i=new XDomainRequest,a=new RegExp("^https?:");i.onload=function(){return r({})},i.open("POST",e.url.replace(a,null===(o=null===window||void 0===window?void 0:window.location)||void 0===o?void 0:o.protocol)),setTimeout((function(){try{i.send(t)}catch(e){n(e)}}),0)}))},t}(),b=function(){function t(t){this.url=t}return t.prototype.send=function(t){var e=this;return new Promise((function(r,n){try{var o=new XMLHttpRequest;o.onreadystatechange=function(){o.readyState===XMLHttpRequest.DONE&&r({})},o.open("POST",e.url),o.send(t)}catch(i){n(i)}}))},t}(),g=function(){function t(t,e){this.url=t}return t.prototype.send=function(t){return i(this,void 0,void 0,(function(){var e,r;return a(this,(function(n){switch(n.label){case 0:return[4,fetch(this.url,{method:"POST",body:t})];case 1:return e=n.sent(),r=e.statusText,[2,e.ok?Promise.resolve({}):Promise.reject({statusText:r})]}}))}))},t}(),w=r(10),x=r.n(w),E=function(){function t(t){this.url=t}return t.prototype.send=function(t){var e=this,r={method:"POST",headers:{"Content-Type":"application/json","Content-Length":t.length}};return new Promise((function(n,o){var i=x.a.request(e.url,r,(function(){})).on("error",(function(t){return o(t)}));i.write(t),i.end(),n({})}))},t}(),_=function(){function t(t){this._uri=t.uri||"https://appsignal-endpoint.net/collect",this._apiKey=t.key,this._clientVersion=t.version,this._transport=this._createTransport(this._url())}return t.prototype.push=function(t){return i(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this._transport.send(t.toJSON())];case 1:return e.sent(),[2,t]}}))}))},t.prototype._createTransport=function(t){switch(v.transport()){case"XDomainRequest":return new m(t);case"XMLHttpRequest":return new b(t);case"NodeHTTP":return new E(t);default:return new g(t)}},t.prototype._url=function(){var t,e=this._authorization();return this._uri+"?"+(t=e,Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&"))},t.prototype._authorization=function(){return{api_key:this._apiKey,version:this._clientVersion}},t}();function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}var S,O=function(t){function e(e){return t.call(this,o({timestamp:Math.round((new Date).getTime()/1e3),namespace:"frontend",error:{name:"NullError",message:"No error has been set",backtrace:[]}},e))||this}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.setAction=function(t){return t&&"string"===typeof t?(this._data.action=t,this):this},e.prototype.setNamespace=function(t){return t&&"string"===typeof t?(this._data.namespace=t,this):this},e.prototype.setError=function(t){var e;return t?(this._data.error={name:t.name||"[unknown]",message:t.message||"setError received an invalid object or type which did not provide an error message or was not an object with a valid message property.\n\nHere's some more information about what we received:\n\ntypeof: "+k(t)+"\nconstructor.name: "+(null!==(e=t.constructor.name)&&void 0!==e?e:"[no constructor]")+'\nAs a string: "'+("string"!==typeof t?JSON.stringify(t):t)+'"',backtrace:h(t)},this):this},e.prototype.setTags=function(t){return this._data.tags=o(o({},this._data.tags),function(t){if(t)return Object.keys(t).forEach((function(e){"object"===f(t[e])&&(t[e]=JSON.stringify(t[e])),t[e]=String(t[e])})),t}(t)),this},e.prototype.setParams=function(t){return this._data.params=o(o({},this._data.params),t),this},e.prototype.setBreadcrumbs=function(t){return this._data.breadcrumbs=t,this},e}(y),L=function(){function t(t){this._data=t||[]}return t.prototype.clear=function(){this._data=[]},t.prototype.values=function(){return this._data},t.prototype.push=function(t){var e;return Array.isArray(t)?(e=this._data).push.apply(e,s(t)):this._data.push(t)},t.prototype.drain=function(){return a(this,(function(t){switch(t.label){case 0:return this._data.length>0?[4,this._data.shift()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}}
2))},t}(),j=function(){function t(t,e,r){this._retries=0,this._timerID=0,this._duration=0,this._api=e,this._queue=t,this.options=o({limit:5,initialDuration:1e3},r),this.reset()}return t.prototype.schedule=function(t){var e=this;void 0===t&&(t=this._duration);var r=Object(d.a)();return r.setTimeout((function(){return i(e,void 0,void 0,(function(){var e,r,n,o,i,u,s;return a(this,(function(a){switch(a.label){case 0:a.trys.push([0,7,8,9]),e=c(this._queue.drain()),r=e.next(),a.label=1;case 1:if(r.done)return[3,6];if(!(n=r.value))return[2];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this._api.push(n)];case 3:return a.sent(),[3,5];case 4:return a.sent(),o=Math.floor(Math.pow(t,1.3)),this._retries=this._retries-1,0===this._retries?this.reset():(this._queue.push(n),this._timerID=this.schedule(o)),[2];case 5:return r=e.next(),[3,1];case 6:return[3,9];case 7:return i=a.sent(),u={error:i},[3,9];case 8:try{r&&!r.done&&(s=e.return)&&s.call(e)}finally{if(u)throw u.error}return[7];case 9:return this.reset(),[2]}}))}))}),t)},t.prototype.reset=function(){var t=this.options,e=t.limit,r=t.initialDuration;this._retries=e,this._duration=r},t}(),P=function(){function t(t){this.VERSION="1.3.18",this.ignored=[],this._breadcrumbs=[],this._hooks={decorators:Array(),overrides:Array()},this._env=v.serialize(),this._queue=new L([]);var e=t.key,r=void 0===e?"":e,n=t.uri,o=t.revision,i=t.ignoreErrors;o&&"string"!==typeof o&&(t.revision=String(o)),""===r&&console.info("[APPSIGNAL]: Started in development mode."),this._api=new _({key:r,uri:n,version:this.VERSION}),i&&Array.isArray(i)&&(this.ignored=i),this._dispatcher=new j(this._queue,this._api),this._options=t}return t.prototype.send=function(t,e,r){var n=this;if(t instanceof Error||t instanceof O){if(0!==this.ignored.length){if(t instanceof Error&&this.ignored.some((function(e){return e.test(t.message)})))return void console.warn("[APPSIGNAL]: Ignored an error: "+t.message);if(t instanceof O){var o=t.serialize().error;if(o.message&&this.ignored.some((function(t){return t.test(o.message)})))return void console.warn("[APPSIGNAL]: Ignored a span: "+o.message)}}var i=t instanceof O?t:this._createSpanFromError(t);if(this._hooks.decorators.length>0&&l.apply(void 0,s(this._hooks.decorators))(i),e)if("function"===typeof e){e(i)}else{console.warn("[APPSIGNAL]: DEPRECATED: Calling the `send`/`sendError` function with a tags object is deprecated. Use the callback argument instead.");var a=p(e)||{};i.setTags(a)}if(r&&(console.warn("[APPSIGNAL]: DEPRECATED: Calling the `send`/`sendError` function with a namespace is deprecated. Use the callback argument instead."),i.setNamespace(r)),this._breadcrumbs.length>0&&i.setBreadcrumbs(this._breadcrumbs),this._hooks.overrides.length>0&&l.apply(void 0,s(this._hooks.overrides))(i),v.supportsPromises()){if(this._breadcrumbs=[],this._options.key)return this._api.push(i).catch((function(){n._queue.push(i),setTimeout((function(){return n._dispatcher.schedule()}),0)}));if(console.warn("[APPSIGNAL]: Span not sent because we're in development mode:",i),t instanceof Error)throw t}else console.error("[APPSIGNAL]: Error not sent. A Promise polyfill is required.")}else console.error("[APPSIGNAL]: Can't send error, given error is not a valid type")},t.prototype.sendError=function(t,e,r){return this.send(t,e,r)},t.prototype.use=function(t){t.call(this)},t.prototype.createSpan=function(t){var e=this._options,r=e.revision,n=void 0===r?"":r,o=e.namespace,i=new O({environment:this._env,revision:n});return o&&i.setNamespace(o),t&&"function"===typeof t&&t(i),i},t.prototype.wrap=function(t,e,r){return i(this,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,4]),[4,t()];case 1:return[2,o.sent()];case 2:return n=o.sent(),[4,this.sendError(n,e,r)];case 3:return o.sent(),[2,Promise.reject(n)];case 4:return[2]}}
2))}))},t.prototype.addDecorator=function(t){this._hooks.decorators.push(t)},t.prototype.addOverride=function(t){this._hooks.overrides.push(t)},t.prototype.demo=function(){var t=this._createSpanFromError(new Error("Hello world! This is an error used for demonstration purposes."));t.setAction("TestAction").setParams({path:"/hello",method:"GET"}).setTags({demo_sample:"true"}),this.send(t)},t.prototype.addBreadcrumb=function(t){var e=o(o({timestamp:Math.round((new Date).getTime()/1e3)},t),{metadata:p(t.metadata)});e.category?e.action?(20===this._breadcrumbs.length&&this._breadcrumbs.pop(),this._breadcrumbs.unshift(e)):console.warn("[APPSIGNAL]: Breadcrumb not added. `action` is missing."):console.warn("[APPSIGNAL]: Breadcrumb not added. `category` is missing.")},t.prototype._createSpanFromError=function(t){var e=this.createSpan();return e.setError(t),e},t}();S="8a3ef517-ca57-47fc-bad1-96b4b5aaafe0";e.a=new P({key:S})},5:function(t,e){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(o){"object"===("undefined"===typeof window?"undefined":r(window))&&(n=window)}t.exports=n},6:function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r=a(e);t.innerHTML="",t.appendChild(e),r.forEach((function(e){return t.appendChild(e)}))}function a(t){return n(t.querySelectorAll("script")).map((function(t){t.parentNode.removeChild(t);var e=document.createElement("script");return e.appendChild(document.createTextNode(t.innerText)),e}))}r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return a}))},69:function(t,e){function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t)||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 n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}NodeList.prototype.__proto__=Array.prototype;var o=function(){var t={pageload:[]},e=function(){document.addEventListener("turbo:load",(function(){t.pageload.forEach((function(t){return t.call()}))}))};function n(){e.call(this)}return n.prototype.on=function(e){for(var n,o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];i=i.filter((function(t){return"function"===typeof t})),t[e]=t[e]||[],(n=t[e]).push.apply(n,r(i))},n.prototype.trigger=function(e,r){t[e].forEach((function(t){return t(r)}))},n}();window.supercast=new o},7:function(t,e,r){"use strict";(function(t,n){function o(){return"[object process]"===Object.prototype.toString.call("undefined"!==typeof t?t:0)}function i(){return o()?n:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}}r.d(e,"b",(function(){return o}
vendor: 4,453 bytes, line 2
2)),r.d(e,"a",(function(){return i}))}).call(this,r(11),r(5))},74:function(t,e,r){"use strict";r.r(e);var n='.bundle{position:relative;box-shadow:0 0 20px 0 rgba(0,0,0,.08);border-radius:12px;background-color:#fff}.bundle-content{padding:24px}.bundle-cta{margin:10px 0}h2{margin-top:12px;margin-bottom:24px;font-weight:900}.plan-pricing-trial{margin-bottom:16px}.button{border:0;border-radius:4px;cursor:pointer;display:inline-block;font-family:inherit;font-size:16px;line-height:1.5;font-weight:500;padding:15px 20px 13px;text-decoration:none;transition:background-color .07s linear;color:#fff;font-weight:600;background-color:var(--supercast-button-background-color, #3d62b3)}.bundle-featured-image{flex:0 0 200px}.bundle-featured-image img{border-radius:12px 12px 0 0;height:200px;object-fit:cover;width:100%}.button:hover{filter:brightness(1.1)}[style*="--aspect-ratio"]>:first-child{width:100%}[style*="--aspect-ratio"]>img{height:auto}@supports(--custom:property){[style*="--aspect-ratio"]{position:relative}[style*="--aspect-ratio"]::before{content:"";display:block;padding-bottom:calc(100%/(var(--aspect-ratio)))}[style*="--aspect-ratio"]>:first-child{height:100%;left:0;position:absolute;top:0}}.hidden{display:none}.plan-pricing.with-promotion .standard-price{color:#848e97;text-decoration:line-through}.plan-pricing.with-promotion .promotion-price{color:var(--accent-color)}.plan-pricing.with-promotion .duration-details{font-size:12px;color:#848e97;font-weight:normal}.ribbon{position:absolute;right:-5px;top:-5px;z-index:1;overflow:hidden;width:75px;height:75px;text-align:right}.ribbon span{font-size:10px;color:var(--accent-color-text, #fff);text-transform:uppercase;text-align:center;font-weight:bold;line-height:20px;transform:rotate(45deg);-webkit-transform:rotate(45deg);width:100px;display:block;background:var(--supercast-button-background-color, #3d62b3);box-shadow:0 3px 10px -5px #000;position:absolute;top:19px;right:-21px}.ribbon span::before{content:"";position:absolute;left:0px;top:100%;z-index:-1;filter:brightness(0.6);border-left:3px solid var(--supercast-button-background-color, #3d62b3);border-right:3px solid rgba(0,0,0,0);border-bottom:3px solid rgba(0,0,0,0);border-top:3px solid var(--supercast-button-background-color, #3d62b3)}.ribbon span::after{content:"";position:absolute;right:0%;top:100%;z-index:-1;filter:brightness(0.6);border-right:3px solid var(--supercast-button-background-color, #3d62b3);border-left:3px solid rgba(0,0,0,0);border-bottom:3px solid rgba(0,0,0,0);border-top:3px solid var(--supercast-button-background-color, #3d62b3)}',o=r(2);function i(){i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",c=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(L){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=s;var f={};function p(){}function h(){}function d(){}var y={};u(y,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(S([])));m&&m!==e&&r.call(m,o)&&(y=m);var b=d.prototype=p.prototype=Object.create(y);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=l(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)}
vendor: 5,273 bytes, line 2
2)):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=l(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=d,u(b,"constructor",d),u(d,"constructor",h),h.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},g(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(b),u(b,c,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(t,e)}
2(t,e)||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 c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t){var e="function"===typeof Map?new Map:void 0;return p=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return h(t,arguments,v(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,t)},p(t)}function h(t,e,r){return h=d()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&y(o,r.prototype),o},h.apply(null,arguments)}function d(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var m=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(w,t);var e,r,c,u,p,h,m,b,g=(e=w,r=d(),function(){var t,n=v(e);if(r){var o=v(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return f(this,t)});function w(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w),g.call(this)}return c=w,u=[{key:"connectedCallback",value:function(){this.planId=parseInt(this.attributes.plan_id&&this.attributes.plan_id.value,10),this.code=this.attributes.code&&this.attributes.code.value,this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.updateContent()}},{key:"updateContent",value:(b=s(i().mark((function t(){var e,r,n,o,c;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchCard(),this.fetchStyle()]);case 2:e=t.sent,r=a(e,2),n=r[0],o=r[1],(c=this.attachShadow({mode:"closed"})).appendChild(o),c.appendChild(n),this.attachEvents(c);case 10:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)})},{key:"fetchCard",value:(m=s(i().mark((function t(){var e,r,n,a;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)(this.subdomain,this.environment),"/subscriptions/card")),this.planId>0?(console.warn('Supercast warning - Loading plans by plan / subdomain is deprecated. We recommend loading your plans using an embed code. You can find your code by clicking "Embed this plan" from your dashboard.'),e.searchParams.set("subscription[plan_id]",this.planId)):e.searchParams.set("co
2de",this.code),t.next=4,fetch(e);case 4:if(!(r=t.sent).ok){t.next=12;break}return t.next=8,r.text();case 8:return n=t.sent,t.abrupt("return",this.extractCard(n));case 12:return(a=document.createElement("div")).style.color="red",a.innerText="We were unable to find your plan. Please confirm you are using a valid code to load your plan. You can find the correct code in 'Embed your plan' in your dashboard.",t.abrupt("return",a);case 16:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"fetchStyle",value:(h=s(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent=n,t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)}))),function(){return h.apply(this,arguments)})},{key:"extractCard",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector(".embed-card-content")}},{key:"attachEvents",value:function(t){var e=this;t.querySelector(".button").addEventListener("click",(function(t){t.preventDefault(),Supercast.startPurchase({code:e.code,subdomain:e.subdomain,planId:e.planId,environment:e.environment})}))}}],u&&l(c.prototype,u),p&&l(c,p),Object.defineProperty(c,"prototype",{writable:!1}),w}(p(HTMLElement));function b(){b=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(L){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return O()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(L){return{type:"throw",arg:L}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function S(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(w.prototype),c(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
vendor: 5,313 bytes, line 2
2ise);var a=new w(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(t,e)}(t,e)||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 w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function x(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function E(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){x(i,n,o,a,c,"next",t)}function c(t){x(i,n,o,a,c,"throw",t)}a(void 0)}))}}function _(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function k(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function S(t){var e="function"===typeof Map?new Map:void 0;return S=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return O(t,arguments,P(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,t)},S(t)}function O(t,e,r){return O=L()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&j(o,r.prototype),o},O.apply(null,arguments)}function L(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}
2function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}var T=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(p,t);var e,r,i,a,c,u,s,l,f=(e=p,r=L(),function(){var t,n=P(e);if(r){var o=P(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return k(this,t)});function p(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),f.call(this)}return i=p,a=[{key:"connectedCallback",value:function(){this.planId=parseInt(this.attributes.plan_id&&this.attributes.plan_id.value,10),this.code=this.attributes.code&&this.attributes.code.value,this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.updateContent()}},{key:"updateContent",value:(l=E(b().mark((function t(){var e,r,n,o,i;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchCard(),this.fetchStyle()]);case 2:e=t.sent,r=g(e,2),n=r[0],o=r[1],(i=this.attachShadow({mode:"open"})).appendChild(o),i.appendChild(n),this.attachEvents(i);case 10:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"fetchCard",value:(s=E(b().mark((function t(){var e,r,n,i;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)(this.subdomain,this.environment),"/subscriptions/card")),this.planId>0?(console.warn('Supercast warning - Loading plans by plan / subdomain is deprecated. We recommend loading your plans using an embed code. You can find your code by clicking "Embed this plan" from your dashboard.'),e.searchParams.set("subscription[plan_id]",this.planId)):e.searchParams.set("code",this.code),t.next=4,fetch(e.toString());case 4:if(!(r=t.sent).ok){t.next=12;break}return t.next=8,r.text();case 8:return n=t.sent,t.abrupt("return",this.extractCard(n));case 12:return(i=document.createElement("div")).style.color="red",i.innerText="We were unable to find your plan. Please confirm you are using a valid code to load your plan. You can find the correct code in 'Embed your plan' in your dashboard.",t.abrupt("return",i);case 16:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"fetchStyle",value:(u=E(b().mark((function t(){var e;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent=n,t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"extractCard",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector(".embed-card-content")}},{key:"attachEvents",value:function(t){var e=this;t.querySelector(".button").addEventListener("click",(function(t){t.preventDefault(),Supercast.startPurchase({code:e.code,subdomain:e.subdomain,planId:e.planId,environment:e.environment})}))}}],a&&_(i.prototype,a),c&&_(i,c),Object.defineProperty(i,"prototype",{writable:!1}),p}(S(HTMLElement));function C(){C=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);
vendor: 6,127 bytes, line 2
2if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return N(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(t,e)}
2(t,e)||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 N(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function I(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function q(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){I(i,n,o,a,c,"next",t)}function c(t){I(i,n,o,a,c,"throw",t)}a(void 0)}))}}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function F(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function M(t){var e="function"===typeof Map?new Map:void 0;return M=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return D(t,arguments,z(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),H(n,t)},M(t)}function D(t,e,r){return D=U()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&H(o,r.prototype),o},D.apply(null,arguments)}function U(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function H(t,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},H(t,e)}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}var B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&H(t,e)}(f,t);var e,r,n,i,a,c,u,s,l=(e=f,r=U(),function(){var t,n=z(e);if(r){var o=z(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return F(this,t)});function f(){return R(this,f),l.apply(this,arguments)}return n=f,i=[{key:"connectedCallback",value:function(){this.goalCode=this.attributes.code&&this.attributes.code.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.goalCode||this.showError("Goal code was not provided."),this.updateContent()}},{key:"updateContent",value:(s=q(C().mark((function t(){var e,r,n,o,i;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchContent(),this.fetchStyle()]);case 2:e=t.sent,r=A(e,2),n=r[0],o=r[1],(i=this.attachShadow({mode:"closed"})).appendChild(o),i.appendChild(n),this.attachEvents(i);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"fetchContent",value:(u=q(C().mark((function t(){var e,r,n,i,a;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)(this.subdomain,this.environment),"/embeds/goals/").concat(this.goalCode)),t.next=3,fetch(e);case 3:if(!(r=t.sent).ok){t.next=13;break}return t.next=7,r.text();case 7:return n=t.sent,(i=document.createElement("div")).innerHTML=n,t.abrupt("return",i.querySelector(".embed-content"));case 13:return(a=document.createElement("div")).style.color="red",a.innerText="We were unable to find your goal.",t.abrupt("return",a);case 17:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchStyle",value:(c=q(C().mark((function t(){var e;return C().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent=".embed-content{background:#fff}.justify-center{justify-content:center}
2.flex{display:-webkit-box;display:flex}.w-2\\/3{width:66.666667%}.text-left{text-align:left}.goal-amount{color:#848e97;font-size:16px}.goal-amount .goal-amount-counts{color:#000;font-weight:bold}.goal{display:block;width:100%;height:30px;-webkit-appearance:none;-moz-appearance:none;appearance:none}",t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"attachEvents",value:function(){}},{key:"showError",value:function(t){var e=document.createElement("div");e.style.color="red",e.textContent=t,this.appendChild(e)}}],i&&G(n.prototype,i),a&&G(n,a),Object.defineProperty(n,"prototype",{writable:!1}),f}(M(HTMLElement)),Y=r(17),X=r(6);function W(){W=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
vendor: 5,766 bytes, line 2
2ise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function $(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function V(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$(Object(r),!0).forEach((function(e){J(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function J(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function Q(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){K(i,n,o,a,c,"next",t)}function c(t){K(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function et(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rt(t){var e="function"===typeof Map?new Map:void 0;return rt=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return nt(t,arguments,at(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),it(n,t)},rt(t)}function nt(t,e,r){return nt=ot()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&it(o,r.prototype),o},nt.apply(null,arguments)}function ot(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function it(t,e){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},it(t,e)}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},at(t)}var ct=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(f,t);var e,r,n,i,a,c,u,s,l=(e=f,r=ot(),function(){var t,n=at(e);
2if(r){var o=at(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return et(this,t)});function f(){return Z(this,f),l.apply(this,arguments)}return n=f,i=[{key:"connectedCallback",value:function(){this.planId=this.attributes.plan_id&&parseInt(this.attributes.plan_id.value,10),this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.code=this.attributes.code&&this.attributes.code.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.updateContent()}},{key:"updateContent",value:(s=Q(W().mark((function t(){var e,r;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.attachShadow({mode:"open"}),this.attachStyles(e),t.next=4,this.fetchContent();case 4:r=t.sent,window.initStripe=function(t){new Y.a(V(V({},t),{},{rootElement:e})).setup()},e.appendChild(r),this.scripts.forEach((function(t){return e.appendChild(t)})),e.querySelector("form.stripe-form").addEventListener("submit",(function(t){t.stopPropagation(),t.target.submit()})),this.attachEvents(e),window.supercast.trigger("pageload");case 11:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"fetchContent",value:(u=Q(W().mark((function t(){var e,r,n,i,a,c,u;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)(this.subdomain,this.environment),"/subscriptions/new")),this.planId>0?(console.warn('Supercast warning - Loading plans by plan / subdomain is deprecated. We recommend loading your plans using an embed code. You can find your code by clicking "Embed this plan" from your dashboard.'),e.searchParams.set("subscription[plan_id]",this.planId)):e.searchParams.set("code",this.code),t.next=4,fetch(e);case 4:return r=t.sent,t.next=7,r.text();case 7:return n=t.sent,(i=document.createElement("div")).classList.add("modal-container"),(a=document.createElement("div")).classList.add("overlay"),(c=document.createElement("div")).classList.add("modal"),i.appendChild(a),a.appendChild(c),u=this.extractCard(n),this.scripts=Object(X.a)(u),c.appendChild(u),c.appendChild(this.poweredBy()),t.abrupt("return",i);case 21:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"poweredBy",value:function(){var t=document.createElement("div");return t.classList.add("powered-by"),t.innerText="Powered by Supercast",t}},{key:"attachStyles",value:(c=Q(W().mark((function t(){var e,r;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent=".overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg, rgba(79, 72, 72, 0.9) 0%, rgba(123, 123, 123, 0.9) 50%, rgba(225, 225, 225, 0.9) 100%);z-index:1001;display:flex;align-items:center;justify-content:center}@keyframes dropIn{from{opacity:0;transform:translate3d(0, 32px, 0)}to{opacity:1;transform:translate3d(0, 0, 0)}}.modal{box-sizing:border-box;position:relative;border-radius:16px;padding:32px 48px 48px;overflow-y:auto;max-height:calc(100vh - 10vw);max-width:90vw;opacity:0;background-color:#fff;animation:dropIn .3s ease-out forwards;text-align:center}@media(max-width: 500px){.modal{padding:32px 24px}}.sc-form .field+.fields,.sc-form .field-group+.field,.sc-form .field+.field,.sc-form .checkbox+.checkbox,.sc-form .radio+.radio{margin-top:16px}.sc-form .field-group{align-items:baseline;display:flex;position:relative;gap:5px}.sc-form .field-group .field{flex:1 0 0}.sc-input[type=text],.sc-input[type=number],.sc-input[type=email],.sc-input[type=url],.sc-input[type=tel],.sc-input[type=password],textarea.sc-input{-webkit-appearance:none;background-color:#fff;border:1px solid #dde2e6;border-radius:4px;font-family:inherit;font-size:16px;line-height:16px;padding:11px 12px 9px;width:100%;transition:.2s all ease-out;box-sizing:border-box}.sc-input[type=text]:hover,.sc-input[type=number]:hover,.sc-input[type=email]:hover,.sc-input[type=url]:hover,.sc-input[type=tel]:hover,.sc-input[type=password]:hover,textarea.sc-input:hover{border-color:#c0c9d0}.sc-input[type=text]:focus,.sc-input[type=number]:focus,.sc-input[type=email]:focus,.sc-input[type=url]:focus,.sc-input[type=tel]:focus,.sc-input[type=password]:focus,textarea.sc-input:focus{border-color:#333a41;box-shadow:inset 0 0 0 1px #333a41;outline:none}.button{border:0;border-radius:4px;cursor:pointer;display:inline-block;font-family:inherit;font-size:16px;line-height:1.5;font-weight:500;padding:15px 20px 13px;text-decoration:none;transition:background-color .07s linear;color:#fff;font-weight:600;background-color:var(--supercast-button-background-color, #3d62b3);margin-top:16px;width:100%}a{color:var(--supercast-button-background-color, #3d62b3);font-weight:bold}.powered-by{margin-top:10px;color:#7e848a;font-size:12px;text-align:center}
2.plan-pricing.with-promotion .standard-price{color:#848e97;text-decoration:line-through}.plan-pricing.with-promotion .promotion-price{color:var(--accent-color)}.plan-pricing.with-promotion .duration-details{font-size:12px;color:#848e97;font-weight:normal}",this.shadowRoot.appendChild(e),(r=document.createElement("style")).textContent="#credit_card{margin-top:16px;-webkit-appearance:none;background-color:#fff;border:1px solid #dde2e6;border-radius:4px;font-family:inherit;font-size:16px;line-height:16px;padding:11px 12px 9px;transition:.2s all ease-out}#credit_card:hover{border-color:#c0c9d0}#credit_card:focus{border-color:#333a41;box-shadow:inset 0 0 0 1px #333a41;outline:none}",this.appendChild(r),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"extractCard",value:function(t){var e=this,r=document.createElement("div");r.innerHTML=t;var n=r.querySelector(".modal-content");return n.querySelectorAll(".stripe-component").forEach((function(t){var r=document.createElement("slot");r.name="slot-"+t.id,t.slot="slot-"+t.id,t.parentNode.replaceChild(r,t),e.appendChild(t)})),n}},{key:"attachEvents",value:function(t){var e=this,r=t.querySelector(".overlay");t.querySelector(".overlay").addEventListener("click",(function(t){t.target==r&&e.parentNode.removeChild(e)}))}}],i&&tt(n.prototype,i),a&&tt(n,a),Object.defineProperty(n,"prototype",{writable:!1}),f}(rt(HTMLElement));function ut(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return st(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return st(t,e)}(t,e)||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 st(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lt(){lt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)}
vendor: 7,014 bytes, line 2
2)):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ft(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function pt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ft(i,n,o,a,c,"next",t)}function c(t){ft(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function yt(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vt(t){var e="function"===typeof Map?new Map:void 0;return vt=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return mt(t,arguments,wt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),gt(n,t)},vt(t)}function mt(t,e,r){return mt=bt()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&gt(o,r.prototype),o},mt.apply(null,arguments)}function bt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function gt(t,e){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},gt(t,e)}function wt(t){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wt(t)}var xt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gt(t,e)}(p,t);
2var e,r,n,i,a,c,u,s,l,f=(e=p,r=bt(),function(){var t,n=wt(e);if(r){var o=wt(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return yt(this,t)});function p(){return ht(this,p),f.apply(this,arguments)}return n=p,i=[{key:"connectedCallback",value:function(){this.subscriptionIdentifier=this.attributes["subscription-identifier"]&&this.attributes["subscription-identifier"].value,this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.shadow=this.attachShadow({mode:"closed"}),this.subscriptionIdentifier?this.updateContent():this.detectSubscriptionIdentifier()}},{key:"detectSubscriptionIdentifier",value:(l=pt(lt().mark((function t(){var e;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.MemberStack){t.next=14;break}return t.prev=1,t.next=4,MemberStack.onReady;case 4:e=t.sent,this.subscriptionIdentifier=e.id,this.updateContent(),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(1),this.showError("Error: Could not locate a MemberStack membership. Please ensure that the user is signed up.");case 12:t.next=15;break;case 14:this.updateContent();case 15:case"end":return t.stop()}}),t,this,[[1,9]])}))),function(){return l.apply(this,arguments)})},{key:"updateContent",value:(s=pt(lt().mark((function t(){var e,r,n,o;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchContent(),this.fetchStyle()]);case 2:e=t.sent,r=ut(e,2),n=r[0],o=r[1],this.shadow.innerHTML="",this.shadow.appendChild(o),this.shadow.appendChild(n),this.attachEvents(this.shadow);case 10:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"fetchContent",value:(u=pt(lt().mark((function t(){var e,r,n,i,a,c;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)(this.subdomain,this.environment),"/embeds/player_links")),Supercast.currentFeedToken&&e.searchParams.set("key",Supercast.currentFeedToken),r={},this.subscriptionIdentifier&&(r["X-Supercast-Subscription-Identifier"]=this.subscriptionIdentifier),t.next=6,fetch(e,{headers:r,credentials:"include"});case 6:if(!(n=t.sent).ok){t.next=16;break}return t.next=10,n.text();case 10:return i=t.sent,(a=document.createElement("div")).innerHTML=i,t.abrupt("return",a.querySelector(".embed-content"));case 16:return(c=document.createElement("div")).style.color="red",c.innerText="We were unable to find your membership.",t.abrupt("return",c);case 20:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchStyle",value:(c=pt(lt().mark((function t(){var e;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent="h2{color:#333a41;flex:1 0 0;font-size:1em;line-height:2em}.response{transition:.5s;padding:10px;background-color:#29c884;color:#fff;margin-top:15px;border-radius:16px}.hidden{display:none}.flex{display:flex;justify-content:center}.overlay{padding:10px;display:none}.overlay .close{position:fixed;color:#ccc;top:10px;right:20px;font-size:1.5em;cursor:pointer;color:#f65f5a}.overlay.open{display:block;position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg, rgba(79, 72, 72, 0.9) 0%, rgba(123, 123, 123, 0.9) 50%, rgba(225, 225, 225, 0.9) 100%);z-index:1001;display:flex;align-items:center;justify-content:center}@keyframes dropIn{from{opacity:0;transform:translate3d(0, 32px, 0)}to{opacity:1;transform:translate3d(0, 0, 0)}}.modal{box-sizing:border-box;position:relative;border-radius:16px;padding:32px 48px 48px;overflow-y:auto;max-height:calc(100vh - 10vw);max-width:40vw;opacity:0;background-color:#fff;animation:dropIn .3s ease-out forwards;text-align:center}@media(max-width: 500px){.modal{padding:32px 24px}}#user_phone_number{padding:17px;margin-right:5px}.sections-row{display:flex;flex-direction:row;margin-left:-10px;margin-right:-10px}.sections-row:first-child{margin-top:-10px}.sections-row:last-child{margin-bottom:-10px}.section-col{border-radius:10px;color:#333a41;line-height:23px;margin:10px}.section-col.full{flex:1 0 0}.section-col.bg{background-color:#fff}.section-pad{padding:20px}.home__logo{border-radius:10px;float:left;margin-right:15px}.home__channel-description{margin:0}.nested-field-container{border:1px solid #e9edef;border-radius:4px;display:flex;flex-direction:row;padding:9px 12px}.nested-field-container input{border:0;flex-grow:2;margin-right:10px}.home__players{display:flex;flex-wrap:wrap;margin:-5px}.home__player{flex:100% 0 0}@media(min-width: 768px){.home__player{flex:50% 0 0}}@media(min-width: 1280px){.home__player{flex:25% 0 0}}.home__player a{background:#f8f9fa;border-radius:12px;color:inherit;display:block;font-weight:500;margin:5px;padding:10px;text-decoration:none;transition:all .1s ease-in}.home__player a:hover,.home__player a:focus{background:#eceff2;outline:none}.home__player img{border-radius:10px;height:50px;margin-right:5px;vertical-align:middle;width:50px}.home__social-icons{display:flex;flex-wrap:wrap}.home__social-icons .home__social-icon{flex-grow:1}.home__social-icons .home__social-icon img{height:50px;margin-right:5px;vertical-align:middle;width:50px}.home__social-icons .home__social-icon a{background:#f8f9fa;border-radius:12px;color:inherit;display:block;font-weight:500;margin:5px;padding:10px;text-decoration:none;transition:all .1s ease-in}.home__social-icons .home__social-icon a:hover,.home__social-icons .home__social-icon a:focus{background:#eceff2;outline:none}.nested-field-container{border:1px solid #e9edef;border-radius:4px;display:flex;flex-direction:row;padding:9px 12px}.nested-field-container input{border:0;flex-grow:2;margin-right:10px;font-family:inherit;font-size:100%;line-height:1.15;margin:0}.button{border:0;border-radius:4px;cursor:pointer;display:inline-block;font-family:inherit;font-size:16px;line-height:1.5;font-weight:500;padding:15px 20px 13px;text-decoration:none;transition:background-color .07s linear}.button:focus{outline:none}.button.positive{color:#fff;font-weight:600;background-color:var(--supercast-button-background-color, #29c884)}.button.positive:hover,.button.positive:focus{filter:brightness(0.9)}",t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"attachEvents",value:function(t){var e=this,r=t.querySelector(".overlay"),n=t.querySelector("form.user"),i=t.querySelector(".response");window.addEventListener("supercast-login-state-changed",(function(){e.updateContent()})),t.querySelectorAll(".modal-link").forEach((function(n){n.addEventListener("click",(function(n){r.classList.add("open");var i=t.querySelector("#user_player"),a=t.querySelector("#user_feed_id"),c=t.querySelector("#qr_container");i.value=n.currentTarget.dataset.player,a.value=n.currentTarget.dataset.id;var u="player=".concat(n.currentTarget.dataset.player,"&feed_token_id=").concat(n.currentTarget.dataset.id),s=new URL("".concat(Object(o.a)(e.subdomain,e.environment),"/embeds/player_links/fetch_qr_code?").concat(u));fetch(s,{headers:{"X-Supercast-Subscription-Identifier":e.subscriptionIdentifier}}).then((function(t){return t.text()})).then((function(t){c.innerHTML=t}))}))})),n.addEventListener("submit",(function(t){t.preventDefault();var e=new FormData(t.target);fetch(t.target.action,{method:"POST",body:e,referrerPolicy:"no-referrer"}).then((function(t){200===t.status&&(i.classList.remove("hidden"),setTimeout((function(){r.classList.remove("open"),i.classList.add("hidden")}),5e3))}))}))}},{key:"showError",value:function(t){var e=document.createElement("div");e.style.color="red",e.textContent=t,this.appendChild(e)}}
vendor: 4,578 bytes, line 2
2],i&&dt(n.prototype,i),a&&dt(n,a),Object.defineProperty(n,"prototype",{writable:!1}),p}(vt(HTMLElement));function Et(){Et=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
2h(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function _t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return kt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kt(t,e)}(t,e)||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 kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function St(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function Ot(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){St(i,n,o,a,c,"next",t)}function c(t){St(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Lt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function jt(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pt(t){var e="function"===typeof Map?new Map:void 0;return Pt=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Tt(t,arguments,Nt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),At(n,t)},Pt(t)}function Tt(t,e,r){return Tt=Ct()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&At(o,r.prototype),o},Tt.apply(null,arguments)}function Ct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function At(t,e){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},At(t,e)}function Nt(t){return Nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nt(t)}var It=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&At(t,e)}(s,t);var e,r,n,o,i,a,c,u=(e=s,r=Ct(),function(){var t,n=Nt(e);if(r){var o=Nt(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return jt(this,t)});function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),u.call(this)}return n=s,o=[{key:"connectedCallback",value:function(){this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.requiredPlans=this.attributes["required-plans"]&&this.attributes["required-plans"].value.split(",").map((function(t){return parseInt(t)})),this.shadow=this.attachShadow({mode:"closed"}),this.updateContent()}},{key:"updateContent",value:(c=Ot(Et().mark((function t(){var e,r,n;return Et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchContent()]);case 2:e=t.sent,r=_t(e,1),n=r[0],this.shadow.innerHTML="",this.shadow.appendChild(n),this.attachEvents(this.shadow);case 8:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"fetchContent",value:(a=Ot(Et().mark((function t(){var e,r;return Et().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,window.Supercast.currentUser({subdomain:this.subdomain,environment:this.environment});case 2:return e=t.sent,r=this.shouldGate(e)?this.availableTemplate():this.unavaialbleTemplate(),t.abrupt("return",r.content.cloneNode(!0));case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"shouldGate",value:function(t){return this.requiredPlans?t&&this.requiredPlans.includes(t.plan_id):null!=t}},{key:"attachEvents",value:function(){var t=this;window.addEventListener("supercast-login-state-changed",(function(){t.updateContent()}))}},{key:"availableTemplate",value:function(){var t=document.createElement("template");return t.innerHTML='<div>\n      <slot name="available"></slot>\n    </div>',t}},{key:"unavaialbleTemplate",value:function(){var t=document.createElement("template");return t.innerHTML='<div>\n      <slot name="unavailable"></slot>\n    </div>',t}}],o&&Lt(n.prototype,o),i&&Lt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),s}(Pt(HTMLElement));function qt(){qt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);
vendor: 7,868 bytes, line 2
2if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Rt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function Gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Rt(i,n,o,a,c,"next",t)}function c(t){Rt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ft(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Dt(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ut(t){var e="function"===typeof Map?new Map:void 0;return Ut=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Ht(t,arguments,Yt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Bt(n,t)},Ut(t)}function Ht(t,e,r){return Ht=zt()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Bt(o,r.prototype),o},Ht.apply(null,arguments)}function zt(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Bt(t,e){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bt(t,e)}function Yt(t){return Yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yt(t)}var Xt=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bt(t,e)}(p,t);
2var e,r,n,i,a,c,u,s,l,f=(e=p,r=zt(),function(){var t,n=Yt(e);if(r){var o=Yt(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return Dt(this,t)});function p(){return Ft(this,p),f.apply(this,arguments)}return n=p,i=[{key:"connectedCallback",value:function(){this.subdomain=this.attributes.subdomain&&this.attributes.subdomain.value,this.environment=this.attributes.environment&&this.attributes.environment.value||"production",this.updateContent()}},{key:"updateContent",value:(l=Gt(qt().mark((function t(){var e,r;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.attachShadow({mode:"open"}),this.attachStyles(e),t.next=4,this.fetchContent();case 4:r=t.sent,e.appendChild(r),this.attachEvents(e);case 7:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)})},{key:"fetchContent",value:(s=Gt(qt().mark((function t(){var e;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("template")).innerHTML="<div class='modal-container'>\n      <div class='overlay'>\n        <div class='modal'>\n          <h2>Sign in with your Supercast account</h2>\n          <form id='login-form' class='sc-form'>\n            <div class='error' id='error'></div>\n            <div class='field'>\n              <input class='sc-input string'  type='text' name='email' placeholder='Email' />\n            </div>\n            <div class='field'>\n              <input class='sc-input string' type='password' name='password' placeholder='Password' />\n            </div>\n            <div>\n              <button type='submit' class='button positive' id='login-button'>Sign In</button>\n            </div>\n            <div style='margin-top: 15px;'>\n              <em>Trouble logging in? <a href='".concat("".concat(Object(o.a)(this.subdomain,this.environment),"/session/new"),'\' target="_blank">Click here</a> to receive a login e-mail or reset your password.</em>\n            </div>\n          </form>\n        </div>\n      </div>\n    </div>'),t.abrupt("return",e.content.cloneNode(!0));case 3:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"attachStyles",value:(u=Gt(qt().mark((function t(){var e;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent=".overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg, rgba(79, 72, 72, 0.9) 0%, rgba(123, 123, 123, 0.9) 50%, rgba(225, 225, 225, 0.9) 100%);z-index:1001;display:flex;align-items:center;justify-content:center}@keyframes dropIn{from{opacity:0;transform:translate3d(0, 32px, 0)}to{opacity:1;transform:translate3d(0, 0, 0)}}.modal{box-sizing:border-box;position:relative;border-radius:16px;padding:32px 48px 48px;overflow-y:auto;max-height:calc(100vh - 10vw);max-width:90vw;opacity:0;background-color:#fff;animation:dropIn .3s ease-out forwards;text-align:center}@media(max-width: 500px){.modal{padding:32px 24px}}.sc-form .field+.fields,.sc-form .field-group+.field,.sc-form .field+.field,.sc-form .checkbox+.checkbox,.sc-form .radio+.radio{margin-top:16px}.sc-form .field-group{align-items:baseline;display:flex;position:relative;gap:5px}.sc-form .field-group .field{flex:1 0 0}.sc-input[type=text],.sc-input[type=number],.sc-input[type=email],.sc-input[type=url],.sc-input[type=tel],.sc-input[type=password],textarea.sc-input{-webkit-appearance:none;background-color:#fff;border:1px solid #dde2e6;border-radius:4px;font-family:inherit;font-size:16px;line-height:16px;padding:11px 12px 9px;width:100%;transition:.2s all ease-out;box-sizing:border-box}.sc-input[type=text]:hover,.sc-input[type=number]:hover,.sc-input[type=email]:hover,.sc-input[type=url]:hover,.sc-input[type=tel]:hover,.sc-input[type=password]:hover,textarea.sc-input:hover{border-color:#c0c9d0}.sc-input[type=text]:focus,.sc-input[type=number]:focus,.sc-input[type=email]:focus,.sc-input[type=url]:focus,.sc-input[type=tel]:focus,.sc-input[type=password]:focus,textarea.sc-input:focus{border-color:#333a41;box-shadow:inset 0 0 0 1px #333a41;outline:none}.button{border:0;border-radius:4px;cursor:pointer;display:inline-block;font-family:inherit;font-size:16px;line-height:1.5;font-weight:500;padding:15px 20px 13px;text-decoration:none;transition:background-color .07s linear;color:#fff;font-weight:600;background-color:var(--supercast-button-background-color, #3d62b3);margin-top:16px;width:100%}a{color:var(--supercast-button-background-color, #3d62b3);font-weight:bold}.error{margin-bottom:15px;color:red}em{font-size:.8em;color:#6f7479}",this.shadowRoot.appendChild(e),t.abrupt("return",e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"login",value:(c=Gt(qt().mark((function t(e){var r;return qt().wrap((function(t){for(;;
vendor: 4,764 bytes, line 2
2)switch(t.prev=t.next){case 0:return e.preventDefault(),r=this.shadowRoot.querySelector("#login-form"),t.next=4,Supercast.login({subdomain:this.subdomain,environment:this.environment,email:r.elements.email.value,password:r.elements.password.value});case 4:t.sent?this.close():this.shadowRoot.querySelector("#error").textContent="Sorry, we were unable to log you in with those credentials.";case 6:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"close",value:function(){this.parentNode.removeChild(this)}},{key:"attachEvents",value:function(t){var e=this,r=t.querySelector(".overlay");t.querySelector(".overlay").addEventListener("click",(function(t){t.target==r&&e.close()})),t.querySelector("#login-form").addEventListener("submit",this.login.bind(this))}}],i&&Mt(n.prototype,i),a&&Mt(n,a),Object.defineProperty(n,"prototype",{writable:!1}),p}(Ut(HTMLElement));function Wt(){Wt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function $t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){c=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return Vt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vt(t,e)}(t,e)||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 Vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Jt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function Kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Jt(i,n,o,a,c,"next",t)}function c(t){Jt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Qt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Zt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function te(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ee(t){var e="function"===typeof Map?new Map:void 0;return ee=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return re(t,arguments,ie(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),oe(n,t)},ee(t)}function re(t,e,r){return re=ne()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&oe(o,r.prototype),o},re.apply(null,arguments)}function ne(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function oe(t,e){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oe(t,e)}function ie(t){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ie(t)}var ae=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oe(t,e)}(l,t);var e,r,n,o,i,a,c,u,s=(e=l,r=ne(),function(){var t,n=ie(e);if(r){var o=ie(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return te(this,t)});function l(){var t;Qt(this,l);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=s.call.apply(s,[this].concat(r))).attributeConfig={},t}return n=l,o=[{key:"connectedCallback",value:function(){this.parseAttributes()&&this.updateContent()}},{key:"parseAttributes",value:function(){var t=[];for(var e in this.attributeConfig)this.attributes.hasOwnProperty(e)?this[e]=this.attributes[e].value:null!==this.attributeConfig[e].default&&(this[e]=this.attributes[e].default),this.attributeConfig[e].required&&null===this[e]&&t.push(e);return!(t.length>0)||(this.showError("The following attributes are required but were not specified: "+t.join(", ")),!1)}},{key:"updateContent",value:(u=Kt(Wt().mark((function t(){var e,r,n,o,i;return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([this.fetchCard(),this.fetchStyle()]);case 2:e=t.sent,r=$t(e,2),n=r[0],o=r[1],i=this.attachShadow({mode:"closed"}),this.rootElement=i,i.appendChild(o),i.appendChild(n),this.attachEvents(i);case 11:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchCard",value:(c=Kt(Wt().mark((function t(){return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"fetchStyle",value:(a=Kt(Wt().mark((function t(){return Wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Not implemented");case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"showError",value:function(t){this.shadowRoot.innerHTML='\n      <div style="color: red;">'.concat(t,"</div>\n    ")}},{key:"attachEvents",value:function(){}}],o&&Zt(n.prototype,o),i&&Zt(n,i),Object.defineProperty(n,"prototype",{writable:!1}),l}(ee(HTMLElement)),ce=r(13);function ue(){ue=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);
vendor: 7,818 bytes, line 2
2if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function se(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function le(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){se(i,n,o,a,c,"next",t)}function c(t){se(i,n,o,a,c,"throw",t)}a(void 0)}))}}function fe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function he(t,e){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},he(t,e)}function de(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=ve(t);if(e){var o=ve(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ye(this,r)}}function ye(t,e){if(e&&("object"===typeof e||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ve(t){return ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ve(t)}var me,be,ge,we,xe,Ee=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&he(t,e)}(l,t);var e,r,n,i,a,c,u,s=de(l);function l(){var t;fe(this,l);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=s.call.apply(s,[this].concat(r))).attributeConfig={environment:{required:!1,default:"production"}},t}return e=l,r=[{key:"fetchCard",value:(u=le(ue().mark((function t(){var e,r,n;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new URL("".concat(Object(o.a)("app",this.environment),"/embeds/entities")),t.next=3,fetch(e);
2case 3:if(!(r=t.sent).ok){t.next=11;break}return t.next=7,r.text();case 7:return n=t.sent,t.abrupt("return",this.extractCard(n));case 11:this.showError("Unable to render entity search");case 12:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"fetchResults",value:(c=le(ue().mark((function t(){var e,r,n;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new URL("".concat(Object(o.a)("app",this.environment),"/embeds/entities/results"))).searchParams.set("search",this.searchValue),t.next=4,fetch(e);case 4:if(!(r=t.sent).ok){t.next=12;break}return t.next=8,r.text();case 8:return n=t.sent,t.abrupt("return",this.extractCard(n));case 12:this.showResultsError("Unable to show search results");case 13:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"fetchStyle",value:(a=le(ue().mark((function t(){var e;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=document.createElement("style")).textContent="*{box-sizing:border-box}.results-container{position:relative;color:#333a41}input[type=text]{border:1px solid #ccc;border-radius:5px;padding:10px 20px;width:100%}input[type=text].with-results{border-bottom-left-radius:0;border-bottom-right-radius:0}input[type=text]:focus{outline:none}input[type=text]:focus-visible{outline:none}a.result{color:inherit;text-decoration:none;display:flex;align-items:center;gap:10px;padding:10px 20px}a.result:hover{background-color:#f8f9fa}strong{color:#22252a;font-weight:bold}.subtitle{color:#848e97}.description{color:#848e97;font-size:12px;max-height:75px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-top:5px}.caret{color:#848e97;font-weight:200}ul{position:absolute;top:0;width:100%;border-radius:5px;border-top-left-radius:0;border-top-right-radius:0;box-shadow:rgba(0,0,0,.15) 0px 8px 24px;padding:0;background:#fff;margin-top:0;border:1px solid #ccc;border-top:none}li{display:block;border-bottom:solid 1px #e9edef}li:last-child{border-bottom:none}li .artwork-container{width:64px;margin-right:10px}li img{height:64px;width:64px}",t.abrupt("return",e);case 3:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"extractCard",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.querySelector(".embed-card-content")}},{key:"refreshContent",value:(i=le(ue().mark((function t(e){var r;return ue().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetchResults();case 2:(r=t.sent).querySelector("li")?e.querySelector("input[type='text']").classList.add("with-results"):e.querySelector("input[type='text']").classList.remove("with-results"),e.querySelector(".results-container").innerHTML=r.outerHTML;case 5:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"showResultsError",value:function(t){this.rootElement.querySelector(".results-container").innerHTML='\n      <div style="color: red;">'.concat(t,"</div>\n    ")}},{key:"search",value:function(t){t.length>2&&(this.searchValue=t,this.refreshContent(this.rootElement))}},{key:"attachEvents",value:function(t){var e=this;this.search=Object(ce.debounce)(this.search,200),t.addEventListener("input",(function(t){t.target.classList.contains("entity-search")&&e.search.call(e,t.target.value)}))}}],r&&pe(e.prototype,r),n&&pe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(ae);r(69);function _e(){_e=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(O){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);
vendor: 5,923 bytes, line 2
2if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var l={};function f(){}function p(){}function h(){}var d={};c(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==e&&r.call(v,o)&&(d=v);var m=h.prototype=f.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){function n(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=h,c(m,"constructor",h),c(h,"constructor",p),p.displayName=c(h,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(g.prototype),c(g.prototype,i,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=k,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ke(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function Se(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ke(i,n,o,a,c,"next",t)}function c(t){ke(i,n,o,a,c,"throw",t)}a(void 0)}))}}customElements.define("supercast-embed",m),customElements.define("supercast-plan",T),customElements.define("supercast-goal",B),customElements.define("supercast-player
2-links",xt),customElements.define("supercast-purchase",ct),customElements.define("supercast-gate",It),customElements.define("supercast-login",Xt),customElements.define("supercast-entity-search",Ee),window.Supercast={currentFeedToken:null,startPurchase:function(t){var e=t.code,r=t.subdomain,n=t.planId,o=t.environment,i=void 0===o?"production":o,a=document.createElement("supercast-purchase");a.setAttribute("code",e),a.setAttribute("plan_id",n),a.setAttribute("subdomain",r),a.setAttribute("environment",i),document.body.appendChild(a)},startLogin:function(t){var e=t.subdomain,r=t.environment,n=void 0===r?"production":r,o=document.createElement("supercast-login");o.setAttribute("subdomain",e),o.setAttribute("environment",n),document.body.appendChild(o)},login:(xe=Se(_e().mark((function t(e){var r,n,i,a,c,u,s,l,f;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.subdomain,n=e.email,i=e.password,a=e.environment,c=void 0===a?"production":a,u=new URL("".concat(Object(o.a)(r,c),"/embeds/user/login")),(s=new FormData).append("email",n),s.append("password",i),t.next=7,fetch(u,{credentials:"include",method:"POST",body:s});case 7:if(!(l=t.sent).ok){t.next=15;break}return t.next=11,l.json();case 11:f=t.sent,Supercast.currentFeedToken=f.feed_url.split("/").pop(),document.cookie="supercast_key=".concat(Supercast.currentFeedToken,"; SameSite=None; Secure"),window.dispatchEvent(new CustomEvent("supercast-login-state-changed",f));case 15:return t.abrupt("return",l.ok);case 16:case"end":return t.stop()}}),t)}))),function(t){return xe.apply(this,arguments)}),logout:(we=Se(_e().mark((function t(e){var r,n,i,a,c;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.subdomain,n=e.environment,i=void 0===n?"production":n,a=new URL("".concat(Object(o.a)(r,i),"/embeds/user/logout")),t.next=4,fetch(a,{credentials:"include",method:"POST"});case 4:return(c=t.sent).ok&&(Supercast.currentFeedToken=null,document.cookie="supercast_key=; SameSite=None; Secure",window.dispatchEvent(new CustomEvent("supercast-login-state-changed",null))),t.abrupt("return",c.ok);case 7:case"end":return t.stop()}}),t)}))),function(t){return we.apply(this,arguments)}),currentUser:(ge=Se(_e().mark((function t(e){var r,n,i,a,c,u;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.subdomain,n=e.environment,i=void 0===n?"production":n,a=new URL("".concat(Object(o.a)(r,i),"/embeds/user")),Supercast.currentFeedToken&&a.searchParams.set("key",Supercast.currentFeedToken),t.next=5,fetch(a,{credentials:"include"});case 5:if(!(c=t.sent).ok){t.next=17;break}return t.next=9,c.json();case 9:if(null!=(u=t.sent).feed_url){t.next=14;break}return t.abrupt("return",null);case 14:return t.abrupt("return",u);case 15:t.next=22;break;case 17:if(401!=c.status){t.next=21;break}return t.abrupt("return",null);case 21:throw new Error("Error ".concat(c.status," retrieving current Supercast user"));case 22:case"end":return t.stop()}}),t)}))),function(t){return ge.apply(this,arguments)}),episodes:(be=Se(_e().mark((function t(e){var r,n,o,i,a,c,u,s,l;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.subdomain,n=e.environment,o=void 0===n?"production":n,t.next=3,Supercast.currentUser({subdomain:r,environment:o});case 3:if(null!=(i=t.sent)){t.next=6;break}throw new Error("This user is not logged into Supercast. Episodes cannot be retrieved.");case 6:if(null!=(a=i.subscriptions.find((function(t){return t.subdomain==r})))){t.next=9;break}throw new Error("Could not locate a subscription to ".concat(r," for ").concat(i.email));case 9:return t.next=11,fetch(a.feed_url);case 11:if(!(c=t.sent).ok){t.next=21;break}return t.next=15,c.text();case 15:return u=t.sent,s=new DOMParser,l=s.parseFromString(u,"text/xml"),t.abrupt("return",Array.from(l.querySelectorAll("item")).map((function(t){return{id:parseInt(t.querySelector("episode_id").textContent),title:t.querySelector("title").textContent,description:t.querySelector("description")&&t.querySelector("description").textContent,url:t.querySelector("enclosure").getAttribute("url")}})));case 21:throw new Error("Error ".concat(c.status," retrieving episodes"));case 22:case"end":return t.stop()}}),t)}))),function(t){return be.apply(this,arguments)}),episode:(me=Se(_e().mark((function t(e){var r,n,o,i,a;return _e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.subdomain,n=e.id,o=e.environment,i=void 0===o?"production":o,t.next=3,Supercast.episodes({subdomain:r,environment:i});case 3:return a=t.sent,t.abrupt("return",a.find((function(t){return t.id==n})));case 5:case"end":return t.stop()}}),t)}))),function(t){return me.apply(this,arguments)}),init:function(){var t=document.cookie.split(";").find((function(t){return t.trim().startsWith("supercast_key=")}));t&&(Supercast.currentFeedToken=t.split("=")[1])}}
2,Supercast.init()},8:function(t,e,r){"use strict";r.r(e),e.default=function(t,e){return e=e||{},new Promise((function(r,n){var o=new XMLHttpRequest,i=[],a=[],c={},u=function t(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:t,headers:{keys:function(){return i},entries:function(){return a},get:function(t){return c[t.toLowerCase()]},has:function(t){return t.toLowerCase()in c}}}};for(var s in o.open(e.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,r){i.push(e=e.toLowerCase()),a.push([e,r]),c[e]=c[e]?c[e]+","+r:r})),r(u())},o.onerror=n,o.withCredentials="include"==e.credentials,e.headers)o.setRequestHeader(s,e.headers[s]);o.send(e.body||null)}))}},9:function(t,e,r){t.exports=self.fetch||(self.fetch=r(8).default||r(8))}});
3//# sourceMappingURL=embed-6841cd65537556838753.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.