feat: inisialisasi project kit v2
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Handle X-XSRF-Token Header
|
||||
RewriteCond %{HTTP:x-xsrf-token} .
|
||||
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{c as e,o as t,t as n}from"./app-BJ7g6sa8.js";e();var r=n();function i({ability:e,children:n,fallback:i=null}){let{permissions:a}=t().props.auth;return(Array.isArray(e)?e:[e]).some(e=>a.includes(e))?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{children:i})}export{i as t};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{a as e,c as t,d as n,n as r,t as i}from"./app-BJ7g6sa8.js";var a=n(t(),1),o=i();function s(){let[t,n]=(0,a.useState)(!1),{data:i,setData:s,post:c,processing:l,errors:u}=e({code:``});return(0,o.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-4`,children:[(0,o.jsx)(r,{title:`Two-Factor Authentication`}),(0,o.jsxs)(`div`,{className:`w-full max-w-sm`,children:[(0,o.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,o.jsx)(`div`,{className:`inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-[#3D4E4B] mb-4`,children:(0,o.jsx)(`svg`,{className:`w-7 h-7 text-[#D4A017]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,o.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z`})})}),(0,o.jsx)(`h1`,{className:`text-xl font-black text-[#3D4E4B] tracking-tight`,children:`Two-Factor Authentication`}),(0,o.jsx)(`p`,{className:`text-sm text-gray-500 font-medium mt-1`,children:t?`Enter a recovery code to continue`:`Enter the 6-digit code from your authenticator app`})]}),(0,o.jsxs)(`div`,{className:`bg-white rounded-2xl shadow-sm border border-gray-100 p-8`,children:[(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`two-factor.verify`),{preserveScroll:!0})},className:`space-y-5`,children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{className:`block text-xs font-bold text-gray-500 uppercase tracking-widest mb-2`,children:t?`Recovery Code`:`Authentication Code`}),(0,o.jsx)(`input`,{type:`text`,inputMode:t?`text`:`numeric`,maxLength:t?21:6,value:i.code,onChange:e=>s(`code`,e.target.value),autoFocus:!0,className:`w-full h-12 border rounded-xl px-4 text-center font-mono font-bold text-lg tracking-[0.4em] outline-none transition-all
|
||||
${u.code?`border-red-300 bg-red-50`:`border-gray-200 focus:border-[#3D4E4B] focus:ring-2 focus:ring-[#3D4E4B]/10`}`,placeholder:t?`xxxxxxxxxx-xxxxxxxxxx`:`000000`}),u.code&&(0,o.jsx)(`p`,{className:`text-xs text-red-500 font-semibold mt-1.5`,children:u.code})]}),(0,o.jsx)(`button`,{type:`submit`,disabled:l||i.code.length<(t?5:6),className:`w-full h-11 bg-[#3D4E4B] text-white text-sm font-bold rounded-xl hover:bg-[#2D3A38] transition-all disabled:opacity-60`,children:l?`Verifying...`:`Continue`})]}),(0,o.jsx)(`div`,{className:`mt-6 text-center`,children:(0,o.jsx)(`button`,{onClick:()=>{n(!t),s(`code`,``)},className:`text-xs font-bold text-[#3D4E4B] hover:underline`,children:t?`Use authenticator code instead`:`Use a recovery code`})})]}),(0,o.jsx)(`div`,{className:`mt-6 text-center`,children:(0,o.jsx)(`a`,{href:`/login`,className:`text-xs font-semibold text-gray-400 hover:text-[#3D4E4B]`,children:`← Back to login`})})]})]})}export{s as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,n,t as r}from"./app-BJ7g6sa8.js";import{t as i}from"./GuestLayout-CN-YY0cs.js";t();var a=r();function o(){let{data:t,setData:r,post:o,processing:s,errors:c,reset:l}=e({password:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Confirm password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,a.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,a.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z`})})}),(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Confirm your password`}),(0,a.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`For your security, please confirm your password to continue.`})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o(route(`password.confirm`),{onFinish:()=>l(`password`)})},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`current-password`,autoFocus:!0,value:t.password,onChange:e=>r(`password`,e.target.value),placeholder:`••••••••`,className:`auth-input${c.password?` !border-red-300 !bg-red-50/50`:``}`}),c.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:c.password})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:s,className:`mt-6 w-full h-11 rounded-xl bg-[#3D4E4B] hover:bg-[#2D3A38] text-white text-sm font-bold tracking-tight transition-colors duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed`,children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Confirming…`]}):`Confirm password`})]})]})}export{o as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{c as e,n as t,r as n,t as r}from"./app-BJ7g6sa8.js";e();var i=r(),a={403:{title:`Access Denied`,description:`You don't have permission to access this resource.`},404:{title:`Page Not Found`,description:`The page you're looking for doesn't exist or has been moved.`},419:{title:`Session Expired`,description:`Your session has expired. Please refresh and try again.`},500:{title:`Server Error`,description:`Something went wrong on our end. Please try again later.`},503:{title:`Under Maintenance`,description:`The system is temporarily unavailable. Please check back soon.`}};function o({status:e}){let{title:r,description:o}=a[e]??{title:`Unexpected Error`,description:`An unexpected error occurred.`};return(0,i.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] flex items-center justify-center p-6`,children:[(0,i.jsx)(t,{title:`${e} — ${r}`}),(0,i.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,i.jsxs)(`div`,{className:`bg-white rounded-3xl border border-gray-100 shadow-sm overflow-hidden`,children:[(0,i.jsxs)(`div`,{className:`bg-[#3D4E4B] px-8 py-10 text-center`,children:[(0,i.jsx)(`div`,{className:`text-7xl font-black text-white/10 tracking-tighter leading-none select-none`,children:e}),(0,i.jsx)(`div`,{className:`mt-2 text-xl font-bold text-white tracking-tight`,children:r})]}),(0,i.jsxs)(`div`,{className:`px-8 py-8 text-center space-y-6`,children:[(0,i.jsx)(`p`,{className:`text-sm font-semibold text-gray-400 leading-relaxed`,children:o}),(0,i.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 justify-center`,children:[e===419?(0,i.jsxs)(`button`,{onClick:()=>window.location.reload(),className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15`})}),`Refresh Page`]}):(0,i.jsxs)(n,{href:`/dashboard`,className:`h-10 px-6 bg-[#3D4E4B] text-white text-sm font-bold tracking-tight rounded-xl hover:bg-[#2D3A38] transition-all flex items-center justify-center gap-2`,children:[(0,i.jsx)(`svg`,{className:`w-4 h-4`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6`})}),`Back to Dashboard`]}),(0,i.jsx)(`button`,{onClick:()=>window.history.back(),className:`h-10 px-6 bg-white border border-gray-100 text-gray-500 text-sm font-bold tracking-tight rounded-xl hover:bg-gray-50 transition-all`,children:`Go Back`})]})]})]}),(0,i.jsxs)(`p`,{className:`text-center text-xs font-bold text-gray-400 uppercase tracking-widest mt-6`,children:[`Error `,e]})]})]})}export{o as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,n,r,t as i}from"./app-BJ7g6sa8.js";import{t as a}from"./GuestLayout-CN-YY0cs.js";t();var o=i();function s({status:t}){let{data:i,setData:s,post:c,processing:l,errors:u}=e({email:``});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Forgot password`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Forgot password?`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:`Enter your email and we'll send a reset link.`})]}),t&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:t}),(0,o.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.email`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{htmlFor:`email`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Email address`}),(0,o.jsx)(`input`,{id:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,value:i.email,onChange:e=>s(`email`,e.target.value),placeholder:`you@company.com`,className:`auth-input${u.email?` !border-red-300 !bg-red-50/50`:``}`}),u.email&&(0,o.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.email})]}),(0,o.jsx)(`button`,{type:`submit`,disabled:l,className:`mt-6 w-full h-11 rounded-xl bg-[#3D4E4B] hover:bg-[#2D3A38] text-white text-sm font-bold tracking-tight transition-colors duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed`,children:l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Send reset link`})]}),(0,o.jsx)(`p`,{className:`mt-7 text-center text-sm text-gray-400 font-medium anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`login`),className:`text-[#3D4E4B] font-semibold hover:text-[#D4A017] transition-colors duration-200`,children:`← Back to sign in`})})]})}export{s as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{c as e,o as t,r as n,t as r}from"./app-BJ7g6sa8.js";e();var i=r();function a({children:e}){let{system_settings:r}=t().props,a=r?.app_name||`biiproject kit v2`,o=r?.app_logo,s=r?.app_logo_text||`BK`;return(0,i.jsxs)(`div`,{className:`min-h-screen flex font-sans`,children:[(0,i.jsxs)(`div`,{className:`hidden lg:flex lg:w-[44%] bg-[#3D4E4B] flex-col justify-between p-14 relative overflow-hidden shrink-0`,children:[(0,i.jsxs)(`svg`,{className:`absolute inset-0 w-full h-full pointer-events-none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,i.jsx)(`defs`,{children:(0,i.jsx)(`pattern`,{id:`dots`,x:`0`,y:`0`,width:`28`,height:`28`,patternUnits:`userSpaceOnUse`,children:(0,i.jsx)(`circle`,{cx:`1.5`,cy:`1.5`,r:`1.5`,fill:`white`,fillOpacity:`0.07`})})}),(0,i.jsx)(`rect`,{width:`100%`,height:`100%`,fill:`url(#dots)`})]}),(0,i.jsx)(`div`,{className:`absolute -bottom-40 -right-40 w-[480px] h-[480px] rounded-full border border-white/[0.06] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute -bottom-64 -right-64 w-[700px] h-[700px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`absolute top-[-60px] left-[-60px] w-[300px] h-[300px] rounded-full border border-white/[0.04] pointer-events-none`}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-3 group`,children:[(0,i.jsx)(`div`,{className:`w-10 h-10 rounded-[0.75rem] flex items-center justify-center overflow-hidden text-sm font-bold text-white shrink-0 ${o?`bg-white/10`:`bg-[#D4A017]`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-white font-bold text-base tracking-tight`,children:a})]})}),(0,i.jsxs)(`div`,{className:`relative z-10 anim-up`,style:{animationDelay:`0.1s`},children:[(0,i.jsx)(`p`,{className:`text-[#D4A017] text-xs font-bold uppercase tracking-[0.18em] mb-5`,children:`Enterprise Platform`}),(0,i.jsxs)(`h2`,{className:`text-white text-[2rem] font-bold leading-[1.2] tracking-tight`,children:[`Manage your`,(0,i.jsx)(`br`,{}),`organization`,(0,i.jsx)(`br`,{}),`with precision.`]}),(0,i.jsx)(`p`,{className:`mt-5 text-[#E3EBE8]/45 text-sm leading-relaxed max-w-xs`,children:`Access control, user management, and system configuration — unified in one secure interface.`}),(0,i.jsx)(`div`,{className:`mt-9 flex flex-col gap-3`,children:[`Role-based access control`,`Real-time audit logs`,`Multi-level permissions`].map(e=>(0,i.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,i.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full bg-[#D4A017] shrink-0`}),(0,i.jsx)(`span`,{className:`text-[#E3EBE8]/55 text-sm font-medium`,children:e})]},e))})]}),(0,i.jsx)(`div`,{className:`relative z-10 anim-fade`,style:{animationDelay:`0.2s`},children:(0,i.jsxs)(`p`,{className:`text-[#E3EBE8]/25 text-xs`,children:[`© `,new Date().getFullYear(),` `,a,`. All rights reserved.`]})})]}),(0,i.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center bg-white px-8 py-12 min-h-screen`,children:[(0,i.jsxs)(`div`,{className:`lg:hidden mb-10 flex items-center gap-3 anim-down`,children:[(0,i.jsx)(`div`,{className:`w-9 h-9 rounded-[0.6rem] flex items-center justify-center text-sm font-bold overflow-hidden ${o?``:`bg-[#3D4E4B] text-white`}`,children:o?(0,i.jsx)(`img`,{src:o,alt:a,className:`w-full h-full object-contain`}):s}),(0,i.jsx)(`span`,{className:`text-[#3D4E4B] font-bold text-base tracking-tight`,children:a})]}),(0,i.jsx)(`div`,{className:`w-full max-w-[360px]`,children:e}),(0,i.jsx)(`div`,{className:`mt-10 anim-fade`,style:{animationDelay:`0.35s`},children:(0,i.jsxs)(n,{href:`/`,className:`inline-flex items-center gap-1.5 text-xs font-semibold text-gray-300 hover:text-[#3D4E4B] transition-colors duration-200 tracking-tight`,children:[(0,i.jsx)(`svg`,{className:`w-3.5 h-3.5`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,i.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M10 19l-7-7m0 0l7-7m-7 7h18`})}),`Back to home`]})})]})]})}export{a as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{d as e,s as t}from"./app-BJ7g6sa8.js";var n=e(t(),1);function r({children:e}){return(0,n.createPortal)(e,document.body)}export{r as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as e}from"./app-BJ7g6sa8.js";var t=e();function n({className:e=``,disabled:n,children:r,...i}){return(0,t.jsx)(`button`,{...i,className:`inline-flex items-center rounded-md border border-transparent bg-gray-800 px-4 py-2 text-xs font-bold tracking-tight text-white transition duration-150 ease-in-out hover:bg-gray-700 focus:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 active:bg-gray-900 ${n&&`opacity-25`} `+e,disabled:n,children:r})}export{n as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,n,t as r}from"./app-BJ7g6sa8.js";import{t as i}from"./GuestLayout-CN-YY0cs.js";t();var a=r();function o({token:t,email:r}){let{data:o,setData:s,post:c,processing:l,errors:u,reset:d}=e({token:t,email:r,password:``,password_confirmation:``});return(0,a.jsxs)(i,{children:[(0,a.jsx)(n,{title:`Reset password`}),(0,a.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,a.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Set new password`}),(0,a.jsxs)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium`,children:[`Choose a strong password for `,(0,a.jsx)(`span`,{className:`text-[#3D4E4B] font-semibold`,children:r}),`.`]})]}),(0,a.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(route(`password.store`),{onFinish:()=>d(`password`,`password_confirmation`)})},className:`space-y-4 anim-up`,style:{animationDelay:`0.1s`},children:[(0,a.jsx)(`input`,{type:`hidden`,value:o.email}),(0,a.jsx)(`input`,{type:`hidden`,value:o.token}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`New password`}),(0,a.jsx)(`input`,{id:`password`,type:`password`,autoComplete:`new-password`,autoFocus:!0,value:o.password,onChange:e=>s(`password`,e.target.value),placeholder:`Min. 8 characters`,className:`auth-input${u.password?` !border-red-300 !bg-red-50/50`:``}`}),u.password&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`label`,{htmlFor:`password_confirmation`,className:`block text-sm font-semibold text-gray-600 mb-1.5`,children:`Confirm new password`}),(0,a.jsx)(`input`,{id:`password_confirmation`,type:`password`,autoComplete:`new-password`,value:o.password_confirmation,onChange:e=>s(`password_confirmation`,e.target.value),placeholder:`••••••••`,className:`auth-input${u.password_confirmation?` !border-red-300 !bg-red-50/50`:``}`}),u.password_confirmation&&(0,a.jsx)(`p`,{className:`mt-1.5 text-xs font-semibold text-red-500`,children:u.password_confirmation})]}),(0,a.jsx)(`button`,{type:`submit`,disabled:l,className:`mt-2 w-full h-11 rounded-xl bg-[#3D4E4B] hover:bg-[#2D3A38] text-white text-sm font-bold tracking-tight transition-colors duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed`,children:l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,a.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,a.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Saving…`]}):`Reset password`})]})]})}export{o as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,d as n,t as r}from"./app-BJ7g6sa8.js";import{C as i,S as a,n as o,t as s}from"./TextInput-DV7QeRn3.js";import{t as c}from"./PrimaryButton-KeVcwQeg.js";var l=n(t(),1),u=r();function d({className:t=``}){let n=(0,l.useRef)(),r=(0,l.useRef)(),{data:d,setData:f,errors:p,put:m,reset:h,processing:g,recentlySuccessful:_}=e({current_password:``,password:``,password_confirmation:``});return(0,u.jsxs)(`section`,{className:t,children:[(0,u.jsxs)(`header`,{children:[(0,u.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Update Password`}),(0,u.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Ensure your account is using a long, random password to stay secure.`})]}),(0,u.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),m(route(`password.update`),{preserveScroll:!0,onSuccess:()=>h(),onError:e=>{e.password&&(h(`password`,`password_confirmation`),n.current.focus()),e.current_password&&(h(`current_password`),r.current.focus())}})},className:`mt-6 space-y-6`,children:[(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`current_password`,value:`Current Password`}),(0,u.jsx)(s,{id:`current_password`,ref:r,value:d.current_password,onChange:e=>f(`current_password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`current-password`}),(0,u.jsx)(i,{message:p.current_password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password`,value:`New Password`}),(0,u.jsx)(s,{id:`password`,ref:n,value:d.password,onChange:e=>f(`password`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password,className:`mt-2`})]}),(0,u.jsxs)(`div`,{children:[(0,u.jsx)(a,{htmlFor:`password_confirmation`,value:`Confirm Password`}),(0,u.jsx)(s,{id:`password_confirmation`,value:d.password_confirmation,onChange:e=>f(`password_confirmation`,e.target.value),type:`password`,className:`mt-1 block w-full`,autoComplete:`new-password`}),(0,u.jsx)(i,{message:p.password_confirmation,className:`mt-2`})]}),(0,u.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,u.jsx)(c,{disabled:g,children:`Save`}),(0,u.jsx)(o,{show:_,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,u.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{d as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,o as t,r as n,t as r}from"./app-BJ7g6sa8.js";import{C as i,S as a,n as o,t as s}from"./TextInput-DV7QeRn3.js";import{t as c}from"./PrimaryButton-KeVcwQeg.js";var l=r();function u({mustVerifyEmail:r,status:u,className:d=``}){let f=t().props.auth.user,{data:p,setData:m,patch:h,errors:g,processing:_,recentlySuccessful:v}=e({name:f.name,email:f.email});return(0,l.jsxs)(`section`,{className:d,children:[(0,l.jsxs)(`header`,{children:[(0,l.jsx)(`h2`,{className:`text-lg font-medium text-gray-900`,children:`Profile Information`}),(0,l.jsx)(`p`,{className:`mt-1 text-sm text-gray-600`,children:`Update your account's profile information and email address.`})]}),(0,l.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),h(route(`profile.update`))},className:`mt-6 space-y-6`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`name`,value:`Name`}),(0,l.jsx)(s,{id:`name`,className:`mt-1 block w-full`,value:p.name,onChange:e=>m(`name`,e.target.value),required:!0,isFocused:!0,autoComplete:`name`}),(0,l.jsx)(i,{className:`mt-2`,message:g.name})]}),(0,l.jsxs)(`div`,{children:[(0,l.jsx)(a,{htmlFor:`email`,value:`Email`}),(0,l.jsx)(s,{id:`email`,type:`email`,className:`mt-1 block w-full`,value:p.email,onChange:e=>m(`email`,e.target.value),required:!0,autoComplete:`username`}),(0,l.jsx)(i,{className:`mt-2`,message:g.email})]}),r&&f.email_verified_at===null&&(0,l.jsxs)(`div`,{children:[(0,l.jsxs)(`p`,{className:`mt-2 text-sm text-gray-800`,children:[`Your email address is unverified.`,(0,l.jsx)(n,{href:route(`verification.send`),method:`post`,as:`button`,className:`rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2`,children:`Click here to re-send the verification email.`})]}),u===`verification-link-sent`&&(0,l.jsx)(`div`,{className:`mt-2 text-sm font-medium text-green-600`,children:`A new verification link has been sent to your email address.`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,l.jsx)(c,{disabled:_,children:`Save`}),(0,l.jsx)(o,{show:v,enter:`transition ease-in-out`,enterFrom:`opacity-0`,leave:`transition ease-in-out`,leaveTo:`opacity-0`,children:(0,l.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Saved.`})})]})]})]})}export{u as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,c as t,n,r,t as i}from"./app-BJ7g6sa8.js";import{t as a}from"./GuestLayout-CN-YY0cs.js";t();var o=i();function s({status:t}){let{post:i,processing:s}=e({});return(0,o.jsxs)(a,{children:[(0,o.jsx)(n,{title:`Verify email`}),(0,o.jsxs)(`div`,{className:`mb-8 anim-down`,children:[(0,o.jsx)(`div`,{className:`w-12 h-12 bg-[#3D4E4B]/5 rounded-2xl flex items-center justify-center mb-6`,children:(0,o.jsx)(`svg`,{className:`w-5 h-5 text-[#3D4E4B]`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,o.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})})}),(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-[#1A2421] tracking-tight`,children:`Check your email`}),(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-gray-400 font-medium leading-relaxed`,children:`We sent a verification link to your email address. Click the link to activate your account.`})]}),t===`verification-link-sent`&&(0,o.jsx)(`div`,{className:`mb-6 px-4 py-3 rounded-xl bg-emerald-50 border border-emerald-100 text-sm font-semibold text-emerald-700 anim-fade`,children:`A new verification link has been sent to your email.`}),(0,o.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),i(route(`verification.send`))},className:`anim-up`,style:{animationDelay:`0.1s`},children:(0,o.jsx)(`button`,{type:`submit`,disabled:s,className:`w-full h-11 rounded-xl bg-[#3D4E4B] hover:bg-[#2D3A38] text-white text-sm font-bold tracking-tight transition-colors duration-200 flex items-center justify-center gap-2 disabled:opacity-60 disabled:cursor-not-allowed`,children:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(`svg`,{className:`w-4 h-4 animate-spin text-white/60`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,o.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,o.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z`})]}),`Sending…`]}):`Resend verification email`})}),(0,o.jsx)(`div`,{className:`mt-5 text-center anim-fade`,style:{animationDelay:`0.18s`},children:(0,o.jsx)(r,{href:route(`logout`),method:`post`,as:`button`,className:`text-sm font-semibold text-gray-400 hover:text-[#3D4E4B] transition-colors duration-200`,children:`Sign out`})})]})}export{s as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{c as e,n as t,t as n}from"./app-BJ7g6sa8.js";e();var r=n();function i({auth:e}){return(0,r.jsxs)(`div`,{className:`min-h-screen bg-[#E3EBE8] text-[#3D4E4B] font-sans`,children:[(0,r.jsx)(t,{title:`Xxx`}),(0,r.jsxs)(`div`,{className:`max-w-7xl mx-auto px-6 py-12`,children:[(0,r.jsx)(`h1`,{className:`text-3xl font-bold mb-8`,children:`Xxx Page`}),(0,r.jsx)(`div`,{className:`bg-white rounded-lg shadow-sm p-6`,children:(0,r.jsx)(`p`,{children:`This is the new xxx page content.`})})]})]})}export{i as default};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,369 @@
|
||||
{
|
||||
"_AuthenticatedLayout-CrB9BCoI.js": {
|
||||
"file": "assets/AuthenticatedLayout-CrB9BCoI.js",
|
||||
"name": "AuthenticatedLayout",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_Can-DIOq7dyw.js": {
|
||||
"file": "assets/Can-DIOq7dyw.js",
|
||||
"name": "Can",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_GuestLayout-CN-YY0cs.js": {
|
||||
"file": "assets/GuestLayout-CN-YY0cs.js",
|
||||
"name": "GuestLayout",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_Portal-DJbp1s68.js": {
|
||||
"file": "assets/Portal-DJbp1s68.js",
|
||||
"name": "Portal",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_PrimaryButton-KeVcwQeg.js": {
|
||||
"file": "assets/PrimaryButton-KeVcwQeg.js",
|
||||
"name": "PrimaryButton",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_TextInput-DV7QeRn3.js": {
|
||||
"file": "assets/TextInput-DV7QeRn3.js",
|
||||
"name": "TextInput",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_filepond-plugin-file-validate-type-CBUe71W_.js": {
|
||||
"file": "assets/filepond-plugin-file-validate-type-CBUe71W_.js",
|
||||
"name": "filepond-plugin-file-validate-type",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
],
|
||||
"css": [
|
||||
"assets/filepond-plugin-file-validate-type-CEtEkCs1.css"
|
||||
]
|
||||
},
|
||||
"_filepond-plugin-file-validate-type-CEtEkCs1.css": {
|
||||
"file": "assets/filepond-plugin-file-validate-type-CEtEkCs1.css",
|
||||
"src": "_filepond-plugin-file-validate-type-CEtEkCs1.css"
|
||||
},
|
||||
"_lodash-ZrZcSXd_.js": {
|
||||
"file": "assets/lodash-ZrZcSXd_.js",
|
||||
"name": "lodash",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"_swal-DZXjpqDE.js": {
|
||||
"file": "assets/swal-DZXjpqDE.js",
|
||||
"name": "swal",
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
],
|
||||
"css": [
|
||||
"assets/swal-DtpL8WXZ.css"
|
||||
]
|
||||
},
|
||||
"_swal-DtpL8WXZ.css": {
|
||||
"file": "assets/swal-DtpL8WXZ.css",
|
||||
"src": "_swal-DtpL8WXZ.css"
|
||||
},
|
||||
"resources/js/Pages/ActivityLogs/Index.tsx": {
|
||||
"file": "assets/Index-Cm49_1vz.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/ActivityLogs/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_lodash-ZrZcSXd_.js",
|
||||
"_Portal-DJbp1s68.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ConfirmPassword.tsx": {
|
||||
"file": "assets/ConfirmPassword-Ducw29r7.js",
|
||||
"name": "ConfirmPassword",
|
||||
"src": "resources/js/Pages/Auth/ConfirmPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ForgotPassword.tsx": {
|
||||
"file": "assets/ForgotPassword-BmQrO4Bp.js",
|
||||
"name": "ForgotPassword",
|
||||
"src": "resources/js/Pages/Auth/ForgotPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/Login.tsx": {
|
||||
"file": "assets/Login-DUDEFmAx.js",
|
||||
"name": "Login",
|
||||
"src": "resources/js/Pages/Auth/Login.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/Register.tsx": {
|
||||
"file": "assets/Register-BscYc22x.js",
|
||||
"name": "Register",
|
||||
"src": "resources/js/Pages/Auth/Register.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/ResetPassword.tsx": {
|
||||
"file": "assets/ResetPassword-BTTfjVJh.js",
|
||||
"name": "ResetPassword",
|
||||
"src": "resources/js/Pages/Auth/ResetPassword.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Auth/VerifyEmail.tsx": {
|
||||
"file": "assets/VerifyEmail-rqxgUqlx.js",
|
||||
"name": "VerifyEmail",
|
||||
"src": "resources/js/Pages/Auth/VerifyEmail.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_GuestLayout-CN-YY0cs.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Dashboard.tsx": {
|
||||
"file": "assets/Dashboard-DZOwY3RZ.js",
|
||||
"name": "Dashboard",
|
||||
"src": "resources/js/Pages/Dashboard.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Docs/Index.tsx": {
|
||||
"file": "assets/Index-CgghpLIe.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Docs/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Errors/Error.tsx": {
|
||||
"file": "assets/Error-rwcY_Rc-.js",
|
||||
"name": "Error",
|
||||
"src": "resources/js/Pages/Errors/Error.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Notifications/Index.tsx": {
|
||||
"file": "assets/Index-DLpY0zj1.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Notifications/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Edit.tsx": {
|
||||
"file": "assets/Edit-BCh5fCTK.js",
|
||||
"name": "Edit",
|
||||
"src": "resources/js/Pages/Profile/Edit.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CBUe71W_.js",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/DeleteUserForm.tsx": {
|
||||
"file": "assets/DeleteUserForm-DLkG3tvo.js",
|
||||
"name": "DeleteUserForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/DeleteUserForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-DV7QeRn3.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/UpdatePasswordForm.tsx": {
|
||||
"file": "assets/UpdatePasswordForm-DXZy5eGn.js",
|
||||
"name": "UpdatePasswordForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/UpdatePasswordForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-DV7QeRn3.js",
|
||||
"_PrimaryButton-KeVcwQeg.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.tsx": {
|
||||
"file": "assets/UpdateProfileInformationForm-CZPCM5rZ.js",
|
||||
"name": "UpdateProfileInformationForm",
|
||||
"src": "resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_TextInput-DV7QeRn3.js",
|
||||
"_PrimaryButton-KeVcwQeg.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Roles/Index.tsx": {
|
||||
"file": "assets/Index-Bnf5l0xj.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Roles/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_Can-DIOq7dyw.js",
|
||||
"_Portal-DJbp1s68.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Settings/Index.tsx": {
|
||||
"file": "assets/Index-z4H1ItiM.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Settings/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CBUe71W_.js",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/SystemSettings/Index.tsx": {
|
||||
"file": "assets/Index-A9YntmU6.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/SystemSettings/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_filepond-plugin-file-validate-type-CBUe71W_.js",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/TwoFactor/Challenge.tsx": {
|
||||
"file": "assets/Challenge-DaBnX94x.js",
|
||||
"name": "Challenge",
|
||||
"src": "resources/js/Pages/TwoFactor/Challenge.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/TwoFactor/Setup.tsx": {
|
||||
"file": "assets/Setup-ZspLG92f.js",
|
||||
"name": "Setup",
|
||||
"src": "resources/js/Pages/TwoFactor/Setup.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Users/Index.tsx": {
|
||||
"file": "assets/Index-cmCbZg8n.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/Pages/Users/Index.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_lodash-ZrZcSXd_.js",
|
||||
"_swal-DZXjpqDE.js",
|
||||
"_Can-DIOq7dyw.js",
|
||||
"_Portal-DJbp1s68.js",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Users/Show.tsx": {
|
||||
"file": "assets/Show-lMRyP8VR.js",
|
||||
"name": "Show",
|
||||
"src": "resources/js/Pages/Users/Show.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx",
|
||||
"_AuthenticatedLayout-CrB9BCoI.js"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Welcome.tsx": {
|
||||
"file": "assets/Welcome-CDP6Hme4.js",
|
||||
"name": "Welcome",
|
||||
"src": "resources/js/Pages/Welcome.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"resources/js/Pages/Xxx.tsx": {
|
||||
"file": "assets/Xxx-CagXuP8t.js",
|
||||
"name": "Xxx",
|
||||
"src": "resources/js/Pages/Xxx.tsx",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.tsx"
|
||||
]
|
||||
},
|
||||
"resources/js/app.tsx": {
|
||||
"file": "assets/app-BJ7g6sa8.js",
|
||||
"name": "app",
|
||||
"src": "resources/js/app.tsx",
|
||||
"isEntry": true,
|
||||
"dynamicImports": [
|
||||
"resources/js/Pages/ActivityLogs/Index.tsx",
|
||||
"resources/js/Pages/Auth/ConfirmPassword.tsx",
|
||||
"resources/js/Pages/Auth/ForgotPassword.tsx",
|
||||
"resources/js/Pages/Auth/Login.tsx",
|
||||
"resources/js/Pages/Auth/Register.tsx",
|
||||
"resources/js/Pages/Auth/ResetPassword.tsx",
|
||||
"resources/js/Pages/Auth/VerifyEmail.tsx",
|
||||
"resources/js/Pages/Dashboard.tsx",
|
||||
"resources/js/Pages/Docs/Index.tsx",
|
||||
"resources/js/Pages/Errors/Error.tsx",
|
||||
"resources/js/Pages/Notifications/Index.tsx",
|
||||
"resources/js/Pages/Profile/Edit.tsx",
|
||||
"resources/js/Pages/Profile/Partials/DeleteUserForm.tsx",
|
||||
"resources/js/Pages/Profile/Partials/UpdatePasswordForm.tsx",
|
||||
"resources/js/Pages/Profile/Partials/UpdateProfileInformationForm.tsx",
|
||||
"resources/js/Pages/Roles/Index.tsx",
|
||||
"resources/js/Pages/Settings/Index.tsx",
|
||||
"resources/js/Pages/SystemSettings/Index.tsx",
|
||||
"resources/js/Pages/TwoFactor/Challenge.tsx",
|
||||
"resources/js/Pages/TwoFactor/Setup.tsx",
|
||||
"resources/js/Pages/Users/Index.tsx",
|
||||
"resources/js/Pages/Users/Show.tsx",
|
||||
"resources/js/Pages/Welcome.tsx",
|
||||
"resources/js/Pages/Xxx.tsx"
|
||||
],
|
||||
"css": [
|
||||
"assets/app-Bu4ihmu3.css"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
// Determine if the application is in maintenance mode...
|
||||
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
||||
require $maintenance;
|
||||
}
|
||||
|
||||
// Register the Composer autoloader...
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
// Bootstrap Laravel and handle the request...
|
||||
/** @var Application $app */
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
|
||||
$app->handleRequest(Request::capture());
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/var/www/html/storage/app/public
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
/* Copied from https://github.com/slatedocs/slate/blob/c4b4c0b8f83e891ca9fab6bbe9a1a88d5fe41292/stylesheets/print.css and unminified */
|
||||
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
menu,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block
|
||||
}
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
progress,
|
||||
video {
|
||||
display: inline-block;
|
||||
vertical-align: baseline
|
||||
}
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0
|
||||
}
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none
|
||||
}
|
||||
|
||||
a {
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0
|
||||
}
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 1em 40px
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
margin: 0
|
||||
}
|
||||
|
||||
button {
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none
|
||||
}
|
||||
|
||||
button,
|
||||
html input[type="button"],
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
input {
|
||||
line-height: normal
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
input[type="number"]::-webkit-inner-spin-button,
|
||||
input[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
box-sizing: content-box
|
||||
}
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em
|
||||
}
|
||||
|
||||
legend {
|
||||
border: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto
|
||||
}
|
||||
|
||||
optgroup {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.content h1,
|
||||
.content h2,
|
||||
.content h3,
|
||||
.content h4,
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 14px
|
||||
}
|
||||
|
||||
.content h1,
|
||||
.content h2,
|
||||
.content h3,
|
||||
.content h4 {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.content pre,
|
||||
.content code {
|
||||
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
|
||||
font-size: 12px;
|
||||
line-height: 1.5
|
||||
}
|
||||
|
||||
.content pre,
|
||||
.content code {
|
||||
word-break: break-all;
|
||||
-webkit-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
hyphens: auto
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'slate';
|
||||
src: url(../fonts/slate.eot?-syv14m);
|
||||
src: url(../fonts/slate.eot?#iefix-syv14m) format("embedded-opentype"), url(../fonts/slate.woff2?-syv14m) format("woff2"), url(../fonts/slate.woff?-syv14m) format("woff"), url(../fonts/slate.ttf?-syv14m) format("truetype"), url(../fonts/slate.svg?-syv14m#slate) format("svg");
|
||||
font-weight: normal;
|
||||
font-style: normal
|
||||
}
|
||||
|
||||
.content aside.warning:before,
|
||||
.content aside.notice:before,
|
||||
.content aside.success:before {
|
||||
font-family: 'slate';
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1
|
||||
}
|
||||
|
||||
.content aside.warning:before {
|
||||
content: "\e600"
|
||||
}
|
||||
|
||||
.content aside.notice:before {
|
||||
content: "\e602"
|
||||
}
|
||||
|
||||
.content aside.success:before {
|
||||
content: "\e606"
|
||||
}
|
||||
|
||||
.tocify,
|
||||
.toc-footer,
|
||||
.lang-selector,
|
||||
.search,
|
||||
#nav-button {
|
||||
display: none
|
||||
}
|
||||
|
||||
.tocify-wrapper>img {
|
||||
margin: 0 auto;
|
||||
display: block
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.content pre,
|
||||
.content code {
|
||||
border: 1px solid #999;
|
||||
border-radius: 5px;
|
||||
font-size: 0.8em
|
||||
}
|
||||
|
||||
.content pre code {
|
||||
border: 0
|
||||
}
|
||||
|
||||
.content pre {
|
||||
padding: 1.3em
|
||||
}
|
||||
|
||||
.content code {
|
||||
padding: 0.2em
|
||||
}
|
||||
|
||||
.content table {
|
||||
border: 1px solid #999
|
||||
}
|
||||
|
||||
.content table tr {
|
||||
border-bottom: 1px solid #999
|
||||
}
|
||||
|
||||
.content table td,
|
||||
.content table th {
|
||||
padding: 0.7em
|
||||
}
|
||||
|
||||
.content p {
|
||||
line-height: 1.5
|
||||
}
|
||||
|
||||
.content a {
|
||||
text-decoration: none;
|
||||
color: #000
|
||||
}
|
||||
|
||||
.content h1 {
|
||||
font-size: 2.5em;
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 21px;
|
||||
border: 2px solid #ccc;
|
||||
border-width: 2px 0;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.content h2 {
|
||||
font-size: 1.8em;
|
||||
margin-top: 2em;
|
||||
border-top: 2px solid #ccc;
|
||||
padding-top: 0.8em
|
||||
}
|
||||
|
||||
.content h1+h2,
|
||||
.content h1+div+h2 {
|
||||
border-top: none;
|
||||
padding-top: 0;
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.content h3,
|
||||
.content h4 {
|
||||
font-size: 0.8em;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0.8em;
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
.content h5,
|
||||
.content h6 {
|
||||
text-transform: uppercase
|
||||
}
|
||||
|
||||
.content aside {
|
||||
padding: 1em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
line-height: 1.6
|
||||
}
|
||||
|
||||
.content aside:before {
|
||||
vertical-align: middle;
|
||||
padding-right: 0.5em;
|
||||
font-size: 14px
|
||||
}
|
||||
+1094
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
|
After Width: | Height: | Size: 96 B |
+149
@@ -0,0 +1,149 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const updateHash = function (id) {
|
||||
window.location.hash = `#${id}`;
|
||||
};
|
||||
|
||||
const navButton = document.getElementById('nav-button');
|
||||
const menuWrapper = document.querySelector('.tocify-wrapper');
|
||||
function toggleSidebar(event) {
|
||||
event.preventDefault();
|
||||
if (menuWrapper) {
|
||||
menuWrapper.classList.toggle('open');
|
||||
navButton.classList.toggle('open');
|
||||
}
|
||||
}
|
||||
function closeSidebar() {
|
||||
if (menuWrapper) {
|
||||
menuWrapper.classList.remove('open');
|
||||
navButton.classList.remove('open');
|
||||
}
|
||||
}
|
||||
navButton.addEventListener('click', toggleSidebar);
|
||||
|
||||
window.hljs.highlightAll();
|
||||
|
||||
const wrapper = document.getElementById('toc');
|
||||
// https://jets.js.org/
|
||||
window.jets = new window.Jets({
|
||||
// *OR - Selects elements whose values contains at least one part of search substring
|
||||
searchSelector: '*OR',
|
||||
searchTag: '#input-search',
|
||||
contentTag: '#toc li',
|
||||
didSearch: function(term) {
|
||||
wrapper.classList.toggle('jets-searching', String(term).length > 0)
|
||||
},
|
||||
// map these accent keys to plain values
|
||||
diacriticsMap: {
|
||||
a: 'ÀÁÂÃÄÅàáâãäåĀāąĄ',
|
||||
c: 'ÇçćĆčČ',
|
||||
d: 'đĐďĎ',
|
||||
e: 'ÈÉÊËèéêëěĚĒēęĘ',
|
||||
i: 'ÌÍÎÏìíîïĪī',
|
||||
l: 'łŁ',
|
||||
n: 'ÑñňŇńŃ',
|
||||
o: 'ÒÓÔÕÕÖØòóôõöøŌō',
|
||||
r: 'řŘ',
|
||||
s: 'ŠšśŚ',
|
||||
t: 'ťŤ',
|
||||
u: 'ÙÚÛÜùúûüůŮŪū',
|
||||
y: 'ŸÿýÝ',
|
||||
z: 'ŽžżŻźŹ'
|
||||
}
|
||||
});
|
||||
|
||||
function hashChange() {
|
||||
const currentItems = document.querySelectorAll('.tocify-subheader.visible, .tocify-item.tocify-focus');
|
||||
Array.from(currentItems).forEach((elem) => {
|
||||
elem.classList.remove('visible', 'tocify-focus');
|
||||
});
|
||||
|
||||
const currentTag = document.querySelector(`a[href="${window.location.hash}"]`);
|
||||
if (currentTag) {
|
||||
const parent = currentTag.closest('.tocify-subheader');
|
||||
if (parent) {
|
||||
parent.classList.add('visible');
|
||||
}
|
||||
|
||||
const siblings = currentTag.closest('.tocify-header');
|
||||
if (siblings) {
|
||||
Array.from(siblings.querySelectorAll('.tocify-subheader')).forEach((elem) => {
|
||||
elem.classList.add('visible');
|
||||
});
|
||||
}
|
||||
|
||||
currentTag.parentElement.classList.add('tocify-focus');
|
||||
|
||||
// wait for dom changes to be done
|
||||
setTimeout(() => {
|
||||
currentTag.scrollIntoView({ behavior: 'smooth', block: 'center', inline: 'center' });
|
||||
// only close the sidebar on level-2 events
|
||||
if (currentTag.parentElement.classList.contains('level-2')) {
|
||||
closeSidebar();
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
}
|
||||
|
||||
let languages = JSON.parse(document.body.getAttribute('data-languages'));
|
||||
// Support a key => value object where the key is the name, or an array of strings where the value is the name
|
||||
if (!Array.isArray(languages)) {
|
||||
languages = Object.values(languages);
|
||||
}
|
||||
// if there is no language use the first one
|
||||
const currentLanguage = window.localStorage.getItem('language') || languages[0];
|
||||
const languageStyle = document.getElementById('language-style');
|
||||
const langSelector = document.querySelectorAll('.lang-selector button.lang-button');
|
||||
|
||||
function setActiveLanguage(newLanguage) {
|
||||
window.localStorage.setItem('language', newLanguage);
|
||||
if (!languageStyle) {
|
||||
return;
|
||||
}
|
||||
|
||||
const newStyle = languages.map((language) => {
|
||||
return language === newLanguage
|
||||
// the current one should be visible
|
||||
? `body .content .${language}-example pre { display: block; }`
|
||||
// the inactive one should be hidden
|
||||
: `body .content .${language}-example pre { display: none; }`;
|
||||
}).join(`\n`);
|
||||
|
||||
Array.from(langSelector).forEach((elem) => {
|
||||
elem.classList.toggle('active', elem.getAttribute('data-language-name') === newLanguage);
|
||||
});
|
||||
|
||||
const activeHash = window.location.hash.slice(1);
|
||||
|
||||
languageStyle.innerHTML = newStyle;
|
||||
|
||||
setTimeout(() => {
|
||||
updateHash(activeHash);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
setActiveLanguage(currentLanguage);
|
||||
|
||||
Array.from(langSelector).forEach((elem) => {
|
||||
elem.addEventListener('click', () => {
|
||||
const newLanguage = elem.getAttribute('data-language-name');
|
||||
setActiveLanguage(newLanguage);
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener('hashchange', hashChange, false);
|
||||
|
||||
const divs = document.querySelectorAll('.content h1[id], .content h2[id]');
|
||||
|
||||
document.addEventListener('scroll', () => {
|
||||
divs.forEach(item => {
|
||||
const rect = item.getBoundingClientRect();
|
||||
if (rect.top > 0 && rect.top < 150) {
|
||||
const location = window.location.toString().split('#')[0];
|
||||
history.replaceState(null, null, location + '#' + item.id);
|
||||
hashChange();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
hashChange();
|
||||
});
|
||||
+289
@@ -0,0 +1,289 @@
|
||||
window.abortControllers = {};
|
||||
|
||||
function cacheAuthValue() {
|
||||
// Whenever the auth header is set for one endpoint, cache it for the others
|
||||
window.lastAuthValue = '';
|
||||
let authInputs = document.querySelectorAll(`.auth-value`)
|
||||
authInputs.forEach(el => {
|
||||
el.addEventListener('input', (event) => {
|
||||
window.lastAuthValue = event.target.value;
|
||||
authInputs.forEach(otherInput => {
|
||||
if (otherInput === el) return;
|
||||
// Don't block the main thread
|
||||
setTimeout(() => {
|
||||
otherInput.value = window.lastAuthValue;
|
||||
}, 0);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', cacheAuthValue);
|
||||
|
||||
function getCookie(name) {
|
||||
if (!document.cookie) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const cookies = document.cookie.split(';')
|
||||
.map(c => c.trim())
|
||||
.filter(c => c.startsWith(name + '='));
|
||||
|
||||
if (cookies.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return decodeURIComponent(cookies[0].split('=')[1]);
|
||||
}
|
||||
|
||||
function tryItOut(endpointId) {
|
||||
document.querySelector(`#btn-tryout-${endpointId}`).hidden = true;
|
||||
document.querySelector(`#btn-canceltryout-${endpointId}`).hidden = false;
|
||||
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`).hidden = false;
|
||||
executeBtn.disabled = false;
|
||||
|
||||
// Show all input fields
|
||||
document.querySelectorAll(`input[data-endpoint=${endpointId}],label[data-endpoint=${endpointId}]`)
|
||||
.forEach(el => el.style.display = 'block');
|
||||
|
||||
if (document.querySelector(`#form-${endpointId}`).dataset.authed === "1") {
|
||||
const authElement = document.querySelector(`#auth-${endpointId}`);
|
||||
authElement && (authElement.hidden = false);
|
||||
}
|
||||
// Expand all nested fields
|
||||
document.querySelectorAll(`#form-${endpointId} details`)
|
||||
.forEach(el => el.open = true);
|
||||
}
|
||||
|
||||
function cancelTryOut(endpointId) {
|
||||
if (window.abortControllers[endpointId]) {
|
||||
window.abortControllers[endpointId].abort();
|
||||
delete window.abortControllers[endpointId];
|
||||
}
|
||||
|
||||
document.querySelector(`#btn-tryout-${endpointId}`).hidden = false;
|
||||
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`);
|
||||
executeBtn.hidden = true;
|
||||
executeBtn.textContent = executeBtn.dataset.initialText;
|
||||
document.querySelector(`#btn-canceltryout-${endpointId}`).hidden = true;
|
||||
// Hide inputs
|
||||
document.querySelectorAll(`input[data-endpoint=${endpointId}],label[data-endpoint=${endpointId}]`)
|
||||
.forEach(el => el.style.display = 'none');
|
||||
document.querySelectorAll(`#form-${endpointId} details`)
|
||||
.forEach(el => el.open = false);
|
||||
const authElement = document.querySelector(`#auth-${endpointId}`);
|
||||
authElement && (authElement.hidden = true);
|
||||
|
||||
document.querySelector('#execution-results-' + endpointId).hidden = true;
|
||||
document.querySelector('#execution-error-' + endpointId).hidden = true;
|
||||
|
||||
// Revert to sample code blocks
|
||||
document.querySelector('#example-requests-' + endpointId).hidden = false;
|
||||
document.querySelector('#example-responses-' + endpointId).hidden = false;
|
||||
}
|
||||
|
||||
function makeAPICall(method, path, body = {}, query = {}, headers = {}, endpointId = null) {
|
||||
console.log({endpointId, path, body, query, headers});
|
||||
|
||||
if (!(body instanceof FormData) && typeof body !== "string") {
|
||||
body = JSON.stringify(body)
|
||||
}
|
||||
|
||||
const url = new URL(window.tryItOutBaseUrl + '/' + path.replace(/^\//, ''));
|
||||
|
||||
// We need this function because if you try to set an array or object directly to a URLSearchParams object,
|
||||
// you'll get [object Object] or the array.toString()
|
||||
function addItemToSearchParamsObject(key, value, searchParams) {
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach((v, i) => {
|
||||
// Append {filters: [first, second]} as filters[0]=first&filters[1]second
|
||||
addItemToSearchParamsObject(key + '[' + i + ']', v, searchParams);
|
||||
})
|
||||
} else if (typeof value === 'object' && value !== null) {
|
||||
Object.keys(value).forEach((i) => {
|
||||
// Append {filters: {name: first}} as filters[name]=first
|
||||
addItemToSearchParamsObject(key + '[' + i + ']', value[i], searchParams);
|
||||
});
|
||||
} else {
|
||||
searchParams.append(key, value);
|
||||
}
|
||||
}
|
||||
|
||||
Object.keys(query)
|
||||
.forEach(key => addItemToSearchParamsObject(key, query[key], url.searchParams));
|
||||
|
||||
window.abortControllers[endpointId] = new AbortController();
|
||||
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers,
|
||||
body: method === 'GET' ? undefined : body,
|
||||
signal: window.abortControllers[endpointId].signal,
|
||||
referrer: window.tryItOutBaseUrl,
|
||||
mode: 'cors',
|
||||
credentials: 'same-origin',
|
||||
})
|
||||
.then(response => Promise.all([response.status, response.statusText, response.text(), response.headers]));
|
||||
}
|
||||
|
||||
function hideCodeSamples(endpointId) {
|
||||
document.querySelector('#example-requests-' + endpointId).hidden = true;
|
||||
document.querySelector('#example-responses-' + endpointId).hidden = true;
|
||||
}
|
||||
|
||||
function handleResponse(endpointId, response, status, headers) {
|
||||
hideCodeSamples(endpointId);
|
||||
|
||||
// Hide error views
|
||||
document.querySelector('#execution-error-' + endpointId).hidden = true;
|
||||
|
||||
const responseContentEl = document.querySelector('#execution-response-content-' + endpointId);
|
||||
|
||||
// Check if the response contains Laravel's dd() default dump output
|
||||
const isLaravelDump = response.includes('Sfdump');
|
||||
|
||||
// If it's a Laravel dd() dump, use innerHTML to render it safely
|
||||
if (isLaravelDump) {
|
||||
responseContentEl.innerHTML = response === '' ? responseContentEl.dataset.emptyResponseText : response;
|
||||
} else {
|
||||
// Otherwise, stick to textContent for regular responses
|
||||
responseContentEl.textContent = response === '' ? responseContentEl.dataset.emptyResponseText : response;
|
||||
}
|
||||
|
||||
// Prettify it if it's JSON
|
||||
let isJson = false;
|
||||
try {
|
||||
const jsonParsed = JSON.parse(response);
|
||||
if (jsonParsed !== null) {
|
||||
isJson = true;
|
||||
response = JSON.stringify(jsonParsed, null, 4);
|
||||
responseContentEl.textContent = response;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
|
||||
isJson && window.hljs.highlightElement(responseContentEl);
|
||||
const statusEl = document.querySelector('#execution-response-status-' + endpointId);
|
||||
statusEl.textContent = ` (${status})`;
|
||||
document.querySelector('#execution-results-' + endpointId).hidden = false;
|
||||
statusEl.scrollIntoView({behavior: "smooth", block: "center"});
|
||||
}
|
||||
|
||||
function handleError(endpointId, err) {
|
||||
hideCodeSamples(endpointId);
|
||||
// Hide response views
|
||||
document.querySelector('#execution-results-' + endpointId).hidden = true;
|
||||
|
||||
// Show error views
|
||||
let errorMessage = err.message || err;
|
||||
const $errorMessageEl = document.querySelector('#execution-error-message-' + endpointId);
|
||||
$errorMessageEl.textContent = errorMessage + $errorMessageEl.textContent;
|
||||
const errorEl = document.querySelector('#execution-error-' + endpointId);
|
||||
errorEl.hidden = false;
|
||||
errorEl.scrollIntoView({behavior: "smooth", block: "center"});
|
||||
|
||||
}
|
||||
|
||||
async function executeTryOut(endpointId, form) {
|
||||
const executeBtn = document.querySelector(`#btn-executetryout-${endpointId}`);
|
||||
executeBtn.textContent = executeBtn.dataset.loadingText;
|
||||
executeBtn.disabled = true;
|
||||
executeBtn.scrollIntoView({behavior: "smooth", block: "center"});
|
||||
|
||||
let body;
|
||||
let setter;
|
||||
if (form.dataset.hasfiles === "1") {
|
||||
body = new FormData();
|
||||
setter = (name, value) => body.append(name, value);
|
||||
} else if (form.dataset.isarraybody === "1") {
|
||||
body = [];
|
||||
setter = (name, value) => _.set(body, name, value);
|
||||
} else {
|
||||
body = {};
|
||||
setter = (name, value) => _.set(body, name, value);
|
||||
}
|
||||
const bodyParameters = form.querySelectorAll('input[data-component=body]');
|
||||
bodyParameters.forEach(el => {
|
||||
let value = el.value;
|
||||
|
||||
if (el.type === 'number' && typeof value === 'string') {
|
||||
value = parseFloat(value);
|
||||
}
|
||||
|
||||
if (el.type === 'file' && el.files[0]) {
|
||||
setter(el.name, el.files[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (el.type !== 'radio') {
|
||||
if (value === "" && el.required === false) {
|
||||
// Don't include empty optional values in the request
|
||||
return;
|
||||
}
|
||||
setter(el.name, value);
|
||||
return;
|
||||
}
|
||||
|
||||
if (el.checked) {
|
||||
value = (value === 'false') ? false : true;
|
||||
setter(el.name, value);
|
||||
}
|
||||
});
|
||||
|
||||
const query = {};
|
||||
const queryParameters = form.querySelectorAll('input[data-component=query]');
|
||||
queryParameters.forEach(el => {
|
||||
if (el.type !== 'radio' || (el.type === 'radio' && el.checked)) {
|
||||
if (el.value === '') {
|
||||
// Don't include empty values in the request
|
||||
return;
|
||||
}
|
||||
|
||||
_.set(query, el.name, el.value);
|
||||
}
|
||||
});
|
||||
|
||||
let path = form.dataset.path;
|
||||
const urlParameters = form.querySelectorAll('input[data-component=url]');
|
||||
urlParameters.forEach(el => (path = path.replace(new RegExp(`\\{${el.name}\\??}`), el.value)));
|
||||
|
||||
const headers = Object.fromEntries(Array.from(form.querySelectorAll('input[data-component=header]'))
|
||||
.map(el => [el.name, el.value]));
|
||||
|
||||
// When using FormData, the browser sets the correct content-type + boundary
|
||||
let method = form.dataset.method;
|
||||
if (body instanceof FormData) {
|
||||
delete headers['Content-Type'];
|
||||
|
||||
// When using FormData with PUT or PATCH, use method spoofing so PHP can access the post body
|
||||
if (['PUT', 'PATCH'].includes(form.dataset.method)) {
|
||||
method = 'POST';
|
||||
setter('_method', form.dataset.method);
|
||||
}
|
||||
}
|
||||
|
||||
let preflightPromise = Promise.resolve();
|
||||
if (window.useCsrf && window.csrfUrl) {
|
||||
preflightPromise = makeAPICall('GET', window.csrfUrl).then(() => {
|
||||
headers['X-XSRF-TOKEN'] = getCookie('XSRF-TOKEN');
|
||||
});
|
||||
}
|
||||
|
||||
return preflightPromise.then(() => makeAPICall(method, path, body, query, headers, endpointId))
|
||||
.then(([responseStatus, statusText, responseContent, responseHeaders]) => {
|
||||
handleResponse(endpointId, responseContent, responseStatus, responseHeaders)
|
||||
})
|
||||
.catch(err => {
|
||||
if (err.name === "AbortError") {
|
||||
console.log("Request cancelled");
|
||||
return;
|
||||
}
|
||||
console.log("Error while making request: ", err);
|
||||
handleError(endpointId, err);
|
||||
})
|
||||
.finally(() => {
|
||||
executeBtn.disabled = false;
|
||||
executeBtn.textContent = executeBtn.dataset.initialText;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user