Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

widget-crm-form

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

widget-crm-form - npm Package Compare versions

Comparing version 4.0.4 to 4.0.5

2

dist/47.js

@@ -1,1 +0,1 @@

(self.webpackChunkwidget_crm_form=self.webpackChunkwidget_crm_form||[]).push([[47],{644:function(e,t,r){e.exports=r(411)},8130:function(e,t,r){"use strict";var n=r(7246),o=r(1282),i=r(8579),s=r(2990),a=r(9696),u=r(5724),c=r(9824),l=r(7783);e.exports=function(e){return new Promise((function(t,r){var f=e.data,p=e.headers,d=e.responseType;n.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function y(){if(h){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,i={data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h};o(t,r,i),h=null}}if(h.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){r(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}"setRequestHeader"in h&&n.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),d&&"json"!==d&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),r(e),h=null)})),f||(f=null),h.send(f)}))}},411:function(e,t,r){"use strict";var n=r(7246),o=r(1811),i=r(935),s=r(1727);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(8838));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(6580),u.CancelToken=r(9802),u.isCancel=r(6943),u.all=function(e){return Promise.all(e)},u.spread=r(4269),u.isAxiosError=r(7810),e.exports=u,e.exports.default=u},6580:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},9802:function(e,t,r){"use strict";var n=r(6580);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6943:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},935:function(e,t,r){"use strict";var n=r(7246),o=r(2990),i=r(5855),s=r(9596),a=r(1727),u=r(8213),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;r.length;){var p=r.shift(),d=r.shift();try{f=p(f)}catch(e){d(e);break}}try{o=s(f)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=l},5855:function(e,t,r){"use strict";var n=r(7246);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},9696:function(e,t,r){"use strict";var n=r(4477),o=r(4859);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},7783:function(e,t,r){"use strict";var n=r(6623);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},9596:function(e,t,r){"use strict";var n=r(7246),o=r(3347),i=r(6943),s=r(8838);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},6623:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},1727:function(e,t,r){"use strict";var n=r(7246);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var l=o.concat(i).concat(s).concat(a),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(f,c),r}},1282:function(e,t,r){"use strict";var n=r(7783);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},3347:function(e,t,r){"use strict";var n=r(7246),o=r(8838);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},8838:function(e,t,r){"use strict";var n=r(7246),o=r(5920),i=r(6623),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(8130)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(s)})),e.exports=c},1811:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},2990:function(e,t,r){"use strict";var n=r(7246);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},4859:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},8579:function(e,t,r){"use strict";var n=r(7246);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4477:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},7810:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},9824:function(e,t,r){"use strict";var n=r(7246);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},5920:function(e,t,r){"use strict";var n=r(7246);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},5724:function(e,t,r){"use strict";var n=r(7246),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},4269:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8213:function(e,t,r){"use strict";var n=r(2080),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);function s(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(s(n," has been removed in "+t));return o&&!i[n]&&(i[n]=!0,console.warn(s(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},7246:function(e,t,r){"use strict";var n=r(1811),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},8047:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return h}});var n=function(){var e=this,t=e._self._c;return e.fields?t("div",{class:e.$style.form},[t("transition",{attrs:{name:"fade"}},[e.success?t("div",{class:e.$style.thank},[t("div",{class:e.$style.thank__title},[e._v(e._s(e.$t("messages.thank")))]),e.thank?t("div",{class:e.$style.thank__message},[e._v(e._s(e.thank))]):e._e(),t("ui-button",{class:e.$style.btn,nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[e._v(e._s(e.$t("button.close")))])],1):e._e()]),t("transition",{attrs:{name:"fade"}},[e.load?t("ui-loader"):e._e()],1),e.title?t("header",{class:e.$style.form__title},[e._v(e._s(e.title))]):e._e(),t("div",{class:e.$style.form__list},e._l([...e.fields],(function(r,n){return t("div",{class:e.$style.form__item},[r.title?t("header",{class:e.$style.form__label},[e._v(e._s(r.title))]):e._e(),t(r.component,{key:n,tag:"component",attrs:{params:r},on:{input:function(e){r.error=null},list:function(t){return e.setList(t,r)},upload:function(t){return e.setFile(t,r)},delete:function(t){return e.deleteFile(t,r)},"clear-list":function(e){r.request.offset=0},request:function(e){r.request.offset+=r.request.limit}},model:{value:r.value,callback:function(t){e.$set(r,"value",t)},expression:"item.value"}},["checkbox"===r.type?t("span",[e._v(e._s(e.$t("privacy.text"))),t("a",{class:e.$style.link,attrs:{href:e.termsLink||`https://epicentrk.ua${e.$localeUrl("/info/terms-of-use/")}`,target:"_blank",title:e.$t("privacy.title")}},[e._v(e._s(e.$t("privacy.link")))])]):e._e()])],1)})),0),t("ui-button",{class:e.$style.form__send,attrs:{type:e.disabled?"disabled":"blue"},nativeOn:{click:function(t){e.$forms().send(e.fields,e.send)}}},[e._v(e._s(e.$t("button.send")))])],1):e._e()};n._withStripped=!0;var o,i=r(644),s=r.n(i),a=r(4421),u={ua:"Ваше ім'я",ru:"Ваше имя"};if(process.client)if("admin.epicentrm.com.ua"===(null===(o=null===window||void 0===window?void 0:window.location)||void 0===o?void 0:o.host))u={ua:"Ваша компанія",ru:"Ваша компания"};else u={ua:"Ваше ім'я",ru:"Ваше имя"};var c=function(){this.contacts=[{code:"name",label:u,component:"ui-form-input-animate",crmType:"contact",type:"text",error:null,value:"",regex:["empty"]},{code:"phone",label:{ua:"Ваш номер телефону",ru:"Ваш номер телефона"},component:"ui-form-input-animate",crmType:"contact",type:"tel",mask:"+380#########",error:null,value:"",regex:["tel","empty"]},{code:"email",label:{ua:"Ваш Email",ru:"Ваш Email"},component:"ui-form-input-animate",crmType:"contact",type:"email",error:null,value:"",regex:["email","empty"]}],this.footer=[{type:"checkbox",component:"ui-form-checkbox",error:null,value:!1,regex:["check"]}],this.line={placeholder:{ua:"Введіть, будь ласка, інформацію",ru:"Введіть, будь ласка, інформацію"},component:"ui-form-input",type:"text",error:null,value:""},this.str={placeholder:{ua:"Введіть, будь ласка, інформацію",ru:"Введіть, будь ласка, інформацію"},component:"ui-form-input",type:"textarea",error:null,value:""},this.boolean={component:"ui-form-radio",error:null,value:"",grid:"row",items:[{label:{ua:"ні",ru:"нет"},value:0},{label:{ua:"так",ru:"да"},value:1}]},this.rating3={component:"ui-form-impression",error:null,items:[{label:{ua:"Погано, не сподобалось",ru:"Плохо, не понравилось"},icon:"emoji-1",value:1},{label:{ua:"Так собі, можна і краще",ru:"Так себе, можно и лучше"},icon:"emoji-2",value:2},{label:{ua:"Чудово, все сподобалось",ru:"Прекрасно, все понравилось"},icon:"emoji-3",value:3}],value:""},this.rating3a={component:"ui-form-impression",error:null,items:[{label:{ua:"Дуже складно та вкрай не зручно",ru:"Очень сложно и очень не удобно"},icon:"emoji-1",value:1},{label:{ua:"Так собі, можна і краще",ru:"Так себе, можно и лучше"},icon:"emoji-4",value:2},{label:{ua:"Дуже просто і зручно",ru:"Очень просто и удобно"},icon:"emoji-5",value:3}],value:""},this.rating5={component:"ui-form-rating",error:null,value:""},this.rating10={component:"ui-form-assessment",error:null,value:""},this.list={placeholder:{ua:"Зробіть вибір",ru:"Сделайте выбор"},component:"ui-form-select",error:null,value:"",search:{value:"",component:"ui-form-input",type:"search",placeholder:{ua:"Пошук",ru:"Поиск"}}},this.file={label:{file:{ua:"Додати файл",ru:"Добавить файл"},files:{ua:"Додати файли",ru:"Добавить файлы"}},component:"ui-form-upload",error:null,value:"",size:83886080,loadFiles:[],regex:["upload"],types:["image","pdf","doc","sheet"]}};const l=s().create({method:"post",baseURL:"https://crm.epicentrk.ua/local/modules/crmgenesis.omnis/api/epicentrk/questionnaire",headers:{Authorization:"Bearer N0NZF0WUTKbthP4iv93XLkFXDu9MUOz9y8wkkFmo","Content-Type":"application/json; charset=UTF-8"}}),f=[];var p={props:{id:Number,contacts:Array,termsLink:String},data:()=>({load:!1,success:!1}),computed:{...(0,a.Se)({forms:"crm/forms"}),fields(){return this.forms[this.id]?.fields},title(){return this.forms[this.id]?.title},thank(){return this.forms[this.id]?.thank},disabled(){return!this.$forms().validate(this.fields)}},created(){this.fields?.length||(this.load=!0,this.get())},methods:{...(0,a.OI)({setForm:"crm/setForm"}),clear(){for(const e in this.fields)switch(this.fields[e].crmType){case"contact":break;case"upload":this.fields[e].loadFiles=[];break;default:this.fields[e].value=""}},async send(){const e=new FormData;this.load=!0,e.append("id",this.id);for(const t of this.fields)if(t.crmType)switch(t.crmType){case"upload":for(const r in t.loadFiles)e.append(t.files[r].code,t.loadFiles[r].value);break;case"list":t.value&&e.append(t.code,t.value.id);break;default:t.value&&e.append(t.code,"string"==typeof t.value?encodeURI(t.value).trim():t.value)}try{const{data:t}=await l({url:"/set.php",data:e,headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(t.error)return this.$toast.e("виникла помилка, спробуйте пізніше"),this.load=!1,void(this.success=!0);this.success=!0,this.load=!1,this.clear()}catch(e){this.success=!0,this.$toast.e("виникла помилка, спробуйте пізніше"),this.load=!1}},async get(){const e=new c,{data:t}=await l({url:"/get.php",data:{id:this.id,lang:this.$i18n.locale}}),r=[],n=[...f];this.load=!1;for(const o of t.result.questionList){o.code=`answerList[${o.id}]`;const t={parent:`parent_${this._uid}_${o.id}`,title:o.name,id:o.id,crmType:o.type,code:o.code};switch(o.type){case"str":case"line":default:break;case"list":t.request={id:o.idList,lang:this.$i18n.locale,offset:0,limit:50}}"file"!==o.type&&e[o.type]?(o.answerRequired&&(t.regex=["empty"]),r.push({...t,...e[o.type]})):n.push(o)}if(n.length){n.sort(((e,t)=>e.answerRequired<t.answerRequired?1:-1));const t={min:0,max:0};for(const e of n)t.files=t.files||[],t.files.push(e),t.max++,e.answerRequired&&t.min++;r.push({crmType:"upload",title:t.files[0].name,...t,...e.file})}this.setForm({id:this.id,title:t.result.geetingMessage,thank:t.result.thankMessage,fields:[...this.contacts||e.contacts,...r,...e.footer]})},async setList(e,t){if(e.clear)return void(t.items=[]);const r=e.search,{data:n}=await l({url:"/getList.php",data:{search:r,...t.request}});n.error?t.blockedLoad=!0:(t.items=e.search?n.result:[...t.items||[],...n.result],!("autocomplete"in t)&&t.items.length>20&&(t.autocomplete=!0),e.cb())},setFile(e,t){t.loadFiles.push(e)},deleteFile(e,t){t.loadFiles.splice(e,1)},close(){this.success=!1,this.$emit("close")}}},d={form:"epicentrk__Yzc",form__title:"epicentrk_akIL",form__list:"epicentrk_yxdf",form__item:"epicentrk_jxNY",form__send:"epicentrk_moKR",link:"epicentrk_QS6o",form__label:"epicentrk_zp4y",thank:"epicentrk_EeKN",thank__title:"epicentrk__WlD",thank__message:"epicentrk_eOqT",btn:"epicentrk_xojd"};var h=(0,r(1900).Z)(p,n,[],!1,(function(e){this.$style=d.locals||d}),null,null).exports},2080:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}}]);
(self.webpackChunkwidget_crm_form=self.webpackChunkwidget_crm_form||[]).push([[47],{644:function(e,t,r){e.exports=r(411)},8130:function(e,t,r){"use strict";var n=r(7246),o=r(1282),i=r(8579),s=r(2990),a=r(9696),u=r(5724),c=r(9824),l=r(7783);e.exports=function(e){return new Promise((function(t,r){var f=e.data,p=e.headers,d=e.responseType;n.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+v)}var g=a(e.baseURL,e.url);function y(){if(h){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,i={data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:n,config:e,request:h};o(t,r,i),h=null}}if(h.open(e.method.toUpperCase(),s(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(y)},h.onabort=function(){h&&(r(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){r(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}"setRequestHeader"in h&&n.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),d&&"json"!==d&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),r(e),h=null)})),f||(f=null),h.send(f)}))}},411:function(e,t,r){"use strict";var n=r(7246),o=r(1811),i=r(935),s=r(1727);function a(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=a(r(8838));u.Axios=i,u.create=function(e){return a(s(u.defaults,e))},u.Cancel=r(6580),u.CancelToken=r(9802),u.isCancel=r(6943),u.all=function(e){return Promise.all(e)},u.spread=r(4269),u.isAxiosError=r(7810),e.exports=u,e.exports.default=u},6580:function(e){"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},9802:function(e,t,r){"use strict";var n=r(6580);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6943:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},935:function(e,t,r){"use strict";var n=r(7246),o=r(2990),i=r(5855),s=r(9596),a=r(1727),u=r(8213),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=a(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!n){var l=[s,void 0];for(Array.prototype.unshift.apply(l,r),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;r.length;){var p=r.shift(),d=r.shift();try{f=p(f)}catch(e){d(e);break}}try{o=s(f)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=a(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(a(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(a(n||{},{method:e,url:t,data:r}))}})),e.exports=l},5855:function(e,t,r){"use strict";var n=r(7246);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},9696:function(e,t,r){"use strict";var n=r(4477),o=r(4859);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},7783:function(e,t,r){"use strict";var n=r(6623);e.exports=function(e,t,r,o,i){var s=new Error(e);return n(s,t,r,o,i)}},9596:function(e,t,r){"use strict";var n=r(7246),o=r(3347),i=r(6943),s=r(8838);function a(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return a(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||s.adapter)(e).then((function(t){return a(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(a(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},6623:function(e){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},1727:function(e,t,r){"use strict";var n=r(7246);e.exports=function(e,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function u(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function c(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(e[o],t[o])}n.forEach(o,(function(e){n.isUndefined(t[e])||(r[e]=u(void 0,t[e]))})),n.forEach(i,c),n.forEach(s,(function(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=u(void 0,e[o])):r[o]=u(void 0,t[o])})),n.forEach(a,(function(n){n in t?r[n]=u(e[n],t[n]):n in e&&(r[n]=u(void 0,e[n]))}));var l=o.concat(i).concat(s).concat(a),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return n.forEach(f,c),r}},1282:function(e,t,r){"use strict";var n=r(7783);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},3347:function(e,t,r){"use strict";var n=r(7246),o=r(8838);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},8838:function(e,t,r){"use strict";var n=r(7246),o=r(5920),i=r(6623),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=r(8130)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!r&&"json"===this.responseType;if(s||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(s)})),e.exports=c},1811:function(e){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},2990:function(e,t,r){"use strict";var n=r(7246);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var s=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},4859:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},8579:function(e,t,r){"use strict";var n=r(7246);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),n.isString(o)&&a.push("path="+o),n.isString(i)&&a.push("domain="+i),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},4477:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},7810:function(e){"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},9824:function(e,t,r){"use strict";var n=r(7246);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},5920:function(e,t,r){"use strict";var n=r(7246);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},5724:function(e,t,r){"use strict";var n=r(7246),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,s={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([r]):s[t]?s[t]+", "+r:r}})),s):s}},4269:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8213:function(e,t,r){"use strict";var n=r(2080),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={},s=n.version.split(".");function a(e,t){for(var r=t?t.split("."):s,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}o.transitional=function(e,t,r){var o=t&&a(t);function s(e,t){return"[Axios v"+n.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(s(n," has been removed in "+t));return o&&!i[n]&&(i[n]=!0,console.warn(s(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={isOlderVersion:a,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],s=t[i];if(s){var a=e[i],u=void 0===a||s(a,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},7246:function(e,t,r){"use strict";var n=r(1811),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){u(t[n])&&u(r)?t[n]=e(t[n],r):u(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},8047:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return h}});var n=function(){var e=this,t=e._self._c;return e.fields?t("div",{class:e.$style.form},[t("transition",{attrs:{name:"fade"}},[e.success?t("div",{class:e.$style.thank},[t("div",{class:e.$style.thank__title},[e._v(e._s(e.$t("messages.thank")))]),e.thank?t("div",{class:e.$style.thank__message},[e._v(e._s(e.thank))]):e._e(),t("ui-button",{class:e.$style.btn,nativeOn:{click:function(t){return e.close.apply(null,arguments)}}},[e._v(e._s(e.$t("button.close")))])],1):e._e()]),t("transition",{attrs:{name:"fade"}},[e.load?t("ui-loader"):e._e()],1),e.title?t("header",{class:e.$style.form__title},[e._v(e._s(e.title))]):e._e(),t("div",{class:e.$style.form__list},e._l([...e.fields],(function(r,n){return t("div",{class:e.$style.form__item},[r.title?t("header",{class:e.$style.form__label},[e._v(e._s(r.title))]):e._e(),t(r.component,{key:n,tag:"component",attrs:{params:r},on:{input:function(e){r.error=null},list:function(t){return e.setList(t,r)},upload:function(t){return e.setFile(t,r)},delete:function(t){return e.deleteFile(t,r)},"clear-list":function(e){r.request.offset=0},request:function(e){r.request.offset+=r.request.limit}},model:{value:r.value,callback:function(t){e.$set(r,"value",t)},expression:"item.value"}},["checkbox"===r.type?t("span",[e._v(e._s(e.$t("privacy.text"))),t("a",{class:e.$style.link,attrs:{href:e.termsLink||`https://epicentrk.ua${e.$localeUrl("/info/terms-of-use/")}`,target:"_blank",title:e.$t("privacy.title")}},[e._v(e._s(e.$t("privacy.link")))])]):e._e()])],1)})),0),t("ui-button",{class:e.$style.form__send,attrs:{type:e.disabled?"disabled":"blue"},nativeOn:{click:function(t){e.$forms().send(e.fields,e.send)}}},[e._v(e._s(e.$t("button.send")))])],1):e._e()};n._withStripped=!0;var o,i=r(644),s=r.n(i),a=r(4421),u={ua:"Ваше ім'я",ru:"Ваше имя"};if(process.client)if("admin.epicentrm.com.ua"===(null===(o=null===window||void 0===window?void 0:window.location)||void 0===o?void 0:o.host))u={ua:"Ваша компанія",ru:"Ваша компания"};else u={ua:"Ваше ім'я",ru:"Ваше имя"};var c=function(){this.contacts=[{code:"name",label:u,component:"ui-form-input-animate",crmType:"contact",type:"text",error:null,value:"",regex:["empty"]},{code:"phone",label:{ua:"Ваш номер телефону",ru:"Ваш номер телефона"},component:"ui-form-input-animate",crmType:"contact",type:"tel",mask:"+380#########",error:null,value:"",regex:["tel","empty"]},{code:"email",label:{ua:"Ваш Email",ru:"Ваш Email"},component:"ui-form-input-animate",crmType:"contact",type:"email",error:null,value:"",regex:["email"]}],this.footer=[{type:"checkbox",component:"ui-form-checkbox",error:null,value:!1,regex:["check"]}],this.line={placeholder:{ua:"Введіть, будь ласка, інформацію",ru:"Введіть, будь ласка, інформацію"},component:"ui-form-input",type:"text",error:null,value:""},this.str={placeholder:{ua:"Введіть, будь ласка, інформацію",ru:"Введіть, будь ласка, інформацію"},component:"ui-form-input",type:"textarea",error:null,value:""},this.boolean={component:"ui-form-radio",error:null,value:"",grid:"row",items:[{label:{ua:"ні",ru:"нет"},value:0},{label:{ua:"так",ru:"да"},value:1}]},this.rating3={component:"ui-form-impression",error:null,items:[{label:{ua:"Погано, не сподобалось",ru:"Плохо, не понравилось"},icon:"emoji-1",value:1},{label:{ua:"Так собі, можна і краще",ru:"Так себе, можно и лучше"},icon:"emoji-2",value:2},{label:{ua:"Чудово, все сподобалось",ru:"Прекрасно, все понравилось"},icon:"emoji-3",value:3}],value:""},this.rating3a={component:"ui-form-impression",error:null,items:[{label:{ua:"Дуже складно та вкрай не зручно",ru:"Очень сложно и очень не удобно"},icon:"emoji-1",value:1},{label:{ua:"Так собі, можна і краще",ru:"Так себе, можно и лучше"},icon:"emoji-4",value:2},{label:{ua:"Дуже просто і зручно",ru:"Очень просто и удобно"},icon:"emoji-5",value:3}],value:""},this.rating5={component:"ui-form-rating",error:null,value:""},this.rating10={component:"ui-form-assessment",error:null,value:""},this.list={placeholder:{ua:"Зробіть вибір",ru:"Сделайте выбор"},component:"ui-form-select",error:null,value:"",search:{value:"",component:"ui-form-input",type:"search",placeholder:{ua:"Пошук",ru:"Поиск"}}},this.file={label:{file:{ua:"Додати файл",ru:"Добавить файл"},files:{ua:"Додати файли",ru:"Добавить файлы"}},component:"ui-form-upload",error:null,value:"",size:83886080,loadFiles:[],regex:["upload"],types:["image","pdf","doc","sheet"]}};const l=s().create({method:"post",baseURL:"https://crm.epicentrk.ua/local/modules/crmgenesis.omnis/api/epicentrk/questionnaire",headers:{Authorization:"Bearer N0NZF0WUTKbthP4iv93XLkFXDu9MUOz9y8wkkFmo","Content-Type":"application/json; charset=UTF-8"}}),f=[];var p={props:{id:Number,contacts:Array,termsLink:String},data:()=>({load:!1,success:!1}),computed:{...(0,a.Se)({forms:"crm/forms"}),fields(){return this.forms[this.id]?.fields},title(){return this.forms[this.id]?.title},thank(){return this.forms[this.id]?.thank},disabled(){return!this.$forms().validate(this.fields)}},created(){this.fields?.length||(this.load=!0,this.get())},methods:{...(0,a.OI)({setForm:"crm/setForm"}),clear(){for(const e in this.fields)switch(this.fields[e].crmType){case"contact":break;case"upload":this.fields[e].loadFiles=[];break;default:this.fields[e].value=""}},async send(){const e=new FormData;this.load=!0,e.append("id",this.id);for(const t of this.fields)if(t.crmType)switch(t.crmType){case"upload":for(const r in t.loadFiles)e.append(t.files[r].code,t.loadFiles[r].value);break;case"list":t.value&&e.append(t.code,t.value.id);break;default:t.value&&e.append(t.code,"string"==typeof t.value?encodeURI(t.value).trim():t.value)}try{const{data:t}=await l({url:"/set.php",data:e,headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(t.error)return this.$toast.e("виникла помилка, спробуйте пізніше"),this.load=!1,void(this.success=!0);this.success=!0,this.load=!1,this.clear()}catch(e){this.success=!0,this.$toast.e("виникла помилка, спробуйте пізніше"),this.load=!1}},async get(){const e=new c,{data:t}=await l({url:"/get.php",data:{id:this.id,lang:this.$i18n.locale}}),r=[],n=[...f];this.load=!1;for(const o of t.result.questionList){o.code=`answerList[${o.id}]`;const t={parent:`parent_${this._uid}_${o.id}`,title:o.name,id:o.id,crmType:o.type,code:o.code};switch(o.type){case"str":case"line":default:break;case"list":t.request={id:o.idList,lang:this.$i18n.locale,offset:0,limit:50}}"file"!==o.type&&e[o.type]?(o.answerRequired&&(t.regex=["empty"]),r.push({...t,...e[o.type]})):n.push(o)}if(n.length){n.sort(((e,t)=>e.answerRequired<t.answerRequired?1:-1));const t={min:0,max:0};for(const e of n)t.files=t.files||[],t.files.push(e),t.max++,e.answerRequired&&t.min++;r.push({crmType:"upload",title:t.files[0].name,...t,...e.file})}this.setForm({id:this.id,title:t.result.geetingMessage,thank:t.result.thankMessage,fields:[...this.contacts||e.contacts,...r,...e.footer]})},async setList(e,t){if(e.clear)return void(t.items=[]);const r=e.search,{data:n}=await l({url:"/getList.php",data:{search:r,...t.request}});n.error?t.blockedLoad=!0:(t.items=e.search?n.result:[...t.items||[],...n.result],!("autocomplete"in t)&&t.items.length>20&&(t.autocomplete=!0),e.cb())},setFile(e,t){t.loadFiles.push(e)},deleteFile(e,t){t.loadFiles.splice(e,1)},close(){this.success=!1,this.$emit("close")}}},d={form:"epicentrk__Yzc",form__title:"epicentrk_akIL",form__list:"epicentrk_yxdf",form__item:"epicentrk_jxNY",form__send:"epicentrk_moKR",link:"epicentrk_QS6o",form__label:"epicentrk_zp4y",thank:"epicentrk_EeKN",thank__title:"epicentrk__WlD",thank__message:"epicentrk_eOqT",btn:"epicentrk_xojd"};var h=(0,r(1900).Z)(p,n,[],!1,(function(e){this.$style=d.locals||d}),null,null).exports},2080:function(e){"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')}}]);

@@ -1,1 +0,1 @@

"use strict";(self.webpackChunkwidget_crm_form=self.webpackChunkwidget_crm_form||[]).push([[693],{7693:function(t,e,n){n.r(e),n.d(e,{default:function(){return E},init:function(){return N}});var r={};n.r(r),n.d(r,{mask:function(){return h}});var i={};n.r(i),n.d(i,{Toast:function(){return _},cases:function(){return S},forms:function(){return y},localeUrl:function(){return Z}});var o={};n.r(o);var s=n(4845),a=n(4421);s.ZP.use(a.ZP);var u={namespaced:!0,state:{forms:{}},getters:{forms:function(t){return t.forms}},mutations:{setForm:function(t,e){s.ZP.set(t.forms,e.id,e)}}},c=new a.ZP.Store({modules:{crm:u,menu:{namespaced:!0,state:{open:!1,load:!1,list:[]},getters:{open:function(t){return t.open}},mutations:{setOpen:function(t,e){return t.open=e}}}},state:{ww:0,wh:0,margin:"0"},getters:{ww:function(t){return t.ww},wh:function(t){return t.wh},margin:function(t){return t.margin}},mutations:{setWw:function(t,e){return t.ww=e},setWh:function(t,e){return t.wh=e},setMargin:function(t,e){return t.margin=e}},actions:{bodyScrollRemove:function(t){var e=t.state;(0,t.commit)("setMargin","".concat(window.innerWidth-document.documentElement.clientWidth,"px")),document.body.style.paddingRight=e.margin,document.body.classList.add("ep-blocked-scroll")},bodyScrollAdd:function(t){var e=t.state;(0,t.commit)("setMargin","0"),document.body.style.paddingRight=e.margin,document.body.classList.remove("ep-blocked-scroll")}}}),l=n(5186),m={actions:"Акції",price:{price:"ціна",action:"акційна ціна",benefit:{points:"Бали Вигода",superCashBack:"Супер кешбек",cashBack:"CashBack",cases:["бала","бал","бали","балів"]}},models:["варіанта","варіант","варіанта","варіантів"],ended:"Закінчився",delivery:{no:"Без доставки",yes:"Доставимо",none:"Доставка недоступна"},pickup:{yes:"Є самовивіз із",none:"Привеземо в"},status:{350:"Товар доступний в інших магазинах"},button:{by:"Купити",shop:"Найближчий магазин",toFavorite:"в обране",toCompare:"до порівняння",favorite:"Обране",compare:"Порівняння",send:"Відправити",close:"Закрити",moreDetail:"Детальніше",select:"Обрати",noInMarket:"Наявність в магазинах",filter:"Фільтрувати",sort:"Сортувати","pre-order":"Передзамовити"},product:{action:"Гарантовано низька ціна",none:"Немає в наявності"},error:{email:"введіть правильний email",tel:"введіть правильний телефон",login:"введіть правильний телефон або email",pass:"введіть пароль (мін 8 символів)","new-pass":"пароль не відповідає правилам",confirm:"паролі не співпадають",sms:"введіть код (6 цифр)",empty:"обов'язкове поле"},search:{placeholder:"Пошук",no:"результатів не знайдено"},privacy:{text:"Залишаючи свої контактні дані, я погоджуюсь з ",link:"політикою конфіденційності",title:"політика конфіденційності"},messages:{thank:"Дякуємо!"},blocks:{viewedProducts:"Ви дивились",recommendation:"Рекомендовано для вас"},locations:{all:"Всі",online:"Центр видачі замовлень",switcher:{list:"списком",map:"на карті"},shops:{1:"Епіцентр",2:"Нова лінія",3:"Інтерспорт",4:"Галереї Деко",5:"ЕПІК",6:"TAF",7:"4F",10:"ЦВЗ",11:"МТВ"},schedule:["Пн-пт","Сб","Нд","Пн-сб","Пн-нд","Сб-нд"],attribution:"Дані карт © ".concat((new Date).getFullYear()," ЧАО «<a href='https://api.visicom.ua/'>Візіком</a>»")}};s.ZP.use(l.Z);var f=new l.Z({locale:"ua",messages:{ua:m}}),d={icons:function(){return n.e(521).then(n.bind(n,521))},"crm-form":function(){return n.e(47).then(n.bind(n,8047))},"crm-form-subject":function(){return n.e(436).then(n.bind(n,8436))},"svg-icon":function(){return n.e(856).then(n.bind(n,5856))},"ui-loader":function(){return n.e(356).then(n.bind(n,6356))},"ui-popup":function(){return n.e(32).then(n.bind(n,7032))},"ui-button":function(){return n.e(433).then(n.bind(n,4433))},"ui-bar":function(){return n.e(286).then(n.bind(n,8286))},"ui-form-assessment":function(){return n.e(717).then(n.bind(n,7717))},"ui-form-checkbox":function(){return n.e(665).then(n.bind(n,3665))},"ui-form-impression":function(){return n.e(904).then(n.bind(n,4904))},"ui-form-input-animate":function(){return n.e(82).then(n.bind(n,1082))},"ui-form-input":function(){return n.e(400).then(n.bind(n,7400))},"ui-form-radio":function(){return n.e(879).then(n.bind(n,879))},"ui-form-rating":function(){return n.e(887).then(n.bind(n,5887))},"ui-form-select":function(){return n.e(123).then(n.bind(n,123))},"ui-form-upload":function(){return n.e(645).then(n.bind(n,2645))},"ui-form-error":function(){return n.e(37).then(n.bind(n,9037))}},p=function(){function t(t,e){this.tokens={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(t){return t.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(t){return t.toLocaleLowerCase()}},F:{pattern:/[А-яЁёҐґєЄіІїЇйЙ]/,transform:function(t){return t.toLocaleUpperCase()}},"!":{escape:!0}},this.el=t,this.mask=e}return t.event=function(t){return new Event(t)},t.prototype.maskIt=function(t){for(var e=0,n=0,r="";e<this.mask.length&&n<t.length;){var i=this.mask[e],o=this.tokens[i],s=t[n];o&&!o.escape&&o.pattern?(o.pattern.test(s)&&(r+=o.transform?o.transform(s):s,e++),n++):(o&&o.escape&&(e++,i=this.mask[e]),r+=i,s===i&&n++,e++)}for(var a="";e<this.mask.length;){i=this.mask[e];if(this.tokens["".concat(i)]){a="";break}a+=i,e++}return r+a},t.prototype.init=function(){var e=this,n=this.el;if(n){n.addEventListener("input",(function(r){if(r.isTrusted){var i=Number(n.selectionEnd),o=n.value[i-1];for(n.value=e.maskIt(n.value);i<n.value.length&&n.value.charAt(i-1)!==o;)i++;n===document.activeElement&&n.setSelectionRange(i,i),n.dispatchEvent(t.event("input"))}}));var r=this.maskIt(n.value);r!==n.value&&(n.value=r,n.dispatchEvent(t.event("input")))}},t}(),h={inserted:function(t,e){var n=e.value;n&&new p(t,n).init()}},v=n(9705),g=function(){function t(t){this.email=/^[_A-Za-z0-9-\\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$/,this.tel=/^((8|\+38)[- ]?)?\(?(039|050|063|066|067|068|073|091|092|093|094|095|096|097|098|099)\)?([- ]?)?[\d\- ]{7,10}$/,this.empty=/\S{1,}$/,this.sms=/\S{6}$/,this.pass=/\S{8}$/,this.pass2=/(?=.*?[A-Z])+(?=.*?[a-z])/g,this.pass3=/(?=.*?[0-9])/g,this.pass4=/(?=.*?[.<>/?;:'"[\]{}\\/|`~!@#$^&*()\-_+=])/g,this.error=t}return t.prototype.test=function(t,e){switch(t){case"empty":return this.empty.test(String(e.value||"").trim());case"tel":return this.tel.test(String(e.value.replace(/\(|\)|\s+|-/g,"")).trim());case"email":return this.email.test(String(e.value).trim());case"pass":return this.pass.test(String(e.value).trim());case"login":return this.email.test(String(e.value).trim())||this.tel.test(String(e.value.replace(/\(|\)|\s+|-/g,"")).trim());case"new-pass":return this.pass.test(String(e.value).trim())&&this.pass2.test(String(e.value).trim())&&this.pass3.test(String(e.value).trim())&&this.pass4.test(String(e.value).trim());case"sms":return this.sms.test(String(e.value).trim());case"confirm":return!e.confirm||e.value===e.confirm.value&&this.pass.test(String(e.value).trim())&&this.pass2.test(String(e.value).trim())&&this.pass3.test(String(e.value).trim())&&this.pass4.test(String(e.value).trim());case"check":return e.value;case"upload":return!e.min||!e.loadFiles||e.min<=e.loadFiles.length;default:return!0}},t.prototype.validate=function(t,e){for(var n,r=!0,i=0,o=t;i<o.length;i++){var s=o[i];for(var a in s.regex)this.test(s.regex[Number(a)],s)||((null==s?void 0:s.confirm)&&s.value?e&&(s.confirm.error=this.error[s.regex[Number(a)]]||!0):e&&(s.error=(null===(n=this.error)||void 0===n?void 0:n[s.regex[Number(a)]])||!0),r=!1)}return r},t.prototype.clear=function(t){for(var e=0,n=t;e<n.length;e++){n[e].value=""}},t.prototype.getParams=function(t){for(var e,n={},r=0,i=t;r<i.length;r++){var o=i[r];o.code&&("login"!==o.code||o.value.includes("@")||(o.value=(e=o.value,1===e.indexOf("800")||0===e.indexOf("800")?new p(null,"0 800 XX XX XX").maskIt(e):new p(null,"+38 XXX XXX XX XX").maskIt(e)).replace(/\s/g,"")),n[String(o.code)]=o.value,o.confirm&&(n[String(o.confirm.code)]=o.confirm.value))}return n},t.prototype.send=function(t,e){this.validate(t,!0)&&e()},t}(),b=g,y=function(){function t(){}return t.install=function(t){t.prototype.$forms=function(){return new b(m.error)},t.forms=t.prototype.$forms},t}(),k=function(t,e,n){t=Math.round(100*Number(t))/100;var r=n?"":t;return(0^t)!==t?r+" "+e[0]:Number(t)>10&&Number(t)<20?r+" "+e[3]:Number(t)%10==1?r+" "+e[1]:Number(t)%10>1&&Number(t)%10<5?r+" "+e[2]:r+" "+e[3]},w=function(){function t(){}return t.install=function(t){t.prototype.$cases=k,t.cases=t.prototype.$cases},t}(),S=w,Z=function(){function t(){}return t.install=function(t){t.prototype.$localeUrl=function(t){return"/ua"+t},t.localeUrl=t.prototype.$localeUrl},t}(),P=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("transition",{attrs:{name:"fade"}},[t.items.length&&t.init?e("div",{class:t.$style.wrapper},[e("transition-group",{attrs:{name:"list",tag:"div"}},t._l(t.items,(function(n){return e("div",{key:n.key,class:[t.$style.toast,t.$style[n.theme]],domProps:{innerHTML:t._s(n.message)},on:{click:function(e){return t.remove(n)}}})})),0)],1):t._e()])};P._withStripped=!0;var $=s.ZP.extend({data:function(){return{items:[],init:!1}},mounted:function(){this.init=!0},methods:{s:function(t){this.add(t,"is-success")},w:function(t){this.add(t,"is-warning")},e:function(t){this.add(t,"is-error")},add:function(t,e){var n=this;this.$parent||(this.$mount(),document.body.appendChild(this.$el));var r={message:t,theme:e,key:Number(new Date)};this.items.push(r),setTimeout((function(){n.remove(r)}),6e3)},remove:function(t){this.items.includes(t)&&this.items.splice(this.items.indexOf(t),1)}}}),A={wrapper:"epicentrk_BuKk",toast:"epicentrk_HZbH","is-warning":"epicentrk_ddys","is-error":"epicentrk_maxL"};var _=(0,n(1900).Z)($,P,[],!1,(function(t){this.$style=A.locals||A}),null,null).exports;_.install=function(t){t.prototype.$toast=new _},s.ZP.use(v.ZP,{theme:"light-border",arrow:!0});var X=function(){return n.e(615).then(n.bind(n,5615))},C=function(){return n.e(586).then(n.bind(n,586))},x=function(){function t(){}return t.addBlock=function(t){return document.body.appendChild(t),t},t.appendSprite=function(){document.body.insertAdjacentHTML("afterbegin",'<div id="crm-form-sprite"></div>'),new s.ZP({store:c,render:function(t){return t(C)}}).$mount(document.getElementById("crm-form-sprite"))},t.initComponent=function(t,e,n,r){new s.ZP({i18n:f,store:c,render:function(t){return t(X,{props:{id:e,items:r,type:n}})}}).$mount(t)},t.initPopup=function(e){t.initComponent(t.addBlock(document.createElement("div")),e,"popup")},t.initPopupSelect=function(e){t.initComponent(t.addBlock(document.createElement("div")),null,"select",e)},t.init=function(){for(var e=Array.from(document.querySelectorAll("[data-form-id]")),n=Array.from(document.querySelectorAll("[data-form-items]")),r=function(e){if("static"===e.dataset.type)t.initComponent(e,Number(e.dataset.formId),"static");else e.addEventListener("click",(function(){t.initPopup(Number(e.dataset.formId))}))},i=0,o=e;i<o.length;i++){r(o[i])}try{for(var s=function(e){e.addEventListener("click",(function(){t.initComponent(t.addBlock(document.createElement("div")),null,"select",JSON.parse(e.dataset.formItems))}))},a=0,u=n;a<u.length;a++){s(u[a])}}catch(t){console.warn("Помилка в масиві даних, перевірте data-form-items")}},t.install=function(){for(var e in i)s.ZP.use(i[e]);for(var e in o)s.ZP.filter(e,o[e]);for(var e in r)s.ZP.directive(e,r[e]);for(var e in d)s.ZP.component(e,d[e]);t.appendSprite(),t.init()},t}(),N=function(){return s.ZP.use(x)},E=x}}]);
"use strict";(self.webpackChunkwidget_crm_form=self.webpackChunkwidget_crm_form||[]).push([[693],{7693:function(t,e,n){n.r(e),n.d(e,{default:function(){return E},init:function(){return N}});var r={};n.r(r),n.d(r,{mask:function(){return h}});var i={};n.r(i),n.d(i,{Toast:function(){return _},cases:function(){return S},forms:function(){return y},localeUrl:function(){return Z}});var o={};n.r(o);var s=n(4845),a=n(4421);s.ZP.use(a.ZP);var u={namespaced:!0,state:{forms:{}},getters:{forms:function(t){return t.forms}},mutations:{setForm:function(t,e){s.ZP.set(t.forms,e.id,e)}}},c=new a.ZP.Store({modules:{crm:u,menu:{namespaced:!0,state:{open:!1,load:!1,list:[]},getters:{open:function(t){return t.open}},mutations:{setOpen:function(t,e){return t.open=e}}}},state:{ww:0,wh:0,margin:"0"},getters:{ww:function(t){return t.ww},wh:function(t){return t.wh},margin:function(t){return t.margin}},mutations:{setWw:function(t,e){return t.ww=e},setWh:function(t,e){return t.wh=e},setMargin:function(t,e){return t.margin=e}},actions:{bodyScrollRemove:function(t){var e=t.state;(0,t.commit)("setMargin","".concat(window.innerWidth-document.documentElement.clientWidth,"px")),document.body.style.paddingRight=e.margin,document.body.classList.add("ep-blocked-scroll")},bodyScrollAdd:function(t){var e=t.state;(0,t.commit)("setMargin","0"),document.body.style.paddingRight=e.margin,document.body.classList.remove("ep-blocked-scroll")}}}),l=n(5186),m={actions:"Акції",price:{price:"ціна",action:"акційна ціна",benefit:{points:"Бали Вигода",superCashBack:"Супер кешбек",cashBack:"CashBack",cases:["бала","бал","бали","балів"]}},models:["варіанта","варіант","варіанта","варіантів"],ended:"Закінчився",delivery:{no:"Без доставки",yes:"Доставимо",none:"Доставка недоступна"},pickup:{yes:"Є самовивіз із",none:"Привеземо в"},status:{350:"Товар доступний в інших магазинах"},button:{by:"Купити",shop:"Найближчий магазин",toFavorite:"в обране",toCompare:"до порівняння",favorite:"Обране",compare:"Порівняння",send:"Відправити",close:"Закрити",moreDetail:"Детальніше",select:"Обрати",noInMarket:"Наявність в магазинах",filter:"Фільтрувати",sort:"Сортувати","pre-order":"Передзамовити"},product:{action:"Гарантовано низька ціна",none:"Немає в наявності"},error:{email:"введіть правильний email",tel:"введіть правильний телефон",login:"введіть правильний телефон або email",pass:"введіть пароль (мін 8 символів)","new-pass":"пароль не відповідає правилам",confirm:"паролі не співпадають",sms:"введіть код (6 цифр)",empty:"обов'язкове поле"},search:{placeholder:"Пошук",no:"результатів не знайдено"},privacy:{text:"Залишаючи свої контактні дані, я погоджуюсь з ",link:"політикою конфіденційності",title:"політика конфіденційності"},messages:{thank:"Дякуємо!"},blocks:{viewedProducts:"Ви дивились",recommendation:"Рекомендовано для вас"},locations:{all:"Всі",online:"Центр видачі замовлень",switcher:{list:"списком",map:"на карті"},shops:{1:"Епіцентр",2:"Нова лінія",3:"Інтерспорт",4:"Галереї Деко",5:"ЕПІК",6:"TAF",7:"4F",10:"ЦВЗ",11:"МТВ"},schedule:["Пн-пт","Сб","Нд","Пн-сб","Пн-нд","Сб-нд"],attribution:"Дані карт © ".concat((new Date).getFullYear()," ЧАО «<a href='https://api.visicom.ua/'>Візіком</a>»")}};s.ZP.use(l.Z);var f=new l.Z({locale:"ua",messages:{ua:m}}),d={icons:function(){return n.e(521).then(n.bind(n,521))},"crm-form":function(){return n.e(47).then(n.bind(n,8047))},"crm-form-subject":function(){return n.e(436).then(n.bind(n,8436))},"svg-icon":function(){return n.e(856).then(n.bind(n,5856))},"ui-loader":function(){return n.e(356).then(n.bind(n,6356))},"ui-popup":function(){return n.e(32).then(n.bind(n,7032))},"ui-button":function(){return n.e(433).then(n.bind(n,4433))},"ui-bar":function(){return n.e(286).then(n.bind(n,8286))},"ui-form-assessment":function(){return n.e(717).then(n.bind(n,7717))},"ui-form-checkbox":function(){return n.e(665).then(n.bind(n,3665))},"ui-form-impression":function(){return n.e(904).then(n.bind(n,4904))},"ui-form-input-animate":function(){return n.e(82).then(n.bind(n,1082))},"ui-form-input":function(){return n.e(400).then(n.bind(n,7400))},"ui-form-radio":function(){return n.e(879).then(n.bind(n,879))},"ui-form-rating":function(){return n.e(887).then(n.bind(n,5887))},"ui-form-select":function(){return n.e(123).then(n.bind(n,123))},"ui-form-upload":function(){return n.e(645).then(n.bind(n,2645))},"ui-form-error":function(){return n.e(37).then(n.bind(n,9037))}},p=function(){function t(t,e){this.tokens={"#":{pattern:/\d/},X:{pattern:/[0-9a-zA-Z]/},S:{pattern:/[a-zA-Z]/},A:{pattern:/[a-zA-Z]/,transform:function(t){return t.toLocaleUpperCase()}},a:{pattern:/[a-zA-Z]/,transform:function(t){return t.toLocaleLowerCase()}},F:{pattern:/[А-яЁёҐґєЄіІїЇйЙ]/,transform:function(t){return t.toLocaleUpperCase()}},"!":{escape:!0}},this.el=t,this.mask=e}return t.event=function(t){return new Event(t)},t.prototype.maskIt=function(t){for(var e=0,n=0,r="";e<this.mask.length&&n<t.length;){var i=this.mask[e],o=this.tokens[i],s=t[n];o&&!o.escape&&o.pattern?(o.pattern.test(s)&&(r+=o.transform?o.transform(s):s,e++),n++):(o&&o.escape&&(e++,i=this.mask[e]),r+=i,s===i&&n++,e++)}for(var a="";e<this.mask.length;){i=this.mask[e];if(this.tokens["".concat(i)]){a="";break}a+=i,e++}return r+a},t.prototype.init=function(){var e=this,n=this.el;if(n){n.addEventListener("input",(function(r){if(r.isTrusted){var i=Number(n.selectionEnd),o=n.value[i-1];for(n.value=e.maskIt(n.value);i<n.value.length&&n.value.charAt(i-1)!==o;)i++;n===document.activeElement&&n.setSelectionRange(i,i),n.dispatchEvent(t.event("input"))}}));var r=this.maskIt(n.value);r!==n.value&&(n.value=r,n.dispatchEvent(t.event("input")))}},t}(),h={inserted:function(t,e){var n=e.value;n&&new p(t,n).init()}},v=n(9705),g=function(){function t(t){this.email=/^[_A-Za-z0-9-\\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$/,this.tel=/^((8|\+38)[- ]?)?\(?(039|050|063|066|067|068|073|091|092|093|094|095|096|097|098|099)\)?([- ]?)?[\d\- ]{7,10}$/,this.empty=/\S{1,}$/,this.sms=/\S{6}$/,this.pass=/\S{8}$/,this.pass2=/(?=.*?[A-Z])+(?=.*?[a-z])/g,this.pass3=/(?=.*?[0-9])/g,this.pass4=/(?=.*?[.<>/?;:'"[\]{}\\/|`~!@#$^&*()\-_+=])/g,this.error=t}return t.prototype.test=function(t,e){switch(t){case"empty":return this.empty.test(String(e.value||"").trim());case"tel":return this.tel.test(String(e.value.replace(/\(|\)|\s+|-/g,"")).trim());case"email":return""===e.value||this.email.test(String(e.value).trim());case"pass":return this.pass.test(String(e.value).trim());case"login":return this.email.test(String(e.value).trim())||this.tel.test(String(e.value.replace(/\(|\)|\s+|-/g,"")).trim());case"new-pass":return this.pass.test(String(e.value).trim())&&this.pass2.test(String(e.value).trim())&&this.pass3.test(String(e.value).trim())&&this.pass4.test(String(e.value).trim());case"sms":return this.sms.test(String(e.value).trim());case"confirm":return!e.confirm||e.value===e.confirm.value&&this.pass.test(String(e.value).trim())&&this.pass2.test(String(e.value).trim())&&this.pass3.test(String(e.value).trim())&&this.pass4.test(String(e.value).trim());case"check":return e.value;case"upload":return!e.min||!e.loadFiles||e.min<=e.loadFiles.length;default:return!0}},t.prototype.validate=function(t,e){for(var n,r=!0,i=0,o=t;i<o.length;i++){var s=o[i];for(var a in s.regex)this.test(s.regex[Number(a)],s)||((null==s?void 0:s.confirm)&&s.value?e&&(s.confirm.error=this.error[s.regex[Number(a)]]||!0):e&&(s.error=(null===(n=this.error)||void 0===n?void 0:n[s.regex[Number(a)]])||!0),r=!1)}return r},t.prototype.clear=function(t){for(var e=0,n=t;e<n.length;e++){n[e].value=""}},t.prototype.getParams=function(t){for(var e,n={},r=0,i=t;r<i.length;r++){var o=i[r];o.code&&("login"!==o.code||o.value.includes("@")||(o.value=(e=o.value,1===e.indexOf("800")||0===e.indexOf("800")?new p(null,"0 800 XX XX XX").maskIt(e):new p(null,"+38 XXX XXX XX XX").maskIt(e)).replace(/\s/g,"")),n[String(o.code)]=o.value,o.confirm&&(n[String(o.confirm.code)]=o.confirm.value))}return n},t.prototype.send=function(t,e){this.validate(t,!0)&&e()},t}(),b=g,y=function(){function t(){}return t.install=function(t){t.prototype.$forms=function(){return new b(m.error)},t.forms=t.prototype.$forms},t}(),k=function(t,e,n){t=Math.round(100*Number(t))/100;var r=n?"":t;return(0^t)!==t?r+" "+e[0]:Number(t)>10&&Number(t)<20?r+" "+e[3]:Number(t)%10==1?r+" "+e[1]:Number(t)%10>1&&Number(t)%10<5?r+" "+e[2]:r+" "+e[3]},w=function(){function t(){}return t.install=function(t){t.prototype.$cases=k,t.cases=t.prototype.$cases},t}(),S=w,Z=function(){function t(){}return t.install=function(t){t.prototype.$localeUrl=function(t){return"/ua"+t},t.localeUrl=t.prototype.$localeUrl},t}(),P=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("transition",{attrs:{name:"fade"}},[t.items.length&&t.init?e("div",{class:t.$style.wrapper},[e("transition-group",{attrs:{name:"list",tag:"div"}},t._l(t.items,(function(n){return e("div",{key:n.key,class:[t.$style.toast,t.$style[n.theme]],domProps:{innerHTML:t._s(n.message)},on:{click:function(e){return t.remove(n)}}})})),0)],1):t._e()])};P._withStripped=!0;var $=s.ZP.extend({data:function(){return{items:[],init:!1}},mounted:function(){this.init=!0},methods:{s:function(t){this.add(t,"is-success")},w:function(t){this.add(t,"is-warning")},e:function(t){this.add(t,"is-error")},add:function(t,e){var n=this;this.$parent||(this.$mount(),document.body.appendChild(this.$el));var r={message:t,theme:e,key:Number(new Date)};this.items.push(r),setTimeout((function(){n.remove(r)}),6e3)},remove:function(t){this.items.includes(t)&&this.items.splice(this.items.indexOf(t),1)}}}),A={wrapper:"epicentrk_BuKk",toast:"epicentrk_HZbH","is-warning":"epicentrk_ddys","is-error":"epicentrk_maxL"};var _=(0,n(1900).Z)($,P,[],!1,(function(t){this.$style=A.locals||A}),null,null).exports;_.install=function(t){t.prototype.$toast=new _},s.ZP.use(v.ZP,{theme:"light-border",arrow:!0});var X=function(){return n.e(615).then(n.bind(n,5615))},C=function(){return n.e(586).then(n.bind(n,586))},x=function(){function t(){}return t.addBlock=function(t){return document.body.appendChild(t),t},t.appendSprite=function(){document.body.insertAdjacentHTML("afterbegin",'<div id="crm-form-sprite"></div>'),new s.ZP({store:c,render:function(t){return t(C)}}).$mount(document.getElementById("crm-form-sprite"))},t.initComponent=function(t,e,n,r){new s.ZP({i18n:f,store:c,render:function(t){return t(X,{props:{id:e,items:r,type:n}})}}).$mount(t)},t.initPopup=function(e){t.initComponent(t.addBlock(document.createElement("div")),e,"popup")},t.initPopupSelect=function(e){t.initComponent(t.addBlock(document.createElement("div")),null,"select",e)},t.init=function(){for(var e=Array.from(document.querySelectorAll("[data-form-id]")),n=Array.from(document.querySelectorAll("[data-form-items]")),r=function(e){if("static"===e.dataset.type)t.initComponent(e,Number(e.dataset.formId),"static");else e.addEventListener("click",(function(){t.initPopup(Number(e.dataset.formId))}))},i=0,o=e;i<o.length;i++){r(o[i])}try{for(var s=function(e){e.addEventListener("click",(function(){t.initComponent(t.addBlock(document.createElement("div")),null,"select",JSON.parse(e.dataset.formItems))}))},a=0,u=n;a<u.length;a++){s(u[a])}}catch(t){console.warn("Помилка в масиві даних, перевірте data-form-items")}},t.install=function(){for(var e in i)s.ZP.use(i[e]);for(var e in o)s.ZP.filter(e,o[e]);for(var e in r)s.ZP.directive(e,r[e]);for(var e in d)s.ZP.component(e,d[e]);t.appendSprite(),t.init()},t}(),N=function(){return s.ZP.use(x)},E=x}}]);
{
"name": "widget-crm-form",
"version": "4.0.4",
"version": "4.0.5",
"description": "epicentrk",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc