1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8249,1183],{82358:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout/[order_id]/fpay",function(){return n(11365)}])},17347:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(85893),o=n(9008),i=n.n(o),a=n(67294),s=n(56064),c=n(17505),u=n(11163);var d=(0,s.$j)((function(e){var t,n,r,o;return{base_url:(null===e||void 0===e||null===(t=e.initServices)||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.base_url)||"",default_seo:(null===e||void 0===e||null===(r=e.initServices)||void 0===r||null===(o=r.settings)||void 0===o?void 0:o.default_seo)||{title:"",meta_description:"",image:""}}}),(function(e){return{}}))((function(e){var t=e.base_url,n=e.default_seo,o=e.meta_title,s=e.meta_description,d=(0,u.useRouter)(),l=(0,c.b)().locale;return(0,r.jsx)(a.Fragment,{children:(0,r.jsxs)(i(),{children:[(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:title",content:null==o||void 0==o||""==o?n.title:o}),(0,r.jsx)("meta",{property:"og:description",content:null==s||void 0==s||""==s?n.meta_description:s}),""!=t&&""!=n.image&&(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("meta",{property:"og:image",content:t+"/"+n.image}),(0,r.jsx)("meta",{property:"og:image:alt",content:null==o||void 0==o||""==o?n.title:o})]}),(0,r.jsx)("meta",{property:"og:locale",content:"en"==l?"en":"es_PE"}),(0,r.jsx)("meta",{property:"og:url",content:"".concat("https://rokys.com").concat(d.asPath)})]})})}));var l=(0,s.$j)((function(e){var t,n;return{default_seo:(null===e||void 0===e||null===(t=e.initServices)||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.default_seo)||{title:"",meta_description:"",image:""}}}),(function(e){return{}}))((function(e){var t=e.page,n=e.default_seo,o=e.show_pg,s=void 0!==o&&o,u=(0,c.b)().locale,l=(0,a.useState)("en"==u?t?t.en_seo.meta_title:n.title:t?t.seo.meta_title:n.title),p=l[0],f=l[1],v=(0,a.useState)("en"==u?t?t.en_seo.meta_description:n.meta_description:t?t.seo.meta_description:n.meta_description),m=v[0],h=v[1],_=(0,a.useCallback)((function(){return void 0==t?(f(n.title),void h(n.meta_description)):"en"==u?(""==t.en_seo.meta_title?f(n.title):f(t.en_seo.meta_title),void(""==t.en_seo.meta_description?h(n.meta_description):h(t.en_seo.meta_description))):(""==t.seo.meta_title?f(n.title):f(t.seo.meta_title),void(""==t.seo.meta_description?h(n.meta_description):h(t.seo.meta_description)))}),[t,n,u]);return(0,a.useEffect)((function(){_()}),[u,_]),(0,r.jsxs)(a.Fragment,{children:[t&&(0,r.jsxs)(i(),{children:[(0,r.jsx)("title",{children:p}),(0,r.jsx)("meta",{name:"description",content:m}),1==t.status_seo&&(0,r.jsx)("meta",{name:"robots",content:"all"}),(0==t.status_seo||null==t.status_seo||void 0==t.status_seo)&&(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("meta",{name:"robots",content:"none"}),(0,r.jsx)("meta",{name:"googlebot",content:"noindex, nofollow"})]})]}),s&&(0,r.jsx)(d,{meta_title:p,meta_description:m})]})}))},17505:function(e,t,n){"use strict";n.d(t,{b:function(){return r.b}});var r=n(95719);n(67294)},23079:function(e,t,n){"use strict";var r=n(85893),o=n(9008),i=n.n(o),a=n(67294),s=n(56064),c=n(4298),u=n.n(c),d=n(92242),l=n(91418),p=n(59849),f=n(11163);function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){v(e,t,n[t])}))}return e}t.Z=(0,s.$j)((function(e){var t,n,r;return{layout_structure:e.initServices.structure.layout,settings:e.initServices.settings,gtm_id:(null===e||void 0===e||null===(t=e.initServices)||void 0===t||null===(n=t.settings)||void 0===n||null===(r=n.gtm)||void 0===r?void 0:r.gtm_id)||null}}))((function(e){var t=e.children,n=e.config,o=void 0===n?{}:n,s=e.layout_structure,c=e.settings,v=(e.gtm_id,c.theme?c.theme:"base"),h=l.Z["".concat(v,"-").concat(c.layout.name)],_=(0,d.V)(c.config),g=(0,a.useState)((0,p.AR)((null===c||void 0===c?void 0:c.favicon)||"",(null===c||void 0===c?void 0:c.base_url)||"")),b=g[0],y=g[1];return(0,f.useRouter)().query,(0,a.useEffect)((function(){y((0,p.AR)((null===c||void 0===c?void 0:c.favicon)||"",(null===c||void 0===c?void 0:c.base_url)||""))}),[c]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i(),{children:[(0,r.jsxs)("style",{children:[":root ","{".concat(_,"}")]}),(0,r.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"}),(0,r.jsx)("link",{rel:"shortcut icon",href:b})]}),c.general.gogle_maps_key&&(0,r.jsx)(u(),{async:!0,src:"https://maps.googleapis.com/ma
1ps/api/js?key=".concat(c.general.gogle_maps_key,"&libraries=places")}),(0,r.jsx)(h,m({},s.components,o,{children:t}))]})}))},11365:function(e,t,n){"use strict";n.r(t);var r=n(34051),o=n.n(r),i=n(85893),a=n(87625),s=n(67294),c=n(56064),u=n(68356),d=n(60984),l=n(17347),p=n(23079),f=n(31485),v=n(72235),m=n(67398),h=n(4300),_=n(541),g=n(7882),b=n(32474);function y(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,o)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k="fpay",j=function(e){var t=e.page_structure,n=e.base_page_structure,r=e.theme,o=e.isMobileDevice,a=e.setStructure;(0,g.Rm)(),(0,g.qX)(t,k,a);return(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)(l.Z,{page:n}),(0,i.jsx)(p.Z,{config:{isCheckout:!0,showFooter:!1},children:t&&0!==Object.keys(t).length?(0,i.jsx)(s.Fragment,{children:t.order.map((function(e){var n=t.components[e];if(n&&1==n.is_visible){var a=r||"base",s=f.Z["".concat(a,"-").concat(n.name)];return(0,i.jsx)(s,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}({page_tag:k},n,{isMobile:o,theme:r,id:e}),e)}}))}):(0,i.jsx)(s.Fragment,{children:n&&(0,i.jsx)(d.default,{name:k,type:n.page_type.title,allowed_components:n.page_type.allowed_components})})})]})};j.getInitialProps=a.Y.getInitialPageProps((function(e){return function(){var t,n=(t=o().mark((function t(n){var r,i,a,s,c,u,d,l,p,f,m,g,y,x,j,w,O,S,E;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.req,i=n.res,a=n.query,i&&i.setHeader("Cache-Control","public, s-maxage=10, stale-while-revalidate=59"),t.next=4,(0,h.I)(e,r,i);case 4:return(s=null===a||void 0===a?void 0:a.order_id)||(0,b.uX)("/",r,i),t.prev=6,t.next=9,(0,v.Jc)(s);case 9:if(c=t.sent,u=c.data,"fpay"==(d=u.data).payment_method){t.next=17;break}(0,b.uX)("/",r,i),t.next=30;break;case 17:return e.dispatch({type:"SET_ORDER",order:d}
1),t.next=21,(0,_.dF)(e,r,i);case 21:return O=(null===(l=e.getState())||void 0===l||null===(p=l.cartProducts)||void 0===p||null===(f=p.shipping_method)||void 0===f?void 0:f.store_id)||(null===(m=e.getState())||void 0===m||null===(g=m.globalVariables)||void 0===g?void 0:g.storeId)||-1,t.next=24,(0,b.df)(e,r,k,!0,O.toString(),a);case 24:if(S=(null===(y=e.getState())||void 0===y||null===(x=y.initServices)||void 0===x||null===(j=x.structure)||void 0===j||null===(w=j.layout)||void 0===w?void 0:w.pages)||[],void 0!=(E=S.find((function(e){return e.name==k})))&&0!=(null===E||void 0===E?void 0:E.status)&&null!=(null===E||void 0===E?void 0:E.status)&&void 0!=(null===E||void 0===E?void 0:E.status)){t.next=29;break}return(0,b.uX)("/notfound404",r,i),t.abrupt("return",{});case 29:1==(null===E||void 0===E?void 0:E.status_seo)&&void 0!=i?i.setHeader("X-Robots-Tag","all"):0!=(null===E||void 0===E?void 0:E.status_seo)&&null!=(null===E||void 0===E?void 0:E.status_seo)&&void 0!=(null===E||void 0===E?void 0:E.status_seo)||void 0==i||i.setHeader("X-Robots-Tag","none");case 30:t.next=35;break;case 32:t.prev=32,t.t0=t.catch(6),(0,b.uX)("/",r,i);case 35:case"end":return t.stop()}}),t,null,[[6,32]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}()}));t.default=(0,c.$j)((function(e){var t=e.initServices.structure.layout.pages;return{page_structure:e.initServices.structure.fpay,base_page_structure:t.find((function(e){return e.name==k})),orderShow:e.currentOrder.order,isMobileDevice:e.globalVariables.isMobileDevice,theme:e.initServices.settings.theme,global_settings:e.initServices.settings}}),(function(e){return{setStructure:(0,u.DE)(m.A,e)}}))(j)},91418:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(5152);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){o(e,t,n[t])}))}return e}({},{"rokys-DefaultLayout":n.n(r)()((function(){return Promise.all([n.e(5675),n.e(9722)]).then(n.bind(n,29722))}),{loadableGenerated:{webpack:function(){return[29722]}}})}),a=i},72235:function(e,t,n){"use strict";n.d(t,{Jc:function(){return u},S6:function(){return v},YV:function(){return c},co:function(){return p},cu:function(){return l},pB:function(){return f},uD:function(){return d}});var r=n(6280),o=n.n(r),i=n(32103);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){a(e,t,n[t])}))}return e}var c=function(e,t,n){var r={method:"post",url:"/order/create",data:{data:(0,i.VI)(JSON.stringify(s({},e,{recaptcha_token:n})))}};return t&&(r.headers={Authorization:t?"Bearer ".concat(t):"","Content-Type":"application/json"}),o()(r)},u=function(e){var t={method:"get",url:"/order/audit/".concat(e)};return o()(t)},d=function(e,t,n){var r={method:"post",maxBodyLength:1/0,url:"/order/customer/check-document",headers:{"Content-Type":"application/json"},data:JSON.stringify({type:e,document:t,recaptcha_token:n})};return o()(r)},l=function(e,t,n){var r={method:"get",url:"/order/list",headers:{Authorization:"Bearer ".concat(n)}};o()(r).then((function(n){n.data.status||t(n.data.data),e(n.data.data)})).catch((function(e){t(e.response.data)}))},p=function(e,t,n,r){var i={method:"get",url:"/order/".concat(r),headers:{Authorization:"Bearer ".concat(n)}};o()(i).then((function(n){n.data.status||t(n.data.data),e(n.data.data)})).catch((function(e){t(e.response.data)}))},f=function(e){var t={method:"get",url:"/order/search/".concat(e)};return o()(t)},v=function(e){var t={method:"get",url:"/order/search/".concat(e,"/tracking-history")};return o()(t)}},541:function(e,t,n){"use strict";n.d(t,{Aj:function(){return g},SO:function(){return b},dF:function(){return y}});var r=n(34051),o=n.n(r),i=n(47041),a=n(91084),s=n(5676),c=n(39602),u=n(30081),d=n(83497),l=n(87476),p=n(
155704),f=n(37235),v=n(87465),m=n(74438);function h(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,o)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,s,"next",e)}function s(e){h(i,r,o,a,s,"throw",e)}a(void 0)}))}}var g=function(e,t){t.token&&(e("token",t.token,{path:"/",expires:new Date(t.expire)}),e("refresh_token",t.refresh_token,{path:"/",expires:new Date(t.expire)}),e("expiredAt",t.expire,{path:"/",expires:new Date(t.expire)}),e("cartId",t.cart.id,{path:"/",expires:new Date(t.cart.time_stored)}))},b=function(e,t){e({type:"SAVE_USER",user:null}),e({type:"REMOVE_CART",cartId:null,time_stored:null,cart_type:null,products:[],proposed_products:[],coupons:[]}),e({type:"SAVE_TOKEN",token:null}),e({type:"SAVE_REFRESH_TOKEN",token:null}),e({type:"SAVE_REFRESH_TOKEN",token:null}),e({type:"SAVE_EXPIRED_AT",user:null}),e({type:"SAVE_ADDRESS",address_list:null}),t("token"),t("refresh_token"),t("expiredAt"),t("cartId")},y=function(){var e=_(o().mark((function e(t,n,r){var h,g,b,y,x,k,j;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h=(0,v.j)(n),g=function(){var e=_(o().mark((function e(s){var v,m,_;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.dispatch((0,c.o4)(h.token)),t.dispatch((0,c.zI)(h.refresh_token)),t.dispatch((0,c.ZY)(h.expiredAt)),t.dispatch((0,c.av)({id:s.id,name:s.name,lastname:s.lastname,phone:s.phone,country:s.country,email:s.email,identification_number:s.identification_number,identification_type:s.identification_type,birthday:s.birthday,affiliated:s.affiliatedSocial,received_promotions_and_discounts:s.received_promotions_and_discounts,favorite_products_ids:(null===s||void 0===s?void 0:s.favorite_products_ids)||[],image:(null===s||void 0===s?void 0:s.image)||null})),!s.cart){e.next=17;break}return(0,i.setCookie)("cartId",s.cart.id,{req:n,res:r,path:"/",expires:new Date(s.cart.time_stored)}),e.prev=6,e.next=9,(0,a.BN)(s.cart.id,h.token);case 9:(v=e.sent).data.status?(m=v.data.data,_=(0,d._F)(m.products||[]),t.dispatch((0,u.FP)(m.id,m.time_stored,m.type,_,(0,l.L_)(m.shipping_method?m.shipping_method:void 0),(0,p.O)((null===m||void 0===m?void 0:m.coupons)||[]))),_.length,m.shipping_method&&m.shipping_method.store&&(t.dispatch((0,f.QH)(m.shipping_method.store.cluster_id)),t.dis
1patch((0,f.PQ)(m.shipping_method.store.t2k_id))),t.dispatch((0,f.VO)())):x(v.data.data),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(6),x(e.t0);case 17:t.dispatch((0,f.VO)());case 18:case"end":return e.stop()}}),e,null,[[6,13]])})));return function(t){return e.apply(this,arguments)}}(),b=function(e){t.dispatch((0,u.SF)(!1)),(0,i.removeCookies)("token",{req:n,res:r}),(0,i.removeCookies)("refresh_token",{req:n,res:r}),(0,i.removeCookies)("expiredAt",{req:n,res:r}),(0,i.removeCookies)("cartId",{req:n,res:r}),t.dispatch((0,f.VO)())},y=function(e){if((0,m.zj)(e.time_stored))(0,i.removeCookies)("cartId",{req:n,res:r});else{var o=(0,d._F)(e.products);t.dispatch((0,u.FP)(e.id,e.time_stored,e.type,o,(0,l.L_)(e.shipping_method?e.shipping_method:void 0),(0,p.O)((null===e||void 0===e?void 0:e.coupons)||[]))),o.length,e.shipping_method&&e.shipping_method.store&&(t.dispatch((0,f.QH)(e.shipping_method.store.cluster_id)),t.dispatch((0,f.PQ)(e.shipping_method.store.t2k_id))),t.dispatch((0,f.VO)())}},x=function(e){t.dispatch((0,u.SF)(!1)),t.dispatch((0,f.VO)()),(0,i.removeCookies)("cartId",{req:n,res:r})},!h.token){e.next=20;break}if(e.prev=6,t.getState().auth.user){e.next=13;break}return e.next=10,(0,s.Mg)(h.token);case 10:return k=e.sent,e.next=13,g(k.data.data);case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(6),b(e.t0);case 18:e.next=35;break;case 20:if(!h.cartId){e.next=34;break}return e.prev=21,e.next=24,(0,a.BN)(h.cartId,null);case 24:(j=e.sent).data.status||x(j.data.data),y(j.data.data),e.next=32;break;case 29:e.prev=29,e.t1=e.catch(21),x(e.t1);case 32:e.next=35;break;case 34:t.dispatch((0,u.SF)(!1));case 35:t.dispatch((0,f.VO)());case 36:case"end":return e.stop()}}),e,null,[[6,15],[21,29]])})));return function(t,n,r){return e.apply(this,arguments)}}()},4298:function(e,t,n){e.exports=n(63573)},10708:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294),o=n(29347);function i(e){var t=(0,r.useContext)(o.ZP);if(!t)throw new Error("Missing <CookiesProvider>");var n=t.getAll(),i=(0,r.useState)(n),a=i[0],s=i[1],c=(0,r.useRef)(a);return"undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement&&(0,r.useLayoutEffect)((function(){function n(){var n=t.getAll();(function(e,t,n){if(!e)return!0;for(var r=0,o=e;r<o.length;r++){var i=o[r];if(t[i]!==n[i])return!0}return!1})(e||null,n,c.current)&&s(n),c.current=n}return t.addChangeListener(n),function(){t.removeChangeListener(n)}}),[t]),[a,(0,r.useMemo)((function(){return t.set.bind(t)}),[t]),(0,r.useMemo)((function(){return t.remove.bind(t)}),[t])]}},51183:function(e,t,n){"use strict";var r=n(67294);const o=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));t.Z=o}},function(e){e.O(0,[5716,6098,2423,7882,9977,656,984,9774,2888,179],(function(){return t=82358,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.