(self.webpackChunknew_whitelabel=self.webpackChunknew_whitelabel||[]).push([[21],{78113:(t,e,r)=>{"use strict";r.d(e,{Z:()=>_});var n=r(2369),i=r(32263);function o(t){return o="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},o(t)}function a(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{}).id;if(!this.captchaComponent){var e=t||this.view.$el.attr("data-captcha-id");this.isCaptchaCheckNeeded=n.Z.isCaptchaAvailable&&e,this.isCaptchaCheckNeeded&&(this.captchaComponent=!0,n.Z.getInstance().init(this.view.$el[0]))}}},{key:"setCharacterCounter",value:function(){var t=this.view.getTextAreaElement();t&&(this.characterCounter=new v({el:t}),this.characterCounter.on({"characterCounter:char-left":this.onCharLeft.bind(this),"characterCounter:reached-max-char":this.onReachedMaxChar.bind(this)}))}},{key:"onCharLeft",value:function(t){this.isReachedMaxChars&&t&&(this.view.showCharLeftMessage(),this.isReachedMaxChar=!1),this.view.refreshCharacterCount(t)}},{key:"onReachedMaxChar",value:function(){this.isReachedMaxChars=!0,this.view.showReachedMaxCharLimitMessage()}},{key:"viewEvents",get:function(){return{"submit:form":"submit"}}},{key:"renderCaptcha",value:function(){n.Z.getInstance().render({callback:this.onCaptchaTokenSet.bind(this),errorCallback:this.onCaptchaError.bind(this),captchaAction:this.captchaAction})}},{key:"onCaptchaTokenSet",value:function(t){this.isCaptchaCheckNeeded=!1,t&&(this.setSubmittingState(!1),this.submit(O(O({},this.view.getFormData()),{},{captcha_response:t}))),this.isCaptchaCheckNeeded=!0}},{key:"onCaptchaError",value:function(t){this.setSubmittingState(!1),"challenge-closed"!==t&&this.view.showSystemError(window.config.ERROR_MESSAGES.SERVER_ERROR)}},{key:"setSubmittingState",value:function(t){this.isSubmittingForm=t,this.view.setSubmitLoadingState(t)}},{key:"submit",value:function(t){if(!this.isSubmittingForm||this.isSaveByChangeEnabled){var e=this.model.validate(t);if(this.setSubmittingState(!e),e)return this.model.validationError=e,this.view.showErrors(),void this.trigger("form:validationError",e);this.isCaptchaCheckNeeded?this.renderCaptcha():this.model.save(t,{success:this.onSubmitSuccess.bind(this)}),this.view.blurSubmit()}}},{key:"onSubmitSuccess",value:function(t,e){var r=this,n=e.success,i=e.message,o=e.errors,a=e.data,u=void 0===a?{}:a,c=e.form_token,l=e[m.Xc];this.setSubmittingState(!1),this.view.clearFieldErrors(),c&&(this.view.replaceFormToken(c),this.trigger("form:changeFormToken",{formToken:c})),n?(this.isSaveByChangeEnabled||(this.view.reset(n),this.characterCounter&&this.characterCounter.reset()),this.trigger("form:submitSuccess",E(E({message:i},m.Xc,l),"data",O(O({},u),{},{formToken:c})))):o&&(Object.keys(o).forEach((function(t){if(["system","token","general"].indexOf(t)>-1)r.isSystemErrorDisabled||r.view.showSystemError(o[t]);else if("captcha"===t)r.isSystemErrorDisabled||(r.view.showSystemError(o[t]),r.view.disableForm());else{var e=Array.isArray(o[t])?o[t]:[o[t]];r.view.showFieldErrors(t,e)}})),this.trigger("form:submitErrors",{errors:o})),this.setCaptcha(u.captcha)}},{key:"remove",value:function(){P(C(a.prototype),"remove",this).call(this)}}],r&&j(e.prototype,r),i&&j(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(i.Z)},82998:(t,e,r)=>{"use strict";function n(t){return n="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},n(t)}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 o(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rb});const 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)}(c,t);var e,r,n,i=p(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),i.apply(this,arguments)}return e=c,r=[{key:"validate",value:function(t){var e=this,r=Object.entries(t).reduce((function(t,r){var n=u(r,2),i=n[0],c=n[1];if(e.rules[i]){var l=e.validateField(i,c);if(l)return o(o({},t),{},a({},i,l))}return t}),{});return 0!==Object.keys(r).length?r:null}},{key:"validateRule",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;return f(y(c.prototype),"validateRule",this).call(this,t,e)}}],r&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(r(26745).vx)},2191:(t,e,r)=>{"use strict";r.d(e,{Z:()=>O});var n=r(26745),i=r(11215),o=r.n(i),a=r(26053),u=r(72760);function c(t){return c="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},c(t)}function l(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 s(t){for(var e=1;e{"use strict";r.d(e,{X:()=>O,Z:()=>j});var n=r(26745);function i(t){return i="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},i(t)}function o(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"regexp",error:t,details:{pattern:e}}}},{key:"usernameValidation",get:function(){return this._usernameValidation||(this._usernameValidation=[this.build(c,"^(?!^\\s+$|^$)"),this.build(s,"^[a-zA-Z0-9_]*$"),this.build(s,"guest|admin|support|livejasmin|livesex|member|ljuser","forbidden"),this.build(m,"^\\w{6,}$"),this.build(g,"^\\w{0,16}$")]),this._usernameValidation}},{key:"usernameForLoginValidation",get:function(){return this._usernameForLoginValidation||(this._usernameForLoginValidation=[this.build(c,"^(?!^\\s+$|^$)"),this.build(s,"^[a-zA-Z0-9_]*$"),this.build(s,"guest|admin|support|livejasmin|livesex|member|ljuser","forbidden"),this.build(v,"^\\w{4,}$"),this.build(g,"^\\w{0,16}$")]),this._usernameForLoginValidation}},{key:"passwordValidation",get:function(){return this._passwordValidation||(this._passwordValidation=[this.build(c,"^(?!^\\s+$|^$)"),this.build(m,"^.{6,}$"),this.build(w,"^.{0,128}$")]),this._passwordValidation}},{key:"emailValidation",get:function(){return this._emailValidation||(this._emailValidation=[this.build(c,"^(?!^\\s+$|^$)"),this.build(u,"^(?!^\\s+$|^$)"),this.build(m,"^.{6,}$"),this.build(l,d)]),this._emailValidation}},{key:"urlValidation",get:function(){return this._urlValidation||(this._urlValidation=[this.build(c,"^(?!^\\s+$|^$)"),this.build(f,"^(?:(?:https?|ftp)://|www.)[-a-z0-9+&@#/%?=~_|!:,.;]*[-a-z0-9+&@#/%=~_|]")]),this._urlValidation}},{key:"defaultValidation",get:function(){return this._defaultValidation||(this._defaultValidation=[this.build(c,"^(?!^\\s+$|^$)")]),this._defaultValidation}},{key:"requiredValidation",get:function(){return this._requiredValidation||(this._requiredValidation=[this.build(y,"^(?!^\\s+$|^$)")]),this._requiredValidation}}],r&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const j=n.cQ.assign(E,n.eG)},55013:(t,e,r)=>{"use strict";r.d(e,{Z:()=>y});var n=r(26745),i=r(32263),o=r(78223),a=r(57343),u=r(97515);function c(t){return c="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},c(t)}function l(t,e){for(var r=0;r{var n=r(43041);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,i){var o;t.propertyIsEnumerable;return'
\n\t\n\t\n\t
\n
'},useData:!0})}}]);