forked from kojibai/verify.kai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPShort-C5MwlKSc.js
More file actions
1 lines (1 loc) · 1.08 KB
/
Copy pathPShort-C5MwlKSc.js
File metadata and controls
1 lines (1 loc) · 1.08 KB
1
import{Tn as e,bn as t,jn as n,tn as r,xn as i,yn as a}from"./index-BlYU7j-M.js";var o=n(e(),1),s=n(r(),1);function c(e){let t=e.trim();return t=t.replace(/[)\].,;:!?]+$/g,``),t=t.replace(/^[([{"'`]+/g,``),t.trim()}function l(e){let t=c(e);if(/%[0-9A-Fa-f]{2}/.test(t))try{t=decodeURIComponent(t)}catch{}return t.includes(` `)&&(t=t.replaceAll(` `,`+`)),t=t.replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``),c(t)}function u(){let e=t(),n=a(),r=i();return(0,o.useEffect)(()=>{let t=typeof r.token==`string`?r.token:``,i=typeof r[`*`]==`string`?r[`*`]:``,a=t&&i?`${t}/${i}`:t||i,o=new URLSearchParams(n.search),s=new URLSearchParams(n.hash.startsWith(`#`)?n.hash.slice(1):n.hash),c=o.get(`t`)||o.get(`p`)||o.get(`token`)||s.get(`t`)||s.get(`p`)||s.get(`token`)||``,u=a||c;u&&e(`/p~${l(u)}`,{replace:!0})},[e,n.search,n.hash,r]),(0,s.jsxs)(`div`,{className:`notfound`,role:`region`,"aria-label":`Redirecting`,children:[(0,s.jsx)(`div`,{className:`notfound__title`,children:`Redirecting…`}),(0,s.jsx)(`div`,{className:`notfound__hint`,children:`Normalizing payload token.`})]})}export{u as default};