Files
accountbook/frontend/.next/server/pages/_error.js
T

1 line
17 KiB
JavaScript
Raw Normal View History

2026-03-12 11:24:10 +08:00
(()=>{var e={};e.id=820,e.ids=[820,888,660],e.modules={1323:(e,t)=>{"use strict";Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},7909:(e,t,r)=>{"use strict";r.r(t),r.d(t,{config:()=>f,default:()=>c,getServerSideProps:()=>h,getStaticPaths:()=>p,getStaticProps:()=>u,reportWebVitals:()=>k,routeModule:()=>b,unstable_getServerProps:()=>g,unstable_getServerSideProps:()=>v,unstable_getStaticParams:()=>m,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>x});var n=r(7093),o=r(5244),s=r(1323),i=r(2899),l=r.n(i),a=r(3414),d=r(6971);let c=(0,s.l)(d,"default"),u=(0,s.l)(d,"getStaticProps"),p=(0,s.l)(d,"getStaticPaths"),h=(0,s.l)(d,"getServerSideProps"),f=(0,s.l)(d,"config"),k=(0,s.l)(d,"reportWebVitals"),x=(0,s.l)(d,"unstable_getStaticProps"),j=(0,s.l)(d,"unstable_getStaticPaths"),m=(0,s.l)(d,"unstable_getStaticParams"),g=(0,s.l)(d,"unstable_getServerProps"),v=(0,s.l)(d,"unstable_getServerSideProps"),b=new n.PagesRouteModule({definition:{kind:o.x.PAGES,page:"/_error",pathname:"/_error",bundlePath:"",filename:""},components:{App:a.default,Document:l()},userland:d})},4407:(e,t,r)=>{"use strict";r.d(t,{N:()=>a,W:()=>l});var n=r(997),o=r(6689),s=r(349);let i=(0,o.createContext)(null);function l({children:e}){let[t,r]=(0,o.useState)(null),l=(0,o.useCallback)(e=>new Promise(t=>{r({title:e.title||"请确认操作",description:e.description||"",confirmText:e.confirmText||"确认",cancelText:e.cancelText||"取消",tone:e.tone||"danger",resolve:t})}),[]),a=(0,o.useCallback)(e=>{r(t=>(t?.resolve(e),null))},[]),d=(0,o.useMemo)(()=>({confirm:l}),[l]);return(0,n.jsxs)(i.Provider,{value:d,children:[e,t?n.jsx("div",{className:"modal-overlay modal-overlay--center",onClick:()=>a(!1),children:(0,n.jsxs)("div",{className:"confirm-card",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",children:[n.jsx("div",{className:`confirm-card__icon confirm-card__icon--${t.tone}`,children:n.jsx(s.J,{name:"danger"===t.tone?"trash":"info",size:18})}),(0,n.jsxs)("div",{className:"confirm-card__body",children:[n.jsx("h2",{id:"confirm-title",children:t.title}),t.description?n.jsx("p",{children:t.description}):null]}),(0,n.jsxs)("div",{className:"confirm-card__actions",children:[n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>a(!1),children:t.cancelText}),n.jsx("button",{type:"button",className:`btn ${"danger"===t.tone?"btn-danger":"btn-primary"}`,onClick:()=>a(!0),children:t.confirmText})]})]})}):null]})}function a(){let e=(0,o.useContext)(i);if(!e)throw Error("useConfirm must be used within ConfirmProvider");return e}},4190:(e,t,r)=>{"use strict";r.d(t,{V:()=>l,p:()=>a});var n=r(997),o=r(6689),s=r(349);let i=(0,o.createContext)(null);function l({children:e}){let[t,r]=(0,o.useState)([]),l=(0,o.useRef)(new Map),a=(0,o.useCallback)(e=>{let t=l.current.get(e);t&&(clearTimeout(t),l.current.delete(e)),r(t=>t.filter(t=>t.id!==e))},[]),d=(0,o.useCallback)((e,t={})=>{let n=`${Date.now()}-${Math.random()}`,o={id:n,message:e,tone:t.tone||"info"};r(e=>[...e,o]);let s=setTimeout(()=>a(n),t.duration??2600);return l.current.set(n,s),n},[a]),c=(0,o.useMemo)(()=>({showToast:d,removeToast:a}),[d,a]);return(0,n.jsxs)(i.Provider,{value:c,children:[e,n.jsx("div",{className:"toast-stack","aria-live":"polite","aria-atomic":"true",children:t.map(e=>(0,n.jsxs)("div",{className:`toast toast--${e.tone}`,children:[n.jsx("span",{className:"toast__icon",children:n.jsx(s.J,{name:"success"===e.tone?"check":"error"===e.tone?"close":"info",size:16})}),n.jsx("span",{className:"toast__message",children:e.message}),n.jsx("button",{type:"button",className:"icon-button icon-button--ghost toast__close","aria-label":"关闭提示",onClick:()=>a(e.id),children:n.jsx(s.J,{name:"close",size:16})})]},e.id))})]})}function a(){let e=(0,o.useContext)(i);if(!e)throw Error("useToast must be used within ToastProvider");return e}},349:(e,t,r)=>{"use strict";r.d(t,{J:()=>i});var n=r(997