1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7147,1183],{83496:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/favorite-products",function(){return n(28816)}])},17347:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(85893),i=n(9008),o=n.n(i),a=n(67294),s=n(56064),u=n(17505),c=n(11163);var l=(0,s.$j)((function(e){var t,n,r,i;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===(i=r.settings)||void 0===i?void 0:i.default_seo)||{title:"",meta_description:"",image:""}}}),(function(e){return{}}))((function(e){var t=e.base_url,n=e.default_seo,i=e.meta_title,s=e.meta_description,l=(0,c.useRouter)(),d=(0,u.b)().locale;return(0,r.jsx)(a.Fragment,{children:(0,r.jsxs)(o(),{children:[(0,r.jsx)("meta",{property:"og:type",content:"website"}),(0,r.jsx)("meta",{property:"og:title",content:null==i||void 0==i||""==i?n.title:i}),(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==i||void 0==i||""==i?n.title:i})]}),(0,r.jsx)("meta",{property:"og:locale",content:"en"==d?"en":"es_PE"}),(0,r.jsx)("meta",{property:"og:url",content:"".concat("https://rokys.com").concat(l.asPath)})]})})}));var d=(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,i=e.show_pg,s=void 0!==i&&i,c=(0,u.b)().locale,d=(0,a.useState)("en"==c?t?t.en_seo.meta_title:n.title:t?t.seo.meta_title:n.title),p=d[0],v=d[1],f=(0,a.useState)("en"==c?t?t.en_seo.meta_description:n.meta_description:t?t.seo.meta_description:n.meta_description),m=f[0],_=f[1],h=(0,a.useCallback)((function(){return void 0==t?(v(n.title),void _(n.meta_description)):"en"==c?(""==t.en_seo.meta_title?v(n.title):v(t.en_seo.meta_title),void(""==t.en_seo.meta_description?_(n.meta_description):_(t.en_seo.meta_description))):(""==t.seo.meta_title?v(n.title):v(t.seo.meta_title),void(""==t.seo.meta_description?_(n.meta_description):_(t.seo.meta_description)))}),[t,n,c]);return(0,a.useEffect)((function(){h()}),[c,h]),(0,r.jsxs)(a.Fragment,{children:[t&&(0,r.jsxs)(o(),{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)(l,{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),i=n(9008),o=n.n(i),a=n(67294),s=n(56064),u=n(4298),c=n.n(u),l=n(92242),d=n(91418),p=n(59849),v=n(11163);function f(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){f(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,i=void 0===n?{}:n,s=e.layout_structure,u=e.settings,f=(e.gtm_id,u.theme?u.theme:"base"),_=d.Z["".concat(f,"-").concat(u.layout.name)],h=(0,l.V)(u.config),g=(0,a.useState)((0,p.AR)((null===u||void 0===u?void 0:u.favicon)||"",(null===u||void 0===u?void 0:u.base_url)||"")),b=g[0],y=g[1];return(0,v.useRouter)().query,(0,a.useEffect)((function(){y((0,p.AR)((null===u||void 0===u?void 0:u.favicon)||"",(null===u||void 0===u?void 0:u.base_url)||""))}),[u]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(o(),{children:[(0,r.jsxs)("style",{children:[":root ","{".concat(h,"}")]}),(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})]}),u.general.gogle_maps_key&&(0,r.jsx)(c(),{async:!0,src:"https://maps.googleapis.com/ma
1ps/api/js?key=".concat(u.general.gogle_maps_key,"&libraries=places")}),(0,r.jsx)(_,m({},s.components,i,{children:t}))]})}))},28816:function(e,t,n){"use strict";n.r(t);var r=n(34051),i=n.n(r),o=n(85893),a=n(87625),s=n(67294),u=n(56064),c=n(68356),l=n(60984),d=n(17347),p=n(23079),v=n(31485),f=n(67398),m=n(4300),_=n(541),h=n(7882),g=n(32474);function b(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x="account_favorites_products",j=function(e){var t=e.page_structure,n=e.base_page_structure,r=e.theme,i=e.isMobileDevice,a=e.setStructure;(0,h.Rm)(),(0,h.qX)(t,x,a);return(0,o.jsxs)(s.Fragment,{children:[(0,o.jsx)(d.Z,{page:n}),t&&0!==Object.keys(t).length?(0,o.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=v.Z["".concat(a,"-").concat(n.name)];return(0,o.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){y(e,t,n[t])}))}return e}({},n,{isMobile:i,theme:r,id:e}),e)}}))}):(0,o.jsx)(s.Fragment,{children:n&&(0,o.jsx)(l.default,{name:x,type:n.page_type.title,allowed_components:n.page_type.allowed_components})})]})};j.getLayout=function(e){return(0,o.jsx)(p.Z,{config:{showLocationBar:!1},children:e})},j.getInitialProps=a.Y.getInitialPageProps((function(e){return function(){var t,n=(t=i().mark((function t(n){var r,o,a,s,u,c,l,d,p,v,f,h,b,y;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.req,o=n.res,a=n.query,o&&o.setHeader("Cache-Control","public, s-maxage=10, stale-while-revalidate=59"),t.next=5,(0,m.I)(e,r,o);case 5:return t.next=7,(0,_.dF)(e,r,o);case 7:return null!=(f=e.getState()).auth.user&&void 0!=f.auth.user||(0,g.uX)("/auth",r,o),h=(null===f||void 0===f||null===(s=f.cartProducts)||void 0===s||null===(u=s.shipping_method)||void 0===u?void 0:u.store_id)||(null===f||void 0===f||null===(c=f.globalVariables)||void 0===c?void 0:c.storeId)||-1,t.next=12,(0,g.df)(e,r,x,!0,h.toString(),a);case 12:if(b=(null===(l=e.getState())||void 0===l||null===(d=l.initServices)||void 0===d||null===(p=d.structure)||void 0===p||null===(v=p.layout)||void 0===v?void 0:v.pages)||[],void 0!=(y=b.find((function(e){return e.name==x})))&&0!=(null===y||void 0===y?void 0:y.status)&&null!=(null===y||void 0===y?void 0:y.status)&&void 0!=(null===y||void 0===y?void 0:y.status)){t.next=17;break}return(0,g.uX)("/notfound404",r,o),t.abrupt("return",{});case 17:1==(null===y||void 0===y?void 0:y.status_seo)&&void 0!=o?o.setHeader("X-Robots-Tag","all"):0!=(null===y||void 0===y?void 0:y.status_seo)&&null!=(null===y||void 0===y?void 0:y.status_seo)&&void 0!=(null===y||void 0===y?void 0:y.status_seo)||void 0==o||o.setHeader("X-Robots-Tag","none");case 18:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(e){b(o,r,i,a,s,"next",e)}function s(e){b(o,r,i,a,s,"throw",e)}a(void 0)}))});return function(e){return n.apply(this,arguments)}}()}));t.default=(0,u.$j)((function(e){var t=e.initServices.structure.layout.pages;return{isMobileDevice:e.globalVariables.isMobileDevice,page_structure:e.initServices.structure[x],base_page_structure:t.find((function(e){return e.name==x})),theme:e.initServices.settings.theme}}),(function(e){return{setStructure:(0,c.DE)(f.A,e)}}))(j)},91418:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(5152);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=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){i(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=o},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),i=n.n(r),o=n(47041),a=n(91084),s=n(5676),u=n(39602),c=n(30081),l=n(83497),d=n(87476),p=n(
155704),v=n(37235),f=n(87465),m=n(74438);function _(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){_(o,r,i,a,s,"next",e)}function s(e){_(o,r,i,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=h(i().mark((function e(t,n,r){var _,g,b,y,x,j,w;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_=(0,f.j)(n),g=function(){var e=h(i().mark((function e(s){var f,m,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.dispatch((0,u.o4)(_.token)),t.dispatch((0,u.zI)(_.refresh_token)),t.dispatch((0,u.ZY)(_.expiredAt)),t.dispatch((0,u.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,o.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,_.token);case 9:(f=e.sent).data.status?(m=f.data.data,h=(0,l._F)(m.products||[]),t.dispatch((0,c.FP)(m.id,m.time_stored,m.type,h,(0,d.L_)(m.shipping_method?m.shipping_method:void 0),(0,p.O)((null===m||void 0===m?void 0:m.coupons)||[]))),h.length,m.shipping_method&&m.shipping_method.store&&(t.dispatch((0,v.QH)(m.shipping_method.store.cluster_id)),t.dis
1patch((0,v.PQ)(m.shipping_method.store.t2k_id))),t.dispatch((0,v.VO)())):x(f.data.data),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(6),x(e.t0);case 17:t.dispatch((0,v.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,c.SF)(!1)),(0,o.removeCookies)("token",{req:n,res:r}),(0,o.removeCookies)("refresh_token",{req:n,res:r}),(0,o.removeCookies)("expiredAt",{req:n,res:r}),(0,o.removeCookies)("cartId",{req:n,res:r}),t.dispatch((0,v.VO)())},y=function(e){if((0,m.zj)(e.time_stored))(0,o.removeCookies)("cartId",{req:n,res:r});else{var i=(0,l._F)(e.products);t.dispatch((0,c.FP)(e.id,e.time_stored,e.type,i,(0,d.L_)(e.shipping_method?e.shipping_method:void 0),(0,p.O)((null===e||void 0===e?void 0:e.coupons)||[]))),i.length,e.shipping_method&&e.shipping_method.store&&(t.dispatch((0,v.QH)(e.shipping_method.store.cluster_id)),t.dispatch((0,v.PQ)(e.shipping_method.store.t2k_id))),t.dispatch((0,v.VO)())}},x=function(e){t.dispatch((0,c.SF)(!1)),t.dispatch((0,v.VO)()),(0,o.removeCookies)("cartId",{req:n,res:r})},!_.token){e.next=20;break}if(e.prev=6,t.getState().auth.user){e.next=13;break}return e.next=10,(0,s.Mg)(_.token);case 10:return j=e.sent,e.next=13,g(j.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(!_.cartId){e.next=34;break}return e.prev=21,e.next=24,(0,a.BN)(_.cartId,null);case 24:(w=e.sent).data.status||x(w.data.data),y(w.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,c.SF)(!1));case 35:t.dispatch((0,v.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 o}});var r=n(67294),i=n(29347);function o(e){var t=(0,r.useContext)(i.ZP);if(!t)throw new Error("Missing <CookiesProvider>");var n=t.getAll(),o=(0,r.useState)(n),a=o[0],s=o[1],u=(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,i=e;r<i.length;r++){var o=i[r];if(t[o]!==n[o])return!0}return!1})(e||null,n,u.current)&&s(n),u.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 i=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=i}},function(e){e.O(0,[5716,6098,2423,7882,9977,656,984,9774,2888,179],(function(){return t=83496,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.