1"use strict";(self.webpackChunktinyurl=self.webpackChunktinyurl||[]).push([[171],{90171(e,t,n){n.r(t),n.d(t,{default:()=>s});var r=n(95353);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l={name:"Renewal",props:{domain:{type:Object,required:!0}},data:function(){return{initializing:!1,enabled:!1,form:new SparkForm({domain:"",enabled:!1})}},watch:{enabled:function(){this.save()},domain:function(){this.syncDomain()}},created:function(){this.syncDomain()},methods:o(o({},(0,r.i0)(["getBrandedDomains"])),{},{save:function(){var e=this;if(!this.initializing){var t=this.$apiUrl("settings/branded-domain/renewal");this.form.enabled=this.enabled,Spark.put(t,this.form).then(function(){e.getBrandedDomains()}).catch(function(){e.syncDomain()})}},syncDomain:function(){var e=this;this.form.resetStatus(),this.initializing=!0,this.$nextTick(function(){e.form.domain=e.domain.domain,e.form.enabled=e.enabled=e.domain.isRenewalEnabled,e.$nextTick(function(){e.initializing=!1})})}})};const s=(0,n(14486).A)(l,function(){var e=this,t=e._self._c;return e.domain.isPurchased?t("div",[t("div",{staticClass:"row"},[e._m(0),e._v(" "),t("div",{staticClass:"col-6 custom-control custom-switch"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.enabled,expression:"enabled"}],staticClass:"custom-control-input",attrs:{id:"renewalSwitcher",type:"checkbox"},domProps:{checked:Array.isArray(e.enabled)?e._i(e.enabled,null)>-1:e.enabled},on:{change:function(t){var n=e.enabled,r=t.target,i=!!r.checked;if(Array.isArray(n)){var a=e._i(n,null);r.checked?a<0&&(e.enabled=n.concat([null])):a>-1&&(e.enabled=n.slice(0,a).concat(n.slice(a+1)))}else e.enabled=i}}}),e._v(" "),e.enabled?t("label",{staticClass:"custom-control-label",attrs:{for:"renewalSwitcher"}},[e._v("Auto")]):t("label",{staticClass:"custom-control-label",attrs:{for:"renewalSwitcher"}},[e._v("Manual")])])])]):e._e()},[function(){var e=this._self._c;return e("div",{staticClass:"col-6"},[e("small",{staticClass:"form-text text-muted"},[this._v("Renewal")])])}],!1,null,null,null).exports}}]);
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.