PageSourceSearch

https://www.komeykaya.cl/_next/static/chunks/6564-3e8231b584e125ac.js

js komeykaya.cl collected 2026-09-24 11:08:55 UTC 10,290 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6564],{84297:function(e,t,r){r.d(t,{Z:function(){return l}});var s=r(67294),a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l=(e,t)=>{let r=(0,s.forwardRef)(({color:r="currentColor",size:l=24,strokeWidth:c=2,absoluteStrokeWidth:u,children:i,...o},d)=>(0,s.createElement)("svg",{ref:d,...a,width:l,height:l,stroke:r,strokeWidth:u?24*Number(c)/Number(l):c,className:`lucide lucide-${n(e)}`,...o},[...t.map(([e,t])=>(0,s.createElement)(e,t)),...(Array.isArray(i)?i:[i])||[]]));return r.displayName=`${e}`,r}},97369:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(84297);let a=(0,s.Z)("CheckCircle2",[["path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",key:"14v8dr"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},23217:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(84297);let a=(0,s.Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},42027:function(e,t,r){r.d(t,{Z:function(){return a}});var s=r(84297);let a=(0,s.Z)("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},32680:function(e,t,r){r.d(t,{Z:function(){return v}});var s=r(67294),a=r(26628),n=r(11163),l=r(53218),c=r(19034),u=r(36512),i=r.n(u),o=r(57456),d=r(52813),m=r(63253),f=r(25381),h=r(53307),x=r(31955),y=r(82586),v=()=>{let e=(0,a.I0)(),{push:t,query:r,isReady:u}=(0,n.useRouter)(),v=x.Z.get(y.r.guestUserToken)||null,[p,N]=(0,s.useState)(x.Z.get(y.r.accessToken)||null),[C,P]=(0,s.useState)(!1),[k,j]=(0,s.useState)(!1),g=(0,s.useRef)(!1),O=(0,s.useRef)(null),b=(0,s.useRef)(null),E=u?r.magic_token:void 0,Z=(0,s.useCallback)(e=>{if(!e)return!1;let t=d.LM[e],r=t&&!t.isOnline;return r},[]),w=(0,s.useCallback)(async e=>{try{let t=await f.Z.validateMagicToken(e);if(t.ok){let e=t.data.authorization;e&&(x.Z.set(y.r.accessToken,e,{path:"/"}),N(e),P(!0));return}throw Error("Error validando magic token")}catch(e){j(!0)}},[]);(0,s.useEffect)(()=>{u&&E&&w(E)},[u,E,w]),(0,s.useEffect)(()=>{if(!u)return;let{status:s}=r,a=i().getLastOrderOnlyPay(),n=s||a&&a.paymentStatus;if(n===o.R$.COMPLETED)setTimeout(()=>{e(m.ZP.clearModals()),t((0,l.ko)(l.IQ.PURCHASE_SUCCESS.path)),e(c.default.clearCart()),e(c.default.setFutureOrderDate(null)),i().removeFutureOrderDate(),i().setLastOrderOnlyPay(null)},5e3);else if(n===o.R$.UNKNOWN){let r=async()=>{try{if(a&&a.paymentMethod){let r=Z(a.paymentMethod);r&&setTimeout(()=>{e(m.ZP.clearModals()),t((0,l.ko)(l.IQ.PURCHASE_SUCCESS.path)),e(c.default.clearCart()),e(c.default.setFutureOrderDate(null)),i().removeFutureOrderDate(),i().setLastOrderOnlyPay(null)},5e3)}}catch(r){setTimeout(()=>{e(m.ZP.clearModals()),t({pathname:(0,l.ko)(l.IQ.PURCHASE_FAILURE.path),query:{errorCode:"UNKNOWN_STATUS_CHECK_ERROR"}})},5e3)}};r()}else n===o.R$.FAILED&&setTimeout(()=>{e(m.ZP.clearModals()),t({pathname:(0,l.ko)(l.IQ.PURCHASE_FAILURE.path),query:{errorCode:r.errorCode||"PAYMENT_FAILED"}})},5e3)},[e,t,r,u,Z]),(0,s.useEffect)(()=>{if(g.current)return;if(E&&k){g.current=!0,b.current=setTimeout(()=>{t({pathname:(0,l.ko)(l.IQ.PURCHASE_FAILURE.path),query:{errorCode:"MAGIC_TOKEN_INVALID"}})},2e3);return}let r=async()=>{if(E&&!C)return;if(E&&C&&p)try{let t=await h.Z.getLastOrder(p);if(t.ok&&t.data&&(i().setLastOrderOnlyPay(t.data),t.data.uuid)){g.current=!0,O.current=setTimeout(()=>{e(c.default.confirmPayment({orderId:t.data.uuid},!0))},2e3);return}}catch(e){}let r=i().getLastOrderOnlyPay();if(r){g.current=!0,O.current=setTimeout(()=>{e(c.default.confirmPayment({orderId:r.uuid},!0))},2e3);return}if(!E&&(v||p)){g.current=!0,O.current=setTimeout(()=>{e(c.default.confirmPayment({token:v||p},!0))},2e3);return}if(!E){var s;let e=i().getLastOrderOnlyPay(),r=e&&e.paymentStatus===o.R$.UNKNOWN&&(null===(s=d.LM[e.paymentMethod])||void 0===s?void 0:s.isOnline);if(r)return;g.current=!0,b.current=setTimeout(()=>{t({pathname:(0,l.ko)(l.IQ.PURCHASE_FAILURE.path),query:{errorCode:"NO_ORDER_TO_CONFIRM"}})},2e3)}};r()},[E,C,k,v,t,e,p]),(0,s.useEffect)(()=>()=>{O.current&&clearTimeout(O.current),b.current&&clearTimeout(b.current)},[])}},56564:function(e,t,r){r.d(t,{_H:function(){return o},Dz:function(){return m},uo:function(){return x},qb:function(){return k},Dc:function(){return b}});var s=r(85893);r(34089);var a=r(26982),n=r(42027),l=r(11163),c=r(67294),u=r(74134),i=r(53218);function o(){let{push:e}=(0,l.useRouter)(),t=(0,c.useCallback)(()=>{e((0,i.ko)(i.IQ.CHECKOUT.basePath))},[e]);return(0,c.useEffect)(()=>{let e=setTimeout(t,7e3);return()=>clearTimeout(e)},[t]),(0,s.jsx)("div",{className:"flex min-h-[80vh] w-full items-center justify-center px-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,s.jsx)("div",{className:"flex h-24 w-24 items-center justify-center rounded-full bg-error-soft",children:(0,s.jsx)(n.Z,{className:"h-14 w-14 text-error"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-content",children:a.ZP.t("AddCardFailure:title")}),(0,s.jsx)("p",{className:"mt-2 max-w-sm text-base text-content-muted",children:a.ZP.t("AddCardFailure:message")})]}),(0,s.jsx)(u.z,{variant:"danger",size:"lg",onClick:t,children:a.ZP.t("AddCardFailure:button")})]})})}r(80359);var d=r(97369);function m(){let{push:e}=(0,l.useRouter)(),t=(0,c.useCallback)(()=>{e((0,i.ko)(i.IQ.CHECKOUT.basePath))},[e]);return(0,c.useEffect)(()=>{let e=setTimeout(t,7e3);return()=>clearTimeout(e)},[t]),(0,s.jsx)("div",{className:"flex min-h-[80vh] w-full items-center justify-center px-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,s.jsx)("div",{className:"flex h-24 w-24 items-center justify-center rounded-full bg-success-soft",children:(0,s.jsx)(d.Z,{className:"h-14 w-14 text-success"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-content",children:a.ZP.t("AddCardSuccess:title")}),(0,s.jsx)("p",{className:"mt-2 max-w-sm text-base text-content-muted",children:a.ZP.t("AddCardSuccess:message")})]}),(0,s.jsx)(u.z,{variant:"primary",size:"lg",onClick:t,children:"Ir al checkout"})]})})}var f=r(23217),h=r(32680);function x(){return(0,h.Z)(),(0,s.jsx)("div",{className:"flex min-h-[80vh] w-full items-center justify-center px-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,s.jsx)("div",{className:"flex h-24 w-24 items-center justify-center rounded-full bg-surface-muted",children:(0,s.jsx)(f.Z,{className:"h-12 w-12 animate-spin text-content-muted"})}),(0,s.jsx)("h1",{className:"text-xl font-bold text-secondary",children:a.ZP.t("ProcessingPurchase:title")}),(0,s.jsx)("p",{className:"max-w-sm text-center text-base text-content-muted",children:a.ZP.t("ProcessingPurchase:message")})]})})}r(70311);var y=r(26628),v=r(92852),p=r(49491),N=r(36512),C=r.n(N);let P=C();function k(){let{push:e,query:t}=(0,l.useRouter)(),r=t.errorCode,o=(0,y.v9)(e=>e.core.settings.tenant),d=(0,y.v9)(e=>{var t,r;return null===(t=e.core)||void 0===t?void 0:null===(r=t.settings)||void 0===r?void 0:r.brandPrimary}),m=(0,p.N)(d)?"":"!text-content";(0,c.useEffect)(()=>{o&&v.Z.purchaseFailureViewed({tenant:o,errorCode:r})},[]);let f=(0,c.useCallback)(()=>{let t=P.getLastOrderOnlyPay(),r=(0,i.ko)(i.IQ.CHECKOUT.basePath),s=t?"".concat(r,"?order=").concat(t.id):r;e(s),P.setLastOrderOnlyPay(null)},[e]);return(0,s.jsx)("div",{className:"flex min-h-[80vh] w-full items-center justify-center px-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,s.jsx)("div",{className:"flex h-24 w-24 items-center justify-center rounded-full bg-error-soft",children:(0,s.jsx)(n.Z,{className:"h-14 w-14 text-error"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-secondary",children:a.ZP.t("PurchaseFailure:title")}),(0,s.jsx)("p",{className:"mt-2 max-w-sm text-base text-content-muted",children:r?a.ZP.t("KushkiPaymentErrors:".concat(r)):a.ZP.t("PurchaseFailure:message")})]}),(0,s.jsx)(u.z,{variant:"primary",size:"lg",className:m,onClick:f,children:a.ZP.t("PurchaseFailure:button")})]})})}r(56419);var j=r(31089),g=r(19034);let O=C();function b(){let e=(0,y.I0)(),{push:t}=(0,l.useRouter)(),r=(0,c.useCallback)(()=>{e(g.default.setOrdersTab(j.w9.ORDERS)),t({pathname:(0,i.ko)(i.IQ.ORDERS.path),query:{fromCheckout:"1"}}),O.setLastOrderOnlyPay(null)},[e,t]);return(0,c.useEffect)(()=>{e(g.default.getActiveOrders()),e(g.default.getOrders()),e(g.default.clearCart())},[e]),(0,c.useEffect)(()=>{var e;let t=O.getLastOrderOnlyPay();if(t&&!(null===(e=t.userId)||void 0===e?void 0:e.startsWith("guest-")))return()=>{};let s=setTimeout(r,6e3);return()=>clearTimeout(s)},[r]),(0,s.jsx)("div",{className:"flex min-h-[80vh] w-full items-center justify-center px-4",children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-6",children:[(0,s.jsx)("div",{className:"flex h-24 w-24 items-center justify-center rounded-full bg-success-soft",children:(0,s.jsx)(d.Z,{className:"h-14 w-14 text-success"})}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-secondary",children:a.ZP.t("PurchaseSuccess:title")}),(0,s.jsx)("p",{className:"mt-2 max-w-sm text-base text-content-muted",children:a.ZP.t("PurchaseSuccess:message")})]}),(0,s.jsx)("button",{type:"button",onClick:r,style:{backgroundColor:"var(--brand-primary, rgb(var(--v2-surface-inverse)))"},className:"rounded-xl px-8 py-3 text-base font-semibold text-content-inverse transition-opacity hover:opacity-90",children:a.ZP.t("PurchaseSuccess:button")})]})})}},49491:function(e,t,r){r.d(t,{N:function(){return s}});function s(e){var t,r,s;if(!e)return!1;let a=e.replace(/^#/,"");if(6!==a.length||!/^[0-9a-fA-F]+$/.test(a))return!1;let n=[0,1,2].map(e=>{let t=parseInt(a.slice(2*e,2*e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}),l=.2126*(null!==(t=n[0])&&void 0!==t?t:0)+.7152*(null!==(r=n[1])&&void 0!==r?r:0)+.0722*(null!==(s=n[2])&&void 0!==s?s:0);return 1.05/(l+.05)>=4.5}}}]);

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.