PageSourceSearch

https://mobig.mx/build/assets/ConsultaCurp-Dt7-ciHZ.js

js mobig.mx collected 2026-10-02 22:34:07 UTC 7,169 bytes, 6 lines download raw bytes

1import{r as l,j as e}from"./app-C9nm_a_f.js";import{B as S}from"./BaseLayout-DzeKnvOq.js";import{B as E}from"./Button-D7lFmnIy.js";import"./app-Bz1QbZCQ.js";import"./FloatingAlert-D3uk_N0H.js";import"./clientFlashStore-ooQFrdsc.js";import"./FlashAlert-B8YS-RUi.js";import"./Icons-e_poaYtE.js";import"./Footer-BPA7SEXD.js";import"./paypal-js-c7UYulfR.js";import"./LoginController-B83tSgMb.js";import"./Navbar-BdhTRaWC.js";import"./ClientProfileController-CqmbE1T5.js";import"./NavbarItems-BzRuGEQb.js";function k(a){return a.trim().toUpperCase()}const P=/^[A-Z][AEIOUX][A-Z]{2}\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])[HM][A-Z]{2}[B-DF-HJ-NP-TV-Z]{3}[A-Z0-9]\d$/;function Z(a){const s=a.toUpperCase();if(s.length===13){const r=s.slice(0,4),o=s.slice(4,10),i=s.slice(10,13);return/^[A-ZÑ&]{4}$/.test(r)&&/^\d{6}$/.test(o)&&/^[A-Z0-9]{3}$/.test(i)}if(s.length===12){const r=s.slice(0,3),o=s.slice(3,9),i=s.slice(9,12);return/^[A-ZÑ&]{3}$/.test(r)&&/^\d{6}$/.test(o)&&/^[A-Z0-9]{3}$/.test(i)}return!1}function _(a){return a.length===18?"curp":a.length===12||a.length===13?"rfc":null}function B(){return document.querySelector('meta[name="csrf-token"]')?.getAttribute("content")??""}const U=({title:a="Consultar líneas vinculadas"})=>{const[s,r]=l.useState(""),[o,i]=l.useState(""),[m,N]=l.useState(!1),[h,f]=l.useState(null),[d,y]=l.useState("input"),[j,C]=l.useState(null),t=l.useMemo(()=>k(s),[s]),u=l.useMemo(()=>_(t),[t]),F=l.useMemo(()=>u==="curp"&&t.length===18&&P.test(t),[u,t]),w=l.useMemo(()=>u==="rfc"&&Z(t),[u,t]),x=F||w,g=()=>{y("input"),f(null),C(null)};l.useEffect(()=>{d==="result"&&t!==o&&g()},[s,d,t,o]);const A=async()=>{if(!(!x||m)){N(!0),f(null);try{const n=F?{curp:t}:{rfc:t},p=await fetch("/vinculacion/search-msisdns",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":B()},credentials:"same-origin",body:JSON.stringify(n)}),c=await p.json().catch(()=>null);if(!p.ok)throw new Error(c?.message??"Error al consultar");const b=Array.isArray(c?.data?.last_digits)?c.data.last_digits.map(String):[],v=c?.messages??c?.message??(b.length?"Estos son los números vinculados.":"No se encontraron números vinculados.");C({last_digits:b,numbers:b,message:Array.isArray(v)?String(v[0]??""):String(v)}),i(t),y("result")}catch{f("Ocurrió un error al consultar. Intenta nuevamente."),g()}finally{N(!1)}}},R=()=>{g(),i(""),r("")};return e.jsx("section",{id:"curp-lookup",className:"py-8 sm:py-12",children:e.jsx("div",{className:"mx-auto px-4 sm:px-6",children:e.jsx("div",{className:"mx-auto flex justify-center",children:e.jsxs("div",{className:["relative overflow-hidden rounded-lg border border-slate-200/60 bg-white","shadow-[0_10px_30px_rgba(15,23,42,0.12)]","transition-all duration-300 ease-out","flex flex-col","w-full max-w-130 sm:w-130","min-h-0","max-h-[78dvh] sm:max-h-110","scale-[0.98]"].join(" "),children:[e.jsxs("div",{className:"relative shrink-0 bg-[#FFF5F8] px-4 py-4 sm:px-8",children:[e.jsx("h2",{className:"text-center text-lg font-extrabold text-[#505050] sm:text-xl",children:d==="result"&&t?"Resultado":e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sm:hidden",children:"Consultar vinculación"}),e.jsx("span",{className:"hidden sm:inline",children:a})]})}),e.jsx("img",{src:"/img/icons/Icon_vinculacion.svg",alt:"Consulta CURP",className:"absolute top-1 -ml-4 h-22 w-22 rounded-full"})]}),e.jsx("div",{className:"relative min-h-0 flex-1",children:d==="input"?e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-8",children:e.jsxs("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[e.jsxs("div",{className:"mt-8.5 w-full",children:[e.jsx("input",{id:"curp",
1name:"curp",maxLength:18,value:s,onChange:n=>{const p=n.target.value.replace(/[^a-zA-Z0-9Ñ&]/g,"").toUpperCase();r(p)},placeholder:"Ingresa tu CURP o RFC",className:["w-full rounded-lg bg-[#F2F2F2] ring-0 outline-none","px-4 py-3 sm:py-4","text-base font-medium text-slate-700 sm:text-lg","placeholder:text-slate-400"].join(" ")}),h?e.jsx("div",{className:"mt-2 text-sm font-medium text-red-600",children:h}):null,!h&&s.length>0&&!x?e.jsx("div",{className:"mt-2 text-xs font-semibold text-slate-500",children:"Verifica el formato."}):null]}),e.jsx("p",{className:"mt-4 max-w-md text-sm text-[#6B7280] sm:text-base",children:"Al continuar consultaremos los números vinculados."}),e.jsx("p",{className:"max-w-md text-sm font-bold text-[#6B7280] sm:text-xs",children:"*CURP para personas físicas."}),e.jsx("p",{className:"mb-2 max-w-md text-sm font-bold text-[#6B7280] sm:text-xs",children:"*RFC para personas morales."})]})}),e.jsx("div",{className:"mt-auto shrink-0 bg-[#FFF5F8] px-4 py-5 sm:px-8 sm:py-6",children:e.jsx(E,{type:"button",onClick:A,disabled:!x||m,className:["h-12 w-full rounded-full font-extrabold transition","text-base","active:scale-[0.99]",!x||m?"cursor-not-allowed":"active:scale-[0.99]","disabled:hover:opacity-50 disabled:active:scale-100"].join(" "),children:m?"Consultando...":"Continuar"})})]}):e.jsx("div",{className:"h-full min-h-0 animate-[rechargePop_.25s_ease-out]",children:e.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[e.jsx("div",{className:"min-h-0 flex-1 px-4 sm:px-8",children:e.jsxs("div",{className:"flex h-full min-h-0 flex-col text-center",children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("p",{className:"text-sm font-semibold text-[#505050] sm:text-base",children:j?.message??"Sin mensaje"})}),e.jsx("div",{className:"mt-4 mb-2 min-h-0 w-full flex-1 overflow-y-auto",children:j?.numbers?.length?e.jsxs("div",{className:"mx-auto max-w-md rounded-lg bg-[#F2F2F2] p-4 text-left",children:[e.jsx("p",{className:"mb-2 text-xs font-extrabold text-slate-600",children:"Números vinculados:"}),e.jsx("ul",{className:"space-y-2",children:j.numbers.map(n=>e.jsxs("li",{className:"flex items-center justify-between rounded-md bg-white px-3 py-2 text-sm font-bold text-slate-700",children:[e.jsx("span",{children:`** **** ${n}`}),e.jsx("span",{className:"text-xs font-semibold text-slate-400",children:"Vinculado"})]},n))})]}):e.jsx("div",{className:"mx-auto max-w-md rounded-lg bg-[#F2F2F2] p-4",children:e.jsx("p",{className:"text-sm font-bold text-slate-600",children:"No hay números vinculados."})})})]})}),e.jsx("div",{className:"mt-auto shrink-0 bg-[#FFF5F8] px-4 py-5 sm:px-8 sm:py-6",children:e.jsx("div",{className:"flex flex-col gap-3",children:e.jsx("button",{type:"button",onClick:R,className:["h-12 w-full rounded-full font-extrabold transition","text-base","border border-[#EA6682]/40 bg-white text-[#EA6682]","hover:bg-white/90 active:scale-[0.99]"].join(" "),children:"Consultar otra CURP o RFC"})})})]})})}),e.jsx("style",{children:`
2                            @keyframes rechargePop {
3                                from { transform: scale(.98); opacity: 0; }
4                                to   { transform: scale(1); opacity: 1; }
5                            }
6                        `})]})})})})};function W(){return e.jsx(S,{children:e.jsx(U,{})})}export{W as 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.