PageSourceSearch

https://optikaoravcova.sk/bundles/frontend/js/chunks/package/compo…ail-ProductQuestionForm.56c21d8b6dcd1333.js

js optikaoravcova.sk collected 2026-10-09 03:19:39 UTC 16,477 bytes, 2 lines download raw bytes

vendor: 4,840 bytes, lines 1-2
1/*! For license information please see components-product_detail-ProductQuestionForm.56c21d8b6dcd1333.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[410],{438:(t,e,r)=>{r.d(e,{Z:()=>i});var n=r(1519),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".product-question-wrapper[data-v-b198ee34]{padding:25px}.product-question-header[data-v-b198ee34]{border-bottom:1px solid #ccc;padding:25px}.product-question-footer[data-v-b198ee34]{border-top:1px solid #ccc;padding:25px}h6[data-v-b198ee34]{margin-bottom:0}",""]);const i=o},6528:(t,e,r)=>{r.r(e),r.d(e,{default:()=>y});var n=r(1524),o=r(629);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 a(){a=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},c=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var i=e&&e.prototype instanceof h?e:h,a=Object.create(i.prototype),c=new P(o||[]);return n(a,"_invoke",{value:E(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var d={};function h(){}function v(){}function m(){}var y={};l(y,c,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==e&&r.call(b,c)&&(y=b);var w=m.prototype=h.prototype=Object.create(y);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==i(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,c,s)}),(function(t){o("throw",t,c,s)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,s)}))}s(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function E(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 L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===d)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 s=p(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function O(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 C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=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 o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return v.prototype=m,n(w,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:v,configurable:!0}),v.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},_(x.prototype),l(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Prom
2ise);var a=new x(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(w),l(w,u,"Generator"),l(w,c,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,P.prototype={constructor:P,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(C),!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"),s=r.call(i,"finallyLoc");if(c&&s){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(!s)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,d):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),d},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),C(r),d}},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;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function c(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).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){c(i,n,o,a,s,"next",t)}function s(t){c(i,n,o,a,s,"throw",t)}a(void 0)}))}}function u(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 l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const p={name:"ProductQuestionModal",data:function(){return{email:"",message:""}},components:{"vue-recaptcha":r(4679).Z},computed:l(l({},(0,o.Se)("product",{productDetail:"getProductDetail"})),{},{recaptchaEnabled:function(){var t=this.$root.recaptcha_enabled;return!(!t||""===t||"0"===t)}}),methods:{openModal:function(){this.$modal.show("product-question-modal")},submitForm:function(){return this.recaptchaEnabled?this.$refs.invisibleRecaptcha.execute():this.sendQuestion()},sendQuestion:function(){var t=arguments,e=this;return s(a().mark((function r(){var o,i,c,s,u;return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o=t.length>0&&void 0!==t[0]?t[0]:null,!e.handleValidity()){r.next=15;break}return(i={from_email:e.email,product_id:e.productDetail.id})["message-text"]=e.message,o&&(i["g-recaptcha-response"]=o),showGlobalPreloader(),r.next=8,(0,n.b)("api/eshop");case 8:return c=r.sent.default,r.next=11,(0,n.b)("services/notify");
2case 11:s=r.sent,s.errorNotify,u=s.successNotify,c.sendProductQuestion(i,(function(t){u({text:"Otázka bola úspešne odoslaná."}),e.resetForm(),e.$modal.hide("product-question-modal")}),(function(t){console.error(t)}),(function(){hideGlobalPreloader()}));case 15:case"end":return r.stop()}}),r)})))()},resetForm:function(){this.email="",this.message=""},handleValidity:function(){var t=this.getErrorMessages();return!t.length||(this.$notify({title:"Chyba!",text:t.join("<br>"),type:"error"}),!1)},getErrorMessages:function(){var t=[];return this.email||t.push("Pole e-mail je povinné!"),this.message||t.push("Pole otázka je povinné!"),t},handleRecaptchaSucess:function(t){this.sendQuestion(t)},handleRecaptchaError:function(){return s(a().mark((function t(){var e;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.b)("services/notify");case 2:e=t.sent,(0,e.errorNotify)();case 5:case"end":return t.stop()}}),t)})))()},resetRecaptcha:function(){this.$refs.invisibleRecaptcha.reset()}}};var d=r(2446),h=r.n(d),v=r(438),m={insert:"head",singleton:!1};h()(v.Z,m);v.Z.locals;const y=(0,r(1900).Z)(p,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"product-question-component"},[t.productDetail?e("button",{staticClass:"btn btn-primary",on:{click:t.openModal}},[e("i",{staticClass:"fa fa-envelope"}),t._v("\n        "+t._s(t.$t("eshopw.haveYouQuestions"))+"\n    ")]):t._e(),t._v(" "),e("modal",{attrs:{name:"product-question-modal",height:"auto",scrollable:!0}},[e("div",{staticClass:"product-question-header"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("h6",[t._v(t._s(t.$t("eshopw.questionAboutProduct")))])])])]),t._v(" "),e("form",{on:{submit:function(e){return e.preventDefault(),t.submitForm.apply(null,arguments)}}},[e("div",{staticClass:"product-question-wrapper"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"control-label",attrs:{for:"from_email"}},[t._v(t._s(t.$t("eshopw.questionAboutProductEmail")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"form-control",attrs:{id:"from_email",required:"required",name:"from_email",type:"email"},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}})])]),t._v(" "),e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"form-group"},[e("label",{staticClass:"control-label",attrs:{for:"message-text"}},[t._v(t._s(t.$t("eshopw.questionAboutProductMessage")))]),t._v(" "),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.message,expression:"message"}],staticClass:"form-control",attrs:{id:"message-text",rows:"5",name:"message-text",cols:"50"},domProps:{value:t.message},on:{input:function(e){e.target.composing||(t.message=e.target.value)}}})])]),t._v(" "),e("div",{staticClass:"clear clearfix"})])]),t._v(" "),e("div",{staticClass:"product-question-footer"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12 text-center"},[e("button",{staticClass:"btn-primary btn",attrs:{type:"submit"}},[e("i",{staticClass:"fa fa-send"}),t._v("\n                            "+t._s(t.$t("eshopw.sendQuestion"))+"\n                        ")])])])]),t._v(" "),t.recaptchaEnabled?e("vue-recaptcha",{ref:"invisibleRecaptcha",attrs:{size:"invisible",sitekey:t.$root.recaptcha_site_key,loadRecaptchaScript:!0},on:{verify:t.handleRecaptchaSucess,error:t.handleRecaptchaError}}):t._e()],1)])],1)}),[],!1,null,"b198ee34",null).exports},1900:(t,e,r)=>{function n(t,e,r,n,o,i,a,c){var s,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(t,e){return s.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:u}}r.d(e,{Z:()=>n})},4679:(t,e,r)=>{function n(){return n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
2for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n.apply(this,arguments)}r.d(e,{Z:()=>u});var o=Object.prototype.hasOwnProperty;var i,a,c,s=(i=!1,a=[],c={resolved:function(){return i},resolve:function(t){if(!i){i=!0;for(var e=0,r=a.length;e<r;e++)a[e](t)}},promise:{then:function(t){i?t():a.push(t)}}},{notify:function(){c.resolve()},wait:function(){return c.promise},render:function(t,e,r){this.wait().then((function(){r(window.grecaptcha.render(t,e))}))},reset:function(t){void 0!==t&&(this.assertLoaded(),this.wait().then((function(){return window.grecaptcha.reset(t)})))},execute:function(t){void 0!==t&&(this.assertLoaded(),this.wait().then((function(){return window.grecaptcha.execute(t)})))},checkRecaptchaLoad:function(){o.call(window,"grecaptcha")&&o.call(window.grecaptcha,"render")&&this.notify()},assertLoaded:function(){if(!c.resolved())throw new Error("ReCAPTCHA has not been loaded")}});"undefined"!=typeof window&&(window.vueRecaptchaApiLoaded=s.notify);const u={name:"VueRecaptcha",props:{sitekey:{type:String,required:!0},theme:{type:String},badge:{type:String},type:{type:String},size:{type:String},tabindex:{type:String},loadRecaptchaScript:{type:Boolean,default:!1},recaptchaScriptId:{type:String,default:"__RECAPTCHA_SCRIPT"},recaptchaHost:{type:String,default:"www.google.com"},language:{type:String,default:""}},beforeMount:function(){if(this.loadRecaptchaScript&&!document.getElementById(this.recaptchaScriptId)){var t=document.createElement("script");t.id=this.recaptchaScriptId,t.src="https://"+this.recaptchaHost+"/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=explicit&hl="+this.language,t.async=!0,t.defer=!0,document.head.appendChild(t)}},mounted:function(){var t=this;s.checkRecaptchaLoad();var e=n({},this.$props,{callback:this.emitVerify,"expired-callback":this.emitExpired,"error-callback":this.emitError}),r=this.$slots.default?this.$el.children[0]:this.$el;s.render(r,e,(function(e){t.$widgetId=e,t.$emit("render",e)}))},methods:{reset:function(){s.reset(this.$widgetId)},execute:function(){s.execute(this.$widgetId)},emitVerify:function(t){this.$emit("verify",t)},emitExpired:function(){this.$emit("expired")},emitError:function(){this.$emit("error")}},render:function(t){return t("div",{},this.$slots.default)}}}}]);

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.