PageSourceSearch

https://naftee-coffee-shop.vercel.app/_next/static/chunks/pages/quiz-e06ece743277009b7c0f.js

js naftee-coffee-shop.vercel.app collected 2026-10-03 07:22:05 UTC 16,631 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[498],{6389:function(e,n,t){"use strict";t.d(n,{a:function(){return l}});var i=t(5893),r=t(2283),o=t.n(r);function l(){return(0,i.jsx)("div",{className:o().wrapper,children:(0,i.jsx)("div",{className:o().spanned,children:(0,i.jsx)("div",{className:o().coffee_cup})})})}},2402:function(e,n,t){"use strict";t.d(n,{U:function(){return c}});var i=t(5893),r=t(1163),o=t(1664),l=t(7918),a=t.n(l);function c(e){var n=e.id,t=(0,r.useRouter)();return(0,i.jsx)(o.default,{className:a().button,href:"/shop/details/".concat(n),locale:t.locale,children:(0,i.jsx)("a",{className:a().productButton,children:"Detail produktu"})})}},5357:function(e,n,t){"use strict";t.d(n,{A:function(){return k}});var i=t(5893),r=t(1664),o=t(7294),l=t(7625),a=t(1436),c=t(8134),s=t(762),u=t.n(s),d=t(1163),h=function(e){var n=e.language,t=(0,d.useRouter)(),o=t.pathname,l=t.query,a=o;l.id&&(a=a.replace("[id]",l.id));var c="CZ"===n?"cs":"en";return(0,i.jsx)(r.default,{className:u().langBtn,href:a,locale:c,children:n})},f=t(185),v=t.n(f);function x(e){var n=e.headerClassName,t=(e.setShowMenu,e.showMenu,(0,c.$)()),o=t.t,l=(t.i18n,(0,d.useRouter)());return(0,i.jsxs)("ul",{className:v()[n],children:[(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/",children:(0,i.jsx)("a",{children:o("header.home",{lng:"cs"===l.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/about-us",children:(0,i.jsx)("a",{children:o("header.aboutUs",{lng:"cs"===l.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/shop/shop-list",children:(0,i.jsx)("a",{children:o("header.shop",{lng:"cs"===l.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/quiz",children:(0,i.jsx)("a",{children:o("header.quiz",{lng:"cs"===l.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/contact",children:(0,i.jsx)("a",{children:o("header.contacts",{lng:"cs"===l.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{className:v().langSwitcher,children:(0,i.jsxs)("div",{className:v().btnContainer,children:[(0,i.jsx)(h,{language:"CZ"}),"/",(0,i.jsx)(h,{language:"EN"})]})})]})}var p=t(8695),j=t.n(p);function _(){var e=(0,o.useState)(!1),n=e[0],t=e[1],c=(0,o.useState)(0),s=c[0],u=c[1];return(0,o.useEffect)((function(){var e,n,t,i,r,o=null===(e=window)||void 0===e?void 0:e.Snipcart,l=null===o||void 0===o||null===(n=o.store)||void 0===n?void 0:n.getState();u(null===l||void 0===l||null===(t=l.cart)||void 0===t||null===(i=t.items)||void 0===i?void 0:i.count);var a=null===o||void 0===o||null===(r=o.store)||void 0===r?void 0:r.subscribe((function(){var e,n,t,i=null===o||void 0===o||null===(e=o.store)||void 0===e?void 0:e.getState();u(null===i||void 0===i||null===(n=i.cart)||void 0===n||null===(t=n.items)||void 0===t?void 0:t.count)}));return function(){return a&&a()}}),[u]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("header",{className:j().header,children:[(0,i.jsx)("div",{children:(0,i.jsx)(r.default,{href:"/",children:(0,i.jsx)("a",{children:(0,i.jsx)("img",{alt:"logo",className:j().logo,src:"/assets/naftee_logo_mobile.png"})})})}),(0,i.jsxs)("div",{className:j().navigation,children:[(0,i.jsxs)("div",{className:j().navigationContent,children:[(0,i.jsx)(x,{headerClassName:"headerDesktop"}),(0,i.jsx)("div",{className:j().langSwitcher,children:(0,i.jsxs)("div",{className:j().btnContainer,children:[(0,i.jsx)(h,{language:"CZ"}),"/",(0,i.jsx)(h,{language:"EN"})]})}),(0,i.jsx)("div",{className:j().shoppingBasket,id:"snipcartShoppingBasket",children:(0,i.jsxs)("div",{className:"snipcart-checkout",children:[(0,i.jsx)("div",{className:" snipcartShoppingBasket",children:(0,i.jsx)(l.G,{icon:a.Ycs,color:"white"})}),(0,i.jsx)("span",{className:j().itemsCount,children:s})]})})]}),n?(0,i.jsx)("div",{className:j().burgerMenu,onClick:function(){return t(!n)},children:(0,i.jsx)(l.G,{icon:a.NBC,color:"white"})}):(0,i.jsx)("div",{className:j().burgerMenu,onClick:function(){return t(!n)},children:(0,i.jsx)(l.G,{icon:a.xiG,color:"white"})})]})]}),n&&(0,i.jsx)(x,{headerClassName:"headerMobile",setShowMenu:t,showMenu:n})]})}var g=t(8481),m=t(4227),C=t(6389),b=t(2562),Z=t(1685),N=t(4989),w=t.n(N);function y(){var e,n=(0,c.$)(),t=n.t,l=n.i18n,a=(0,d.useRouter)(),s=(0,o.useState)(""),u=s[0],h=s[1],f=(0,o.useState)(!1),v=f[0],x=f[1],p=(0,o.useState)(!0),j=p[0],_=p[1],N=(0,Z.Z)("cookies-accepted",!1),y=(0,g.Z)(N,2),S=y[0],z=y[1];return(0,o.useEffect)((function(){x(!0),(0,m.W)({query:q,variables:{locale:l.language}}
1).then((function(e){h(e)})).catch(console.error).finally((function(){return x(!1)}))}),[l.language]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("footer",{className:w().footer,children:[(0,i.jsxs)("section",{className:w().wrapper,children:[(0,i.jsxs)("ul",{className:w().contacts,children:[(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:"tel:+420776245218",children:"+420 776 245 218"})}),(0,i.jsx)("li",{children:(0,i.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"})}),(0,i.jsx)("li",{children:(0,i.jsx)("address",{children:"Czech Budweis, Czech Republic"})})]}),(0,i.jsxs)("ul",{children:[(0,i.jsxs)("li",{className:w().social,children:[(0,i.jsx)(r.default,{href:"https://www.instagram.com/nafteecoffee/",children:(0,i.jsx)("a",{className:"fa fa-instagram"})}),(0,i.jsx)(r.default,{href:"https://www.facebook.com/search/top?q=Naftee",children:(0,i.jsx)("a",{className:"fa fa-facebook"})})]}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/terms",children:(0,i.jsx)("a",{children:t("footer.termsAndConditions",{lng:"cs"===a.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/privacy",children:(0,i.jsx)("a",{children:t("footer.privacyPolicy",{lng:"cs"===a.locale?"cs_CZ":"en"})})})}),(0,i.jsx)("li",{children:(0,i.jsx)(r.default,{href:"/faq",children:(0,i.jsx)("a",{children:t("footer.frequentlyAskedQuestions",{lng:"cs"===a.locale?"cs_CZ":"en"})})})})]})]}),"(",j&&!S&&(0,i.jsx)(i.Fragment,{children:v?(0,i.jsx)(C.a,{}):(0,i.jsx)(b.Z,{title:void 0,visible:j&&!S,getContainer:!1,bodyStyle:{margin:0},onOk:function(){_(!1),z(!0)},onCancel:function(){return _(!1)},width:"100%",mask:null,maskClosable:!1,children:(0,i.jsx)("p",{children:null===u||void 0===u||null===(e=u.cookie)||void 0===e?void 0:e.text})})}),")"]})})}var q="query CookieQuery($locale: SiteLocale){\n \n  cookie(locale: $locale) {\n    text\n    id\n  }\n}",S=t(9878),z=t.n(S);function k(e){var n=e.children,t=(0,c.$)().i18n;function r(){Snipcart.api.session.setLanguage("cs_CZ"===t.language?t.language.replace("_CZ",""):t.language)}return(0,o.useEffect)((function(){return t.on("languageChanged",r),function(){t.off("languageChanged",r)}}),[t.language]),(0,i.jsxs)("div",{className:z().layoutSection,children:[(0,i.jsx)(_,{}),(0,i.jsx)("section",{className:z().layoutChildrenSection,children:n}),(0,i.jsx)(y,{})]})}},4227:function(e,n,t){"use strict";t.d(n,{W:function(){return r}});var i=t(8687);function r(e){var n=e.query,t=e.variables;return new i.GraphQLClient("https://graphql.datocms.com/",{headers:{authorization:"Bearer ".concat("dcf7c70ca6f6fb69721273dbc749b3")}}).request(n,t)}},4441:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return R},default:function(){return $}});var i=t(5893),r=t(9008),o=t(6156),l=t(5061),a=t(8481),c=t(1248),s=t(6349),u=t(9181),d=t(1577),h=t(7294),f=t(8134),v=t(1163),x=t(3459),p=t.n(x);function j(e){var n=e.onContinue,t=e.quizItemIndex,r=e.length,o=(0,v.useRouter)(),l=(0,f.$)().t;return(0,i.jsxs)("div",{className:p().navigation,children:[(0,i.jsx)(c.Z.Item,{noStyle:!0,children:(0,i.jsx)(d.Z,{onClick:function(){return o.back()},children:(0,i.jsx)("span",{children:l("quiz.quit",{lng:"cs"===o.locale?"cs_CZ":"en"})})})}),(0,i.jsxs)("div",{children:[t,"/",r]}),(0,i.jsx)(c.Z.Item,{noStyle:!0,children:(0,i.jsx)(d.Z,{onClick:n,children:l("quiz.skip",{lng:"cs"===o.locale?"cs_CZ":"en"})})})]})}var _=t(4035),g=t.n(_);function m(e){var n=e.onContinue,t=(0,f.$)().t,r=(0,v.useRouter)();return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:g().btnContainer,children:(0,i.jsx)(c.Z.Item,{children:(0,i.jsx)(d.Z,{onClick:n,type:"primary",htmlType:"submit",children:t("quiz.continue",{lng:"cs"===r.locale?"cs_CZ":"en"})})})})})}var C=t(2118),b=t.n(C);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function N(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};
1n%2?Z(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w={labelCol:{span:8},wrapperCol:{span:16}},y={wrapperCol:{offset:8,span:16}};function q(e){var n,t,r=e.onFinished,o=e.quiz,x=(0,f.$)().t,p=(0,v.useRouter)(),_=c.Z.useForm(),g=(0,a.Z)(_,1)[0],C=(0,h.useState)(0),Z=C[0],q=C[1],S=(0,h.useState)(0),z=S[0],k=S[1],F=(0,h.useRef)(null),P=(0,h.useState)([]),O=P[0],H=P[1],B=Z===o.length-1;(0,h.useEffect)((function(){var e;g.setFieldsValue({options:null===(e=o[Z])||void 0===e?void 0:e.option[0]})}),[Z]),(0,h.useEffect)((function(){var e;q(0),g.setFieldsValue({options:null===o||void 0===o||null===(e=o[0])||void 0===e?void 0:e.option[0]})}),[o]);var E=function(){var e,n,t,i,r,l,a,c,s;return"string"===typeof(null===o||void 0===o||null===(e=o[Z])||void 0===e||null===(n=e.recommendation)||void 0===n?void 0:n[z])||"number"===typeof(null===o||void 0===o||null===(t=o[Z])||void 0===t||null===(i=t.recommendation)||void 0===i?void 0:i[z])?null===o||void 0===o||null===(r=o[Z])||void 0===r||null===(l=r.recommendation)||void 0===l?void 0:l[z]:null===o||void 0===o||null===(a=o[Z])||void 0===a||null===(c=a.recommendation)||void 0===c||null===(s=c[z])||void 0===s?void 0:s.id},Q=function(){H([].concat((0,l.Z)(O),[E()])),B||q(Z+1)},M=function(){var e;return(0,i.jsx)("h1",{children:null===o||void 0===o||null===(e=o[Z])||void 0===e?void 0:e.question})};return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:b().form,children:(0,i.jsxs)(c.Z,N(N({form:g},w),{},{children:[(0,i.jsx)(j,{onContinue:Q,quizItemIndex:Z+1,length:o.length}),(0,i.jsx)(M,{}),(0,i.jsx)(c.Z.Item,{shouldUpdate:!0,name:"options",noStyle:!0,children:(0,i.jsx)(s.ZP.Group,{onChange:function(e){k(e.target.index)},children:null===o||void 0===o||null===(n=o[Z])||void 0===n||null===(t=n.option)||void 0===t?void 0:t.map((function(e,n){var t,r,l,a,c;return(0,i.jsx)("div",{className:b().radioWrapper,ref:F,id:"popoverArea".concat(n),children:null!==o&&void 0!==o&&null!==(t=o[Z])&&void 0!==t&&null!==(r=t.instruction)&&void 0!==r&&r[z]?(0,i.jsx)("div",{className:b().popover,children:(0,i.jsx)(u.Z,{placement:"right",title:void 0,content:(0,i.jsx)("p",{children:null===o||void 0===o||null===(l=o[Z])||void 0===l||null===(a=l.instruction)||void 0===a?void 0:a[z]}),trigger:["click"],getPopupContainer:function(){return document.getElementById("popoverArea".concat(n))},align:{offset:[null===F||void 0===F||null===(c=F.current)||void 0===c?void 0:c.clientWidth,0]},children:(0,i.jsx)(s.ZP,{value:e,index:n,children:e},e.id)})}):(0,i.jsx)(s.ZP,{value:e,index:n,children:e},e.id)},e)}))})}),!B&&(0,i.jsx)(m,{onContinue:Q}),B&&(0,i.jsx)(c.Z.Item,N(N({},y),{},{children:(0,i.jsx)(d.Z,{type:"primary",htmlType:"submit",onClick:function(){var e=[].concat((0,l.Z)(O),[E()]),n=e[1]===e[3]||e[3]===e[4]?e[3]:e[4];r({package:e[2],method:e[0],coffeeSort:n})},children:x("quiz.finish",{lng:"cs"===p.locale?"cs_CZ":"en"})})}))]}))})})}var S=t(4227),z=t(9683),k=t(812),F=t(5357),P=t(1492),O=t.n(P),H=t(5675),B=t(2402);function E(e){var n,t,r=e.product,o=e.method,l=e.quantity,a=(0,v.useRouter)(),c=(0,f.$)().t,s=r||{},u=s.productName,d=s.horizontalProductView,h=s.id,x=s.quantityWeight,p=s.taste,j=null===x||void 0===x||null===(n=x.productData)||void 0===n||null===(t=n.find((function(e){return(null===e||void 0===e?void 0:e.weight)===l})))||void 0===t?void 0:t.price;return(0,i.jsx)("article",{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{children:u}),d&&(0,i.jsx)(H.default,{src:null===d||void 0===d?void 0:d.url,alt:null===d||void 0===d?void 0:d.alt,width:null===d||void 0===d?void 0:d.width,height:null===d||void 0===d?void 0:d.height}),(0,i.jsxs)("p",{children:[c("quiz.sort",{lng:"cs"===a.locale?"cs_CZ":"en"}),p]}),(0,i.jsxs)("p",{children:[c("quiz.method",{lng:"cs"===a.locale?"cs_CZ":"en"}),o]}),(0,i.jsxs)("p",{children:[l,c("quiz.package",{lng:"cs"===a.locale?"cs_CZ":"en"})]}),(0,i.jsxs)("p",{children:[j," ",c("quiz.price",{lng:"cs"===a.locale?"cs_CZ":"en"})]}),(0,i.jsx)(B.U,{id:h})]})})}var Q=function(e){var n=e.product,t=e.answers;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(E,{product:n,quantity:t.package,method:t.method})})},M=t(1664),R=!0;function $(e){var n=e.quizData,t=(0,f.$)(),o=t.t,l=(t.i18n,(0,v.useRouter)()),a=(0,h.useState)(!1),c=a[0],s=a[1],u=(0,h.useState)(null),d=u[0],x=u[1],p=(0,h.useState)({method:"",package:"",coffeeSort:""}),j=p[0],_=p[1];o("quiz.method",{lng:"cs"===l.locale?"cs_CZ":"en"});var g=(0,h.useRef)(!1);(0,h.useEffect)((function(){j.coffeeSort&&(g.current||(g.current=!0,(0,S.W)({query:L,variables:{filter:{id:{eq:j.coffeeSort}},locale:"CZ"===l.locale?"cs":"en"}}).then((function(e){console.log(e.product),x(e.product),s(!0)})).catch(console.error)))}),[j.coffeeSort]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.default,{children:(0,i.jsx)("title",{children:"Qu
1iz"})}),(0,i.jsx)(F.A,{children:(0,i.jsxs)("section",{className:O().quizContainer,children:[(0,i.jsx)("h1",{className:O().mainHeadline,children:o("quiz.quiz",{lng:"cs"===l.locale?"cs_CZ":"en"})}),c?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{className:O().result,children:d&&(0,i.jsx)(z.ZP,{icon:(0,i.jsx)(k.Z,{}),title:o("quiz.headline",{lng:"cs"===l.locale?"cs_CZ":"en"}),subTitle:(0,i.jsx)(Q,{product:d,answers:j}),extra:[(0,i.jsx)(M.default,{href:"/shop/shop-list",locale:l.locale,children:(0,i.jsx)("a",{children:o("quiz.toShop",{lng:"cs"===l.locale?"cs_CZ":"en"})})})]})})}):(0,i.jsxs)("div",{className:O().quest,children:[(0,i.jsx)("h3",{className:O().invitation,children:o("quiz.instruction",{lng:"cs"===l.locale?"cs_CZ":"en"})}),(0,i.jsx)(q,{quiz:null===n||void 0===n?void 0:n.allCoffeeQuizzes,onFinished:function(e){_(e)}})]})]})})]})}var L="query ProductQuery($filter: ProductModelFilter, $locale: SiteLocale){\n  product(filter: $filter, locale:$locale) {\n    productName\n    id\n    taste\n    quantityWeight \n    horizontalProductView {\n      alt\n      id\n      url\n      title\n      width\n      height\n    }\n\n  }}"},2353:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/quiz",function(){return t(4441)}])},4989:function(e){e.exports={footer:"Footer_footer__1KW17",contacts:"Footer_contacts__37ogF",wrapper:"Footer_wrapper__3kMRE",social:"Footer_social__1aYLP"}},7918:function(e){e.exports={productButton:"GoToDetailButton_productButton__3y1GZ"}},8695:function(e){e.exports={header:"Header_header__2-XWX",logo:"Header_logo__1ZEvY",navigation:"Header_navigation__2VmyR",navigationContent:"Header_navigationContent__QZi9J",langSwitcher:"Header_langSwitcher__2wMFt",btnContainer:"Header_btnContainer__3sevf",shoppingBasket:"Header_shoppingBasket__1UhWb",burgerMenu:"Header_burgerMenu__5QFZ5",itemsCount:"Header_itemsCount__2GHOy"}},185:function(e){e.exports={headerDesktop:"HeaderContent_headerDesktop__3pzfl",langSwitcher:"HeaderContent_langSwitcher__3FnHK",btnContainer:"HeaderContent_btnContainer__1Rr-a",headerMobile:"HeaderContent_headerMobile__1j4hH"}},762:function(e){e.exports={langBtn:"LangButton_langBtn__2dzNb"}},9878:function(e){e.exports={layoutSection:"Layout_layoutSection__ZMsUa",layoutChildrenSection:"Layout_layoutChildrenSection__2R8O0"}},2283:function(e){e.exports={wrapper:"Loader_wrapper___PTTb",spanned:"Loader_spanned__y4rwH",cf:"Loader_cf__3fK5q",coffee_cup:"Loader_coffee_cup__2ZQbm",steam:"Loader_steam__552qk"}},1492:function(e){e.exports={quizContainer:"Quiz_quizContainer__1i7QM",mainHeadline:"Quiz_mainHeadline__2S5Mf",quest:"Quiz_quest__tPxOf",invitation:"Quiz_invitation__MduT5",result:"Quiz_result__2F57j"}},4035:function(e){e.exports={btnContainer:"QuizBlockBtns_btnContainer__3nPvd"}},2118:function(e){e.exports={form:"QuizForm_form__2Fg7d",radioWra
1pper:"QuizForm_radioWrapper__1PPZH"}},3459:function(e){e.exports={navigation:"QuizNavBar_navigation__2r_qE"}}},function(e){e.O(0,[774,523,351,74,248,109],(function(){return n=2353,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.