staffwriter-cdn 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +268 -111
- package/.next/app-path-routes-manifest.json +27 -8
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +15 -15
- package/.next/react-loadable-manifest.json +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/routes-manifest.json +14 -6
- package/.next/server/app/(app)/delivery/page.js +2 -2
- package/.next/server/app/(app)/delivery/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/registry/cloud/[id]/page.js +2 -2
- package/.next/server/app/(app)/registry/cloud/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/registry/page.js +2 -2
- package/.next/server/app/(app)/registry/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/renderer/cloud/[id]/page.js +2 -2
- package/.next/server/app/(app)/renderer/cloud/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/renderer/page.js +1 -1
- package/.next/server/app/(app)/renderer/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(app)/services/[service]/page.js +2 -0
- package/.next/server/app/(app)/services/[service]/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/services/page.js +2 -0
- package/.next/server/app/(app)/services/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/themes/page.js +18 -18
- package/.next/server/app/(app)/themes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[alias]/page.js +2 -2
- package/.next/server/app/[alias]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +2 -2
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/api/aliases/route.js +1 -1
- package/.next/server/app/api/aliases/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/config/route.js +1 -1
- package/.next/server/app/api/config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/connections/route.js +1 -1
- package/.next/server/app/api/connections/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/control/route.js +1 -1
- package/.next/server/app/api/control/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/debug/route.js +1 -1
- package/.next/server/app/api/debug/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/external/available/route.js +1 -0
- package/.next/server/app/api/external/available/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/external/route.js +1 -0
- package/.next/server/app/api/external/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/home/route.js +1 -1
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/me/route.js +1 -1
- package/.next/server/app/api/me/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/network/route.js +4 -1
- package/.next/server/app/api/network/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/node/route.js +1 -1
- package/.next/server/app/api/node/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/pages/route.js +1 -1
- package/.next/server/app/api/pages/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/pod/bots/route.js +1 -0
- package/.next/server/app/api/pod/bots/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/chats/route.js +1 -0
- package/.next/server/app/api/pod/chats/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/command/route.js +1 -0
- package/.next/server/app/api/pod/command/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/mail/relay/route.js +1 -0
- package/.next/server/app/api/pod/mail/relay/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/mail/route.js +1 -0
- package/.next/server/app/api/pod/mail/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/mail/send/route.js +1 -0
- package/.next/server/app/api/pod/mail/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/mail/sent/route.js +1 -0
- package/.next/server/app/api/pod/mail/sent/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/messages/route.js +1 -0
- package/.next/server/app/api/pod/messages/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/outline-vpn/key/route.js +1 -0
- package/.next/server/app/api/pod/outline-vpn/key/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/outline-vpn/route.js +1 -0
- package/.next/server/app/api/pod/outline-vpn/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/peer/route.js +4 -0
- package/.next/server/app/api/pod/peer/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/tunnels/route.js +4 -0
- package/.next/server/app/api/pod/tunnels/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/tunnels/send/route.js +4 -0
- package/.next/server/app/api/pod/tunnels/send/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/vpn/file/route.js +1 -0
- package/.next/server/app/api/pod/vpn/file/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/pod/vpn/route.js +1 -0
- package/.next/server/app/api/pod/vpn/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/services/route.js +1 -0
- package/.next/server/app/api/services/route_client-reference-manifest.js +1 -0
- package/.next/server/app/delivery.html +2 -2
- package/.next/server/app/delivery.rsc +4 -4
- package/.next/server/app/page/[uid]/[id]/page.js +2 -2
- package/.next/server/app/page/[uid]/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/registry.html +2 -2
- package/.next/server/app/registry.rsc +4 -4
- package/.next/server/app/renderer.html +2 -2
- package/.next/server/app/renderer.rsc +5 -5
- package/.next/server/app/services.html +23 -0
- package/.next/server/app/{activity.meta → services.meta} +3 -3
- package/.next/server/app/{activity.rsc → services.rsc} +5 -5
- package/.next/server/app/themes.html +2 -2
- package/.next/server/app/themes.rsc +4 -4
- package/.next/server/app-paths-manifest.json +27 -8
- package/.next/server/chunks/11.js +1 -0
- package/.next/server/chunks/1238.js +1 -0
- package/.next/server/chunks/2443.js +1 -0
- package/.next/server/chunks/249.js +1 -0
- package/.next/server/chunks/2881.js +1 -0
- package/.next/server/chunks/308.js +1 -1
- package/.next/server/chunks/3345.js +1 -0
- package/.next/server/chunks/355.js +1 -0
- package/.next/server/chunks/3813.js +1 -0
- package/.next/server/chunks/4474.js +1 -0
- package/.next/server/chunks/{887.js → 4887.js} +1 -1
- package/.next/server/chunks/{611.js → 5611.js} +1 -1
- package/.next/server/chunks/6290.js +1 -0
- package/.next/server/chunks/6297.js +1 -0
- package/.next/server/chunks/{550.js → 6550.js} +1 -1
- package/.next/server/chunks/6884.js +1 -0
- package/.next/server/chunks/6925.js +3 -0
- package/.next/server/chunks/7278.js +1 -0
- package/.next/server/chunks/8377.js +1 -0
- package/.next/server/chunks/8413.js +1 -0
- package/.next/server/chunks/850.js +2 -2
- package/.next/server/chunks/8638.js +1 -0
- package/.next/server/chunks/9068.js +1 -0
- package/.next/server/chunks/9209.js +1 -0
- package/.next/server/chunks/{477.js → 9477.js} +1 -1
- package/.next/server/chunks/9631.js +1 -0
- package/.next/server/chunks/969.js +1 -0
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/server/middleware.js +2 -2
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +1 -1
- package/.next/server/pages/404.html +2 -2
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_document.js +1 -1
- package/.next/server/pages/_error.js +2 -2
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/webpack-runtime.js +1 -1
- package/.next/static/chunks/1758-2514470f25b31b22.js +1 -0
- package/.next/static/chunks/2134-2f7a404728a7c319.js +1 -0
- package/.next/static/chunks/31-c86250907ab7b523.js +1 -0
- package/.next/static/chunks/3223-46e4f16d7c0bf0f3.js +1 -0
- package/.next/static/chunks/3861-8344fb02393c9435.js +1 -0
- package/.next/static/chunks/4477-6f2be11646923f51.js +1 -0
- package/.next/static/chunks/5094.df042006e4e3718d.js +1 -0
- package/.next/static/chunks/6252-ae540930d80a7cf6.js +1 -0
- package/.next/static/chunks/7254-605918695936361b.js +1 -0
- package/.next/static/chunks/8031-045f9d0d668c0c32.js +1 -0
- package/.next/static/chunks/8245-ed756357d8e74f48.js +1 -0
- package/.next/static/chunks/8297-297b6bab95fa5fe6.js +1 -0
- package/.next/static/chunks/8349-74dc381229789791.js +1 -0
- package/.next/static/chunks/8769-1b62d70bc1432ade.js +1 -0
- package/.next/static/chunks/8859-7da4ae08cbe3632d.js +1 -0
- package/.next/static/chunks/9057-88fc5ab4ff755ba8.js +1 -0
- package/.next/static/chunks/app/(app)/delivery/page-c950ef62ab7d98da.js +1 -0
- package/.next/static/chunks/app/(app)/{layout-018c19697d98a239.js → layout-5286ba00b484976e.js} +1 -1
- package/.next/static/chunks/app/(app)/registry/cloud/[id]/{page-aeda6c5aa24d77cd.js → page-047a4478de4c03c4.js} +1 -1
- package/.next/static/chunks/app/(app)/registry/page-c94616bfda87c693.js +1 -0
- package/.next/static/chunks/app/(app)/renderer/cloud/[id]/{page-f9385bc941a480cb.js → page-20bafb43c5a1c764.js} +1 -1
- package/.next/static/chunks/app/(app)/renderer/{page-b66d847affd2e6d4.js → page-877c6d4c44b9c0e1.js} +1 -1
- package/.next/static/chunks/app/(app)/services/[service]/page-6e693fb1832351cd.js +1 -0
- package/.next/static/chunks/app/(app)/services/page-637b34abd2236ecc.js +1 -0
- package/.next/static/chunks/app/(app)/themes/page-de160b10f5d6c1f8.js +1 -0
- package/.next/static/chunks/app/[alias]/page-f89113e70c4a4716.js +1 -0
- package/.next/static/chunks/app/api/aliases/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/config/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/connections/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/control/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/debug/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/external/available/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/external/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/health/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/home/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/me/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/network/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/node/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pages/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/bots/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/chats/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/command/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/mail/relay/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/mail/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/mail/send/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/mail/sent/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/messages/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/outline-vpn/key/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/outline-vpn/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/peer/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/tunnels/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/tunnels/send/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/vpn/file/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/pod/vpn/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/api/services/route-c7f85e20799f51ae.js +1 -0
- package/.next/static/chunks/app/page/[uid]/[id]/page-f89113e70c4a4716.js +1 -0
- package/.next/static/chunks/app/page-0cbd8e64bffc8453.js +1 -0
- package/.next/static/chunks/{webpack-8cca20063c431502.js → webpack-ba64640acea4d61a.js} +1 -1
- package/.next/static/rBvzd62Jfjfj8K7FMSfCB/_buildManifest.js +1 -0
- package/LICENSE +661 -0
- package/README.md +18 -4
- package/package.json +3 -3
- package/source.tar.gz +0 -0
- package/.next/server/app/(app)/activity/page.js +0 -2
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +0 -1
- package/.next/server/app/activity.html +0 -23
- package/.next/server/chunks/278.js +0 -1
- package/.next/server/chunks/306.js +0 -1
- package/.next/server/chunks/413.js +0 -1
- package/.next/server/chunks/443.js +0 -1
- package/.next/server/chunks/631.js +0 -1
- package/.next/server/chunks/7.js +0 -1
- package/.next/server/chunks/70.js +0 -1
- package/.next/server/chunks/749.js +0 -1
- package/.next/server/chunks/811.js +0 -1
- package/.next/server/chunks/813.js +0 -1
- package/.next/server/chunks/831.js +0 -1
- package/.next/server/chunks/925.js +0 -3
- package/.next/static/chunks/1388-d052a282c5484536.js +0 -1
- package/.next/static/chunks/1438-2324766c596cbd0b.js +0 -1
- package/.next/static/chunks/2134-f48d970ae9776c5d.js +0 -1
- package/.next/static/chunks/2567-8be3558f3397f3ba.js +0 -1
- package/.next/static/chunks/4715-82331ca540b96608.js +0 -1
- package/.next/static/chunks/5094.750b2e7b30f33107.js +0 -1
- package/.next/static/chunks/5248-8e58352a4a85d319.js +0 -1
- package/.next/static/chunks/7379-091c15b5a6ec3547.js +0 -1
- package/.next/static/chunks/7465-746c42789367d2ea.js +0 -1
- package/.next/static/chunks/8245-c2dd75b8de2b5864.js +0 -1
- package/.next/static/chunks/app/(app)/activity/page-6fc1f31796806b02.js +0 -1
- package/.next/static/chunks/app/(app)/delivery/page-36f2ec56dd38b120.js +0 -1
- package/.next/static/chunks/app/(app)/registry/page-53dbe59fc5a3226c.js +0 -1
- package/.next/static/chunks/app/(app)/themes/page-4a75580bc6a6eb0f.js +0 -1
- package/.next/static/chunks/app/[alias]/page-dfc775ab3f94d158.js +0 -1
- package/.next/static/chunks/app/api/aliases/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/config/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/connections/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/control/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/debug/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/health/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/home/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/me/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/network/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/node/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/api/pages/route-f28148114d2bf5da.js +0 -1
- package/.next/static/chunks/app/page/[uid]/[id]/page-dfc775ab3f94d158.js +0 -1
- package/.next/static/chunks/app/page-0807857f6c80baee.js +0 -1
- package/.next/static/f4vik1k-gk--Tisf5zLte/_buildManifest.js +0 -1
- /package/.next/static/{f4vik1k-gk--Tisf5zLte → rBvzd62Jfjfj8K7FMSfCB}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9057],{11438:(e,t,n)=>{n.d(t,{default:()=>e4});var r=n(95155),l=n(12115),i=n(47650),a=n(20063),o=n(20031),s=n(17064),c=n(41530),d=n(86175),u=n(52619),p=n.n(u),x=n(92359),h=n(83561),f=n(93485),m=n(84560),g=n(9435),v=n(31937),b=n(78421),j=n(35875),y=n(93483),A=n(58489),w=n(88122),S=n(10913),C=n(83147),k=n(13909),z=n(45240);let I=["light","dark","system"],W={light:"Light",dark:"Dark",system:"System"},P={light:k.A,dark:C.A,system:z.A};function B(e){let{buttonSize:t=28}=e,{mode:n,setMode:i}=(0,S.Ut)(),[a,o]=l.useState(!1);l.useEffect(()=>o(!0),[]);let s=a&&null!=n?n:"system",c=I[(I.indexOf(s)+1)%I.length],d=P[s];return(0,r.jsx)(g.A,{title:a?"Theme: ".concat(W[s]," → ").concat(W[c]):"Theme",variant:"soft",children:(0,r.jsx)(m.Ay,{size:"sm",variant:"soft",color:"neutral",onClick:()=>i(c),"aria-label":a?"Switch theme (currently ".concat(W[s],")"):"Switch theme",sx:{"--IconButton-size":"".concat(t,"px"),"--IconButton-radius":"50%"},children:(0,r.jsx)(d,{fontSize:"small"})})})}var E=n(58245),H=n(59779),L=n(78131);function T(e){let{buttonSize:t=28}=e,n=(0,h.mu)(),{mode:l,theme:i}=(0,E.Wi)(),a=h.k_[(h.k_.indexOf(l)+1)%h.k_.length],{label:o,Icon:s}=H.M[l],c="Background: ".concat(o,". Switch to ").concat(H.M[a].label);return(0,r.jsx)(L.A,{theme:i,look:l,hint:c,"data-mode":l,buttonSize:t,onClick:()=>n.updatePage({background:a}),children:(0,r.jsx)(s,{fontSize:"small"})})}var M=n(64729);function O(e){let{buttonSize:t=24}=e;return(0,r.jsx)(M.A,{mode:(0,r.jsx)(B,{buttonSize:t}),children:(0,r.jsx)(T,{buttonSize:t})})}var R=n(57364),D=n(94540);let G=e=>{let{children:t,sx:n}=e;return(0,r.jsx)(x.A,{variant:"outlined",sx:{p:.25,borderRadius:999,display:"inline-flex",alignItems:"center",...n},children:t})};function U(){let{viewLayout:e,setViewLayout:t}=(0,R.O)();return(0,r.jsxs)(f.A,{size:"sm",value:e,onChange:(e,n)=>{n&&t(n)},"aria-label":"View stacking direction",spacing:.25,variant:"soft",color:"neutral",sx:{p:.25,borderRadius:999,"& .MuiIconButton-root":{"--IconButton-size":"".concat(24,"px")}},children:[(0,r.jsx)(m.Ay,{value:"vertical","aria-label":"Vertical stack","aria-pressed":"vertical"===e,title:"Stack vertically",children:(0,r.jsx)(v.A,{fontSize:"small"})}),(0,r.jsx)(m.Ay,{value:"horizontal","aria-label":"Horizontal stack","aria-pressed":"horizontal"===e,title:"Stack horizontally",children:(0,r.jsx)(b.A,{fontSize:"small"})})]})}function F(){let e=(0,D.c)(),{viewLayout:t}=(0,R.O)();if(!e)return null;let{navCollapsed:n,paneCollapsed:l,toggleNav:i,togglePane:a,hasNav:o=!0,hasPane:s=!0}=e,c="horizontal"===t,d=c?w.A:A.A,u=c?A.A:w.A;return(0,r.jsxs)(G,{sx:{gap:.15},children:[o?(0,r.jsx)(g.A,{title:n?"Show left panel":"Hide left panel",variant:"soft",children:(0,r.jsx)(m.Ay,{size:"sm",variant:"soft",color:"neutral",onClick:i,"aria-label":n?"Show side navigation":"Hide side navigation","aria-pressed":!n,sx:{"--IconButton-size":"".concat(24,"px"),"--IconButton-radius":"50%",...!n?{bgcolor:"neutral.softBg"}:{}},children:n?(0,r.jsx)(y.A,{fontSize:"small"}):(0,r.jsx)(j.A,{fontSize:"small"})})}):null,s?(0,r.jsx)(g.A,{title:l?"Show right panel":"Hide right panel",variant:"soft",children:(0,r.jsx)(m.Ay,{size:"sm",variant:"soft",color:"neutral",onClick:a,"aria-label":l?"Show side pane":"Hide side pane","aria-pressed":!l,sx:{"--IconButton-size":"".concat(24,"px"),"--IconButton-radius":"50%",...!l?{bgcolor:"neutral.softBg"}:{}},children:l?(0,r.jsx)(d,{fontSize:"small"}):(0,r.jsx)(u,{fontSize:"small"})})}):null]})}function N(e){var t,n;let{layoutControls:l=!0,compactChrome:i=!1}=e,a=(0,h.KJ)(e=>e.ready),o=(0,h.KJ)(e=>e.page),s=null==(n=null==(t=(0,D.c)())?void 0:t.hasColumns)||n;return(0,r.jsx)(c.A,{sx:{display:"flex",alignItems:"center",gap:{xs:.5,lg:.75},flexShrink:0},children:(0,r.jsxs)(c.A,{sx:{display:i?"flex":{xs:"none",lg:"flex"},alignItems:"center",gap:.75,visibility:a?void 0:"hidden"},children:[o.barControls.includes("layout")&&s?(0,r.jsx)(c.A,{"data-testid":"bar-layout",sx:{display:{xs:"none",lg:"inline-flex"},alignItems:"center"},children:(0,r.jsx)(F,{})}):null,l&&o.barControls.includes("orientation")?(0,r.jsx)(c.A,{"data-testid":"bar-orientation",sx:{display:{xs:"none",xl:"inline-flex"},alignItems:"center"},children:(0,r.jsx)(G,{children:(0,r.jsx)(U,{})})}):null,o.barControls.includes("style")?(0,r.jsx)(c.A,{"data-testid":"bar-style",sx:{display:"inline-flex",alignItems:"center"},children:(0,r.jsx)(O,{buttonSize:24})}):null]})})}var Y=n(47912),K=n(296),Z=n(88504),J=n(22681),V=n(65572),X=n(2312),_=n(35326),q=n(67105),Q=n(42968),$=n(27972),ee=n(26255),et=n(87938),en=n(278),er=n(41216),el=n(40828),ei=n(89647),ea=n(56400),eo=n(12276),es=n(9073),ec=n(8518),ed=n(50499);function eu(){let{status:e,user:t,admin:n,adminReason:i,problem:a,adapter:o}=(0,ec.Z)(),[s,c]=l.useState(!1),d=l.useCallback(()=>c(!1),[]),u=t?t.name||t.email||"StaffWriter user":null,p=t?t.email:"loading"===e?"Loading…":"unavailable"===e?"Sign-in unavailable":"Local pages only";return{status:e,user:t,admin:n,adminReason:i,problem:a,name:u,title:null!=u?u:"Not signed in",detail:p,signIn:()=>c(!0),signOut:()=>void(null==o||o.signOut()),dialog:(0,r.jsx)(ed.A,{open:s,onClose:d})}}function ep(e){var t,n;let{account:l,size:i}=e;return(0,r.jsx)(q.A,{size:"sm",variant:l.user?"solid":"soft",color:l.user?"primary":"neutral",src:null!=(n=null==(t=l.user)?void 0:t.photoURL)?n:void 0,alt:l.title,slotProps:{img:{referrerPolicy:"no-referrer"}},sx:{width:i,height:i,fontSize:.42*i},children:l.name?function(e){let t=e.trim().split(/\s+/);return(1===t.length?t[0].slice(0,2):t[0][0]+t[t.length-1][0]).toUpperCase()}(l.name):(0,r.jsx)(es.A,{sx:{fontSize:.65*i}})})}function ex(e){let{providerId:t}=e,n="google.com"===t,l=n?"Signed in with Google":"Signed in with email & password";return(0,r.jsx)(g.A,{title:l,placement:"top",variant:"soft",size:"sm",children:(0,r.jsx)(c.A,{component:"span",role:"img","aria-label":l,sx:{display:"inline-flex",color:"text.tertiary"},children:n?(0,r.jsx)(ed.N,{sx:{fontSize:14}}):(0,r.jsx)(el.A,{sx:{fontSize:14}})})})}function eh(e){let{account:t}=e,{user:n,admin:l,adminReason:i,problem:a,status:o}=t;return(0,r.jsxs)(ee.A,{placement:"top-end",size:"sm",sx:{minWidth:220,maxWidth:280,zIndex:1300},children:[(0,r.jsxs)(c.A,{sx:{px:1.5,py:.5},children:[(0,r.jsx)(_.Ay,{level:"title-sm",noWrap:!0,children:t.title}),(0,r.jsx)(_.Ay,{level:"body-xs",textColor:"text.tertiary",children:n?n.email:null!=a?a:"Sign in for cloud pages and server settings."}),n&&(l||i)?(0,r.jsxs)(d.A,{direction:"row",spacing:.5,alignItems:"flex-start",sx:{mt:.5},children:[l?(0,r.jsx)(er.A,{sx:{fontSize:16}}):null,(0,r.jsx)(_.Ay,{level:"body-xs",children:l?"Server admin":i})]}):null]}),(0,r.jsx)($.A,{}),n?(0,r.jsxs)(en.A,{onClick:t.signOut,children:[(0,r.jsx)(ea.A,{fontSize:"small"})," Sign out"]}):(0,r.jsxs)(en.A,{disabled:"signedOut"!==o,onClick:t.signIn,children:[(0,r.jsx)(ei.A,{fontSize:"small"})," Sign in"]})]})}function ef(){let e=eu();return(0,r.jsxs)(d.A,{direction:"row",spacing:1,"aria-label":"Account",role:"group",sx:{p:1.5,alignItems:"center",borderTop:"1px solid",borderColor:"divider"},children:[(0,r.jsx)(ep,{account:e,size:36}),(0,r.jsxs)(c.A,{sx:{minWidth:0,flex:1},children:[(0,r.jsxs)(d.A,{direction:"row",spacing:.5,alignItems:"center",sx:{minWidth:0},children:[(0,r.jsx)(_.Ay,{level:"title-sm",noWrap:!0,sx:{fontWeight:"lg",flex:"1 1 auto",minWidth:0},children:e.title}),e.user?(0,r.jsx)(ex,{providerId:e.user.providerId}):null]}),(0,r.jsx)(_.Ay,{level:"body-xs",textColor:"text.tertiary",noWrap:!0,children:e.detail})]}),(0,r.jsxs)(Q.m,{children:[(0,r.jsx)(et.A,{slots:{root:m.Ay},slotProps:{root:{variant:"plain",color:"neutral",size:"sm","aria-label":"Account options"}},children:(0,r.jsx)(eo.A,{fontSize:"small"})}),(0,r.jsx)(eh,{account:e})]}),e.dialog]})}function em(e){let{size:t}=e,n=eu(),l=n.user?"Account: ".concat(n.title):"Account: not signed in";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(Q.m,{children:[(0,r.jsx)(et.A,{slots:{root:m.Ay},slotProps:{root:{variant:"plain",color:"neutral","aria-label":l,title:n.user?n.title:"Sign in",sx:{"--IconButton-size":"".concat(t,"px"),"--IconButton-radius":"50%"}}},children:(0,r.jsx)(ep,{account:n,size:t})}),(0,r.jsx)(eh,{account:n})]}),n.dialog]})}var eg=n(41897),ev=n(22969),eb=n(89218),ej=n(82487),ey=n(5445),eA=n(32821),ew=n(4697);let eS={renderer:(0,r.jsx)(eb.A,{}),registry:(0,r.jsx)(ej.A,{}),themes:(0,r.jsx)(eA.A,{}),delivery:(0,r.jsx)(ew.A,{}),services:(0,r.jsx)(ey.A,{})},eC=l.createContext(null);function ek(e){try{window.localStorage.setItem(eg.rs.appSidebarStorageKey,e)}catch(e){}}let ez=["minimap","open","bare"];function eI(e){let t=ez.indexOf(e);return ez[(t+1)%ez.length]}function eW(e){let{children:t}=e,[n,i]=l.useState("minimap"),[a,o]=l.useState(0),s=l.useCallback(()=>{o(e=>e+1)},[]);l.useLayoutEffect(()=>{let e=function(){try{let e=window.localStorage.getItem(eg.rs.appSidebarStorageKey);if("minimap"===e||"open"===e||"bare"===e)return e;if("1"===e)return"open";if("0"===e)return"minimap";return null}catch(e){return null}}();e&&i(e)},[]);let c=l.useCallback(()=>{i(e=>{let t=eI(e);return ek(t),t})},[]),d=l.useCallback(()=>{i(e=>{if("open"!==e)return e;let t=eI("open");return ek(t),t})},[]),u=l.useCallback(e=>{i(t=>{let n=e?"open":"minimap";return t===n?t:(ek(n),n)})},[]),p="open"===n,x="minimap"===n,h=l.useMemo(()=>({mode:n,open:p,quickRailVisible:x,railWidthLayoutSeq:a,bumpRailWidthLayoutSeq:s,cycleLayout:c,collapseRail:d,setOpen:u}),[n,p,x,a,s,c,d,u]);return(0,r.jsx)(eC.Provider,{value:h,children:t})}function eP(){let e=l.useContext(eC);if(!e)throw Error("useAppShellSidebar must be used inside <AppShellSidebarProvider>");return e}function eB(e){let{size:t=24,...n}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 19 19",role:"img","aria-hidden":"true",focusable:"false",shapeRendering:"geometricPrecision",...n,children:[(0,r.jsx)("path",{fill:"#B4C0D3",d:"m.787 12.567 6.055-2.675 3.485 2.006.704 6.583-4.295-.035.634-4.577-.74-.422-3.625 2.817-2.218-3.697Z"}),(0,r.jsx)("path",{fill:"#00D3AB",d:"m10.714 11.616 5.352 3.908 2.112-3.767-4.295-1.725v-.845l4.295-1.76-2.112-3.732-5.352 3.908v4.013Z"}),(0,r.jsx)("path",{fill:"#4876EF",d:"m10.327 7.286.704-6.583-4.295.07.634 4.577-.74.422-3.66-2.816L.786 6.617l6.055 2.676 3.485-2.007Z"})]})}let eE="app-shell-sidebar";function eH(){let e=(0,a.usePathname)();return(0,r.jsx)(K.A,{component:"nav",size:"sm","aria-label":"Primary",sx:{"--ListItem-radius":"8px","--ListItem-minHeight":"36px",gap:.25},children:ev.UI.map(t=>{let n=(0,ev.o1)(e,t);return(0,r.jsx)(Z.A,{sx:t.startsGroup?{mt:"".concat(ev.Op,"px")}:void 0,children:(0,r.jsxs)(J.A,{component:p(),href:t.href,selected:n,"aria-current":n?"page":void 0,variant:n?"soft":"plain",color:n?"primary":"neutral",children:[(0,r.jsx)(X.A,{sx:{color:n?"primary.plainColor":"text.tertiary"},children:eS[t.id]}),(0,r.jsx)(V.A,{children:(0,r.jsx)(_.Ay,{level:"title-sm",sx:{fontWeight:n?"lg":"md"},children:t.label})})]})},t.id)})})}function eL(){let{open:e,collapseRail:t,bumpRailWidthLayoutSeq:n}=eP();return(0,r.jsx)(x.A,{id:eE,component:"aside","aria-label":"App navigation","aria-hidden":!e,variant:"plain",onTransitionEnd:e=>{"width"===e.propertyName&&e.target===e.currentTarget&&n()},sx:t=>({flexShrink:0,width:e?"".concat(eg.rs.appSidebarWidth,"px"):0,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",borderRight:"1px solid",borderColor:"divider",bgcolor:"background.level1",transition:"width ".concat(eg.rs.appShellRailWidthTransitionMs,"ms ease"),[t.getColorSchemeSelector("dark")]:{bgcolor:"background.surface"}}),children:(0,r.jsxs)(c.A,{sx:{width:"".concat(eg.rs.appSidebarWidth,"px"),height:"100%",display:"flex",flexDirection:"column",minHeight:0},children:[(0,r.jsx)(c.A,{"aria-hidden":!0,sx:{height:"".concat(eg.rs.topOffset,"px"),flexShrink:0}}),(0,r.jsx)(c.A,{sx:{px:1,pb:1},children:(0,r.jsxs)(c.A,{sx:{display:"flex",alignItems:"center",gap:1,minHeight:"".concat(eg.rs.topBarHeight-4,"px"),borderRadius:"12px",border:"1px solid",borderColor:"divider",bgcolor:"background.surface",px:.5},children:[(0,r.jsx)(m.Ay,{variant:"plain",color:"neutral",size:"sm",onClick:t,"aria-label":"Collapse app navigation","aria-controls":eE,"aria-expanded":e,suppressHydrationWarning:!0,children:(0,r.jsx)(eB,{size:22})}),(0,r.jsxs)(c.A,{sx:{minWidth:0,flex:1,textAlign:"right",pr:1},children:[(0,r.jsx)(_.Ay,{level:"title-sm",noWrap:!0,sx:{lineHeight:1.2},children:"StaffWriter"}),(0,r.jsx)(_.Ay,{level:"body-xs",textColor:"text.tertiary",noWrap:!0,children:"Server"})]})]})}),(0,r.jsx)(Y.A,{}),(0,r.jsx)(c.A,{onWheel:e=>{e.stopPropagation()},sx:{flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",...eg.eL},children:(0,r.jsx)(c.A,{sx:{p:1},children:(0,r.jsx)(eH,{})})}),e?(0,r.jsx)(ef,{}):null,(0,r.jsx)(c.A,{sx:{px:2,py:1.5},children:(0,r.jsx)(_.Ay,{level:"body-xs",textColor:"text.tertiary",noWrap:!0,children:"StaffWriter \xb7 \xa9 2026"})})]})})}var eT=n(69982);function eM(){let{open:e,quickRailVisible:t}=eP(),n=(e?eg.rs.appSidebarWidth:0)+eg.rs.appMenuCornerViewportInsetPx,l=eg.rs.topOffset+(eg.rs.glassBarHeightPx-24)/2;return(0,r.jsx)(c.A,{role:"presentation",sx:{position:"fixed",top:"".concat(l,"px"),left:"".concat(n,"px"),zIndex:1105,width:"".concat(eg.rs.appMenuCornerRailPx,"px"),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",transition:"left ".concat(eg.rs.appShellRailWidthTransitionMs,"ms ease"),"& button, & a":{pointerEvents:"auto"}},children:(0,r.jsxs)(d.A,{direction:"column",spacing:"".concat(6,"px"),alignItems:"center",sx:{width:"100%"},children:[(0,r.jsx)(eR,{}),t?(0,r.jsx)(eD,{}):null]})})}function eO(){let{open:e}=eP();return e?null:(0,r.jsx)(c.A,{sx:{position:"fixed",bottom:"".concat(eg.rs.bottomGapPx,"px"),left:"".concat(eg.rs.appMenuCornerViewportInsetPx,"px"),zIndex:1105,width:"".concat(eg.rs.appMenuCornerRailPx,"px"),display:"flex",justifyContent:"center",pointerEvents:"none","& button":{pointerEvents:"auto"}},children:(0,r.jsx)(em,{size:32})})}function eR(){let{mode:e,open:t,cycleLayout:n}=eP(),l=function(e){switch(e){case"minimap":return"Open full app sidebar";case"open":return"Collapse sidebar — hide minimap icons";case"bare":return"Show minimap navigation"}}(e);return(0,r.jsx)(g.A,{title:l,variant:"soft",children:(0,r.jsx)(m.Ay,{size:"sm",variant:"soft",color:"neutral",onClick:n,"aria-label":l,"aria-controls":eE,"aria-expanded":t,"aria-pressed":t,sx:{flexShrink:0,"--IconButton-size":"".concat(24,"px"),"--IconButton-radius":"50%",transition:"background-color 160ms ease, color 160ms ease, box-shadow 160ms ease",...t?{bgcolor:"primary.softBg",color:"primary.plainColor",boxShadow:"none"}:{"&:hover":{bgcolor:"neutral.softHoverBg"}}},children:(0,r.jsx)(eT.A,{fontSize:"small"})})})}function eD(){let e=(0,a.usePathname)();return(0,r.jsx)(d.A,{component:"nav",direction:"column",spacing:"".concat(6,"px"),alignItems:"center","aria-label":"Quick navigation",sx:{width:"100%"},children:ev.UI.map(t=>(0,r.jsx)(eG,{item:t,active:(0,ev.o1)(e,t)},t.id))})}function eG(e){let{item:t,active:n}=e;return(0,r.jsx)(g.A,{title:t.label,variant:"soft",placement:"right",children:(0,r.jsx)(m.Ay,{component:p(),href:t.href,size:"sm",variant:"soft",color:"neutral","aria-label":t.label,"aria-current":n?"page":void 0,sx:{flexShrink:0,...t.startsGroup?{"&&":{mt:"".concat(ev.Op,"px")}}:null,"--IconButton-size":"".concat(24,"px"),"--IconButton-radius":"50%",transition:"background-color 160ms ease, color 160ms ease, box-shadow 160ms ease",...n?{bgcolor:"primary.softBg",color:"primary.plainColor",boxShadow:"none"}:{bgcolor:"transparent",color:"text.tertiary","&:hover":{bgcolor:"neutral.softHoverBg",color:"text.primary"}},"& svg":{fontSize:"1.125rem"}},children:eS[t.id]})})}var eU=n(20258),eF=n(60459),eN=n(5262),eY=n(31021),eK=n(35454),eZ=n(82494);function eJ(){let e=(0,h.KJ)(e=>e.sections),t=(0,eZ.ao)(),n=l.useRef(null);return l.useEffect(()=>{var e;let t=n.current,r=null==t?void 0:t.querySelector("[aria-current]");t&&r&&(null==(e=t.scrollTo)||e.call(t,{left:r.offsetLeft-(t.clientWidth-r.offsetWidth)/2}))},[null==t?void 0:t.activeSectionId]),(0,r.jsx)(c.A,{ref:n,component:"nav","aria-label":"Sections",sx:{display:"flex",gap:.25,minWidth:0,overflowX:"auto",position:"relative",...eg.eL},children:e.map(e=>{let n=(null==t?void 0:t.activeSectionId)===e.id;return(0,r.jsx)(eN.A,{size:"sm",variant:n?"soft":"plain",color:"neutral","aria-current":n?"location":void 0,sx:{flexShrink:0,minHeight:28,fontWeight:n?"lg":"md"},...t?{onClick:()=>t.onSelect(e.id)}:{component:p(),href:(0,eK.PF)("/renderer",e.id)},children:(0,eY.a9)(e.title)},e.id)})})}let eV={blurPx:5,lightOpacity:.36,darkOpacity:.42},eX=e=>({display:"flex",alignItems:"center",gap:{xs:.5,lg:.75},...(0,eF.S6)(!0),py:{xs:.35,lg:.45},borderRadius:"lg",width:"100%",boxSizing:"border-box",minHeight:eg.rs.glassBarHeightPx,...function(e){let t=(0,h.V4)(e),n=e.getColorSchemeSelector("dark"),r="blur(".concat(eV.blurPx,"px) saturate(160%)");return{...t,backdropFilter:r,WebkitBackdropFilter:r,backgroundColor:"rgba(255, 255, 255, ".concat(eV.lightOpacity,")"),[n]:{...t[n],backgroundColor:"rgba(15, 18, 23, ".concat(eV.darkOpacity,")")}}}(e)});function e_(e){let{variant:t="full",railLayoutControls:n=!1,title:l}=e,{open:i}=eP(),a=(0,h.KJ)(e=>e.ready),o=(0,h.KJ)(e=>e.page),s=e=>l?"sections"!==e:a&&o.barContent.includes(e);if("rail"===t){let e=i?eg.rs.appSidebarWidth:0;return(0,r.jsx)(c.A,{component:"header",role:"banner",sx:{position:"fixed",top:0,left:"".concat(e,"px"),right:0,zIndex:1100,mt:"".concat(eg.rs.topOffset,"px"),pl:"".concat(eg.rs.clusterGutterPx+eg.rs.appMenuCornerShiftPx,"px"),pr:"".concat(eg.rs.clusterGutterPx,"px"),pointerEvents:"none",transition:"left 220ms ease",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxSizing:"border-box"},children:(0,r.jsx)(x.A,{variant:"plain",sx:e=>({...eX(e),pl:"".concat(eF.T-1,"px"),pointerEvents:"auto",width:"auto",flexShrink:0,boxSizing:"border-box",transition:"background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease"}),children:(0,r.jsx)(c.A,{sx:{display:"inline-flex",alignItems:"center",gap:.75},children:(0,r.jsx)(N,{layoutControls:n,compactChrome:!0})})})})}return(0,r.jsx)(c.A,{component:"header",role:"banner",sx:{width:"100%"},children:(0,r.jsxs)(x.A,{variant:"plain",sx:e=>({...eX(e),...(0,eF.S6)(s("logo")),justifyContent:"space-between",width:"100%",minWidth:0,boxSizing:"border-box",transition:"background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, backdrop-filter 180ms ease"}),children:[(0,r.jsxs)(c.A,{sx:{display:"flex",alignItems:"center",gap:"".concat(eF.kA,"px"),minWidth:0,flex:1},children:[s("logo")?(0,r.jsx)(c.A,{component:p(),href:ev.y3,sx:{display:"inline-flex",alignItems:"center",textDecoration:"none",color:"inherit",flexShrink:0},"aria-label":"StaffWriter home",children:(0,r.jsx)(eB,{size:eF.$S})}):null,s("title")&&(l||o.title.trim())?(0,r.jsx)(eU.A,{"data-testid":"bar-title",markdown:"**{{title}}**",values:{title:null!=l?l:o.title},sx:{flexShrink:1,maxWidth:s("sections")?"40%":"100%","& .sw-prose":{whiteSpace:"nowrap"},"& .sw-prose > p":{overflow:"hidden",textOverflow:"ellipsis"}}}):null,s("sections")?(0,r.jsx)(eJ,{}):null]}),(0,r.jsx)(N,{})]})})}var eq=n(18565),eQ=n(24794);function e$(e,t,n){return Math.max(t,Math.min(n,e))}function e0(e){let{onDrag:t,ariaLabel:n,disabled:i}=e,a=l.useRef(null),o=!!i,s=e=>{a.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch(e){}};return(0,r.jsx)(c.A,{role:"separator","aria-orientation":"vertical","aria-label":n,onPointerDown:e=>{o||(e.preventDefault(),a.current=e.clientX,e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{if(null==a.current)return;let n=e.clientX-a.current;0!==n&&(a.current=e.clientX,t(n))},onPointerUp:s,onPointerCancel:s,sx:{width:"6px",height:"100%",cursor:o?"default":"col-resize",userSelect:"none",touchAction:"none",bgcolor:"transparent",position:"relative",zIndex:2,display:{xs:"none",md:"block"},pointerEvents:o?"none":"auto",transition:"background-color 120ms ease","&:hover":o?void 0:{bgcolor:"primary.softBg"}}})}var e1=n(57763);let e2=l.createContext(null);function e5(e){let{children:t}=e,n=(0,a.usePathname)(),{viewLayout:i}=(0,R.O)(),{gradient:d}=(0,E.Wi)(),u=(0,h.KJ)(e=>e.page),[p,x]=l.useState(),f=!!p||u.barContent.length>0||u.barControls.length>0,m=u.barControls.length>0,g=f?0:eg.rs.topReserve-eg.rs.topOffset,{open:v,railWidthLayoutSeq:b}=eP(),{widths:j,setWidth:y,collapsed:A,toggleCollapsed:w}=function(e){let{storageKey:t,defaults:n,min:r,max:i}=e,[a,o]=l.useState(n),[s,c]=l.useState({nav:!1,pane:!1}),d=l.useRef(!1);l.useEffect(()=>{let e=function(e){try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}}(t);if(null==e?void 0:e.widths){var l,a;o({nav:e$(null!=(l=e.widths.nav)?l:n.nav,r.nav,i.nav),pane:e$(null!=(a=e.widths.pane)?a:n.pane,r.pane,i.pane)})}(null==e?void 0:e.collapsed)&&c({nav:!!e.collapsed.nav,pane:!!e.collapsed.pane}),d.current=!0},[t]),l.useEffect(()=>{if(d.current)try{window.localStorage.setItem(t,JSON.stringify({widths:a,collapsed:s}))}catch(e){}},[t,a,s]);let u=l.useCallback((e,t)=>{o(n=>({...n,[e]:e$(t,r[e],i[e])}))},[r,i]);return{widths:a,setWidth:u,collapsed:s,toggleCollapsed:l.useCallback(e=>{c(t=>({...t,[e]:!t[e]}))},[]),setCollapsed:l.useCallback((e,t)=>{c(n=>({...n,[e]:t}))},[])}}({storageKey:"sw.cdn.cols.v1",defaults:{nav:eg.rs.navWidth,pane:eg.rs.paneWidth},min:{nav:eg.rs.navMin,pane:eg.rs.paneMin},max:{nav:eg.rs.navMax,pane:eg.rs.paneMax}}),[S,C]=l.useState({nav:0,pane:0}),k=l.useMemo(()=>({nav:Math.max(j.nav,S.nav),pane:Math.max(j.pane,S.pane)}),[j,S]),z=u.barControls.includes("layout"),I=l.useMemo(()=>z?A:{nav:!1,pane:!1},[z,A]),[W,P]=l.useState(null),[B,H]=l.useState(null),[L,T]=l.useState(null),[M,O]=l.useState(!1),[G,U]=l.useState({nav:!0,pane:!0}),F=l.useRef(null),[N,Y]=l.useState(0),K=l.useCallback(e=>{F.current=e,Y(e=>e+1)},[]),Z=l.useRef(null),J=l.useRef(v),[V,X]=l.useState(eg.rs.streamLeftInsetShellPx),[_,q]=l.useState(0),Q=(0,s.D)(),[$,ee]=l.useState(!1);l.useEffect(()=>{ee(!0)},[]);let et=(0,o.A)(Q.breakpoints.up(eg.rs.shellSidebarBreakpoint)),en=!$||et,er=(0,o.A)("@media (min-width:".concat(Q.breakpoints.values[eg.rs.shellSidebarBreakpoint]+eg.rs.appSidebarWidth,"px)")),el=en&&(!v||!$||er),ei="horizontal"===i,ea=l.useMemo(()=>({navMount:W,paneMount:B,headerMount:L,setHasStreamHeader:O,setFilledColumns:U,setBarTitle:x,setColumnFloors:C}),[W,B,L]),eo=el&&!I.nav&&G.nav,es=el&&!I.pane&&G.pane,ec=ei?{mx:0}:function(e,t){let n=e>0?e+eg.rs.resizeGutterPx:0,r=t>0?t+eg.rs.resizeGutterPx:0,l=n?eg.rs.navWrapperLeftClearancePx:0,i="(100% - ".concat(n+r+eg.rs.maxWidth,"px) / 2");return{ml:"calc(".concat(n,"px + max(").concat(l,"px, ").concat(i,"))"),mr:"".concat(r,"px")}}(eo?k.nav:0,es?k.pane:0),ed={left:V,right:eo||es?eg.rs.clusterGutterPx:V},eu={flex:1,minWidth:0,boxSizing:"border-box",maxWidth:ei?"none":"".concat(eg.rs.maxWidth,"px"),...ei?{px:0}:en?{pl:"".concat(ed.left,"px"),pr:"".concat(ed.right,"px")}:{pl:"".concat(eg.rs.streamLeftInsetCompactPx,"px"),pr:"".concat(eg.rs.clusterGutterPx,"px")}},ep=l.useCallback(()=>{let e=Z.current;e&&X((0,eg.xe)({mainLeftViewport:e.getBoundingClientRect().left,appRailOpen:v}))},[v]);l.useLayoutEffect(()=>{ep();let e=Z.current,t=F.current,n=new ResizeObserver(ep);return e&&n.observe(e),t&&n.observe(t),window.addEventListener("resize",ep),()=>{n.disconnect(),window.removeEventListener("resize",ep)}},[ei,ep,n,N,eo,es,k]);let ex=en?"".concat(V,"px"):"".concat(eg.rs.streamLeftInsetCompactPx,"px"),eh=l.useCallback(()=>{if(!ei)return void q(0);q((0,eq.lh)(F.current))},[ei]);l.useLayoutEffect(()=>{if(eh(),!ei)return;let e=F.current;if(!e)return;let t=new ResizeObserver(()=>{eh()});for(let n of(t.observe(e),Array.from(e.children)))n instanceof HTMLElement&&t.observe(n);let n="undefined"!=typeof MutationObserver?new MutationObserver(()=>{eh()}):null;return n&&n.observe(e,{childList:!0}),window.addEventListener("resize",eh),()=>{t.disconnect(),null==n||n.disconnect(),window.removeEventListener("resize",eh)}},[ei,eh,n,V,v,I.pane,N]),l.useLayoutEffect(()=>{ep(),eh()},[v,b,ep,eh]),l.useLayoutEffect(()=>{let e=J.current;if(J.current=v,e===v)return;let t=eg.rs.appShellRailWidthTransitionMs+25,n=window.setTimeout(()=>{ep(),eh()},t);return()=>window.clearTimeout(n)},[v,ep,eh]);let ef=l.useMemo(()=>({navCollapsed:I.nav,paneCollapsed:I.pane,toggleNav:()=>w("nav"),togglePane:()=>w("pane"),columnsFit:el,hasColumns:el&&(G.nav||G.pane),hasNav:G.nav,hasPane:G.pane}),[I.nav,I.pane,w,el,G.nav,G.pane]),em="".concat((en?eg.rs.contentStreamTopReserveShellPx:eg.rs.contentStreamTopReserveCompactPx)-g,"px"),ev=ei?null:"".concat((en?eg.rs.sidebarAlignTopPx:eg.rs.sidebarAlignTopCompactPx)-g,"px"),eb=eg.rs.sidebarOuterInnerPaddingShiftPx,ej="calc(".concat(eg.rs.clusterGutterPx,"px + ").concat(eb,"px)"),ey="calc(".concat(Q.spacing(2)," - ").concat(eb,"px)"),eA=I.nav?{p:0}:ei?{px:0,py:1}:{pl:ej,pr:ey,pb:"".concat(eg.rs.bottomGapPx,"px"),pt:ev},ew=I.pane?{p:0}:ei?{px:0,py:1}:{pl:ey,pr:ej,pb:"".concat(eg.rs.bottomGapPx,"px"),pt:ev},eS=l.useCallback(e=>{let t=F.current;if(!t)return;let n=e.target;if(!n||t.contains(n)||0===e.deltaY)return;let r=(e,t)=>t>0?e.scrollTop+e.clientHeight<e.scrollHeight-1:t<0&&e.scrollTop>0,l=l=>{if(!l)return;let a=n instanceof HTMLElement?n:n.parentElement;for(;a&&l.contains(a);a=a.parentElement){if(a.scrollHeight>a.clientHeight+1){if(r(a,e.deltaY))return;if("horizontal"===i){(0,eQ.jU)(t.scrollWidth,t.clientWidth)>0&&(e.preventDefault(),t.scrollLeft+=e.deltaY,(0,eQ.kd)(t));return}e.preventDefault(),t.scrollTop+=e.deltaY;return}if(a===l)break}"horizontal"===i&&(0,eQ.jU)(t.scrollWidth,t.clientWidth)>0?(e.preventDefault(),t.scrollLeft+=e.deltaY,(0,eQ.kd)(t)):"horizontal"!==i&&(e.preventDefault(),t.scrollTop+=e.deltaY)};return W&&W.contains(n)?void l(W):B&&B.contains(n)?void l(B):void("horizontal"===i&&(0,eQ.jU)(t.scrollWidth,t.clientWidth)>0?(t.scrollLeft+=e.deltaY,(0,eQ.kd)(t)):"horizontal"!==i&&(t.scrollTop+=e.deltaY))},[W,B,i]);return(0,r.jsx)(D.w,{value:ef,children:(0,r.jsx)(e2.Provider,{value:ea,children:(0,r.jsxs)(c.A,{sx:{height:"100dvh",maxWidth:"100vw",display:"flex",flexDirection:"row",overflow:"hidden",position:"relative"},children:[(0,r.jsx)(eL,{}),(0,r.jsx)(eM,{}),(0,r.jsx)(eO,{}),(0,r.jsxs)(c.A,{onWheel:eS,sx:{flex:1,minWidth:0,height:"100%",overflow:"hidden",overflowX:"clip",position:"relative",isolation:"isolate",display:"flex",flexDirection:"column",px:0},children:[(0,r.jsx)(h.zs,{gradient:d}),(0,r.jsx)(c.A,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"row",alignItems:"stretch",boxSizing:"border-box"},children:(0,r.jsxs)(c.A,{ref:Z,component:"main",sx:{position:"relative",display:"flex",flexDirection:"column",minHeight:0,...eu,...ec,[eq.GF]:"".concat(_,"px")},children:[(0,r.jsxs)(c.A,{"data-testid":"shell-nav-wrapper",sx:{display:eo?"flex":"none",position:"absolute",...ei?{top:en?"".concat(eg.rs.topReserve-g,"px"):"".concat(eg.rs.topOffset,"px"),left:ex,right:"".concat(eg.rs.clusterGutterPx,"px"),bottom:"auto",width:"auto",height:"auto",maxHeight:"40vh",zIndex:1}:{top:0,bottom:0,right:"100%",overflow:"hidden",maxHeight:"100%",width:"".concat(k.nav+eg.rs.resizeGutterPx,"px")},flexDirection:"row",alignItems:"stretch",minHeight:0},children:[(0,r.jsx)(c.A,{ref:P,component:"nav",sx:{flex:1,width:"100%",minWidth:0,minHeight:0,pointerEvents:ei?"auto":"none",height:ei?"auto":"100%",maxHeight:ei?void 0:"100%",alignSelf:ei?"auto":"stretch",display:"flex",flexDirection:"column",overflowX:"hidden",overflowY:"hidden",overscrollBehavior:"contain",...eg.eL,...eA}}),ei?null:(0,r.jsx)(e0,{ariaLabel:"Resize side navigation",disabled:I.nav,onDrag:e=>y("nav",k.nav+e)})]}),ei?null:(0,r.jsxs)(c.A,{"data-testid":"shell-pane-wrapper",sx:{display:es?"flex":"none",position:"absolute",top:0,bottom:0,left:"100%",overflow:"hidden",maxHeight:"100%",width:"".concat(k.pane+eg.rs.resizeGutterPx,"px"),flexDirection:"row",alignItems:"stretch",minHeight:0},children:[(0,r.jsx)(e0,{ariaLabel:"Resize side pane",disabled:I.pane,onDrag:e=>y("pane",k.pane-e)}),(0,r.jsx)(c.A,{ref:H,sx:{flex:1,width:"100%",minWidth:0,minHeight:0,pointerEvents:"none",height:"100%",maxHeight:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",overflowX:"hidden",overflowY:"hidden",overscrollBehavior:"contain",...eg.eL,...ew}})]}),en&&f?(0,r.jsx)(c.A,{"data-testid":"shell-glass-toolbar-overlay",sx:{position:"absolute",top:"".concat(eg.rs.topOffset,"px"),...ei?{left:0,right:0,pl:ex,pr:"".concat(eg.rs.clusterGutterPx,"px")}:{left:0,right:0,pl:"".concat(ed.left,"px"),pr:"".concat(ed.right,"px")},zIndex:2,pointerEvents:"none","& > *":{pointerEvents:"auto"}},children:(0,r.jsx)(e_,{title:p})}):null,ei?(0,r.jsx)(c.A,{ref:T,"data-testid":"shell-stream-header",sx:{display:M?"block":"none",flexShrink:0,minWidth:0,pt:em,pl:ex,pr:"".concat(eg.rs.clusterGutterPx,"px")}}):null,(0,r.jsx)(e1.A,{ref:K,layout:i,gap:eg.rs.sectionGapPx/8,paddingTop:ei&&M?"".concat(eg.rs.sectionGapPx/2,"px"):em,scrollPaddingTop:ei?void 0:em,paddingLeft:ei?ex:void 0,children:t})]})})]}),!en&&m?(0,r.jsx)(c.A,{"data-testid":"shell-glass-rail-wrapper",sx:{display:{xs:"block",lg:"none"}},children:(0,r.jsx)(e_,{variant:"rail",railLayoutControls:!0})}):null]})})})}function e4(e){let{children:t}=e;return(0,r.jsx)(R.U,{children:(0,r.jsx)(eW,{children:(0,r.jsx)(eZ.sf,{children:(0,r.jsx)(e5,{children:t})})})})}let e3=eg.rs.paneWidth-eg.rs.horizontalInlineSidePaneWidthPx;e4.View=function(e){var t;let{sideNav:n,sidePane:a,streamHeader:o,barTitle:u,navMinWidth:p,paneMinWidth:x,children:h}=e,f=l.useContext(e2),m=(0,s.D)(),{viewLayout:g}=(0,R.O)(),v=(0,D.c)(),b=null!=(t=null==v?void 0:v.paneCollapsed)&&t,j="horizontal"===g,y=!!n,A=!!a,w=null==f?void 0:f.setFilledColumns;l.useLayoutEffect(()=>{null==w||w({nav:y,pane:A})},[y,A,w]);let S=null==f?void 0:f.setBarTitle;l.useLayoutEffect(()=>(null==S||S(u),()=>null==S?void 0:S(void 0)),[u,S]);let C=null==f?void 0:f.setColumnFloors;l.useLayoutEffect(()=>(null==C||C({nav:null!=p?p:0,pane:null!=x?x:0}),()=>null==C?void 0:C({nav:0,pane:0})),[p,x,C]);let k=j&&!!o,z=null==f?void 0:f.setHasStreamHeader;if(l.useEffect(()=>{if(k&&z)return z(!0),()=>z(!1)},[k,z]),!f)return(0,r.jsxs)(d.A,{sx:{minHeight:0,flex:1},children:[k?o:null,(0,r.jsxs)(d.A,{direction:{xs:"column",lg:"row"},sx:{flex:1,minHeight:0},children:[n&&(0,r.jsx)(c.A,{sx:{display:{xs:"none",lg:"block"},flex:"0 0 auto",minWidth:eg.rs.navWidth},children:n}),(0,r.jsx)(c.A,{sx:{flex:1,minWidth:0,minHeight:0},children:h}),a&&(0,r.jsx)(c.A,{sx:{display:{xs:"none",lg:"block"},flex:"0 0 auto",minWidth:eg.rs.paneWidth},children:a})]})]});let{navMount:I,paneMount:W,headerMount:P}=f,B=eg.rs.sectionGapPx/8,E=j&&a&&!b?(0,r.jsx)(c.A,{"data-block-stream-inline-pane":"",sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",minWidth:0,pr:m.spacing(B),mr:"-".concat(m.spacing(B)),...x?{"&&&":{width:x-e3,maxWidth:x-e3}}:null},children:a},"shell-inline-side-pane"):null;return(0,r.jsxs)(r.Fragment,{children:[E,h,k&&P?(0,i.createPortal)(o,P):null,I&&n?(0,i.createPortal)(n,I):null,!j&&W&&a?(0,i.createPortal)(a,W):null]})}},22969:(e,t,n)=>{n.d(t,{Op:()=>r,UI:()=>i,o1:()=>a,y3:()=>l});let r=18,l="/renderer",i=[{id:"renderer",href:l,label:"Renderer"},{id:"themes",href:"/themes",label:"Themes"},{id:"registry",href:"/registry",label:"Registry",startsGroup:!0},{id:"delivery",href:"/delivery",label:"Delivery"},{id:"services",href:"/services",label:"Services"}];function a(e,t){return!!e&&(e===t.href||e.startsWith("".concat(t.href,"/")))}},50499:(e,t,n)=>{n.d(t,{A:()=>A,N:()=>y});var r=n(95155),l=n(12115),i=n(5262),a=n(35447),o=n(47912),s=n(38096),c=n(64652),d=n(97363),u=n(67057),p=n(5058),x=n(36464),h=n(93609),f=n(86175),m=n(45123),g=n(35326),v=n(8518);let b={"auth/invalid-credential":"Wrong email or password.","auth/invalid-email":"That is not an email address.","auth/user-not-found":"Wrong email or password.","auth/wrong-password":"Wrong email or password.","auth/user-disabled":"This account is disabled.","auth/too-many-requests":"Too many attempts. Wait a little and try again.","auth/popup-blocked":"The browser blocked the sign-in window. Allow pop-ups and try again.","auth/unauthorized-domain":"Firebase does not allow sign-in from this address.","auth/operation-not-allowed":"This way of signing in is turned off in Firebase.","auth/network-request-failed":"The sign-in service could not be reached."},j=new Set(["auth/popup-closed-by-user","auth/cancelled-popup-request","auth/user-cancelled"]);function y(e){return(0,r.jsxs)(m.A,{viewBox:"0 0 24 24",...e,children:[(0,r.jsx)("path",{fill:"#4285F4",d:"M23.5 12.27c0-.82-.07-1.6-.2-2.36H12v4.47h6.45a5.52 5.52 0 0 1-2.39 3.62v3h3.87c2.26-2.09 3.57-5.16 3.57-8.73Z"}),(0,r.jsx)("path",{fill:"#34A853",d:"M12 24c3.24 0 5.96-1.07 7.93-2.91l-3.87-3a7.2 7.2 0 0 1-10.74-3.78H1.33v3.09A12 12 0 0 0 12 24Z"}),(0,r.jsx)("path",{fill:"#FBBC05",d:"M5.32 14.31a7.2 7.2 0 0 1 0-4.62V6.6H1.33a12 12 0 0 0 0 10.8l3.99-3.09Z"}),(0,r.jsx)("path",{fill:"#EA4335",d:"M12 4.77c1.76 0 3.34.61 4.59 1.8l3.43-3.44A12 12 0 0 0 1.33 6.6l3.99 3.09A7.16 7.16 0 0 1 12 4.77Z"})]})}function A(e){let{open:t,onClose:n}=e,{adapter:m,status:A}=(0,v.Z)(),[w,S]=l.useState(""),[C,k]=l.useState(""),[z,I]=l.useState(null),[W,P]=l.useState(null);l.useEffect(()=>{t&&"signedIn"===A&&n()},[t,A,n]),l.useEffect(()=>{t||(k(""),P(null),I(null))},[t]);let B=async(e,t)=>{I(e),P(null);try{await t()}catch(e){P(function(e){var t;let n=function(e){let t=null==e?void 0:e.code;return"string"==typeof t?t:""}(e);return j.has(n)?null:null!=(t=b[n])?t:"Signing in did not work. Try again."}(e))}finally{I(t=>t===e?null:t)}};return(0,r.jsx)(p.Ay,{open:t,onClose:n,children:(0,r.jsxs)(h.A,{"aria-label":"Sign in",sx:{width:360,maxWidth:"100%"},children:[(0,r.jsx)(x.A,{}),(0,r.jsx)(a.A,{children:"Sign in to StaffWriter"}),(0,r.jsx)(i.A,{variant:"outlined",color:"neutral",startDecorator:(0,r.jsx)(y,{}),loading:"google"===z,disabled:!m||"password"===z,onClick:()=>m&&B("google",()=>m.signInWithGoogle()),children:"Continue with Google"}),(0,r.jsx)(o.A,{children:"or"}),(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault(),m&&B("password",()=>m.signInWithPassword(w.trim(),C))},children:(0,r.jsxs)(f.A,{spacing:1.5,children:[(0,r.jsxs)(s.A,{required:!0,children:[(0,r.jsx)(c.A,{children:"Email"}),(0,r.jsx)(d.Ay,{type:"email",autoComplete:"email",value:w,onChange:e=>S(e.target.value)})]}),(0,r.jsxs)(s.A,{required:!0,children:[(0,r.jsx)(c.A,{children:"Password"}),(0,r.jsx)(d.Ay,{type:"password",autoComplete:"current-password",value:C,onChange:e=>k(e.target.value)})]}),W?(0,r.jsx)(g.Ay,{role:"alert",level:"body-sm",color:"danger",children:W}):null,(0,r.jsx)(i.A,{type:"submit",loading:"password"===z,disabled:!m,children:"Sign in"})]})}),(null==m?void 0:m.signUpUrl)?(0,r.jsxs)(g.Ay,{level:"body-sm",textColor:"text.tertiary",textAlign:"center",children:["New here?"," ",(0,r.jsx)(u.A,{href:m.signUpUrl,target:"_blank",rel:"noopener",children:"Create an account"})]}):null]})})}},59779:(e,t,n)=>{n.d(t,{M:()=>a});var r=n(56662),l=n(49003),i=n(94886);let a={none:{label:"No color",Icon:l.A},page:{label:"Page theme",Icon:i.A},dynamic:{label:"Follow cards",Icon:r.A}}},64729:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(95155);n(12115);var l=n(41530),i=n(92359);function a(e){let{lead:t,mode:n,compact:a=!1,children:o}=e;return a?(0,r.jsxs)(l.A,{sx:{display:"inline-flex",alignItems:"center",gap:"2px"},children:[t,n,o]}):(0,r.jsxs)(i.A,{variant:"soft",sx:{p:.25,borderRadius:999,bgcolor:"background.level1",display:"inline-flex",alignItems:"center",gap:.5},children:[t,(0,r.jsx)(i.A,{variant:"outlined",sx:{p:.25,borderRadius:999},children:n}),o]})}},78131:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(95155);n(12115);var l=n(84560),i=n(9435),a=n(83561),o=n(44503);let s={none:{color:"text.tertiary",bgcolor:"transparent",opacity:.45,borderColor:"transparent"},page:{color:"var(--joy-palette-primary-plainColor)",bgcolor:"var(--joy-palette-primary-softBg)",borderColor:"transparent"},dynamic:{color:"var(--joy-palette-primary-plainColor)",bgcolor:"var(--joy-palette-primary-softBg)",borderColor:"var(--joy-palette-primary-plainColor)",boxShadow:"0 0 10px 1px var(--joy-palette-primary-plainColor)",filter:"saturate(1.5) brightness(1.15)"}};function c(e){let{theme:t,look:n,hint:c,label:d=c,buttonSize:u=28,children:p,sx:x,...h}=e,f=t.swatch?{...s[n],...{"--joy-palette-primary-plainColor":t.swatch}}:s[n],m={"--IconButton-size":"".concat(u+4,"px"),"--IconButton-radius":"50%",border:"2px solid",transition:"box-shadow 120ms ease-out, opacity 120ms ease-out",...f,"--Icon-color":"currentColor","&:hover, &:active":{...f,opacity:"none"===n?.75:1}};return(0,r.jsx)(a.WB,{theme:t,fonts:o.e,sx:{display:"inline-flex"},children:(0,r.jsx)(i.A,{title:c,variant:"soft",children:(0,r.jsx)(l.Ay,{size:"sm",variant:"plain",color:"neutral","aria-label":d,...h,sx:x?[m,...Array.isArray(x)?x:[x]]:m,children:p})})})}},82494:(e,t,n)=>{n.d(t,{ao:()=>s,sf:()=>o,tT:()=>c});var r=n(95155),l=n(12115);let i=l.createContext(null),a=l.createContext(()=>{});function o(e){let{children:t}=e,[n,o]=l.useState(null);return(0,r.jsx)(a.Provider,{value:o,children:(0,r.jsx)(i.Provider,{value:n,children:t})})}function s(){return l.useContext(i)}function c(e,t){let n=l.useContext(a),r=l.useRef(t);r.current=t,l.useEffect(()=>(n({activeSectionId:e,onSelect:e=>r.current(e)}),()=>n(null)),[e,n])}},94540:(e,t,n)=>{n.d(t,{c:()=>o,w:()=>a});var r=n(95155),l=n(12115);let i=l.createContext(null);function a(e){let{value:t,children:n}=e;return(0,r.jsx)(i.Provider,{value:t,children:n})}function o(){return l.useContext(i)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8624],{24381:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(83694),l=n(95155);let s=(0,r.A)((0,l.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},42908:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(83694),l=n(95155);let s=(0,r.A)((0,l.jsx)("path",{d:"M12 5V3.21c0-.45-.54-.67-.85-.35l-2.8 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.32.31.86.09.86-.36V7c3.31 0 6 2.69 6 6 0 2.72-1.83 5.02-4.31 5.75-.42.12-.69.52-.69.95 0 .65.62 1.16 1.25.97C17.57 19.7 20 16.64 20 13c0-4.42-3.58-8-8-8m-6 8c0-1.34.44-2.58 1.19-3.59.3-.4.26-.95-.09-1.31-.42-.42-1.14-.38-1.5.1-1 1.34-1.6 3-1.6 4.8 0 3.64 2.43 6.7 5.75 7.67.63.19 1.25-.32 1.25-.97 0-.43-.27-.83-.69-.95C7.83 18.02 6 15.72 6 13"}),"RestartAltRounded")},52882:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(83694),l=n(95155);let s=(0,r.A)((0,l.jsx)("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2m6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2"}),"PauseRounded")},62853:(e,t,n)=>{Promise.resolve().then(n.bind(n,86513))},69400:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(83694),l=n(95155);let s=(0,r.A)((0,l.jsx)("path",{d:"M12 3c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1m5.14 2.86c-.39.39-.38 1-.01 1.39 1.13 1.2 1.83 2.8 1.87 4.57.09 3.83-3.08 7.13-6.91 7.17C8.18 19.05 5 15.9 5 12c0-1.84.71-3.51 1.87-4.76.37-.39.37-1-.01-1.38-.4-.4-1.05-.39-1.43.02C3.98 7.42 3.07 9.47 3 11.74c-.14 4.88 3.83 9.1 8.71 9.25 5.1.16 9.29-3.93 9.29-9 0-2.37-.92-4.51-2.42-6.11-.38-.41-1.04-.42-1.44-.02"}),"PowerSettingsNewRounded")},72588:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(83694),l=n(95155);let s=(0,r.A)((0,l.jsx)("path",{d:"M19 8h-1.81c-.45-.78-1.07-1.45-1.82-1.96l.93-.93c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0l-1.47 1.47C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L9.11 3.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l.92.93C7.88 6.55 7.26 7.22 6.81 8H5c-.55 0-1 .45-1 1s.45 1 1 1h1.09c-.05.33-.09.66-.09 1v1H5c-.55 0-1 .45-1 1s.45 1 1 1h1v1c0 .34.04.67.09 1H5c-.55 0-1 .45-1 1s.45 1 1 1h1.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H19c.55 0 1-.45 1-1s-.45-1-1-1h-1.09c.05-.33.09-.66.09-1v-1h1c.55 0 1-.45 1-1s-.45-1-1-1h-1v-1c0-.34-.04-.67-.09-1H19c.55 0 1-.45 1-1s-.45-1-1-1m-6 8h-2c-.55 0-1-.45-1-1s.45-1 1-1h2c.55 0 1 .45 1 1s-.45 1-1 1m0-4h-2c-.55 0-1-.45-1-1s.45-1 1-1h2c.55 0 1 .45 1 1s-.45 1-1 1"}),"BugReportRounded")},81864:(e,t,n)=>{"use strict";function r(e,t){return"".concat(e," ").concat(t).concat(1===e?"":"s")}n.d(t,{h:()=>r})},86513:(e,t,n)=>{"use strict";n.d(t,{default:()=>L});var r=n(95155),l=n(12115),s=n(20804),o=n(11438),a=n(41530),i=n(5262),c=n(97363),u=n(35326),d=n(628),h=n(8518),x=n(54170),f=n(55278);let p={log:"text.secondary",request:"text.primary",warn:"warning.plainColor",error:"danger.plainColor"};function m(e){let{entries:t}=e,n=l.useRef(null),s=l.useRef(!0);return l.useLayoutEffect(()=>{s.current&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[t]),(0,r.jsx)(a.A,{ref:n,role:"log","aria-label":"Server log",tabIndex:0,onScroll:e=>{let{scrollTop:t,scrollHeight:n,clientHeight:r}=e.currentTarget;s.current=n-t-r<24},sx:{maxHeight:360,overflow:"auto",fontFamily:"code",fontSize:"xs",lineHeight:1.7},children:t.map(e=>(0,r.jsxs)(a.A,{sx:{display:"flex",gap:1.5},children:[(0,r.jsx)(a.A,{component:"span",sx:{color:"text.tertiary",flexShrink:0},children:new Date(e.at).toLocaleTimeString("en-GB",{hour12:!1})}),(0,r.jsx)(a.A,{component:"span",sx:{color:p[e.level],whiteSpace:"pre-wrap",overflowWrap:"anywhere",minWidth:0},children:e.text})]},e.seq))})}function y(e){let{onKey:t}=e,[n,s]=l.useState("");return(0,r.jsxs)(a.A,{component:"form",onSubmit:e=>{e.preventDefault(),n.trim()&&t(n.trim())},sx:{display:"flex",flexWrap:"wrap",gap:1},children:[(0,r.jsx)(c.Ay,{size:"sm",type:"password",autoComplete:"off",placeholder:"Control key",value:n,onChange:e=>s(e.target.value),slotProps:{input:{"aria-label":"Control key for the log"}}}),(0,r.jsx)(i.A,{size:"sm",type:"submit",variant:"soft",color:"neutral",disabled:!n.trim(),children:"Show log"})]})}function v(e){let{leftMs:t,needsKey:n}=e,{entries:s,wantsKey:o,error:i,giveKey:c}=function(e){let{adapter:t}=(0,h.Z)(),[n,r]=l.useState([]),[s,o]=l.useState(null),[a,i]=l.useState(()=>{var e;return null!=(e=window.sessionStorage.getItem(f.qK))?e:""}),c=l.useRef({instance:"",seq:0}),u=e&&!a,d=l.useCallback(async()=>{try{let e=await (null==t?void 0:t.idToken()),n=await fetch("/api/debug?after=".concat(c.current.seq),{cache:"no-store",headers:{...e?{authorization:"Bearer ".concat(e)}:null,...a?{"x-sw-control-key":a}:null}}),r=await n.json();if(n.ok)return{log:r};return{refused:String(r.error),wrongKey:401===n.status}}catch(e){return null}},[t,a]),p=l.useCallback(e=>{if(!e)return;if("refused"in e){o(e.refused),e.wrongKey&&(window.sessionStorage.removeItem(f.qK),i(""));return}o(null);let{instance:t,entries:n}=e.log;if(t!==c.current.instance){let e=""===c.current.instance;if(c.current={instance:t,seq:0},!e)return void r([])}let l=n.filter(e=>e.seq>c.current.seq);l.length&&(c.current.seq=l[l.length-1].seq,r(e=>[...e,...l].slice(-500)))},[]);return(0,x.n)(d,p,!u,0,2e3),{entries:n,wantsKey:u,error:s,giveKey:e=>{window.sessionStorage.setItem(f.qK,e),o(null),i(e)}}}(n);return(0,r.jsx)(d.A,{title:"Debug",actions:(0,r.jsx)(u.Ay,{level:"body-xs",children:"Ends in ".concat(Math.max(1,Math.ceil(t/6e4))," min")}),children:(0,r.jsxs)(a.A,{sx:{mt:1.5,display:"flex",flexDirection:"column",gap:1.5},children:[i?(0,r.jsx)(u.Ay,{role:"alert",level:"body-sm",color:"danger",children:i}):null,o?(0,r.jsx)(y,{onKey:c}):null,s.length?(0,r.jsx)(m,{entries:s}):null,s.length||o||i?null:(0,r.jsx)(u.Ay,{level:"body-sm",children:"No lines yet."})]})})}var g=n(20258),j=n(81864),A=n(54295),w=n(59241),b=n(64641);let k=n(85657).W2.map((e,t)=>Array.from(e,(e,n)=>"#"===e?"M".concat(n+.5," ").concat(t+.5,"h0"):"").join("")).join(""),C={online:"var(--joy-palette-success-500)",partial:"var(--joy-palette-warning-500)",offline:"var(--joy-palette-danger-500)"};function S(e){let{place:t,online:n,paused:r,total:l,self:s}=e,o=["".concat(t,": ").concat(n," of ").concat(l," online")];return r&&o.push("".concat(r," paused")),s&&o.push("with this server"),o.join(", ")}function M(e){let{nodes:t}=e,n=(0,w.Sg)(t),l=n.length?n.map(S).join("; "):"no server location known";return(0,r.jsxs)(a.A,{component:"svg",viewBox:"0 0 ".concat(w.yh," ").concat(w.xw),role:"img","aria-label":"World map of servers. ".concat(l),sx:{display:"block",width:"100%",height:"auto"},children:[(0,r.jsx)("path",{d:k,fill:"none",stroke:"var(--joy-palette-text-tertiary)",strokeOpacity:.45,strokeWidth:.62,strokeLinecap:"round"}),n.map(e=>{let t=function(e){let{online:t,paused:n,total:r}=e;return t===r?"online":t||n?"partial":"offline"}(e);return(0,r.jsxs)("g",{"data-marker":t,transform:"translate(".concat(e.x," ").concat(e.y,")"),children:[(0,r.jsx)("title",{children:S(e)}),e.self?(0,r.jsx)("circle",{"data-self":"",r:2.8,fill:C[t],fillOpacity:.18,stroke:C[t],strokeWidth:.3}):null,(0,r.jsx)("circle",{r:e.total>1?1.7:1.2,fill:C[t],stroke:"var(--joy-palette-background-surface)",strokeWidth:.35}),e.total>1?(0,r.jsx)("text",{dy:"0.35em",textAnchor:"middle",fontSize:1.9,fontWeight:700,fill:"#fff",children:e.total}):null]},"".concat(e.x," ").concat(e.y))})]})}let W={xs:"auto minmax(0, 1fr) 4.5rem",sm:"auto minmax(0, 1fr) minmax(0, 1fr) 4.5rem 4.5rem"},q=(e,t)=>({gridColumn:{xs:e,sm:"auto"},gridRow:{xs:t,sm:"auto"}});function R(e){let{node:t}=e;return(0,r.jsxs)(a.A,{component:"li",sx:{display:"grid",gridTemplateColumns:W,alignItems:"center",columnGap:1.5,py:.75,borderTop:"1px solid",borderColor:"divider"},children:[(0,r.jsx)(A.A,{tone:t.paused?"paused":t.online?"up":"down"}),(0,r.jsxs)(u.Ay,{level:"title-sm",noWrap:!0,children:[t.id.toUpperCase(),t.self?(0,r.jsxs)(u.Ay,{level:"body-xs",textColor:"text.tertiary",children:[" ","\xb7 this server"]}):null]}),(0,r.jsx)(u.Ay,{level:"body-sm",noWrap:!0,sx:q(2,2),children:(0,w.fW)(t)}),(0,r.jsx)(u.Ay,{level:"body-sm",sx:{...q(3,1),textAlign:{xs:"right",sm:"left"}},children:function(e){let{online:t,paused:n}=e;return n?"Paused":t?"Online":"Offline"}(t)}),(0,r.jsx)(u.Ay,{level:"body-sm",textAlign:"right",noWrap:!0,sx:q(3,2),children:(0,b.A)(t.latencyMs)})]})}function H(e){let{network:t,state:n,latencyMs:s}=e,o=l.useMemo(()=>{var e;return(null!=(e=null==t?void 0:t.nodes)?e:[]).map(e=>e.self?{...e,online:"running"===n,paused:"paused"===n,latencyMs:s}:e)},[t,n,s]),i=o.filter(e=>e.online).length;return(0,r.jsxs)(d.A,{title:"Network",children:[(0,r.jsx)(g.A,{role:"status","aria-label":"Servers online",markdown:t?"=={{online}} of {{servers}} online==":"_Checking the servers…_",values:{online:i,servers:(0,j.h)(o.length,"server")}}),(null==t?void 0:t.problem)?(0,r.jsx)(u.Ay,{level:"body-sm",color:"warning",children:t.problem}):null,(0,r.jsx)(a.A,{sx:{my:1.5},children:(0,r.jsx)(M,{nodes:o})}),(0,r.jsx)(a.A,{component:"ul","aria-label":"Servers",sx:{listStyle:"none",m:0,p:0},children:o.map(e=>(0,r.jsx)(R,{node:e},e.id))})]})}var K=n(5943),_=n(96391);function L(){let{health:e,state:t,node:n,network:l,control:a,setControl:i,refresh:c}=(0,_.U)(),u=(0,f.H7)({status:a,instance:null==n?void 0:n.instance,onStatus:i,refresh:c}),d=(0,s.u)();return(0,r.jsxs)(o.default.View,{barTitle:"Delivery",children:[(0,r.jsx)(K.A,{state:t,latencyMs:e.latencyMs,node:n,port:d,controls:u}),u.admin&&(null==a?void 0:a.debugLeftMs)&&"off"!==a.access?(0,r.jsx)(v,{leftMs:a.debugLeftMs,needsKey:"key"===a.access}):null,(0,r.jsx)(H,{network:l,state:t,latencyMs:e.latencyMs})]})}}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,8245,7254,9057,4477,8441,1255,7358],()=>e(e.s=62853)),_N_E=e.O()}]);
|
package/.next/static/chunks/app/(app)/{layout-018c19697d98a239.js → layout-5286ba00b484976e.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{75777:(e,s,_)=>{Promise.resolve().then(_.bind(_,11438))}},e=>{e.O(0,[9627,277,5004,2246,7240,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{75777:(e,s,_)=>{Promise.resolve().then(_.bind(_,11438))}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,8245,7254,9057,8441,1255,7358],()=>e(e.s=75777)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6905],{5540:(e,t,n)=>{"use strict";n.d(t,{default:()=>k});var r=n(95155),l=n(12115),a=n(90272),s=n(41530),o=n(5262),i=n(28257),d=n(8518),c=n(35042),u=n(86400),h=n(
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6905],{5540:(e,t,n)=>{"use strict";n.d(t,{default:()=>k});var r=n(95155),l=n(12115),a=n(90272),s=n(41530),o=n(5262),i=n(28257),d=n(8518),c=n(35042),u=n(86400),h=n(61387),v=n(97363),f=n(67057),g=n(35326),p=n(65094),m=n(91262),x=n(89742),j=n(87654),y=n(87082);function b(e){let{projectId:t,saved:n,published:a,served:i,onSaved:c}=e,{admin:u,adapter:h}=(0,d.Z)(),[b,w]=l.useState(n),[A,S]=l.useState(!1),[C,T]=l.useState(null);l.useEffect(()=>w(n),[n]);let k=b&&b!==n?(0,m.C1)(b):null,R=async e=>{S(!0),T(null);try{await (0,x.sV)(h,t,e),e||w(""),c()}catch(e){T(e instanceof Error?e.message:"The address was not saved.")}finally{S(!1)}},N=u?k||(n&&b===n?i?(0,r.jsxs)(r.Fragment,{children:["Served at"," ",(0,r.jsxs)(f.A,{href:"/".concat(n),target:"_blank",rel:"noopener",children:["/",n]})]}):a?"Saved. This server does not show the page to everyone.":"Saved. Served once the project is published.":"A long, wordy address, such as introduction-to-the-solar-system."):"Only a server admin sets addresses.";return(0,r.jsxs)(j.A,{component:"section","aria-label":"URL",sx:{...y.Lt,py:1},children:[(0,r.jsx)(y.Ay,{lead:(0,r.jsx)(p.A,{"aria-hidden":!0}),children:(0,r.jsx)(g.Ay,{level:"title-md",children:"URL"})}),(0,r.jsxs)(s.A,{component:"form",onSubmit:e=>{e.preventDefault(),b&&b!==n&&!k&&R(b)},sx:{pl:"".concat(y.Ah,"px"),display:"flex",flexDirection:"column",gap:.75,pt:.5,pb:.5},children:[(0,r.jsxs)(s.A,{sx:{display:"flex",flexWrap:"wrap",gap:1},children:[(0,r.jsx)(v.Ay,{size:"sm",startDecorator:"/",value:b,placeholder:"address-of-this-page",error:!!k,onChange:e=>w(e.target.value.toLowerCase().replace(/\s+/g,"-")),slotProps:{input:{"aria-label":"URL alias",maxLength:m.y3,spellCheck:!1,readOnly:!u}},sx:{flex:"1 1 260px",minWidth:0}}),(0,r.jsx)(o.A,{size:"sm",type:"submit",loading:A,disabled:!u||!b||b===n||!!k,children:"Save"}),(0,r.jsx)(o.A,{size:"sm",variant:"plain",color:"neutral",disabled:!u||!n||A,onClick:()=>R(null),children:"Remove"})]}),(0,r.jsx)(g.Ay,{level:"body-xs",textColor:"text.tertiary",role:"status",sx:{overflowWrap:"anywhere"},children:N}),C?(0,r.jsx)(g.Ay,{level:"body-xs",color:"danger",role:"alert",children:C}):null]})]})}var w=n(26309);let A={title:"Page data",hint:"This page is saved to your StaffWriter project as you edit. Importing replaces the page settings and entries with the same id."},S={saved:{label:"Saved",color:"success"},pending:{label:"Saving…",color:"neutral"},saving:{label:"Saving…",color:"neutral"},failed:{label:"Not saved",color:"danger"},changed:{label:"Not saved",color:"danger"},missing:{label:"Not saved",color:"danger"}},C={changed:"The project was changed elsewhere, so edits made here are not saved.",missing:"The project was deleted, so edits made here are not saved.",failed:"The last change was not saved."};function T(e){var t,n;let{projectId:v,document:f,binding:g,refresh:p,reopen:m}=e,{project:x}=f,j=null!=(n=null==(t=(0,d.Z)().user)?void 0:t.uid)?n:"",y=(0,c.R)(),w=!!y.find(j,v),{status:T,error:k}=l.useSyncExternalStore(g.subscribe,g.getState,g.getState),R=w?(0,c.w)(j,v,x.urlAlias||void 0):void 0,N={render:"/renderer/cloud/".concat(encodeURIComponent(v)),preview:R,state:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{size:"sm",variant:"soft",color:x.draft?"warning":"success",children:x.draft?"Draft":"Published"}),w?(0,r.jsx)(i.A,{size:"sm",variant:"soft",color:"primary",children:"Live"}):null,(0,r.jsx)(i.A,{size:"sm",variant:"outlined",color:S[T].color,role:"status","aria-label":"Saving",children:S[T].label})]})};return(0,r.jsx)(u.aT,{value:N,children:(0,r.jsx)(h.A,{data:A,intro:(0,r.jsxs)(r.Fragment,{children:[C[T]?(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{color:"danger",endDecorator:"failed"===T?(0,r.jsx)(o.A,{size:"sm",variant:"soft",color:"danger",onClick:()=>void g.flush(),children:"Retry"}):(0,r.jsx)(o.A,{size:"sm",variant:"soft",color:"danger",onClick:()=>window.confirm("Drop the edits made here and open the project as it is stored?")&&m(),children:"Reload"}),children:[C[T],k].filter(Boolean).join(" ")})}):null,(0,r.jsx)(s.A,{children:(0,r.jsx)(b,{projectId:v,saved:x.urlAlias,published:!x.draft,served:w,onSaved:()=>{p(),y.reload()}})})]})})})}function k(e){let{projectId:t}=e;return(0,r.jsx)(w.A,{projectId:t,title:"Registry",children:e=>(0,r.jsx)(T,{...e,projectId:t})})}},26309:(e,t,n)=>{"use strict";n.d(t,{CloudRendererView:()=>j,A:()=>x});var r=n(95155),l=n(12115),a=n(41530),s=n(35326),o=n(83561),i=n(8518),d=n(59506),c=n(90717),u=n(38182);function h(e){return function e(t){var n;if(Array.isArray(t))return"[".concat(t.map(e).join(","),"]");if(!(0,c.u4)(t))return null!=(n=JSON.stringify(t))?n:"null";let r=Object.keys(t).filter(e=>void 0!==t[e]&&"updatedAt"!==e&&"createdAt"!==e).sort().map(n=>"".concat(JSON.stringify(n),":").concat(e(t[n])));return"{".concat(r.join(","),"}")}({...e,sections:e.sections.map(e=>({...e,cards:e.cards.map(e=>({...e,content:function(e){try{var t,n,r,l;let a=(0,o.$P)(o.GM).schema.nodeFromJSON(e).toJSON(),s=[...null!=(l=a.content)?l:[]];for(;(null==(t=s.at(-1))?void 0:t.type)==="paragraph"&&!(null==(r=s.at(-1))||null==(n=r.content)?void 0:n.length);)s.pop();return{...a,content:s}}catch(t){return e}}(e.content)}))}))})}var v=n(50797),f=n(32153),g=n(52134),p=n(11438);let m=new WeakMap;function x(e){var t;let{projectId:n,title:c,children:g}=e,x=function(e){var t,n;let{user:r,adapter:a,status:s}=(0,i.Z)(),c=null==r?void 0:r.uid,g=(0,v.eU)(),p=l.useMemo(()=>a&&c?async()=>({uid:c,projectId:e,found:await a.readProject(c,e)}):null,[a,c,e]),x=(0,f.i)(p),j=(null==(t=x.value)?void 0:t.uid)===c&&(null==(n=x.value)?void 0:n.projectId)===e?x.value:null,[y,b]=l.useState(null),w=(null==j?void 0:j.found)&&j.found!==y?j.found:null,A=l.useRef(w);A.current=w;let S=!!w,[C,T]=l.useState(null),k="".concat(c,"/").concat(e);l.useEffect(()=>{let t=A.current;if(!a||!c||!S||!t)return;let n=function(e,t,n){var r,l;let a=null!=(r=m.get(e))?r:new Map;m.set(e,a);let s=null!=(l=a.get(t))?l:{binding:n(),views:0};return a.set(t,s),s.views+=1,s.binding}(a,k,()=>(function(e){let t,{snapshot:n,save:r,delayMs:l=1500}=e,a=new Set(n.themes.map(e=>e.id)),s=[...e.themes.filter(e=>!a.has(e.id)),...n.themes],i=(0,o.dZ)((0,o.z0)(JSON.stringify({version:o.Ny,...n,themes:s})));function d(){let{page:e,sections:t,themes:n}=i.getSnapshot();return(0,u.U)(e,t,n)}let c=new Set,v={status:"saved",error:""},f=e.version,g=h(d()),p=null,m=!1,x=e=>{e.preventDefault(),e.returnValue=""},j=()=>{"hidden"===document.visibilityState&&w()};function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(v.status!==e||v.error!==t){v={status:e,error:t};{let t="saved"===e?"removeEventListener":"addEventListener";window[t]("beforeunload",x),document[t]("visibilitychange",j)}c.forEach(e=>e())}}function b(){clearTimeout(t),t=setTimeout(()=>void w(),l)}function w(){if(clearTimeout(t),p)return p.then(w);if(m)return Promise.resolve();let e=d(),n=h(e);return n===g?(y("saved"),Promise.resolve()):(y("saving"),p=r(e,f).then(e=>{if(!m){if("string"==typeof e){m=!0,y(e);return}f=e.version,g=n,h(d())===g?y("saved"):(y("pending"),b())}},e=>{m||y("failed",e instanceof Error?e.message:"Something went wrong.")}).finally(()=>{p=null}))}return i.subscribe(()=>{if(!m){if(!p&&h(d())===g){clearTimeout(t),y("saved");return}p||y("pending"),b()}}),{store:i,getState:()=>v,subscribe:e=>(c.add(e),()=>{c.delete(e)}),flush:w,discard(){m=!0,clearTimeout(t),y("saved")}}})({snapshot:(0,d.e)(t.page),version:t.version,themes:g.getSnapshot().themes,save:(t,n)=>a.savePage(c,e,t,n)}));return T({key:k,binding:n}),()=>{var e;T(null);let t=null==(e=m.get(a))?void 0:e.get(k);(null==t?void 0:t.binding)===n&&(t.views-=1,n.flush().then(()=>{var e,r;let{status:l}=n.getState();"saved"!==l||t.views||(null==(e=m.get(a))?void 0:e.get(k))!==t||null==(r=m.get(a))||r.delete(k)}))}},[a,c,e,k,S,g]);let R=w&&(null==C?void 0:C.key)===k?C.binding:null;return{document:w,binding:R,note:c?x.error?"The project could not be read. ".concat(x.error):j&&!j.found?"This project was not found.":"Reading the project…":"loading"===s?"Loading…":"Sign in to open your cloud pages.",refresh:x.reload,reopen:()=>{var e;a&&(null==j?void 0:j.found)&&(null==R||R.discard(),null==(e=m.get(a))||e.delete(k),b(j.found),x.reload())}}}(n),{document:j,binding:y,note:b}=x,w=(0,v.mt)(null!=(t=null==y?void 0:y.store)?t:null);return j&&y&&w?(0,r.jsx)(o.xF,{store:y.store,children:g({...x,document:j,binding:y})},n):(0,r.jsx)(p.default.View,{barTitle:c,children:(0,r.jsx)(a.A,{children:(0,r.jsx)(s.Ay,{level:"body-sm",textColor:"text.tertiary",textAlign:"center",role:"status",children:b})})})}function j(e){let{projectId:t}=e;return(0,r.jsx)(x,{projectId:t,title:"Renderer",children:()=>(0,r.jsx)(g.default,{registryHref:"/registry/cloud/".concat(encodeURIComponent(t))})})}},59506:(e,t,n)=>{"use strict";n.d(t,{e:()=>l});var r=n(83561);function l(e){if(e.snapshot)return e.snapshot;let{title:t,description:n,createdAt:l,updatedAt:a}=e,s=e.cards.filter(e=>e.markdown).map((e,t)=>({id:"card-cloud-".concat(t+1),name:e.name,content:(0,r.Kl)(e.markdown)}));return{page:{...r._U,title:t,description:n,createdAt:l,updatedAt:a},sections:s.length?[{schemaVersion:r.f$,id:"section-cloud",title:t,themeId:"",cards:s,updatedAt:a}]:[],themes:[]}}},85184:(e,t,n)=>{Promise.resolve().then(n.bind(n,5540))},91262:(e,t,n)=>{"use strict";n.d(t,{C1:()=>a,Vj:()=>s,y3:()=>r});let r=96,l=/^[a-z0-9]+(-[a-z0-9]+)*$/;function a(e){return e.length<24?"At least ".concat(24," characters; ").concat(e.length," so far."):e.length>r?"At most ".concat(r," characters."):l.test(e)?null:"Lower-case letters and digits, with single hyphens between."}function s(e){return"string"==typeof e&&null===a(e)}}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,6252,31,8245,7254,9057,3861,2134,8349,8441,1255,7358],()=>e(e.s=85184)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4671],{8138:(e,t,l)=>{"use strict";l.d(t,{wJ:()=>m,Pf:()=>k,ed:()=>A,IW:()=>w,UO:()=>v,Rg:()=>b,TP:()=>y});let r=e=>e.replace(/[&<>"]/g,e=>({"&":"&","<":"<",">":">",'"':"""})[e]),n=/^(https?:|mailto:|tel:|#|\/(?!\/))/i,a=/^(https?:\/\/|data:image\/(png|jpe?g|gif|webp);)/i,i={bold:"strong",italic:"em",underline:"u",strike:"s",code:"code"},s=e=>{var t;return null!=(t=e.content)?t:[]};function o(e){var t,l,c,d,u;if("hardBreak"===e.type)return"<br>";if("image"===e.type){let n=String(null!=(c=null==(t=e.attrs)?void 0:t.src)?c:"");return a.test(n)?'<img src="'.concat(r(n),'" alt="').concat(r(String(null!=(d=null==(l=e.attrs)?void 0:l.alt)?d:"")),'">'):""}return void 0===e.text?s(e).map(o).join(""):(null!=(u=e.marks)?u:[]).reduce((e,t)=>{if("link"===t.type){var l,a;let i=String(null!=(a=null==(l=t.attrs)?void 0:l.href)?a:"");return n.test(i)?'<a href="'.concat(r(i),'" target="_blank">').concat(e,"</a>"):e}let s=i[t.type];return s?"<".concat(s,">").concat(e,"</").concat(s,">"):e},r(e.text))}let c=e=>{var t;return null!=(t=e.text)?t:s(e).map(c).join("")};function d(e,t){return s(e).map(e=>{let l=s(e).filter(e=>{var t;return!/List$/.test(null!=(t=e.type)?t:"")}),r=s(e).filter(e=>{var t;return/List$/.test(null!=(t=e.type)?t:"")}),n=t?' class="ql-indent-'.concat(Math.min(t,8),'"'):"";return"<li".concat(n,">").concat(l.map(o).join("<br>")||"<br>","</li>").concat(r.map(e=>d(e,t+1)).join(""))}).join("")}function u(e){switch(e.type){case"paragraph":return"<p>".concat(o(e)||"<br>","</p>");case"heading":{var t;let l=Math.min(3,Math.max(1,Number(null==(t=e.attrs)?void 0:t.level)||1));return"<h".concat(l,">").concat(o(e),"</h").concat(l,">")}case"bulletList":return"<ul>".concat(d(e,0),"</ul>");case"orderedList":return"<ol>".concat(d(e,0),"</ol>");case"blockquote":return"<blockquote>".concat(s(e).map(o).join("<br>"),"</blockquote>");case"codeBlock":return'<pre class="ql-syntax">'.concat(r(c(e)),"</pre>");case"horizontalRule":return"<p>———</p>";case"image":return"<p>".concat(o(e),"</p>");case"table":return s(e).map(e=>"<p>".concat(s(e).map(o).join(" \xb7 "),"</p>")).join("");default:return s(e).map(u).join("")}}let p={click:[],"mouse-enter":[],"mouse-leave":[]},h={cornersSize:0,corners:[],margin:[0,0,0,0],borders:[],border:[0,"solid","#000000"],transform:{scale:1,rotate:0,translate:[0,0]},shadowDirection:[],shadow:[0,"#000000"],backgroundImage:null,backgroundPosition:[0,0],backgroundScale:1,backgroundType:"none",backgroundFilter:[],backgroundGradient:{0:["#ffffff",50],1:["#ffffff",100]},gradientAngle:0,gradientStop:50},x={lg:15,md:12,sm:9,xs:6};function g(e){return e.map((e,t)=>{let l=s(e.content).map(u).join(""),r=Math.min(40,Math.max(2,s(e.content).length+Math.ceil(c(e.content).length/80)));return{id:t+1,name:e.name||"card-".concat(t+1),background:1,layout:Object.fromEntries(Object.entries(x).map(e=>{let[t,l]=e;return[t,[{i:"2",x:0,y:0,w:l,h:r}]]})),actionsByEvent:{enter:[],exit:[]},variables:[],storage:[],items:[{...h,id:1,kind:"plain",padding:[0,0,0,0],actionsByEvent:p,typeParams:{name:"plain-1"}},{...h,id:2,kind:"text",padding:[2,2,2,2],actionsByEvent:p,typeParams:{name:"text-1",text:l}}]}})}var f=l(38182);let m=1,j="StaffWriter Server";function y(e){return"sw-".concat(e.replace(/^doc-/,""))}function b(e,t){let l={projectId:y(e),title:t.page.title,description:t.page.description,cards:g(t.sections.flatMap(e=>e.cards)),snapshot:JSON.stringify(t)};if(new Blob([l.snapshot,JSON.stringify(l.cards)]).size>921600)throw Error("This page is too large for the database. Use smaller or linked pictures.");return l}function v(e,t){return{category:"Server",author:t,origin:j,language:"en",variables:[],storage:[],actionsByEvent:{start:[],finish:[]},export:{isDraft:!0,isTemplate:!1,restoreLastSession:!1,topOffset:0,playbackMode:"static",backgroundColor:"#ffffff",header:{title:e.title,subtitle:e.description},template:{path:"templates/solid",style:"default",skin:[]},footer:{title:"",notes:""}}}}function A(e,t){let l=e.sw;return e.origin===j&&t(null==l?void 0:l.savedAt,e.updateTime)}function k(e,t,l){let{title:r,description:n}=e.page;return{title:r,description:n,updateTime:t,...l?{cards:g(e.sections.flatMap(e=>e.cards))}:null,sw:{format:m,savedAt:t,snapshot:JSON.stringify(e),edited:!0}}}function w(e,t){let l=e.sw;if((null==l?void 0:l.format)===m&&"string"==typeof l.snapshot&&t(l.savedAt,e.updateTime))try{var r;return null!=(r=(0,f.R)(JSON.parse(l.snapshot)))?r:void 0}catch(e){return}}},8374:(e,t,l)=>{"use strict";l.d(t,{P:()=>i});var r=l(12115);let n="sw.cdn.sections.collapsed.v1";function a(){try{var e;let t=JSON.parse(null!=(e=window.localStorage.getItem(n))?e:"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch(e){return[]}}function i(e){let[t,l]=r.useState([]),i=r.useCallback(e=>{let t=a(),r=e(t);if(r!==t)try{window.localStorage.setItem(n,JSON.stringify(r))}catch(e){}l(r)},[]);r.useEffect(()=>{l(a())},[]);let s=r.useCallback(e=>i(t=>t.includes(e)?t.filter(t=>t!==e):t),[i]),o=r.useCallback(e=>i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),[i]);return r.useEffect(()=>{e&&s(e)},[e,s]),{isCollapsed:r.useCallback(e=>t.includes(e),[t]),toggle:o,expand:s}}},33473:(e,t,l)=>{"use strict";l.d(t,{A:()=>f,o:()=>g});var r=l(95155),n=l(12115),a=l(41530),i=l(83351),s=l(41897),o=l(57364),c=l(20258),d=l(95189),u=l(87654),p=l(99640),h=l(31021),x=l(60459);function g(e){let{section:t,onExpand:l,onDropCard:n}=e,s=(0,h.a9)(t.title),o=(0,i.vu)(t.id,n);return(0,r.jsx)(a.A,{component:"section","aria-label":l?"Folded section: ".concat(s):"Empty section: ".concat(s),"data-block-stream-narrow":"",...(0,p.Cx)(t.id),...o.target,children:(0,r.jsxs)(u.A,{sx:{...x.Lc,display:"flex",alignItems:"center",gap:1,outline:o.over?"2px solid":"none",outlineColor:"primary.solidBg"},children:[(0,r.jsx)(c.A,{markdown:l?"**{{title}}**":"**{{title}}** \xb7 _No cards_",values:{title:s}}),l?(0,r.jsx)(d.A,{label:s,collapsed:!0,onToggle:l}):null]})})}function f(e){let{sections:t,isCollapsed:l,onExpand:i,renderHeader:c,renderCards:d,renderTail:u,onDropCard:p,gap:h=s.rs.sectionGapPx}=e,x="horizontal"===(0,o.O)().viewLayout;return(0,r.jsx)(r.Fragment,{children:t.map((e,s)=>{let o=l(e.id),f=o?null:d(e),m=null==u?void 0:u(e,s===t.length-1,o);return x?(0,r.jsxs)(n.Fragment,{children:[s>0?(0,r.jsx)(a.A,{"aria-hidden":!0,"data-block-stream-out-of-band":"","data-testid":"section-break",sx:{alignSelf:"flex-start",height:72,borderLeft:"1px solid",borderColor:"divider"}}):null,o?(0,r.jsx)(g,{section:e,onExpand:()=>i(e.id),onDropCard:p}):f,m]},e.id):(0,r.jsxs)(a.A,{"data-section-group":e.id,sx:{display:"flex",flexDirection:"column",gap:"".concat(h,"px")},children:[c(e),f,m]},e.id)})})}},35866:(e,t,l)=>{"use strict";l.d(t,{Ay:()=>u,Tk:()=>d,jx:()=>p,mc:()=>c});var r=l(95155);l(12115);var n=l(52619),a=l.n(n),i=l(41530),s=l(84560),o=l(9435);let c=26,d={"--IconButton-size":"".concat(c,"px"),"--Icon-fontSize":"17px",borderRadius:"6px"};function u(e){let{label:t,href:l,sameTab:n=!1,color:i="neutral",children:c,...u}=e;return(0,r.jsx)(o.A,{title:t,variant:"soft",size:"sm",children:(0,r.jsx)(s.Ay,{size:"sm",variant:"plain",color:i,"aria-label":t,sx:d,...l?n?{component:a(),href:l}:{component:"a",href:l,target:"_blank",rel:"noopener"}:null,...u,children:c})})}function p(){return(0,r.jsx)(i.A,{"aria-hidden":!0,sx:{width:"1px",height:14,mx:"3px",flexShrink:0,bgcolor:"divider"}})}},36080:(e,t,l)=>{"use strict";l.d(t,{default:()=>s});var r=l(95155),n=l(12115),a=l(83561),i=l(35454);function s(e){let{children:t}=e,l=(0,i.g1)(),s=(0,a.gG)(),{currentId:o}=(0,a.tF)(),[c,d]=n.useState(!1);return(n.useLayoutEffect(()=>{let e=s&&(0,i.zV)(s.getSnapshot().pages,l);e&&s.open(e.id),d(!0)},[s,l]),s&&!c)?null:(0,r.jsx)(n.Fragment,{children:t},o)}},44824:(e,t,l)=>{"use strict";l.d(t,{A:()=>y});var r=l(88945),n=l(67810),a=l(12115),i=l(30365),s=l(57001),o=l(74223),c=l(2914),d=l(33859);function u(e){return(0,d.SX)("MuiFormHelperText",e)}(0,d.WN)("MuiFormHelperText",["root"]);var p=l(3275),h=l(36520),x=l(23388),g=l(37594),f=l(95155);let m=["children","component","slots","slotProps"],j=(0,o.A)("div",{name:"JoyFormHelperText",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;return{"--Icon-fontSize":"calc(var(--FormHelperText-lineHeight) * 1em)",display:"flex",alignItems:"center",gap:"2px",fontFamily:t.vars.fontFamily.body,fontSize:"var(--FormHelperText-fontSize, ".concat(t.vars.fontSize.sm,")"),lineHeight:"var(--FormHelperText-lineHeight, ".concat(t.vars.lineHeight.sm,")"),color:"var(--FormHelperText-color, ".concat(t.vars.palette.text.tertiary,")"),margin:"var(--FormHelperText-margin, 0px)",[".".concat(x.A.root," + &")]:{"--FormHelperText-margin":"0px"},[".".concat(h.A.error," &")]:{"--Icon-color":"currentColor"}}}),y=a.forwardRef(function(e,t){let l=(0,c.A)({props:e,name:"JoyFormHelperText"}),{children:o,component:d,slots:h={},slotProps:x={}}=l,y=(0,n.A)(l,m),b=a.useRef(null),v=(0,i.A)(b,t),A=a.useContext(p.A),k=null==A?void 0:A.setHelperText;a.useEffect(()=>(null==k||k(b.current),()=>{null==k||k(null)}),[k]);let w=(0,s.A)({root:["root"]},u,{}),C=(0,r.A)({},y,{component:d,slots:h,slotProps:x}),[S,T]=(0,g.A)("root",{ref:v,elementType:j,externalForwardedProps:C,ownerState:l,additionalProps:{as:d,id:null==A?void 0:A["aria-describedby"]},className:w.root});return(0,f.jsx)(S,(0,r.A)({},T,{children:o}))})},47913:(e,t,l)=>{"use strict";l.d(t,{default:()=>ei});var r=l(95155),n=l(12115),a=l(83561),i=l(90272),s=l(41530),o=l(5262),c=l(89647),d=l(8518),u=l(50499),p=l(11438),h=l(35326),x=l(83694);let g=(0,x.A)((0,r.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1"}),"HomeRounded"),f=(0,x.A)((0,r.jsx)("path",{d:"M11 8.17 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.87 20 13.48 20 12c0-3.35-2.07-6.22-5-7.41V5c0 1.1-.9 2-2 2h-2zm9.49 13.73c-.39.39-1.02.39-1.41 0l-1.56-1.56c-2.07 1.37-4.68 2-7.45 1.48-3.95-.75-7.13-3.92-7.88-7.88-.52-2.77.1-5.38 1.48-7.45L2.1 4.93a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0l16.97 16.97c.4.39.4 1.02.01 1.41M11 18c-1.1 0-2-.9-2-2v-1l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.08 3.05 7.44 7 7.93z"}),"PublicOffRounded");var m=l(4697);let j=(0,x.A)((0,r.jsx)("path",{d:"M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71z"}),"RefreshRounded");var y=l(35866),b=l(81864),v=l(87344),A=l(58774),k=l(41905);function w(e){var t;let{project:l,uid:a,state:i,pages:s,reload:o}=e,c=(null==(t=i.home)?void 0:t.uid)===a&&i.home.projectId===l.id,u=!!s.find(a,l.id),p=function(e,t,l,r,a){let{adapter:i}=(0,d.Z)(),[s,o]=n.useState(!1),[c,u]=n.useState(null);return{busy:s,error:c,toggle:async()=>{let n=t.draft;if(i&&(n||!l||window.confirm("This is the home page: as a draft it is no longer shown at /. Make it a draft?"))){o(!0),u(null);try{await i.setPublished(e,t.id,n),r.admin&&n?await r.set(e,t.id,!0):(await i.publishLive(e),r.reload())}catch(e){u(e instanceof Error?e.message:"The project was not changed.")}finally{a(),o(!1)}}}}}(a,l,c,s,o);return(0,r.jsxs)(A.A,{label:l.title||l.id,title:l.title,href:"/registry/cloud/".concat(encodeURIComponent(l.id)),description:l.description,badges:[c&&{text:"Home",color:"primary"},u&&{text:"Live",color:"primary"},l.template&&{text:"Template"},l.draft?{text:"Draft",color:"warning"}:{text:"Published",color:"success"}],actions:(0,r.jsxs)(r.Fragment,{children:[c?null:(0,r.jsx)(y.Ay,{label:l.draft?"Only a published project can be the home page":"Set as home page",disabled:!i.admin||i.busy||l.draft,onClick:()=>i.change({uid:a,projectId:l.id}),children:(0,r.jsx)(g,{})}),(0,r.jsx)(y.Ay,{label:l.draft?"Draft: publish it":"Published: make it a draft",color:l.draft?"neutral":"primary",disabled:p.busy||s.busy,loading:p.busy,onClick:p.toggle,children:l.draft?(0,r.jsx)(f,{}):(0,r.jsx)(m.A,{})})]}),children:[(0,r.jsxs)(A.V,{children:[(0,b.h)(l.cards,"card"),l.category?" \xb7 ".concat(l.category):""]}),l.urlAlias?(0,r.jsxs)(A.V,{children:["/",l.urlAlias]}):null,(0,r.jsx)(v.A,{createdAt:l.createdAt,editedAt:l.updatedAt}),p.error?(0,r.jsx)(h.Ay,{level:"body-xs",color:"danger",role:"alert",children:p.error}):null]})}function C(e){let{uid:t,projects:l,state:n,pages:a}=e,{value:i,loading:s,error:o,reload:c}=l;return(0,r.jsxs)(k.Ay,{title:"Cloud pages",count:null==i?void 0:i.length,storageKey:"cloud",actions:(0,r.jsx)(y.Ay,{label:"Read cloud pages again",disabled:s,onClick:c,children:(0,r.jsx)(j,{})}),children:[o?(0,r.jsxs)(k.Ex,{color:"danger",children:["Your cloud pages could not be read. ",o]}):null,(null==i?void 0:i.length)?(0,r.jsx)(k.pV,{label:"Cloud pages",children:i.map(e=>(0,r.jsx)(w,{project:e,uid:t,state:n,pages:a,reload:c},e.id))}):o?null:(0,r.jsx)(k.Ex,{children:s?"Reading your cloud pages…":"No cloud pages in this account."})]})}var S=l(79076),T=l(21704),F=l(59275),H=l(65094),P=l(31709),E=l(87654),R=l(87082);let M=new Intl.DateTimeFormat("en-GB",{dateStyle:"medium",timeStyle:"short"});function z(e){let{state:t}=e,{home:l,known:n,admin:a,busy:i,change:o}=t;return(0,r.jsx)(R.Ay,{"data-testid":"home-page",lead:(0,r.jsx)(g,{"aria-hidden":!0}),actions:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y.Ay,{label:"Open the home page",href:"/",children:(0,r.jsx)(P.A,{})}),l?(0,r.jsx)(y.Ay,{label:"Remove the home page",disabled:!a||i,onClick:()=>o(null),children:(0,r.jsx)(F.A,{})}):null]}),children:(0,r.jsxs)(s.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:1,rowGap:.5,minWidth:0},children:[(0,r.jsx)(h.Ay,{level:"body-sm",textColor:"text.tertiary",children:"Home page"}),l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Ay,{level:"title-sm",sx:{overflowWrap:"anywhere",minWidth:0},children:l.title}),(0,r.jsxs)(h.Ay,{level:"body-xs",textColor:"text.tertiary",children:["Set ",M.format(l.publishedAt)]})]}):(0,r.jsx)(h.Ay,{level:"title-sm",children:n?"Not set":"…"})]})})}function I(e){let{pages:t}=e;return(0,r.jsx)(s.A,{component:"ul","aria-label":"Public addresses",sx:{listStyle:"none",m:0,p:0},children:t.map(e=>{let{alias:t,title:l}=e;return(0,r.jsx)(s.A,{component:"li",sx:{borderTop:"1px solid",borderColor:"divider",py:.5},children:(0,r.jsx)(R.Ay,{lead:(0,r.jsx)(H.A,{titleAccess:"Public address"}),actions:(0,r.jsx)(y.Ay,{label:"Open /".concat(t),href:"/".concat(t),children:(0,r.jsx)(P.A,{})}),children:(0,r.jsxs)(s.A,{sx:{display:"flex",flexWrap:"wrap",alignItems:"baseline",columnGap:1,minWidth:0},children:[(0,r.jsxs)(h.Ay,{level:"title-sm",sx:{overflowWrap:"anywhere",minWidth:0},children:["/",t]}),(0,r.jsx)(h.Ay,{level:"body-xs",textColor:"text.tertiary",sx:{overflowWrap:"anywhere"},children:l})]})})},t)})})}function O(e){let{published:t,aliases:l,local:n,cloud:a,state:i}=e,{user:o}=(0,d.Z)();return(0,r.jsxs)(E.A,{component:"section","aria-label":"Dashboard",sx:{...R.Lt,py:1.25,display:"flex",flexDirection:"column",gap:1},children:[(0,r.jsx)(R.Ay,{lead:(0,r.jsx)(T.A,{"aria-hidden":!0}),sx:{minHeight:32},actions:(0,r.jsxs)(h.Ay,{level:"body-xs",textColor:"text.tertiary",sx:{mr:"6px"},children:[null===t?"":"".concat((0,b.h)(t,"public page")," \xb7 "),(0,b.h)(n,"local page"),null===a?"":" \xb7 ".concat((0,b.h)(a,"cloud page"))]}),children:(0,r.jsx)(h.Ay,{component:"h1",level:"title-lg",children:"Dashboard"})}),o?(0,r.jsx)(s.A,{sx:{borderTop:"1px solid",borderColor:"divider",pt:1},children:(0,r.jsx)(z,{state:i})}):null,l.length?(0,r.jsx)(I,{pages:l}):null,o&&i.error?(0,r.jsx)(h.Ay,{role:"alert",level:"body-sm",color:"danger",children:i.error}):null]})}var L=l(20063),N=l(13673);let D=(0,x.A)((0,r.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"}),"CloudUploadOutlined");var V=l(8964),W=l(34809),J=l(38182),B=l(8138),_=l(42380),G=l(35454);function U(e){let{entry:t,index:l,titles:i,only:s,projects:o}=e,c=(0,a.gG)(),u=(0,a.KJ)(e=>e.themes),p=function(e,t){var l;let{user:r,adapter:i}=(0,d.Z)(),s=(0,a.KJ)(e=>e.themes),[o,c]=n.useState(!1),[u,p]=n.useState(null),h=async()=>{if(r&&i){c(!0),p(null);try{let l=(0,B.Rg)(e.id,(0,J.U)(e.page,e.sections,s)),n=await i.uploadPage(r.uid,l,!1);"changed"===n&&window.confirm("The cloud copy has been changed since this page was uploaded. Replace it with this page?")&&(n=await i.uploadPage(r.uid,l,!0)),"saved"===n&&t.reload()}catch(e){p(e instanceof Error?e.message:"The page was not saved to the cloud.")}finally{c(!1)}}};return{offered:!!r,saved:!!(null==(l=t.value)?void 0:l.some(t=>t.id===(0,B.TP)(e.id))),busy:o,error:u,upload:h}}(t,o),{id:x,page:g,sections:f}=t,m=t.page.title.trim()||"Page ".concat(l+1),j=f.reduce((e,t)=>e+t.cards.length,0);return(0,r.jsxs)(A.A,{label:m,title:g.title,href:(0,G.lf)("/registry",x),description:g.description,badges:[p.saved&&{text:"In cloud",color:"success"}],actions:(0,r.jsxs)(r.Fragment,{children:[p.offered?(0,r.jsx)(y.Ay,{label:p.saved?"Update cloud copy":"Upload to cloud",disabled:p.busy,loading:p.busy,onClick:p.upload,children:(0,r.jsx)(D,{})}):null,(0,r.jsx)(y.Ay,{label:"Preview",href:(0,G.lf)("/",x),children:(0,r.jsx)(P.A,{})}),(0,r.jsx)(y.jx,{}),(0,r.jsx)(y.Ay,{label:"Duplicate page",onClick:()=>null==c?void 0:c.duplicate(x,g.title.trim()?(0,_.v)(g.title,i):""),children:(0,r.jsx)(V.A,{})}),(0,r.jsx)(y.Ay,{label:"Delete page",color:"danger",disabled:s,onClick:()=>{window.confirm('Delete the page "'.concat(m,'"?'))&&(null==c||c.remove(x))},children:(0,r.jsx)(W.A,{})})]}),children:[(0,r.jsxs)(A.V,{children:[(0,b.h)(f.length,"section")," \xb7 ",(0,b.h)(j,"card")," \xb7"," ",(0,a.eW)(u,g.themeId).name||"Untitled theme"]}),(0,r.jsx)(v.A,{createdAt:g.createdAt,editedAt:(0,a.u8)(g,f)}),p.error?(0,r.jsx)(h.Ay,{level:"body-xs",color:"danger",role:"alert",children:p.error}):null]})}function q(e){let{pages:t,projects:l}=e,n=(0,a.gG)(),i=(0,L.useRouter)(),s=t.map(e=>e.page.title);return(0,r.jsx)(k.Ay,{title:"Local pages",count:t.length,storageKey:"local",actions:(0,r.jsx)(o.A,{size:"sm",variant:"plain",color:"neutral",startDecorator:(0,r.jsx)(N.A,{}),onClick:()=>{let e=null==n?void 0:n.create();e&&i.push((0,G.lf)("/registry",e))},children:"New page"}),children:(0,r.jsx)(k.pV,{label:"Local pages",children:t.map((e,n)=>(0,r.jsx)(U,{entry:e,index:n,titles:s,only:1===t.length,projects:l},e.id))})})}var K=l(35042);function Z(e){var t;let{page:l,index:n,pages:a,state:i}=e,{uid:s,projectId:o,title:c}=l,{user:u}=(0,d.Z)(),p=(0,K.w)(s,o,l.alias),h=(null==(t=i.home)?void 0:t.uid)===s&&i.home.projectId===o;return(0,r.jsxs)(A.A,{label:c||"Public page ".concat(n+1),title:c,href:p,description:l.description,badges:[h&&{text:"Home",color:"primary"}],actions:(0,r.jsxs)(r.Fragment,{children:[u&&!h?(0,r.jsx)(y.Ay,{label:"Set as home page",disabled:!a.admin||i.busy,onClick:()=>i.change({uid:s,projectId:o}),children:(0,r.jsx)(g,{})}):null,(0,r.jsx)(y.Ay,{label:"Open page",href:p,children:(0,r.jsx)(P.A,{})}),u?(0,r.jsx)(y.Ay,{label:"Hide from public pages",disabled:!a.admin||a.busy,onClick:()=>a.set(s,o,!1),children:(0,r.jsx)(f,{})}):null]}),children:[l.alias?(0,r.jsxs)(A.V,{children:["/",l.alias]}):null,(0,r.jsx)(v.A,{createdAt:l.createdAt,editedAt:l.updatedAt})]})}function $(e){let{pages:t,state:l}=e,{list:n,error:a}=t;return(0,r.jsxs)(k.Ay,{title:"Public pages",count:null==n?void 0:n.length,storageKey:"public",children:[a?(0,r.jsx)(k.Ex,{color:"danger",children:a}):null,(null==n?void 0:n.length)?(0,r.jsx)(k.pV,{label:"Public pages",children:n.map((e,n)=>(0,r.jsx)(Z,{page:e,index:n,pages:t,state:l},"".concat(e.uid,"/").concat(e.projectId)))}):a?null:(0,r.jsx)(k.Ex,{children:n?"No public pages yet.":"Reading the public pages…"})]})}var X=l(54122),Y=l(32153),Q=l(31585);let ee={display:"flex",flexDirection:"column",gap:1.5};function et(){let[e,t]=n.useState(!1),l=n.useCallback(()=>t(!1),[]);return(0,r.jsxs)(s.A,{sx:{display:"flex",justifyContent:"center",pt:1},children:[(0,r.jsx)(o.A,{startDecorator:(0,r.jsx)(c.A,{}),onClick:()=>t(!0),children:"Sign in / Sign up"}),(0,r.jsx)(u.A,{open:e,onClose:l})]})}function el(){var e,t,l,o,c,u;let{pages:p}=(0,a.tF)(),h=(0,a.KJ)(e=>e.error),{status:x,user:g,adapter:f}=(0,d.Z)(),m=(0,Q.k)(),j=function(e,t){let l=n.useMemo(()=>e&&t?()=>e.listProjects(t):null,[e,t]);return(0,Y.i)(l)}(f,null==g?void 0:g.uid),y=(0,K.R)(),b=(0,X.Z)();return(0,r.jsxs)(r.Fragment,{children:[h?(0,r.jsx)(s.A,{children:(0,r.jsx)(i.A,{color:"warning",children:h})}):null,(0,r.jsx)(s.A,{children:(0,r.jsx)(O,{published:null!=(o=null==(e=y.list)?void 0:e.length)?o:null,aliases:null!=(c=null==(t=y.list)?void 0:t.filter(e=>e.alias))?c:[],local:p.length,cloud:g&&null!=(u=null==(l=j.value)?void 0:l.length)?u:null,state:m})}),(0,r.jsxs)(s.A,{sx:ee,children:[g?(0,r.jsx)($,{pages:y,state:m}):null,g?(0,r.jsx)(C,{uid:g.uid,projects:j,state:m,pages:y}):null,(0,r.jsx)(q,{pages:p,projects:j}),"signedOut"===x?(0,r.jsx)(et,{}):null]}),g?(0,r.jsx)(s.A,{sx:ee,children:(0,r.jsx)(S.A,{title:"Databases",kind:"firestore",state:b})}):null,g?(0,r.jsx)(s.A,{sx:ee,children:(0,r.jsx)(S.A,{title:"Storage",kind:"storage",state:b})}):null]})}function er(){let{ready:e}=(0,a.tF)();return(0,r.jsx)(p.default.View,{barTitle:"Registry",children:e?(0,r.jsx)(el,{}):null})}var en=l(36080),ea=l(61387);function ei(){let e=(0,G.g1)(),{ready:t,pages:l}=(0,a.tF)();return e&&(!t||(0,G.zV)(l,e))?(0,r.jsx)(en.default,{children:(0,r.jsx)(ea.A,{})}):(0,r.jsx)(er,{})}},54295:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var r=l(95155);l(12115);var n=l(41530);let a={up:"success.400",paused:"warning.400",down:"danger.400",off:"neutral.400"};function i(e){let{tone:t}=e;return(0,r.jsx)(n.A,{"aria-hidden":!0,"data-tone":t,sx:{width:8,height:8,borderRadius:"50%",flexShrink:0,bgcolor:a[t]}})}},57496:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var r=l(83694),n=l(95155);let a=(0,r.A)((0,n.jsx)("path",{d:"M15.9 5c-.17 0-.32.09-.41.23l-.07.15-5.18 11.65c-.16.29-.26.61-.26.96 0 1.11.9 2.01 2.01 2.01.96 0 1.77-.68 1.96-1.59l.01-.03L16.4 5.5c0-.28-.22-.5-.5-.5M2.06 10.06c.51.51 1.33.55 1.89.09 2.76-2.26 6.24-3.18 9.58-2.76l1.19-2.68c-4.35-.78-8.96.3-12.57 3.25-.64.53-.68 1.51-.09 2.1m19.88 0c.59-.59.55-1.57-.1-2.1-1.36-1.11-2.86-1.95-4.44-2.53l-.53 2.82c1.13.47 2.19 1.09 3.17 1.89.58.46 1.39.43 1.9-.08m-4.03 4.03c.6-.6.56-1.63-.14-2.12-.46-.33-.94-.61-1.44-.86l-.55 2.92c.11.07.22.14.32.22.57.4 1.33.32 1.81-.16m-11.83-.01c.5.5 1.27.54 1.85.13.94-.66 2.01-1.06 3.1-1.22l1.28-2.88c-2.13-.06-4.28.54-6.09 1.84-.69.51-.74 1.53-.14 2.13"}),"NetworkCheckRounded")},83157:(e,t,l)=>{Promise.resolve().then(l.bind(l,47913))},91547:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var r=l(83694),n=l(95155);let a=(0,r.A)((0,n.jsx)("path",{d:"m14.06 9.02.92.92L5.92 19H5v-.92zM17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29m-3.6 3.19L3 17.25V21h3.75L17.81 9.94z"}),"EditOutlined")},95189:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var r=l(95155);l(12115);var n=l(84560),a=l(83730),i=l(35866);function s(e){let{label:t,collapsed:l,onToggle:s}=e;return(0,r.jsx)(n.Ay,{size:"sm",variant:"plain",color:"neutral",onClick:s,"aria-expanded":!l,"aria-label":"".concat(l?"Expand":"Collapse"," ").concat(t),title:"".concat(l?"Expand":"Collapse"," ").concat(t),sx:{...i.Tk,flexShrink:0},children:(0,r.jsx)(a.A,{sx:{transition:"transform 120ms ease-out",transform:l?"rotate(-90deg)":"none"}})})}}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,6252,31,8245,7254,9057,3861,8349,1758,8441,1255,7358],()=>e(e.s=83157)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9281],{26309:(e,r,t)=>{"use strict";t.d(r,{CloudRendererView:()=>y,A:()=>A});var n=t(95155),o=t(12115),a=t(41530),l=t(35326),i=t(83561),s=t(8518),d=t(59506),u=t(90717),c=t(38182);function v(e){return function e(r){var t;if(Array.isArray(r))return"[".concat(r.map(e).join(","),"]");if(!(0,u.u4)(r))return null!=(t=JSON.stringify(r))?t:"null";let n=Object.keys(r).filter(e=>void 0!==r[e]&&"updatedAt"!==e&&"createdAt"!==e).sort().map(t=>"".concat(JSON.stringify(t),":").concat(e(r[t])));return"{".concat(n.join(","),"}")}({...e,sections:e.sections.map(e=>({...e,cards:e.cards.map(e=>({...e,content:function(e){try{var r,t,n,o;let a=(0,i.$P)(i.GM).schema.nodeFromJSON(e).toJSON(),l=[...null!=(o=a.content)?o:[]];for(;(null==(r=l.at(-1))?void 0:r.type)==="paragraph"&&!(null==(n=l.at(-1))||null==(t=n.content)?void 0:t.length);)l.pop();return{...a,content:l}}catch(r){return e}}(e.content)}))}))})}var f=t(50797),m=t(32153),h=t(52134),g=t(11438);let p=new WeakMap;function A(e){var r;let{projectId:t,title:u,children:h}=e,A=function(e){var r,t;let{user:n,adapter:a,status:l}=(0,s.Z)(),u=null==n?void 0:n.uid,h=(0,f.eU)(),g=o.useMemo(()=>a&&u?async()=>({uid:u,projectId:e,found:await a.readProject(u,e)}):null,[a,u,e]),A=(0,m.i)(g),y=(null==(r=A.value)?void 0:r.uid)===u&&(null==(t=A.value)?void 0:t.projectId)===e?A.value:null,[S,b]=o.useState(null),x=(null==y?void 0:y.found)&&y.found!==S?y.found:null,w=o.useRef(x);w.current=x;let z=!!x,[C,j]=o.useState(null),N="".concat(u,"/").concat(e);o.useEffect(()=>{let r=w.current;if(!a||!u||!z||!r)return;let t=function(e,r,t){var n,o;let a=null!=(n=p.get(e))?n:new Map;p.set(e,a);let l=null!=(o=a.get(r))?o:{binding:t(),views:0};return a.set(r,l),l.views+=1,l.binding}(a,N,()=>(function(e){let r,{snapshot:t,save:n,delayMs:o=1500}=e,a=new Set(t.themes.map(e=>e.id)),l=[...e.themes.filter(e=>!a.has(e.id)),...t.themes],s=(0,i.dZ)((0,i.z0)(JSON.stringify({version:i.Ny,...t,themes:l})));function d(){let{page:e,sections:r,themes:t}=s.getSnapshot();return(0,c.U)(e,r,t)}let u=new Set,f={status:"saved",error:""},m=e.version,h=v(d()),g=null,p=!1,A=e=>{e.preventDefault(),e.returnValue=""},y=()=>{"hidden"===document.visibilityState&&x()};function S(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.status!==e||f.error!==r){f={status:e,error:r};{let r="saved"===e?"removeEventListener":"addEventListener";window[r]("beforeunload",A),document[r]("visibilitychange",y)}u.forEach(e=>e())}}function b(){clearTimeout(r),r=setTimeout(()=>void x(),o)}function x(){if(clearTimeout(r),g)return g.then(x);if(p)return Promise.resolve();let e=d(),t=v(e);return t===h?(S("saved"),Promise.resolve()):(S("saving"),g=n(e,m).then(e=>{if(!p){if("string"==typeof e){p=!0,S(e);return}m=e.version,h=t,v(d())===h?S("saved"):(S("pending"),b())}},e=>{p||S("failed",e instanceof Error?e.message:"Something went wrong.")}).finally(()=>{g=null}))}return s.subscribe(()=>{if(!p){if(!g&&v(d())===h){clearTimeout(r),S("saved");return}g||S("pending"),b()}}),{store:s,getState:()=>f,subscribe:e=>(u.add(e),()=>{u.delete(e)}),flush:x,discard(){p=!0,clearTimeout(r),S("saved")}}})({snapshot:(0,d.e)(r.page),version:r.version,themes:h.getSnapshot().themes,save:(r,t)=>a.savePage(u,e,r,t)}));return j({key:N,binding:t}),()=>{var e;j(null);let r=null==(e=p.get(a))?void 0:e.get(N);(null==r?void 0:r.binding)===t&&(r.views-=1,t.flush().then(()=>{var e,n;let{status:o}=t.getState();"saved"!==o||r.views||(null==(e=p.get(a))?void 0:e.get(N))!==r||null==(n=p.get(a))||n.delete(N)}))}},[a,u,e,N,z,h]);let D=x&&(null==C?void 0:C.key)===N?C.binding:null;return{document:x,binding:D,note:u?A.error?"The project could not be read. ".concat(A.error):y&&!y.found?"This project was not found.":"Reading the project…":"loading"===l?"Loading…":"Sign in to open your cloud pages.",refresh:A.reload,reopen:()=>{var e;a&&(null==y?void 0:y.found)&&(null==D||D.discard(),null==(e=p.get(a))||e.delete(N),b(y.found),A.reload())}}}(t),{document:y,binding:S,note:b}=A,x=(0,f.mt)(null!=(r=null==S?void 0:S.store)?r:null);return y&&S&&x?(0,n.jsx)(i.xF,{store:S.store,children:h({...A,document:y,binding:S})},t):(0,n.jsx)(g.default.View,{barTitle:u,children:(0,n.jsx)(a.A,{children:(0,n.jsx)(l.Ay,{level:"body-sm",textColor:"text.tertiary",textAlign:"center",role:"status",children:b})})})}function y(e){let{projectId:r}=e;return(0,n.jsx)(A,{projectId:r,title:"Renderer",children:()=>(0,n.jsx)(h.default,{registryHref:"/registry/cloud/".concat(encodeURIComponent(r))})})}},32153:(e,r,t)=>{"use strict";t.d(r,{i:()=>o});var n=t(12115);function o(e){let[r,t]=n.useState({value:null,loading:!!e,error:null}),[o,a]=n.useState(0);return n.useEffect(()=>{if(!e)return void t({value:null,loading:!1,error:null});let r=!0;return t(e=>({...e,loading:!0,error:null})),e().then(e=>r&&t({value:e,loading:!1,error:null}),e=>r&&t(r=>({...r,loading:!1,error:e instanceof Error?e.message:"Something went wrong."}))),()=>{r=!1}},[e,o]),{...r,reload:n.useCallback(()=>a(e=>e+1),[]),set:n.useCallback(e=>t({value:e,loading:!1,error:null}),[])}}},33368:(e,r,t)=>{Promise.resolve().then(t.bind(t,26309))},38182:(e,r,t)=>{"use strict";t.d(r,{R:()=>a,U:()=>o});var n=t(90717);function o(e,r,t){let n=new Set([e,...r,...r.flatMap(e=>e.cards)].map(e=>e.themeId));return{page:e,sections:r,themes:t.filter(e=>n.has(e.id))}}function a(e){if(!(0,n.u4)(e)||!(0,n.u4)(e.page))return null;let{sections:r,themes:t}=e;if(!Array.isArray(r)||!Array.isArray(t))return null;let a=r.map(n.Bz),l=t.map(n.N_);return a.includes(null)||l.includes(null)?null:o((0,n.NL)(e.page),a,l.filter(e=>!(0,n.nB)(e.id)))}},49953:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zm-7 5h5v5h-5z"}),"EventOutlined")},59506:(e,r,t)=>{"use strict";t.d(r,{e:()=>o});var n=t(83561);function o(e){if(e.snapshot)return e.snapshot;let{title:r,description:t,createdAt:o,updatedAt:a}=e,l=e.cards.filter(e=>e.markdown).map((e,r)=>({id:"card-cloud-".concat(r+1),name:e.name,content:(0,n.Kl)(e.markdown)}));return{page:{...n._U,title:r,description:t,createdAt:o,updatedAt:a},sections:l.length?[{schemaVersion:n.f$,id:"section-cloud",title:r,themeId:"",cards:l,updatedAt:a}]:[],themes:[]}}},78373:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M5 10h14v2h2V6c0-1.1-.9-2-2-2h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h7v-2H5zm0-4h14v2H5zm17.84 10.28-.71.71-2.12-2.12.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41m-3.54-.7 2.12 2.12-5.3 5.3H14v-2.12z"}),"EditCalendarOutlined")},83730:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.996.996 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0"}),"KeyboardArrowDownRounded")},90272:(e,r,t)=>{"use strict";t.d(r,{A:()=>b});var n=t(67810),o=t(88945),a=t(12115),l=t(2821),i=t(57001),s=t(88133),d=t(25191),u=t(74223),c=t(2914),v=t(37594),f=t(33859);function m(e){return(0,f.SX)("MuiAlert",e)}(0,f.WN)("MuiAlert",["root","startDecorator","endDecorator","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var h=t(14522),g=t(95155);let p=["children","className","color","invertedColors","role","variant","size","startDecorator","endDecorator","component","slots","slotProps"],A=(0,u.A)("div",{name:"JoyAlert",slot:"Root",overridesResolver:(e,r)=>r.root})(e=>{var r;let{theme:t,ownerState:n}=e,{p:a,padding:l,borderRadius:i}=(0,h.x)({theme:t,ownerState:n},["p","padding","borderRadius"]);return[(0,o.A)({"--Alert-radius":t.vars.radius.sm,"--Alert-decoratorChildRadius":"max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))","--Button-minHeight":"var(--Alert-decoratorChildHeight)","--IconButton-size":"var(--Alert-decoratorChildHeight)","--Button-radius":"var(--Alert-decoratorChildRadius)","--IconButton-radius":"var(--Alert-decoratorChildRadius)","--Icon-color":"currentColor"},"sm"===n.size&&{"--Alert-padding":"0.5rem","--Alert-decoratorChildHeight":"1.5rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.5rem"},"md"===n.size&&{"--Alert-padding":"0.75rem","--Alert-decoratorChildHeight":"2rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.625rem"},"lg"===n.size&&{"--Alert-padding":"1rem","--Alert-decoratorChildHeight":"2.375rem","--Icon-fontSize":t.vars.fontSize.xl2,gap:"0.875rem"},{backgroundColor:t.vars.palette.background.surface,display:"flex",position:"relative",alignItems:"center",padding:"var(--Alert-padding)",borderRadius:"var(--Alert-radius)"},t.typography["body-".concat({sm:"xs",md:"sm",lg:"md"}[n.size])],{fontWeight:t.vars.fontWeight.md},"solid"===n.variant&&n.color&&n.invertedColors&&(0,d.Hm)(n.color)(t),"soft"===n.variant&&n.color&&n.invertedColors&&(0,d.qG)(n.color)(t),null==(r=t.variants[n.variant])?void 0:r[n.color]),void 0!==a&&{"--Alert-padding":a},void 0!==l&&{"--Alert-padding":l},void 0!==i&&{"--Alert-radius":i}]}),y=(0,u.A)("span",{name:"JoyAlert",slot:"StartDecorator",overridesResolver:(e,r)=>r.startDecorator})({display:"inherit",flex:"none"}),S=(0,u.A)("span",{name:"JoyAlert",slot:"EndDecorator",overridesResolver:(e,r)=>r.endDecorator})({display:"inherit",flex:"none",marginLeft:"auto"}),b=a.forwardRef(function(e,r){let t=(0,c.A)({props:e,name:"JoyAlert"}),{children:a,className:d,color:u="neutral",invertedColors:f=!1,role:h="alert",variant:b="soft",size:x="md",startDecorator:w,endDecorator:z,component:C,slots:j={},slotProps:N={}}=t,D=(0,n.A)(t,p),H=(0,o.A)({},t,{color:u,invertedColors:f,variant:b,size:x}),R=(e=>{let{variant:r,color:t,size:n}=e,o={root:["root",n&&"size".concat((0,s.A)(n)),t&&"color".concat((0,s.A)(t)),r&&"variant".concat((0,s.A)(r))],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,i.A)(o,m,{})})(H),k=(0,o.A)({},D,{component:C,slots:j,slotProps:N}),[E,I]=(0,v.A)("root",{ref:r,className:(0,l.A)(R.root,d),elementType:A,externalForwardedProps:k,ownerState:H,additionalProps:{role:h}}),[V,L]=(0,v.A)("startDecorator",{className:R.startDecorator,elementType:y,externalForwardedProps:k,ownerState:H}),[M,O]=(0,v.A)("endDecorator",{className:R.endDecorator,elementType:S,externalForwardedProps:k,ownerState:H});return(0,g.jsxs)(E,(0,o.A)({},I,{children:[w&&(0,g.jsx)(V,(0,o.A)({},L,{children:w})),a,z&&(0,g.jsx)(M,(0,o.A)({},O,{children:z}))]}))})},90717:(e,r,t)=>{"use strict";t.d(r,{Bz:()=>n.Bz,NL:()=>n.NL,N_:()=>o.N_,nB:()=>o.nB,u4:()=>n.u4}),t(65991);var n=t(22545);t(29460);var o=t(94673)}},e=>{e.O(0,[9627,277,5004,2246,7240,2567,8245,1388,1438,7379,2134,8441,1255,7358],()=>e(e.s=33368)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9281],{26309:(e,r,t)=>{"use strict";t.d(r,{CloudRendererView:()=>y,A:()=>A});var n=t(95155),o=t(12115),a=t(41530),l=t(35326),i=t(83561),s=t(8518),d=t(59506),u=t(90717),c=t(38182);function v(e){return function e(r){var t;if(Array.isArray(r))return"[".concat(r.map(e).join(","),"]");if(!(0,u.u4)(r))return null!=(t=JSON.stringify(r))?t:"null";let n=Object.keys(r).filter(e=>void 0!==r[e]&&"updatedAt"!==e&&"createdAt"!==e).sort().map(t=>"".concat(JSON.stringify(t),":").concat(e(r[t])));return"{".concat(n.join(","),"}")}({...e,sections:e.sections.map(e=>({...e,cards:e.cards.map(e=>({...e,content:function(e){try{var r,t,n,o;let a=(0,i.$P)(i.GM).schema.nodeFromJSON(e).toJSON(),l=[...null!=(o=a.content)?o:[]];for(;(null==(r=l.at(-1))?void 0:r.type)==="paragraph"&&!(null==(n=l.at(-1))||null==(t=n.content)?void 0:t.length);)l.pop();return{...a,content:l}}catch(r){return e}}(e.content)}))}))})}var f=t(50797),m=t(32153),h=t(52134),g=t(11438);let p=new WeakMap;function A(e){var r;let{projectId:t,title:u,children:h}=e,A=function(e){var r,t;let{user:n,adapter:a,status:l}=(0,s.Z)(),u=null==n?void 0:n.uid,h=(0,f.eU)(),g=o.useMemo(()=>a&&u?async()=>({uid:u,projectId:e,found:await a.readProject(u,e)}):null,[a,u,e]),A=(0,m.i)(g),y=(null==(r=A.value)?void 0:r.uid)===u&&(null==(t=A.value)?void 0:t.projectId)===e?A.value:null,[S,b]=o.useState(null),x=(null==y?void 0:y.found)&&y.found!==S?y.found:null,w=o.useRef(x);w.current=x;let z=!!x,[C,j]=o.useState(null),N="".concat(u,"/").concat(e);o.useEffect(()=>{let r=w.current;if(!a||!u||!z||!r)return;let t=function(e,r,t){var n,o;let a=null!=(n=p.get(e))?n:new Map;p.set(e,a);let l=null!=(o=a.get(r))?o:{binding:t(),views:0};return a.set(r,l),l.views+=1,l.binding}(a,N,()=>(function(e){let r,{snapshot:t,save:n,delayMs:o=1500}=e,a=new Set(t.themes.map(e=>e.id)),l=[...e.themes.filter(e=>!a.has(e.id)),...t.themes],s=(0,i.dZ)((0,i.z0)(JSON.stringify({version:i.Ny,...t,themes:l})));function d(){let{page:e,sections:r,themes:t}=s.getSnapshot();return(0,c.U)(e,r,t)}let u=new Set,f={status:"saved",error:""},m=e.version,h=v(d()),g=null,p=!1,A=e=>{e.preventDefault(),e.returnValue=""},y=()=>{"hidden"===document.visibilityState&&x()};function S(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(f.status!==e||f.error!==r){f={status:e,error:r};{let r="saved"===e?"removeEventListener":"addEventListener";window[r]("beforeunload",A),document[r]("visibilitychange",y)}u.forEach(e=>e())}}function b(){clearTimeout(r),r=setTimeout(()=>void x(),o)}function x(){if(clearTimeout(r),g)return g.then(x);if(p)return Promise.resolve();let e=d(),t=v(e);return t===h?(S("saved"),Promise.resolve()):(S("saving"),g=n(e,m).then(e=>{if(!p){if("string"==typeof e){p=!0,S(e);return}m=e.version,h=t,v(d())===h?S("saved"):(S("pending"),b())}},e=>{p||S("failed",e instanceof Error?e.message:"Something went wrong.")}).finally(()=>{g=null}))}return s.subscribe(()=>{if(!p){if(!g&&v(d())===h){clearTimeout(r),S("saved");return}g||S("pending"),b()}}),{store:s,getState:()=>f,subscribe:e=>(u.add(e),()=>{u.delete(e)}),flush:x,discard(){p=!0,clearTimeout(r),S("saved")}}})({snapshot:(0,d.e)(r.page),version:r.version,themes:h.getSnapshot().themes,save:(r,t)=>a.savePage(u,e,r,t)}));return j({key:N,binding:t}),()=>{var e;j(null);let r=null==(e=p.get(a))?void 0:e.get(N);(null==r?void 0:r.binding)===t&&(r.views-=1,t.flush().then(()=>{var e,n;let{status:o}=t.getState();"saved"!==o||r.views||(null==(e=p.get(a))?void 0:e.get(N))!==r||null==(n=p.get(a))||n.delete(N)}))}},[a,u,e,N,z,h]);let D=x&&(null==C?void 0:C.key)===N?C.binding:null;return{document:x,binding:D,note:u?A.error?"The project could not be read. ".concat(A.error):y&&!y.found?"This project was not found.":"Reading the project…":"loading"===l?"Loading…":"Sign in to open your cloud pages.",refresh:A.reload,reopen:()=>{var e;a&&(null==y?void 0:y.found)&&(null==D||D.discard(),null==(e=p.get(a))||e.delete(N),b(y.found),A.reload())}}}(t),{document:y,binding:S,note:b}=A,x=(0,f.mt)(null!=(r=null==S?void 0:S.store)?r:null);return y&&S&&x?(0,n.jsx)(i.xF,{store:S.store,children:h({...A,document:y,binding:S})},t):(0,n.jsx)(g.default.View,{barTitle:u,children:(0,n.jsx)(a.A,{children:(0,n.jsx)(l.Ay,{level:"body-sm",textColor:"text.tertiary",textAlign:"center",role:"status",children:b})})})}function y(e){let{projectId:r}=e;return(0,n.jsx)(A,{projectId:r,title:"Renderer",children:()=>(0,n.jsx)(h.default,{registryHref:"/registry/cloud/".concat(encodeURIComponent(r))})})}},32153:(e,r,t)=>{"use strict";t.d(r,{i:()=>o});var n=t(12115);function o(e){let[r,t]=n.useState({value:null,loading:!!e,error:null}),[o,a]=n.useState(0);return n.useEffect(()=>{if(!e)return void t({value:null,loading:!1,error:null});let r=!0;return t(e=>({...e,loading:!0,error:null})),e().then(e=>r&&t({value:e,loading:!1,error:null}),e=>r&&t(r=>({...r,loading:!1,error:e instanceof Error?e.message:"Something went wrong."}))),()=>{r=!1}},[e,o]),{...r,reload:n.useCallback(()=>a(e=>e+1),[]),set:n.useCallback(e=>t({value:e,loading:!1,error:null}),[])}}},33368:(e,r,t)=>{Promise.resolve().then(t.bind(t,26309))},38182:(e,r,t)=>{"use strict";t.d(r,{R:()=>a,U:()=>o});var n=t(90717);function o(e,r,t){let n=new Set([e,...r,...r.flatMap(e=>e.cards)].map(e=>e.themeId));return{page:e,sections:r,themes:t.filter(e=>n.has(e.id))}}function a(e){if(!(0,n.u4)(e)||!(0,n.u4)(e.page))return null;let{sections:r,themes:t}=e;if(!Array.isArray(r)||!Array.isArray(t))return null;let a=r.map(n.Bz),l=t.map(n.N_);return a.includes(null)||l.includes(null)?null:o((0,n.NL)(e.page),a,l.filter(e=>!(0,n.nB)(e.id)))}},49953:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zm-7 5h5v5h-5z"}),"EventOutlined")},59506:(e,r,t)=>{"use strict";t.d(r,{e:()=>o});var n=t(83561);function o(e){if(e.snapshot)return e.snapshot;let{title:r,description:t,createdAt:o,updatedAt:a}=e,l=e.cards.filter(e=>e.markdown).map((e,r)=>({id:"card-cloud-".concat(r+1),name:e.name,content:(0,n.Kl)(e.markdown)}));return{page:{...n._U,title:r,description:t,createdAt:o,updatedAt:a},sections:l.length?[{schemaVersion:n.f$,id:"section-cloud",title:r,themeId:"",cards:l,updatedAt:a}]:[],themes:[]}}},78373:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M5 10h14v2h2V6c0-1.1-.9-2-2-2h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h7v-2H5zm0-4h14v2H5zm17.84 10.28-.71.71-2.12-2.12.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41m-3.54-.7 2.12 2.12-5.3 5.3H14v-2.12z"}),"EditCalendarOutlined")},83730:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var n=t(83694),o=t(95155);let a=(0,n.A)((0,o.jsx)("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.996.996 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0"}),"KeyboardArrowDownRounded")},90272:(e,r,t)=>{"use strict";t.d(r,{A:()=>b});var n=t(67810),o=t(88945),a=t(12115),l=t(2821),i=t(57001),s=t(88133),d=t(25191),u=t(74223),c=t(2914),v=t(37594),f=t(33859);function m(e){return(0,f.SX)("MuiAlert",e)}(0,f.WN)("MuiAlert",["root","startDecorator","endDecorator","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var h=t(14522),g=t(95155);let p=["children","className","color","invertedColors","role","variant","size","startDecorator","endDecorator","component","slots","slotProps"],A=(0,u.A)("div",{name:"JoyAlert",slot:"Root",overridesResolver:(e,r)=>r.root})(e=>{var r;let{theme:t,ownerState:n}=e,{p:a,padding:l,borderRadius:i}=(0,h.x)({theme:t,ownerState:n},["p","padding","borderRadius"]);return[(0,o.A)({"--Alert-radius":t.vars.radius.sm,"--Alert-decoratorChildRadius":"max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))","--Button-minHeight":"var(--Alert-decoratorChildHeight)","--IconButton-size":"var(--Alert-decoratorChildHeight)","--Button-radius":"var(--Alert-decoratorChildRadius)","--IconButton-radius":"var(--Alert-decoratorChildRadius)","--Icon-color":"currentColor"},"sm"===n.size&&{"--Alert-padding":"0.5rem","--Alert-decoratorChildHeight":"1.5rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.5rem"},"md"===n.size&&{"--Alert-padding":"0.75rem","--Alert-decoratorChildHeight":"2rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.625rem"},"lg"===n.size&&{"--Alert-padding":"1rem","--Alert-decoratorChildHeight":"2.375rem","--Icon-fontSize":t.vars.fontSize.xl2,gap:"0.875rem"},{backgroundColor:t.vars.palette.background.surface,display:"flex",position:"relative",alignItems:"center",padding:"var(--Alert-padding)",borderRadius:"var(--Alert-radius)"},t.typography["body-".concat({sm:"xs",md:"sm",lg:"md"}[n.size])],{fontWeight:t.vars.fontWeight.md},"solid"===n.variant&&n.color&&n.invertedColors&&(0,d.Hm)(n.color)(t),"soft"===n.variant&&n.color&&n.invertedColors&&(0,d.qG)(n.color)(t),null==(r=t.variants[n.variant])?void 0:r[n.color]),void 0!==a&&{"--Alert-padding":a},void 0!==l&&{"--Alert-padding":l},void 0!==i&&{"--Alert-radius":i}]}),y=(0,u.A)("span",{name:"JoyAlert",slot:"StartDecorator",overridesResolver:(e,r)=>r.startDecorator})({display:"inherit",flex:"none"}),S=(0,u.A)("span",{name:"JoyAlert",slot:"EndDecorator",overridesResolver:(e,r)=>r.endDecorator})({display:"inherit",flex:"none",marginLeft:"auto"}),b=a.forwardRef(function(e,r){let t=(0,c.A)({props:e,name:"JoyAlert"}),{children:a,className:d,color:u="neutral",invertedColors:f=!1,role:h="alert",variant:b="soft",size:x="md",startDecorator:w,endDecorator:z,component:C,slots:j={},slotProps:N={}}=t,D=(0,n.A)(t,p),H=(0,o.A)({},t,{color:u,invertedColors:f,variant:b,size:x}),R=(e=>{let{variant:r,color:t,size:n}=e,o={root:["root",n&&"size".concat((0,s.A)(n)),t&&"color".concat((0,s.A)(t)),r&&"variant".concat((0,s.A)(r))],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,i.A)(o,m,{})})(H),k=(0,o.A)({},D,{component:C,slots:j,slotProps:N}),[E,I]=(0,v.A)("root",{ref:r,className:(0,l.A)(R.root,d),elementType:A,externalForwardedProps:k,ownerState:H,additionalProps:{role:h}}),[V,L]=(0,v.A)("startDecorator",{className:R.startDecorator,elementType:y,externalForwardedProps:k,ownerState:H}),[M,O]=(0,v.A)("endDecorator",{className:R.endDecorator,elementType:S,externalForwardedProps:k,ownerState:H});return(0,g.jsxs)(E,(0,o.A)({},I,{children:[w&&(0,g.jsx)(V,(0,o.A)({},L,{children:w})),a,z&&(0,g.jsx)(M,(0,o.A)({},O,{children:z}))]}))})},90717:(e,r,t)=>{"use strict";t.d(r,{Bz:()=>n.Bz,NL:()=>n.NL,N_:()=>o.N_,nB:()=>o.nB,u4:()=>n.u4}),t(65991);var n=t(22545);t(29460);var o=t(94673)}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,8245,7254,9057,3861,2134,8441,1255,7358],()=>e(e.s=33368)),_N_E=e.O()}]);
|
package/.next/static/chunks/app/(app)/renderer/{page-b66d847affd2e6d4.js → page-877c6d4c44b9c0e1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[583],{36080:(r,e,t)=>{"use strict";t.d(e,{default:()=>l});var o=t(95155),a=t(12115),i=t(83561),n=t(35454);function l(r){let{children:e}=r,t=(0,n.g1)(),l=(0,i.gG)(),{currentId:d}=(0,i.tF)(),[s,c]=a.useState(!1);return(a.useLayoutEffect(()=>{let r=l&&(0,n.zV)(l.getSnapshot().pages,t);r&&l.open(r.id),c(!0)},[l,t]),l&&!s)?null:(0,o.jsx)(a.Fragment,{children:e},d)}},41678:(r,e,t)=>{Promise.resolve().then(t.bind(t,36080)),Promise.resolve().then(t.bind(t,52134))},49953:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zm-7 5h5v5h-5z"}),"EventOutlined")},78373:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M5 10h14v2h2V6c0-1.1-.9-2-2-2h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h7v-2H5zm0-4h14v2H5zm17.84 10.28-.71.71-2.12-2.12.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41m-3.54-.7 2.12 2.12-5.3 5.3H14v-2.12z"}),"EditCalendarOutlined")},83730:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.996.996 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0"}),"KeyboardArrowDownRounded")},90272:(r,e,t)=>{"use strict";t.d(e,{A:()=>D});var o=t(67810),a=t(88945),i=t(12115),n=t(2821),l=t(57001),d=t(88133),s=t(25191),c=t(74223),v=t(2914),A=t(37594),u=t(33859);function h(r){return(0,u.SX)("MuiAlert",r)}(0,u.WN)("MuiAlert",["root","startDecorator","endDecorator","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=t(14522),p=t(95155);let g=["children","className","color","invertedColors","role","variant","size","startDecorator","endDecorator","component","slots","slotProps"],f=(0,c.A)("div",{name:"JoyAlert",slot:"Root",overridesResolver:(r,e)=>e.root})(r=>{var e;let{theme:t,ownerState:o}=r,{p:i,padding:n,borderRadius:l}=(0,m.x)({theme:t,ownerState:o},["p","padding","borderRadius"]);return[(0,a.A)({"--Alert-radius":t.vars.radius.sm,"--Alert-decoratorChildRadius":"max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))","--Button-minHeight":"var(--Alert-decoratorChildHeight)","--IconButton-size":"var(--Alert-decoratorChildHeight)","--Button-radius":"var(--Alert-decoratorChildRadius)","--IconButton-radius":"var(--Alert-decoratorChildRadius)","--Icon-color":"currentColor"},"sm"===o.size&&{"--Alert-padding":"0.5rem","--Alert-decoratorChildHeight":"1.5rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.5rem"},"md"===o.size&&{"--Alert-padding":"0.75rem","--Alert-decoratorChildHeight":"2rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.625rem"},"lg"===o.size&&{"--Alert-padding":"1rem","--Alert-decoratorChildHeight":"2.375rem","--Icon-fontSize":t.vars.fontSize.xl2,gap:"0.875rem"},{backgroundColor:t.vars.palette.background.surface,display:"flex",position:"relative",alignItems:"center",padding:"var(--Alert-padding)",borderRadius:"var(--Alert-radius)"},t.typography["body-".concat({sm:"xs",md:"sm",lg:"md"}[o.size])],{fontWeight:t.vars.fontWeight.md},"solid"===o.variant&&o.color&&o.invertedColors&&(0,s.Hm)(o.color)(t),"soft"===o.variant&&o.color&&o.invertedColors&&(0,s.qG)(o.color)(t),null==(e=t.variants[o.variant])?void 0:e[o.color]),void 0!==i&&{"--Alert-padding":i},void 0!==n&&{"--Alert-padding":n},void 0!==l&&{"--Alert-radius":l}]}),z=(0,c.A)("span",{name:"JoyAlert",slot:"StartDecorator",overridesResolver:(r,e)=>e.startDecorator})({display:"inherit",flex:"none"}),x=(0,c.A)("span",{name:"JoyAlert",slot:"EndDecorator",overridesResolver:(r,e)=>e.endDecorator})({display:"inherit",flex:"none",marginLeft:"auto"}),D=i.forwardRef(function(r,e){let t=(0,v.A)({props:r,name:"JoyAlert"}),{children:i,className:s,color:c="neutral",invertedColors:u=!1,role:m="alert",variant:D="soft",size:H="md",startDecorator:C,endDecorator:y,component:S,slots:b={},slotProps:R={}}=t,N=(0,o.A)(t,g),V=(0,a.A)({},t,{color:c,invertedColors:u,variant:D,size:H}),j=(r=>{let{variant:e,color:t,size:o}=r,a={root:["root",o&&"size".concat((0,d.A)(o)),t&&"color".concat((0,d.A)(t)),e&&"variant".concat((0,d.A)(e))],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.A)(a,h,{})})(V),E=(0,a.A)({},N,{component:S,slots:b,slotProps:R}),[I,k]=(0,A.A)("root",{ref:e,className:(0,n.A)(j.root,s),elementType:f,externalForwardedProps:E,ownerState:V,additionalProps:{role:m}}),[L,M]=(0,A.A)("startDecorator",{className:j.startDecorator,elementType:z,externalForwardedProps:E,ownerState:V}),[P,W]=(0,A.A)("endDecorator",{className:j.endDecorator,elementType:x,externalForwardedProps:E,ownerState:V});return(0,p.jsxs)(I,(0,a.A)({},k,{children:[C&&(0,p.jsx)(L,(0,a.A)({},M,{children:C})),i,y&&(0,p.jsx)(P,(0,a.A)({},W,{children:y}))]}))})}},r=>{r.O(0,[9627,277,5004,2246,7240,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[583],{36080:(r,e,t)=>{"use strict";t.d(e,{default:()=>l});var o=t(95155),a=t(12115),i=t(83561),n=t(35454);function l(r){let{children:e}=r,t=(0,n.g1)(),l=(0,i.gG)(),{currentId:d}=(0,i.tF)(),[s,c]=a.useState(!1);return(a.useLayoutEffect(()=>{let r=l&&(0,n.zV)(l.getSnapshot().pages,t);r&&l.open(r.id),c(!0)},[l,t]),l&&!s)?null:(0,o.jsx)(a.Fragment,{children:e},d)}},41678:(r,e,t)=>{Promise.resolve().then(t.bind(t,36080)),Promise.resolve().then(t.bind(t,52134))},49953:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zm-7 5h5v5h-5z"}),"EventOutlined")},78373:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M5 10h14v2h2V6c0-1.1-.9-2-2-2h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h7v-2H5zm0-4h14v2H5zm17.84 10.28-.71.71-2.12-2.12.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41m-3.54-.7 2.12 2.12-5.3 5.3H14v-2.12z"}),"EditCalendarOutlined")},83730:(r,e,t)=>{"use strict";t.d(e,{A:()=>i});var o=t(83694),a=t(95155);let i=(0,o.A)((0,a.jsx)("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.996.996 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0"}),"KeyboardArrowDownRounded")},90272:(r,e,t)=>{"use strict";t.d(e,{A:()=>D});var o=t(67810),a=t(88945),i=t(12115),n=t(2821),l=t(57001),d=t(88133),s=t(25191),c=t(74223),v=t(2914),A=t(37594),u=t(33859);function h(r){return(0,u.SX)("MuiAlert",r)}(0,u.WN)("MuiAlert",["root","startDecorator","endDecorator","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantPlain","variantOutlined","variantSoft","variantSolid"]);var m=t(14522),p=t(95155);let g=["children","className","color","invertedColors","role","variant","size","startDecorator","endDecorator","component","slots","slotProps"],f=(0,c.A)("div",{name:"JoyAlert",slot:"Root",overridesResolver:(r,e)=>e.root})(r=>{var e;let{theme:t,ownerState:o}=r,{p:i,padding:n,borderRadius:l}=(0,m.x)({theme:t,ownerState:o},["p","padding","borderRadius"]);return[(0,a.A)({"--Alert-radius":t.vars.radius.sm,"--Alert-decoratorChildRadius":"max((var(--Alert-radius) - var(--variant-borderWidth, 0px)) - var(--Alert-padding), min(var(--Alert-padding) + var(--variant-borderWidth, 0px), var(--Alert-radius) / 2))","--Button-minHeight":"var(--Alert-decoratorChildHeight)","--IconButton-size":"var(--Alert-decoratorChildHeight)","--Button-radius":"var(--Alert-decoratorChildRadius)","--IconButton-radius":"var(--Alert-decoratorChildRadius)","--Icon-color":"currentColor"},"sm"===o.size&&{"--Alert-padding":"0.5rem","--Alert-decoratorChildHeight":"1.5rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.5rem"},"md"===o.size&&{"--Alert-padding":"0.75rem","--Alert-decoratorChildHeight":"2rem","--Icon-fontSize":t.vars.fontSize.xl,gap:"0.625rem"},"lg"===o.size&&{"--Alert-padding":"1rem","--Alert-decoratorChildHeight":"2.375rem","--Icon-fontSize":t.vars.fontSize.xl2,gap:"0.875rem"},{backgroundColor:t.vars.palette.background.surface,display:"flex",position:"relative",alignItems:"center",padding:"var(--Alert-padding)",borderRadius:"var(--Alert-radius)"},t.typography["body-".concat({sm:"xs",md:"sm",lg:"md"}[o.size])],{fontWeight:t.vars.fontWeight.md},"solid"===o.variant&&o.color&&o.invertedColors&&(0,s.Hm)(o.color)(t),"soft"===o.variant&&o.color&&o.invertedColors&&(0,s.qG)(o.color)(t),null==(e=t.variants[o.variant])?void 0:e[o.color]),void 0!==i&&{"--Alert-padding":i},void 0!==n&&{"--Alert-padding":n},void 0!==l&&{"--Alert-radius":l}]}),z=(0,c.A)("span",{name:"JoyAlert",slot:"StartDecorator",overridesResolver:(r,e)=>e.startDecorator})({display:"inherit",flex:"none"}),x=(0,c.A)("span",{name:"JoyAlert",slot:"EndDecorator",overridesResolver:(r,e)=>e.endDecorator})({display:"inherit",flex:"none",marginLeft:"auto"}),D=i.forwardRef(function(r,e){let t=(0,v.A)({props:r,name:"JoyAlert"}),{children:i,className:s,color:c="neutral",invertedColors:u=!1,role:m="alert",variant:D="soft",size:H="md",startDecorator:C,endDecorator:y,component:S,slots:b={},slotProps:R={}}=t,N=(0,o.A)(t,g),V=(0,a.A)({},t,{color:c,invertedColors:u,variant:D,size:H}),j=(r=>{let{variant:e,color:t,size:o}=r,a={root:["root",o&&"size".concat((0,d.A)(o)),t&&"color".concat((0,d.A)(t)),e&&"variant".concat((0,d.A)(e))],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return(0,l.A)(a,h,{})})(V),E=(0,a.A)({},N,{component:S,slots:b,slotProps:R}),[I,k]=(0,A.A)("root",{ref:e,className:(0,n.A)(j.root,s),elementType:f,externalForwardedProps:E,ownerState:V,additionalProps:{role:m}}),[L,M]=(0,A.A)("startDecorator",{className:j.startDecorator,elementType:z,externalForwardedProps:E,ownerState:V}),[P,W]=(0,A.A)("endDecorator",{className:j.endDecorator,elementType:x,externalForwardedProps:E,ownerState:V});return(0,p.jsxs)(I,(0,a.A)({},k,{children:[C&&(0,p.jsx)(L,(0,a.A)({},M,{children:C})),i,y&&(0,p.jsx)(P,(0,a.A)({},W,{children:y}))]}))})}},r=>{r.O(0,[9627,277,5004,2246,7240,8859,8245,7254,9057,3861,2134,8441,1255,7358],()=>r(r.s=41678)),_N_E=r.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9312],{36858:(e,l,n)=>{"use strict";n.d(l,{default:()=>e8});var t=n(95155),s=n(12115),r=n(52619),a=n.n(r),i=n(20063),o=n(41530),d=n(67057),c=n(35326),u=n(94458),h=n(11438),x=n(31021),m=n(57364),p=n(46563),j=n(5262),y=n(97363),v=n(5058),b=n(36464),f=n(93609),g=n(34809),A=n(3446),w=n(64892);let k=e=>e.trim().length>0&&e.length<=64&&!/[\u0000-\u001f\u007f]/.test(e);var S=n(35866),C=n(35202),I=n(40584),L=n(29453);function R(e){let{text:l,label:n}=e,{size:r,path:a}=s.useMemo(()=>{let e=(0,L.Ay)(0,"M");e.addData(l),e.make();let n=e.getModuleCount(),t="";for(let l=0;l<n;l+=1)for(let s=0;s<n;s+=1)e.isDark(l,s)&&(t+="M".concat(s," ").concat(l,"h1v1h-1z"));return{size:n,path:t}},[l]),i=r+8;return(0,t.jsx)(o.A,{component:"svg",role:"img","aria-label":n,viewBox:"".concat(-4," ").concat(-4," ").concat(i," ").concat(i),shapeRendering:"crispEdges",sx:{display:"block",width:"100%",height:"auto",bgcolor:"#fff",borderRadius:"sm"},children:(0,t.jsx)("path",{fill:"#000",d:a})})}var P=n(79154),W=n(52867),D=n(12681);let N="/api/pod/outline-vpn";function F(e){let{name:l,accessUrl:n,onClose:s}=e;return(0,t.jsx)(v.Ay,{open:!0,onClose:s,children:(0,t.jsxs)(f.A,{"aria-label":"Key of ".concat(l),sx:{width:360,maxWidth:"100%",overflow:"auto"},children:[(0,t.jsx)(b.A,{}),(0,t.jsx)(c.Ay,{level:"title-md",sx:{pr:4,overflowWrap:"anywhere"},children:l}),(0,t.jsx)(R,{text:n,label:"QR code of ".concat(l)}),(0,t.jsxs)(o.A,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[(0,t.jsx)(c.Ay,{level:"body-xs",fontFamily:"code",sx:{flex:1,minWidth:0,overflowWrap:"anywhere"},children:n}),(0,t.jsx)(I.QR,{text:n,what:"the key"})]})]})})}function T(e){let{entry:l,list:n}=e,r=(0,W.h)(),a=(0,C.S)(),i=(0,W.Gk)(),[d,u]=s.useState(null),[h,x]=s.useState(null),{id:m,usedBytes:p,limitBytes:v}=l,b=l.name||"Key ".concat(m),f=!!r.blocked||i.busy,L=async e=>{n.set(await (await r.send(N,"POST",e)).json())},R=async()=>{await a({title:"Remove the key ".concat(b,"?"),body:"Whoever uses this key is cut off.",action:"Remove"})&&i.run(()=>L({action:"remove",id:m}))};return(0,t.jsxs)(o.A,{component:"li","aria-label":b,children:[null===h?(0,t.jsxs)(I.fI,{sx:{columnGap:2},children:[(0,t.jsx)(c.Ay,{level:"title-sm",sx:{flex:"1 1 140px",minWidth:0,overflowWrap:"anywhere"},children:b}),(0,t.jsxs)(c.Ay,{level:"body-sm",children:[null===p?"Data not reported":"".concat((0,D.Q3)(p)," used"),null===v?"":" of ".concat((0,D.Q3)(v))]}),(0,t.jsxs)(I.fI,{sx:{gap:.5},children:[(0,t.jsx)(S.Ay,{label:"Show the key of ".concat(b),disabled:f,onClick:()=>void i.run(async()=>{let e=await r.send("".concat(N,"/key"),"POST",{id:m});u((await e.json()).accessUrl)}),children:(0,t.jsx)(w.A,{})}),(0,t.jsx)(S.Ay,{label:"Edit ".concat(b),disabled:f,onClick:()=>x({name:l.name,limit:null===v?"":String(v/1e9)}),children:(0,t.jsx)(A.A,{})}),(0,t.jsx)(S.Ay,{label:"Remove ".concat(b),color:"danger",disabled:f,onClick:()=>void R(),children:(0,t.jsx)(g.A,{})})]})]}):(0,t.jsx)(o.A,{component:"form","aria-label":"Edit ".concat(b),onSubmit:e=>{var n;e.preventDefault();let t=null!=(n=null==h?void 0:h.name.trim())?n:"";if(!h||!k(t))return;let s=h.limit.trim(),r=s?Math.round(1e9*Number(s)):null;i.run(async()=>{if(null!==r&&!(Number.isSafeInteger(r)&&r>0))throw Error("Give the limit in GB.");t!==l.name&&await L({action:"rename",id:m,name:t}),r!==v&&await L({action:"limit",id:m,bytes:r}),x(null)})},children:(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(y.Ay,{size:"sm",autoFocus:!0,value:h.name,onChange:e=>x({...h,name:e.target.value}),slotProps:{input:{"aria-label":"New name",maxLength:64}},sx:{flex:"0 1 240px"}}),(0,t.jsx)(y.Ay,{size:"sm",type:"number",value:h.limit,placeholder:"No limit",endDecorator:"GB",onChange:e=>x({...h,limit:e.target.value}),slotProps:{input:{"aria-label":"Data limit in GB",min:0,step:"any"}},sx:{width:150}}),(0,t.jsx)(I.D0,{type:"submit",loading:i.busy,disabled:!h.name.trim(),children:"Save"}),(0,t.jsx)(j.A,{size:"sm",variant:"plain",color:"neutral",onClick:()=>x(null),children:"Cancel"})]})}),(0,t.jsx)(I.AF,{children:i.error}),d?(0,t.jsx)(F,{name:b,accessUrl:d,onClose:()=>u(null)}):null]})}function O(e){var l;let{running:n}=e,r=(0,W.h)(),a=(0,W.Gk)(),i=(0,P.r)(n?N:null),[d,c]=s.useState(""),u=null==(l=i.value)?void 0:l.keys;return(0,t.jsxs)(I.eS,{title:"Access keys",children:[r.admin?null:(0,t.jsx)(I.L7,{children:"Only a server admin sees the keys."}),r.admin&&!n?(0,t.jsx)(I.L7,{children:"Keys can be managed while Outline runs."}):null,(0,t.jsx)(I.AF,{children:i.error}),(null==u?void 0:u.length)?(0,t.jsx)(I.qo,{label:"Access keys",children:u.map(e=>(0,t.jsx)(T,{entry:e,list:i},e.id))}):u?(0,t.jsx)(I.L7,{children:"No keys yet."}):null,n?(0,t.jsxs)(o.A,{component:"form","aria-label":"New access key",onSubmit:e=>{e.preventDefault();let l=d.trim();k(l)&&!r.blocked&&a.run(async()=>{i.set(await (await r.send(N,"POST",{action:"add",name:l})).json()),c("")})},sx:{mt:1},children:[(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(y.Ay,{size:"sm",value:d,placeholder:"Key name, as phone",autoComplete:"off",disabled:!!r.blocked,onChange:e=>c(e.target.value),slotProps:{input:{"aria-label":"Key name",maxLength:64}},sx:{flex:"0 1 260px"}}),(0,t.jsx)(I.D0,{type:"submit",loading:a.busy,disabled:!d.trim(),children:"Add key"})]}),(0,t.jsx)(I.AF,{children:a.error})]}):null]})}var E=n(87654),z=n(60459);function U(e){let{children:l}=e;return(0,t.jsx)(E.A,{sx:{...z.Lc,py:{xs:1.5,sm:2},"& > section:first-of-type":{mt:0,pt:0,borderTop:"none"}},children:l})}var G=n(21426),_=n(28347),K=n(78769),M=n(55278);function V(){let{admin:e,access:l}=(0,W.h)(),[n,r]=s.useState(!1),[a,i]=s.useState("");return(s.useEffect(()=>r(!!window.sessionStorage.getItem(M.qK)),[]),e)?(0,t.jsx)(U,{children:(0,t.jsxs)(I.eS,{title:"Control key",children:["open"===l?(0,t.jsx)(I.L7,{children:"This server asks for no key."}):null,"off"===l?(0,t.jsx)(I.L7,{children:"Changes are off: set SW_CONTROL_KEY in the server’s settings (pod.env), then apply them."}):null,"key"===l?(0,t.jsxs)(o.A,{component:"form","aria-label":"Control key",onSubmit:e=>{e.preventDefault(),a.trim()&&(window.sessionStorage.setItem(M.qK,a.trim()),i(""),r(!0))},children:[(0,t.jsx)(c.Ay,{level:"body-sm",textColor:"text.tertiary",sx:{mb:1},children:"Changes ask for SW_CONTROL_KEY. It is kept for this tab only."}),n?(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(c.Ay,{level:"title-sm",color:"success",children:"A key is saved for this tab."}),(0,t.jsx)(j.A,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{window.sessionStorage.removeItem(M.qK),r(!1)},children:"Forget it"})]}):(0,t.jsxs)(I.fI,{sx:{flexWrap:"nowrap"},children:[(0,t.jsx)(y.Ay,{size:"sm",type:"password",autoComplete:"off",placeholder:"Control key",value:a,onChange:e=>i(e.target.value),slotProps:{input:{"aria-label":"Control key"}},sx:{flex:"0 1 360px",minWidth:0}}),(0,t.jsx)(j.A,{size:"sm",type:"submit",variant:"soft",color:"neutral",disabled:!a.trim(),children:"Save"})]})]}):null]})}):null}var q=n(67496),Q=n(38594),Z=n(28257),B=n(296),H=n(88504),Y=n(22681),$=n(48696),J=n(87974),X=n(93485),ee=n(13673),el=n(45428);let en={text:"",extra:"none",rows:[]},et={text:"",value:""};function es(e){let{text:l,extra:n,rows:t}=e,s=t.map(e=>e.filter(e=>e.text.trim())).filter(e=>e.length);return"none"!==n&&s.length?"keyboard"===n?{text:l,keyboard:s.map(e=>e.map(e=>e.text))}:{text:l,buttons:s.map(e=>e.map(e=>{let{text:l,value:n}=e,t=n.trim();return t?(0,$.OD)(t)?{text:l,url:t}:{text:l,data:t}:{text:l}}))}:{text:l}}function er(e){let{value:l,onChange:n,label:s}=e,{text:r,extra:a,rows:i}=l,d="keyboard"===a,c=d?"Key":"Button",u=e=>n({...l,rows:e}),h=(e,l)=>u(l.length?i.map((n,t)=>t===e?l:n):i.filter((l,n)=>n!==e));return(0,t.jsxs)(o.A,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[(0,t.jsx)(J.A,{size:"sm",minRows:2,maxRows:8,value:r,placeholder:s,onChange:e=>n({...l,text:e.target.value}),slotProps:{textarea:{"aria-label":s,maxLength:$.DE}}}),(0,t.jsxs)(X.A,{size:"sm","aria-label":"With the message",value:a,onChange:(e,t)=>{t&&n({...l,extra:t,rows:"none"===t||i.length?i:[[et]]})},sx:{alignSelf:"flex-start",flexWrap:"wrap"},children:[(0,t.jsx)(j.A,{value:"none",children:"No buttons"}),(0,t.jsx)(j.A,{value:"buttons",children:"Inline buttons"}),(0,t.jsx)(j.A,{value:"keyboard",children:"Reply keyboard"})]}),"none"===a?null:(0,t.jsxs)(t.Fragment,{children:[i.map((e,l)=>(0,t.jsxs)(I.fI,{children:[e.map((n,s)=>{let r=n=>h(l,e.map((e,l)=>l===s?{...e,...n}:e)),a="".concat(c," ").concat(s+1," of row ").concat(l+1);return(0,t.jsxs)(I.fI,{sx:{gap:.5,flexWrap:"nowrap"},children:[(0,t.jsx)(y.Ay,{size:"sm",value:n.text,placeholder:"".concat(c," text"),onChange:e=>r({text:e.target.value}),slotProps:{input:{"aria-label":"".concat(a,": text")}},sx:{width:140}}),d?null:(0,t.jsx)(y.Ay,{size:"sm",value:n.value,placeholder:"Data or https://…",onChange:e=>r({value:e.target.value}),slotProps:{input:{"aria-label":"".concat(a,": data or link")}},sx:{width:170}}),(0,t.jsx)(S.Ay,{label:"Remove ".concat(a.toLowerCase()),onClick:()=>h(l,e.filter((e,l)=>l!==s)),children:(0,t.jsx)(el.A,{})})]},s)}),(0,t.jsx)(S.Ay,{label:"Add a ".concat(c.toLowerCase()," to row ").concat(l+1),disabled:e.length>=$.aL,onClick:()=>h(l,[...e,et]),children:(0,t.jsx)(ee.A,{})})]},l)),(0,t.jsx)(j.A,{size:"sm",variant:"plain",color:"neutral",startDecorator:(0,t.jsx)(ee.A,{}),disabled:i.length>=$.Z0,onClick:()=>u([...i,[et]]),sx:{alignSelf:"flex-start"},children:"Add row"})]})]})}function ea(e){let l,{message:n,bot:s}=e,r=n.from===s,{buttons:a,keyboard:i,pressed:u,error:h}=n;return(0,t.jsxs)(o.A,{component:"li",sx:{alignSelf:r?"flex-end":"flex-start",maxWidth:"85%",minWidth:0},children:[(0,t.jsxs)(c.Ay,{level:"body-xs",textColor:"text.tertiary",textAlign:r?"right":"left",children:[n.from," \xb7 ",(l=n.at)?new Date(1e3*l).toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"}):""]}),(0,t.jsx)(o.A,{sx:{px:1.25,py:.75,borderRadius:"md",border:"1px solid",borderColor:h?"danger.outlinedBorder":"divider",bgcolor:r?"primary.softBg":"background.surface"},children:(0,t.jsx)(c.Ay,{level:"body-sm",textColor:"text.primary",sx:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:u?"Pressed: ".concat(n.text):n.text})}),null==a?void 0:a.map((e,l)=>(0,t.jsx)(I.fI,{sx:{mt:.5,gap:.5},children:e.map((e,l)=>(0,t.jsx)(Z.A,{size:"sm",variant:"outlined",children:e.url&&(0,$.OD)(e.url)?(0,t.jsx)(d.A,{href:e.url,target:"_blank",rel:"noopener noreferrer",level:"body-xs",children:e.text}):e.text},l))},l)),i?(0,t.jsx)(o.A,{"aria-label":"Reply keyboard",role:"group",children:i.map((e,l)=>(0,t.jsx)(I.fI,{sx:{mt:.5,gap:.5},children:e.map((e,l)=>(0,t.jsx)(Z.A,{size:"sm",variant:"soft",children:e},l))},l))}):null,h?(0,t.jsxs)(c.Ay,{level:"body-xs",color:"danger",children:["Not sent: ",h]}):null]})}function ei(e){let{bot:l,chat:n,onSent:r}=e,a=(0,W.h)(),i=(0,W.Gk)(),[d,c]=s.useState(en);return(0,t.jsxs)(o.A,{component:"form","aria-label":"New message",onSubmit:e=>{e.preventDefault();let t=es(d);i.run(async()=>{let e=(0,$.Ek)(t);if(e)throw Error(e);await a.send("/api/pod/messages","POST",{bot:l,chat:n,...t}),c(en),r()})},sx:{mt:1.5},children:[(0,t.jsx)(er,{label:"Message",value:d,onChange:c}),(0,t.jsx)(I.fI,{sx:{mt:1},children:(0,t.jsx)(I.D0,{type:"submit",variant:"solid",color:"primary",loading:i.busy,disabled:!d.text.trim(),children:"Send"})}),(0,t.jsx)(I.AF,{children:i.error})]})}function eo(e){var l,n,r,a,i,d;let{bot:u}=e,[h,x]=s.useState(null),m="/api/pod/chats?bot=".concat(encodeURIComponent(u)),p=(0,P.r)(m,3e3),j=null!=(a=null==(l=p.value)?void 0:l.chats)?a:[],y=null!=(i=j.find(e=>e.id===h))?i:j[0],v=(0,P.r)(y?"".concat(m,"&chat=").concat(y.id):null,3e3),b=null==(n=v.value)?void 0:n.messages,f=s.useRef(null),g=null!=(d=null==b?void 0:b.length)?d:0,A=null==b||null==(r=b[g-1])?void 0:r.at;return(s.useLayoutEffect(()=>{let e=f.current;e&&(e.scrollTop=e.scrollHeight)},[null==y?void 0:y.id,g,A]),p.value)?y?(0,t.jsxs)(o.A,{sx:{display:"flex",flexWrap:"wrap",gap:2,minWidth:0},children:[(0,t.jsx)(B.A,{size:"sm","aria-label":"Chats",sx:{flex:"1 1 180px",maxWidth:{sm:240},maxHeight:360,overflow:"auto","--ListItem-radius":"8px"},children:j.map(e=>(0,t.jsx)(H.A,{children:(0,t.jsx)(Y.A,{selected:e.id===y.id,onClick:()=>x(e.id),children:(0,t.jsxs)(o.A,{sx:{minWidth:0},children:[(0,t.jsx)(c.Ay,{level:"title-sm",noWrap:!0,children:e.title}),(0,t.jsx)(c.Ay,{level:"body-xs",noWrap:!0,children:e.last})]})})},e.id))}),(0,t.jsxs)(o.A,{sx:{flex:"4 1 300px",minWidth:0},children:[(0,t.jsx)(o.A,{component:"ul",ref:f,"aria-label":"Messages of ".concat(y.title),sx:{display:"flex",flexDirection:"column",gap:1,m:0,p:0,listStyle:"none",maxHeight:360,overflow:"auto"},children:null==b?void 0:b.map((e,l)=>(0,t.jsx)(ea,{message:e,bot:u},l))}),(0,t.jsx)(I.AF,{children:v.error}),(0,t.jsx)(ei,{bot:u,chat:y.id,onSent:v.reload},y.id)]})]}):(0,t.jsx)(I.L7,{children:"No chats yet. A bot cannot start one: a person writes to it first."}):(0,t.jsx)(I.AF,{children:p.error})}var ed=n(12785),ec=n(81864);let eu=e=>{var l,n,t;return null!=(t=null==(l=null!=(n=e.buttons)?n:e.keyboard)?void 0:l.flat().length)?t:0};function eh(e){let{bot:l,bots:n}=e,r=(0,W.h)(),a=(0,C.S)(),i=(0,W.Gk)(),[d,u]=s.useState(null),h=Object.entries(l.replies),x=async(e,t)=>{let s=await r.send("/api/pod/bots","PUT",{name:l.name,key:e,reply:t});n.set(await s.json())};return(0,t.jsxs)(o.A,{sx:{minWidth:0},children:[h.length?(0,t.jsx)(I.qo,{label:"Automatic replies",children:h.map(e=>{let[l,n]=e;return(0,t.jsx)(o.A,{component:"li","aria-label":l,children:(0,t.jsxs)(I.fI,{sx:{columnGap:2,flexWrap:"nowrap"},children:[(0,t.jsx)(c.Ay,{level:"title-sm",fontFamily:"code",noWrap:!0,sx:{flex:"0 1 160px"},children:l}),(0,t.jsx)(c.Ay,{level:"body-sm",noWrap:!0,sx:{flex:"1 1 0",minWidth:0},children:n.text}),eu(n)?(0,t.jsx)(c.Ay,{level:"body-xs",children:(0,ec.h)(eu(n),n.buttons?"button":"key")}):null,(0,t.jsxs)(I.fI,{sx:{gap:.5,flexWrap:"nowrap"},children:[(0,t.jsx)(S.Ay,{label:"Edit the reply to ".concat(l),disabled:!!r.blocked,onClick:()=>u({of:l,key:l,draft:function(e){let{text:l,buttons:n,keyboard:t}=e;return(null==n?void 0:n.length)?{text:l,extra:"buttons",rows:n.map(e=>e.map(e=>{var l,n;return{text:e.text,value:null!=(n=null!=(l=e.url)?l:e.data)?n:""}}))}:(null==t?void 0:t.length)?{text:l,extra:"keyboard",rows:t.map(e=>e.map(e=>({text:e,value:""})))}:{text:l,extra:"none",rows:[]}}(n)}),children:(0,t.jsx)(A.A,{})}),(0,t.jsx)(S.Ay,{label:"Remove the reply to ".concat(l),color:"danger",disabled:!!r.blocked||i.busy,onClick:async()=>{await a({title:"Remove the reply to ".concat(l,"?"),body:"The bot stops answering it by itself.",action:"Remove"})&&i.run(()=>x(l,null))},children:(0,t.jsx)(g.A,{})})]})]})},l)})}):(0,t.jsx)(I.L7,{children:"No automatic replies yet."}),d?(0,t.jsxs)(o.A,{component:"form","aria-label":"Automatic reply",onSubmit:e=>{if(e.preventDefault(),!d)return;let{of:l,key:n,draft:t}=d,s=es(t);i.run(async()=>{let e=(0,$.Ek)(s);if(e)throw Error(e);await x(n.trim(),s),null!==l&&l!==n.trim()&&await x(l,null),u(null)})},sx:{mt:1.5},children:[(0,t.jsx)(y.Ay,{size:"sm",value:d.key,placeholder:"To a command (/start), a message or a button’s data",onChange:e=>u({...d,key:e.target.value}),slotProps:{input:{"aria-label":"Replies to",maxLength:$.tM}},sx:{mb:1}}),(0,t.jsx)(er,{label:"Reply",value:d.draft,onChange:e=>u({...d,draft:e})}),(0,t.jsxs)(I.fI,{sx:{mt:1},children:[(0,t.jsx)(I.D0,{type:"submit",variant:"solid",color:"primary",loading:i.busy,disabled:!d.key.trim()||!d.draft.text.trim(),children:"Save reply"}),(0,t.jsx)(j.A,{size:"sm",variant:"plain",color:"neutral",onClick:()=>u(null),children:"Cancel"})]})]}):(0,t.jsx)(I.fI,{sx:{mt:1},children:(0,t.jsx)(I.D0,{onClick:()=>u({of:null,key:"",draft:en}),children:"Add reply"})}),(0,t.jsx)(I.AF,{children:i.error})]})}function ex(){var e,l,n,r;let{signedIn:a,admin:i}=(0,W.h)(),o=(0,ed.Es)(),[d,c]=s.useState(null),u=null!=(l=null==(e=o.value)?void 0:e.bots)?l:[],h=null!=(n=u.find(e=>e.name===d))?n:u[0];return a?(0,t.jsx)(U,{children:(0,t.jsxs)(I.eS,{title:"Conversations",actions:u.length>1?(0,t.jsx)(Q.A,{size:"sm",value:null!=(r=null==h?void 0:h.name)?r:null,onChange:(e,l)=>c(l),slotProps:{button:{"aria-label":"Bot of the conversations"}},children:u.map(e=>(0,t.jsx)(q.A,{value:e.name,children:e.username?"@".concat(e.username):e.name},e.name))}):null,children:[i?null:(0,t.jsx)(I.L7,{children:"Only a server admin reads the chats."}),h?(0,t.jsx)(eo,{bot:h.name},h.name):o.value?(0,t.jsx)(I.L7,{children:"Add a bot first, under Bots."}):null]})}):null}function em(){var e;let{signedIn:l}=(0,W.h)(),n=(0,ed.Es)(),[r,a]=s.useState(null);s.useEffect(()=>a(function(){let e=new URLSearchParams(window.location.search),l=e.get("bot");return l?{name:l,shown:"replies"===e.get("show")?"replies":"chats"}:null}()),[]);let i=null==(e=n.value)?void 0:e.bots.find(e=>e.name===(null==r?void 0:r.name));return l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"Your bots",children:(0,t.jsx)(ed.Ay,{bots:n,open:r,onOpen:a})})}),i&&r?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"".concat("chats"===r.shown?"History":"Automatic replies"," \xb7 ").concat(i.name),children:"chats"===r.shown?(0,t.jsx)(eo,{bot:i.name},i.name):(0,t.jsx)(eh,{bot:i,bots:n},i.name)})}):null]}):null}var ep=n(89742),ej=n(8518),ey=n(32153),ev=n(79076),eb=n(54122);let ef={uid:"",projectId:""};function eg(){var e,l;let{admin:n,adapter:r}=(0,ej.Z)(),a=(0,eb.Z)().list.filter(e=>"firestore"===e.kind),i=s.useMemo(()=>n?()=>(0,ep.im)(r):null,[n,r]),u=(0,ey.i)(i),h=(0,C.S)(),x=(0,W.Gk)(),[m,p]=s.useState(null),j=null!=(l=a.find(e=>e.id===m))?l:a[0],[v,b]=s.useState(ef),[f,A]=s.useState(null);s.useEffect(()=>A(null),[null==j?void 0:j.id]);let w=e=>void x.run(async()=>{u.set(await (0,ep.$g)(r,{connectionId:j.id,...e})),b(ef)}),k=async e=>{let{uid:l,projectId:n,title:t}=e;await h({title:"Remove ".concat(t||n,"?"),body:"This server stops showing it. The page stays in its database.",action:"Remove"})&&x.run(async()=>u.set(await (0,ep.yf)(r,{uid:l,projectId:n})))};return n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(I.AF,{children:u.error}),(null==(e=u.value)?void 0:e.length)?(0,t.jsx)(I.qo,{label:"Added pages",children:u.value.map(e=>(0,t.jsx)(o.A,{component:"li",children:(0,t.jsxs)(I.fI,{sx:{justifyContent:"space-between",flexWrap:"nowrap"},children:[(0,t.jsxs)(o.A,{sx:{minWidth:0},children:[(0,t.jsx)(c.Ay,{level:"title-sm",noWrap:!0,children:e.title||e.projectId}),(0,t.jsxs)(d.A,{href:"/page/".concat(e.uid,"/").concat(e.projectId),target:"_blank",rel:"noopener",level:"body-xs",children:["/page/",e.uid,"/",e.projectId]})]}),(0,t.jsx)(S.Ay,{label:"Remove ".concat(e.title||e.projectId),color:"danger",onClick:()=>void k(e),children:(0,t.jsx)(g.A,{})})]})},"".concat(e.uid,"/").concat(e.projectId)))}):null,j?(0,t.jsxs)(o.A,{component:"form","aria-label":"Add a page from a database",onSubmit:e=>{e.preventDefault(),v.uid.trim()&&v.projectId.trim()&&w(v)},sx:{mt:1,display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:1},children:[(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(Q.A,{size:"sm",value:j.id,onChange:(e,l)=>p(l),slotProps:{button:{"aria-label":"Database"}},sx:{flex:"1 1 160px"},children:a.map(e=>(0,t.jsx)(q.A,{value:e.id,children:e.name},e.id))}),["uid","projectId"].map(e=>(0,t.jsx)(y.Ay,{size:"sm",value:v[e],placeholder:"uid"===e?"User id":"Project id",onChange:l=>b(n=>({...n,[e]:l.target.value})),slotProps:{input:{"aria-label":"uid"===e?"User id":"Project id"}},sx:{flex:"1 1 140px"}},e)),(0,t.jsx)(I.D0,{keyless:!0,type:"submit",disabled:!v.uid.trim()||!v.projectId.trim(),loading:x.busy,children:"Add page"})]}),(0,t.jsx)(I.fI,{children:(0,t.jsx)(I.D0,{keyless:!0,variant:"plain",onClick:()=>void x.run(async()=>A(await (0,ep.yj)(r,j.id))),children:"List its published pages"})}),(null==f?void 0:f.length)===0?(0,t.jsx)(I.L7,{children:"It has no published pages."}):null,(null==f?void 0:f.length)?(0,t.jsx)(I.qo,{label:"Published pages of the database",children:f.map(e=>(0,t.jsx)(o.A,{component:"li",children:(0,t.jsxs)(I.fI,{sx:{justifyContent:"space-between"},children:[(0,t.jsx)(c.Ay,{level:"title-sm",children:e.title||e.projectId}),(0,t.jsx)(I.D0,{keyless:!0,onClick:()=>w(e),"aria-label":"Show ".concat(e.title||e.projectId),children:"Show"})]})},"".concat(e.uid,"/").concat(e.projectId)))}):null]}):(0,t.jsx)(I.L7,{children:"Add a database above first."}),(0,t.jsx)(I.AF,{children:x.error})]}):(0,t.jsx)(I.L7,{children:"Only a server admin picks pages from added databases."})}function eA(){let{user:e}=(0,ej.Z)(),l=(0,eb.Z)();return(0,t.jsx)(t.Fragment,{children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{children:(0,t.jsx)(ev.A,{title:"Databases",kind:"firestore",state:l})}),(0,t.jsx)(o.A,{children:(0,t.jsx)(ev.A,{title:"Storage",kind:"storage",state:l})}),(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"Pages from added databases",children:(0,t.jsx)(eg,{})})})]}):null})}var ew=n(38096),ek=n(64652),eS=n(67419),eC=n(76810);function eI(){var e;let l=(0,P.r)("/api/pod/mail/sent");return(0,t.jsxs)(I.eS,{title:"Sent from here",children:[(0,t.jsx)(I.AF,{children:l.error}),(null==(e=l.value)?void 0:e.messages.length)?(0,t.jsx)(I.qo,{label:"Sent mail",children:l.value.messages.map((e,l)=>(0,t.jsxs)(o.A,{component:"li",children:[(0,t.jsxs)(I.fI,{sx:{justifyContent:"space-between"},children:[(0,t.jsx)(c.Ay,{level:"title-sm",children:e.subject}),(0,t.jsxs)(c.Ay,{level:"body-xs",textColor:"text.tertiary",children:[e.to," \xb7 ",(0,D.KN)(1e3*e.at)]})]}),e.error?(0,t.jsxs)(c.Ay,{level:"body-xs",color:"danger",children:["Not sent: ",e.error]}):null]},l))}):l.value?(0,t.jsx)(I.L7,{children:"Nothing yet."}):null]})}let eL=[{name:"host",label:"Relay",hint:"smtp.example.com:587",type:"text"},{name:"user",label:"User",hint:"From the relay provider",type:"text"},{name:"password",label:"Password",hint:"From the relay provider",type:"password"}],eR={host:"",user:"",password:""};function eP(e){var l;let{service:n}=e,r=(0,W.h)(),a=(0,W.Gk)(),[i,d]=s.useState(eR),[u,h]=s.useState(!1);if(!(null==(l=n.accepts)?void 0:l.includes("relay")))return(0,t.jsx)(I.eS,{title:"Relay",children:(0,t.jsx)(I.L7,{children:"Set MAIL_RELAY, MAIL_RELAY_USER and MAIL_RELAY_PASSWORD in pod.env, then run npx staffwriter-pod up mail."})});let x=e=>void a.run(async()=>{let l=(0,eS.Vo)(e);if(l)throw Error(l);await r.send("/api/pod/mail/relay","PUT",e),d(eR),h(!0)});return(0,t.jsxs)(I.eS,{title:"Relay",children:[(0,t.jsx)(c.Ay,{level:"body-sm",sx:{mb:1},children:n.relay?"Outgoing mail goes through ".concat(n.relay,"."):"Outgoing mail is sent directly."}),(0,t.jsxs)(o.A,{component:"form","aria-label":"Mail relay",onSubmit:e=>{e.preventDefault(),x(i)},children:[(0,t.jsx)(o.A,{sx:{display:"grid",gap:1.5,gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))"},children:eL.map(e=>{let{name:l,label:n,hint:s,type:a}=e;return(0,t.jsxs)(ew.A,{size:"sm",children:[(0,t.jsx)(ek.A,{children:n}),(0,t.jsx)(y.Ay,{type:a,autoComplete:"off",value:i[l],placeholder:s,disabled:!!r.blocked,onChange:e=>{d(n=>({...n,[l]:e.target.value})),h(!1)}})]},l)})}),(0,t.jsxs)(I.fI,{sx:{mt:1.5},children:[(0,t.jsx)(I.D0,{type:"submit",variant:"solid",color:"primary",loading:a.busy,disabled:!i.host.trim(),children:"Use this relay"}),n.relay?(0,t.jsx)(I.D0,{onClick:()=>x(eR),children:"Send directly"}):null,u?(0,t.jsx)(c.Ay,{role:"status",level:"body-sm",color:"success",children:"Saved: the pod applies it in a moment."}):null]}),(0,t.jsx)(I.AF,{children:a.error})]})]})}function eW(e){var l,n;let{service:s}=e,{signedIn:r,admin:a}=(0,W.h)(),i=null!=(n=s.dns)?n:[],d="removed"!==s.state;return(0,t.jsxs)(t.Fragment,{children:[r&&d?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"Quick message",children:(0,t.jsx)(eC.A,{service:s})})}):null,a&&d?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"Accounts",children:(0,t.jsxs)(c.Ay,{level:"body-sm",children:["Mailboxes and their settings are in the web admin. Sign in as admin@your domain; its password is on the server, in ","/opt/pod/mail/secrets.env","."]})})}):null,d&&i.length?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"DNS records",actions:(0,t.jsx)(I.QR,{text:i.join("\n"),what:"DNS records"}),children:(0,t.jsx)(o.A,{component:"pre",sx:{m:0,maxHeight:260,overflow:"auto",fontFamily:"code",fontSize:"xs",lineHeight:1.7,whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:i.join("\n")})})}):null,a&&d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{children:(0,t.jsx)(eP,{service:s})}),(null==(l=s.accepts)?void 0:l.includes("send"))?(0,t.jsx)(U,{children:(0,t.jsx)(eI,{})}):null]}):null]})}var eD=n(31585);let eN=async()=>{let e=await fetch("/api/pages",{cache:"no-store"});if(!e.ok)throw Error("The server answered ".concat(e.status,"."));return(await e.json()).pages},eF=e=>"".concat(e.uid,"/").concat(e.projectId);function eT(){var e,l,n;let r=(0,eD.k)(),a=(0,ey.i)(eN),[i,o]=s.useState(null),d=r.home?eF(r.home):null,u=null==(e=a.value)?void 0:e.find(e=>eF(e)===i);return(0,t.jsxs)(I.eS,{title:"Home page",children:[(0,t.jsx)(c.Ay,{level:"body-sm",sx:{mb:1},children:r.known?r.home?"Now: ".concat(r.home.title||"—"):"None set.":"Asking the server…"}),r.admin?(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(Q.A,{size:"sm",placeholder:"Choose a published page",value:null!=i?i:d,onChange:(e,l)=>o(l),slotProps:{button:{"aria-label":"Published page"}},sx:{flex:"0 1 360px",minWidth:200},children:null==(l=a.value)?void 0:l.map(e=>(0,t.jsx)(q.A,{value:eF(e),children:e.title||e.projectId},eF(e)))}),(0,t.jsx)(eO,{disabled:!u||eF(u)===d||r.busy,onClick:()=>u&&void r.change({uid:u.uid,projectId:u.projectId}),children:"Set as home page"}),r.home?(0,t.jsx)(eO,{disabled:r.busy,onClick:()=>void r.change(null),children:"Remove"}):null]}):(0,t.jsx)(I.L7,{children:"An admin chooses it."}),(0,t.jsx)(I.AF,{children:null!=(n=r.error)?n:a.error})]})}function eO(e){return(0,t.jsx)(I.D0,{...e,keyless:!0})}function eE(){let{adapter:e}=(0,ej.Z)();return(0,t.jsxs)(I.eS,{title:"Sign-up link",children:[(null==e?void 0:e.signUpUrl)?(0,t.jsx)(d.A,{href:e.signUpUrl,target:"_blank",rel:"noopener",level:"title-sm",children:e.signUpUrl}):(0,t.jsx)(I.L7,{children:"None. Set SW_SIGN_UP_URL in pod.env to offer one in the sign-in window."}),(0,t.jsxs)(c.Ay,{level:"body-sm",textColor:"text.tertiary",sx:{mt:1},children:["Pages are written and published in the"," ",(0,t.jsx)(d.A,{component:a(),href:"/registry",children:"registry"}),"."]})]})}function ez(){let{user:e}=(0,ej.Z)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{children:(0,t.jsx)(eT,{})}),e?(0,t.jsx)(U,{children:(0,t.jsx)(eE,{})}):null]})}var eU=n(44824),eG=n(72118);let e_=/^[A-Za-z0-9_-]{1,32}$/,eK=/^[A-Za-z0-9+/]{43}=$/,eM=/^[A-Za-z0-9.-]{1,253}(:[1-9][0-9]{0,4})?$/,eV=/^10\.99\.0\.([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4])$/;function eq(e){var l,n;let t,s=l=>"string"==typeof e[l]?e[l]:"",r={};return e_.test(s("name"))||(r.name="Up to 32 letters, digits, hyphens or underscores."),eK.test(s("publicKey"))||(r.publicKey="The WireGuard public key of the other server."),s("endpoint")&&(l=s("endpoint"),!(eM.test(l)&&65535>=Number(null!=(n=l.split(":")[1])?n:1)))&&(r.endpoint="A host, or host:port."),"string"==typeof(t=s("address"))&&eV.test(t)||(r.address="An address from 10.99.0.1 to 10.99.0.254."),r}let eQ="/api/pod/tunnels";function eZ(e){let{tunnel:l,tunnels:n}=e,r=(0,W.h)(),a=(0,C.S)(),i=(0,W.Gk)(),[d,u]=s.useState(null),{name:h,address:x,added:m,pingMs:p}=l,j=async()=>{await a({title:"Remove the tunnel ".concat(h,"?"),body:"This server stops reaching the other end.",action:"Remove"})&&i.run(async()=>{n.set(await (await r.send(eQ,"DELETE",{address:x})).json())})};return(0,t.jsxs)(o.A,{component:"li","aria-label":h,children:[(0,t.jsxs)(I.fI,{sx:{columnGap:2},children:[(0,t.jsxs)(c.Ay,{level:"title-sm",sx:{minWidth:0,flex:"1 1 140px",overflowWrap:"anywhere"},children:[h,(0,t.jsxs)(c.Ay,{level:"body-xs",textColor:"text.tertiary",children:[" ","\xb7 ",m?"added here":"pod server"]})]}),(0,t.jsx)(c.Ay,{level:"body-sm",fontFamily:"code",children:x}),(0,t.jsx)(c.Ay,{level:"body-sm",children:function(e){let{handshake:l,reported:n}=e;return n?l?"Handshake ".concat((0,D.KN)(1e3*l)):"No handshake yet":"Waiting for the pod"}(l)}),(0,t.jsx)(c.Ay,{level:"body-sm",children:null===p?"No ping":"Ping ".concat(p," ms")}),(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(I.D0,{loading:i.busy,onClick:()=>{u(null),n.reload(),i.run(async()=>{let e=await (await r.send("".concat(eQ,"/send"),"POST",{address:x})).json();u("".concat(e.node.toUpperCase()," answered over the tunnel in ").concat(e.ms," ms"))})},"aria-label":"Test the tunnel ".concat(h),children:"Test"}),m?(0,t.jsx)(I.D0,{color:"danger",disabled:i.busy,onClick:()=>void j(),"aria-label":"Remove the tunnel ".concat(h),children:"Remove"}):null]})]}),d?(0,t.jsx)(c.Ay,{role:"status",level:"body-sm",color:"success",children:d}):null,(0,t.jsx)(I.AF,{children:i.error})]})}function eB(e){let{label:l,value:n,what:s}=e;return(0,t.jsxs)(o.A,{sx:{display:"flex",alignItems:"center",gap:.5,minWidth:0,maxWidth:"100%"},children:[(0,t.jsxs)(c.Ay,{level:"body-sm",noWrap:!0,sx:{minWidth:0},children:[l,": ",n]}),(0,t.jsx)(I.QR,{text:n,what:s})]})}let eH=[{name:"name",label:"Name",hint:"office"},{name:"publicKey",label:"Public key",hint:"The other server’s WireGuard key"},{name:"endpoint",label:"Endpoint (optional)",hint:"host:51830"},{name:"address",label:"Pod address",hint:"10.99.0.20"}],eY={name:"",publicKey:"",endpoint:"",address:""};function e$(e){let{tunnels:l,onDone:n}=e,r=(0,W.h)(),a=(0,W.Gk)(),[i,d]=s.useState(eY),[c,u]=s.useState(!1),h=c?eq(i):{};return(0,t.jsxs)(o.A,{component:"form","aria-label":"New tunnel",noValidate:!0,onSubmit:e=>{e.preventDefault(),u(!0);let t=Object.fromEntries(Object.entries(i).map(e=>{let[l,n]=e;return[l,n.trim()]}));Object.keys(eq(t)).length||a.run(async()=>{l.set(await (await r.send(eQ,"POST",t)).json()),n()})},sx:{mt:1},children:[(0,t.jsx)(o.A,{sx:{display:"grid",gap:1.5,gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))"},children:eH.map(e=>{let{name:l,label:n,hint:s}=e;return(0,t.jsxs)(ew.A,{size:"sm",error:!!h[l],children:[(0,t.jsx)(ek.A,{children:n}),(0,t.jsx)(y.Ay,{value:i[l],placeholder:s,autoComplete:"off",onChange:e=>d(n=>({...n,[l]:e.target.value}))}),h[l]?(0,t.jsx)(eU.A,{children:h[l]}):null]},l)})}),(0,t.jsxs)(I.fI,{sx:{mt:1.5},children:[(0,t.jsx)(I.D0,{type:"submit",variant:"solid",color:"primary",loading:a.busy,children:"Add"}),(0,t.jsx)(j.A,{size:"sm",variant:"plain",color:"neutral",onClick:n,children:"Cancel"})]}),(0,t.jsx)(I.AF,{children:a.error})]})}function eJ(){let e=(0,W.h)(),l=(0,W.Gk)(),n=(0,P.r)(eQ),[r,a]=s.useState(!1),i=n.value;return(0,t.jsxs)(I.eS,{title:"Tunnels",actions:r?null:(0,t.jsx)(I.D0,{onClick:()=>a(!0),children:"Add tunnel"}),children:[e.admin?null:(0,t.jsx)(I.L7,{children:"Only a server admin sees the tunnels."}),(0,t.jsx)(I.AF,{children:n.error}),i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(I.fI,{sx:{columnGap:3,rowGap:0,mb:.5},children:[(0,t.jsx)(eB,{label:"This server",value:i.address,what:"this server’s pod address"}),(0,t.jsx)(eB,{label:"Its key",value:i.publicKey,what:"this server’s public key"})]}),i.tunnels.length?(0,t.jsx)(I.qo,{label:"Tunnels",children:i.tunnels.map(e=>(0,t.jsx)(eZ,{tunnel:e,tunnels:n},e.address))}):(0,t.jsx)(I.L7,{children:"No tunnels yet."}),i.reportedAt?(0,t.jsxs)(I.L7,{children:["Reported ",(0,D.KN)(i.reportedAt)]}):null]}):null,r?(0,t.jsx)(e$,{tunnels:n,onDone:()=>a(!1)}):null,i?(0,t.jsx)(c.Ay,{component:"label",level:"body-sm",endDecorator:(0,t.jsx)(eG.A,{size:"sm",checked:i.secureDelivery,disabled:!!e.blocked||l.busy,onChange:t=>{let s;return s=t.target.checked,void l.run(async()=>{n.set(await (await e.send(eQ,"PUT",{secureDelivery:s})).json())})},slotProps:{input:{"aria-label":"Secure pod delivery network"}}}),sx:{display:"flex",justifyContent:"space-between",gap:1.5,mt:1.5},children:"Secure pod delivery network (experimental): reach other servers over the tunnels"}):null,(0,t.jsx)(I.AF,{children:l.error})]})}var eX=n(95983),e0=n(50830);let e1="/api/pod/vpn";function e5(e){let{client:l,list:n}=e,r=(0,W.h)(),a=(0,C.S)(),i=(0,W.Gk)(),[d,u]=s.useState(null),{id:h,name:x,enabled:m,address:p,seenAt:j}=l,y=!!r.blocked||i.busy,A=e=>void i.run(async()=>{n.set(await (await r.send(e1,"POST",{action:e,id:h})).json())}),k=async e=>URL.createObjectURL(await (await r.send("".concat(e1,"/file"),"POST",{id:h,kind:e})).blob());return(0,t.jsxs)(o.A,{component:"li","aria-label":x,children:[(0,t.jsxs)(I.fI,{sx:{columnGap:2},children:[(0,t.jsx)(c.Ay,{level:"title-sm",sx:{flex:"1 1 140px",minWidth:0,overflowWrap:"anywhere"},children:x}),(0,t.jsx)(c.Ay,{level:"body-sm",fontFamily:"code",children:p}),(0,t.jsx)(c.Ay,{level:"body-sm",children:j?"Seen ".concat((0,D.KN)(j)):"Never seen"}),(0,t.jsxs)(I.fI,{sx:{gap:.5},children:[(0,t.jsx)(eG.A,{size:"sm",checked:m,disabled:y,onChange:()=>A(m?"disable":"enable"),slotProps:{input:{"aria-label":"".concat(x," enabled")}},sx:{mr:1}}),(0,t.jsx)(S.Ay,{label:"QR code of ".concat(x),disabled:y,onClick:()=>void i.run(async()=>u(await k("qrcode"))),children:(0,t.jsx)(w.A,{})}),(0,t.jsx)(S.Ay,{label:"Download the configuration of ".concat(x),disabled:y,onClick:()=>void i.run(async()=>{let e=await k("configuration");Object.assign(document.createElement("a"),{href:e,download:"".concat(x.replace(/[^\w.-]+/g,"-").slice(0,32)||"vpn",".conf")}).click(),window.setTimeout(()=>URL.revokeObjectURL(e),1e3)}),children:(0,t.jsx)(e0.A,{})}),(0,t.jsx)(S.Ay,{label:"Remove ".concat(x),color:"danger",disabled:y,onClick:async()=>{await a({title:"Remove the VPN client ".concat(x,"?"),body:"The device loses the VPN, and its settings stop working.",action:"Remove"})&&A("remove")},children:(0,t.jsx)(g.A,{})})]})]}),(0,t.jsx)(I.AF,{children:i.error}),d?(0,t.jsx)(v.Ay,{open:!0,onClose:()=>{d&&URL.revokeObjectURL(d),u(null)},children:(0,t.jsxs)(f.A,{"aria-label":"QR code of ".concat(x),sx:{width:360,maxWidth:"100%"},children:[(0,t.jsx)(b.A,{}),(0,t.jsx)(c.Ay,{level:"title-md",children:x}),(0,t.jsx)(o.A,{component:"img",src:d,alt:"QR code of ".concat(x),sx:{width:"100%",bgcolor:"#fff",borderRadius:"sm"}})]})}):null]})}function e2(e){var l;let{running:n}=e,r=(0,W.h)(),a=(0,W.Gk)(),i=(0,P.r)(n?e1:null),[d,c]=s.useState(""),u=null==(l=i.value)?void 0:l.clients;return(0,t.jsxs)(I.eS,{title:"VPN clients",children:[r.admin?null:(0,t.jsx)(I.L7,{children:"Only a server admin sees the clients."}),r.admin&&!n?(0,t.jsx)(I.L7,{children:"Clients can be managed while the VPN runs."}):null,(0,t.jsx)(I.AF,{children:i.error}),(null==u?void 0:u.length)?(0,t.jsx)(I.qo,{label:"VPN clients",children:u.map(e=>(0,t.jsx)(e5,{client:e,list:i},e.id))}):u?(0,t.jsx)(I.L7,{children:"No clients yet."}):null,(0,t.jsxs)(o.A,{component:"form","aria-label":"New VPN client",onSubmit:e=>{e.preventDefault(),d.trim()&&!r.blocked&&a.run(async()=>{i.set(await (await r.send(e1,"POST",{action:"add",name:d.trim()})).json()),c("")})},sx:{mt:1},hidden:!n,children:[(0,t.jsxs)(I.fI,{children:[(0,t.jsx)(y.Ay,{size:"sm",value:d,placeholder:"Client name, as phone",autoComplete:"off",disabled:!!r.blocked,onChange:e=>c(e.target.value),slotProps:{input:{"aria-label":"Client name",maxLength:64}},sx:{flex:"0 1 260px"}}),(0,t.jsx)(I.D0,{type:"submit",loading:a.busy,disabled:!d.trim(),children:"Add client"})]}),(0,t.jsx)(I.AF,{children:a.error})]})]})}function e7(e){let{info:l}=e;return(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"How to use",children:(0,t.jsx)(o.A,{component:"ol",sx:{m:0,pl:2.5,display:"grid",gap:.5},children:l.steps.map(e=>(0,t.jsx)(c.Ay,{component:"li",level:"body-sm",sx:{display:"list-item"},children:e},e))})})})}function e4(e){let{children:l}=e,{signedIn:n}=(0,W.h)();return(0,t.jsx)(U,{children:n?l:(0,t.jsx)(I.L7,{children:"Sign in as a server admin to manage it."})})}function e6(e){let{info:l,data:n}=e,{admin:s}=(0,W.h)(),{overview:r}=n,a=(0,eX.EI)(n,l.reportedAs);switch(l.id){case"web":return(0,t.jsx)(ez,{});case"cdn":return(0,t.jsx)(eA,{});case"telegram":return(0,t.jsx)(ex,{});case"mail":return a?(0,t.jsx)(eW,{service:a}):null;case"bots":return(0,t.jsx)(em,{});case"wireguard-vpn":return r.vpn?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e4,{children:(0,t.jsx)(e2,{running:(null==a?void 0:a.state)==="running"})}),s?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"VPN page",children:(0,t.jsx)(I.L7,{children:"Its sign-in is on the server, in /opt/wireguard/secrets.env."})})}):null]}):(0,t.jsx)(U,{children:(0,t.jsx)(I.L7,{children:"The pod has left no sign-in here (vpn.json): manage the VPN on its own page."})});case"wireguard-tunnel":return(0,t.jsx)(e4,{children:(0,t.jsx)(eJ,{})});case"outline":return r.outlineVpn?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e4,{children:(0,t.jsx)(O,{running:(null==a?void 0:a.state)==="running"})}),s?(0,t.jsx)(U,{children:(0,t.jsx)(I.eS,{title:"Outline Manager",children:(0,t.jsx)(I.L7,{children:"It connects with the two values on the server, in /opt/outline/access.txt."})})}):null]}):(0,t.jsx)(U,{children:(0,t.jsx)(I.L7,{children:"Its keys are managed on the server that runs it."})})}}function e3(e){let{id:l}=e,n=(0,i.useRouter)(),s=(0,eX.A$)(),r=s.overview?s:null,c=r?(0,p.G6)(r.overview):[],j=(0,_.RT)(c),{viewLayout:y}=(0,m.O)(),v=(0,p.wJ)(l),b=c.some(e=>e.id===l),f=(0,t.jsx)(d.A,{component:a(),href:"/services",level:"title-sm",textColor:"text.secondary",underline:"none",startDecorator:(0,t.jsx)(u.A,{}),children:"All services"});return(0,t.jsxs)(h.default.View,{barTitle:v.label,sideNav:r?(0,t.jsx)(x.Ay,{label:"Services",sections:j,activeSectionId:(0,_.nF)(v.group),activeCardId:(0,_.FO)(l),onSelect:(e,l)=>{var t;let s=j.find(l=>l.id===e),r=null!=(t=null==s?void 0:s.services.find(e=>(0,_.FO)(e.id)===l))?t:null==s?void 0:s.services[0];r&&n.push((0,p.VF)(r.id))}}):void 0,children:[(0,t.jsx)(o.A,{"data-block-stream-narrow":"horizontal"===y?"":void 0,children:f}),r?b?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{children:(0,t.jsx)(G.A,{info:v,data:r})}),(0,t.jsx)(e7,{info:v}),(0,t.jsx)(e6,{info:v,data:r}),"telegram"!==v.id?(0,t.jsx)(V,{}):null]}):(0,t.jsx)(U,{children:(0,t.jsx)(I.L7,{children:"This server runs no such service."})}):(0,t.jsx)(K.g,{silent:s.silent})]})}function e8(e){let{id:l}=e;return(0,t.jsx)(W.LP,{children:(0,t.jsx)(e3,{id:l},l)})}},85956:(e,l,n)=>{Promise.resolve().then(n.bind(n,36858))},97360:(e,l,n)=>{"use strict";n.d(l,{d:()=>s});var t=n(12115);function s(e,l){let[n,s]=t.useState(()=>(function(e,l){try{let n=window.localStorage.getItem(e);return"true"===n||"false"===n?"true"===n:l}catch(e){return l}})(e,l)),r=t.useCallback(()=>{let l=!n;try{window.localStorage.setItem(e,String(l))}catch(e){}s(l)},[e,n]);return[n,r]}}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,6252,8297,3223,8245,7254,9057,4477,8769,1758,8441,1255,7358],()=>e(e.s=85956)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6412],{29249:(e,s,_)=>{Promise.resolve().then(_.bind(_,78769))}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,6252,8297,8245,7254,9057,4477,8769,8441,1255,7358],()=>e(e.s=29249)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7606],{3193:(e,t,n)=>{Promise.resolve().then(n.bind(n,17164))},12361:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var i=n(95155);n(12115);var l=n(41530),r=n(296),a=n(88504),o=n(22681),s=n(65572),d=n(2312),c=n(35326),h=n(83561);function p(e){let{list:t,label:n="Themes",value:p,onPick:x}=e,u=(0,h.mu)(),{themes:m,page:g}=(0,h.b8)(),f=(0,h.eW)(m,null!=p?p:g.themeId);return(0,i.jsx)(r.A,{size:"sm","aria-label":n,sx:{"--ListItem-radius":"8px",gap:.25},children:(null!=t?t:[...h.Cn,...m]).map(e=>{var t;return(0,i.jsx)(a.A,{children:(0,i.jsxs)(o.A,{selected:e.id===f.id,"aria-current":e.id===f.id?"true":void 0,onClick:()=>x?x(e.id):u.updatePage({themeId:e.id}),children:[(0,i.jsx)(d.A,{children:(0,i.jsx)(l.A,{"aria-hidden":!0,sx:{width:20,height:20,borderRadius:"50%",border:"1px solid",borderColor:"divider",backgroundImage:h.C3[e.gradient].light,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(l.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:null!=(t=e.swatch)?t:e.primary}})})}),(0,i.jsx)(s.A,{children:e.name||"Untitled theme"}),(0,i.jsx)(c.Ay,{level:"body-xs",textColor:"text.tertiary",children:(0,h.nB)(e.id)?"built-in":"local"})]})},e.id)})})}},17164:(e,t,n)=>{"use strict";n.d(t,{default:()=>eC});var i=n(95155),l=n(12115),r=n(90272),a=n(41530),o=n(17064),s=n(20031),d=n(83561),c=n(58754),h=n(55059),p=n(59456),x=n(57364),u=n(94540),m=n(11438),g=n(58245),f=n(44503),b=n(41897),y=n(60459),j=n(87654);let v="https://www.w3.org/WAI/WCAG22/Understanding",A="".concat(v,"/visual-presentation.html"),C="".concat(v,"/text-spacing.html"),w="".concat(v,"/contrast-minimum.html"),k="".concat(v,"/resize-text.html"),S={sans:"Sans serif",serif:"Serif",book:"Book serif",mono:"Monospace",display:"Display serif",rounded:"Rounded",apple:"Apple sans",news:"Apple serif"},T="## Measure and rhythm\n\nReaders keep their place more easily when lines stay short and leading is generous. At its strictest level, WCAG caps a line at 80 characters and asks for line spacing of at least 1.5 [[1]](".concat(A,").\n\n> Good typography is rarely noticed. The reader remembers the idea, not the letters.\n\n### Before you publish\n\n- One idea in each paragraph\n- Headings that **say something**\n- Contrast checked in light *and* dark [[3]](").concat(w,")\n\n```\nrenderer.render(cards, theme);\n```"),W="---\n\n### References\n\n1. [Understanding 1.4.8: Visual Presentation](".concat(A,") \xb7 W3C, WCAG 2.2\n2. [Understanding 1.4.12: Text Spacing](").concat(C,") \xb7 W3C, WCAG 2.2\n3. [Understanding 1.4.3: Contrast (Minimum)](").concat(w,") \xb7 W3C, WCAG 2.2\n4. [Understanding 1.4.4: Resize Text](").concat(k,") \xb7 W3C, WCAG 2.2"),z={min:.65,max:1},L={min:.4,max:1};function I(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:z;l.useLayoutEffect(()=>{var n;let l=e.current,r=t.current;if(!l||!r)return;let a=()=>{if(!l.clientHeight)return;let e=l.clientHeight-function(e,t){let n=0;for(let i=e.parentElement;i&&i!==t;i=i.parentElement){let e=window.getComputedStyle(i);for(let t of[e.paddingTop,e.paddingBottom,e.borderTopWidth,e.borderBottomWidth])n+=parseFloat(t)||0}return n}(r,l),t=e=>{r.style.zoom=String(e),r.style.setProperty("--fit-scale",String(e))};t(function(e,t){let{min:n,max:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:z;if(e(i)<=t)return i;let l=n,r=i;for(let n=0;n<8;n+=1){let n=(l+r)/2;e(n)<=t?l=n:r=n}return l}(e=>(t(e),r.getBoundingClientRect().height),e,i))};a();let o=new ResizeObserver(a);o.observe(l);let s=document.fonts;return null==s||s.ready.then(a),null==s||null==(n=s.addEventListener)||n.call(s,"loadingdone",a),()=>{var e;o.disconnect(),null==s||null==(e=s.removeEventListener)||e.call(s,"loadingdone",a)}},[e,t,n,i])}let B=e=>"calc(var(--sw-prose-font-size, 16px) * ".concat(e,")"),H="Aa Gg Qq Rr Ss Kk Mm Ee Ww Bb Ff Hh Nn Pp Yy Zz".repeat(3);function R(){return(0,i.jsx)(a.A,{"aria-hidden":!0,"data-testid":"theme-demo-behind",sx:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"none",userSelect:"none",p:1,color:"var(--joy-palette-primary-plainColor)",opacity:.16,fontFamily:"display",fontSize:"clamp(56px, 9vw, 120px)",fontWeight:800,lineHeight:1.15,overflowWrap:"anywhere"},children:H})}let G={min:1,max:1};function D(e){let{fit:t=!0}=e,n=(0,g.wM)(),r=l.useRef(null),o=l.useRef(null);I(r,o,n,t?L:G);let[s,c,p,x]=l.useMemo(()=>["*Field notes \xb7 Typography*\n\n# The quiet craft of a readable page\n\nA theme sets the **voice** of every card: its type, rhythm and colour. This feature is plain markdown, rendered by TipTap exactly as your own pages will be.","---\n\n==by Ilya and 3 more== \xb7 ==243 views== \xb7 ==4 comments== \xb7 ==6 min read==\n\n---",T,W].map(e=>(0,d.Kl)(e)),[]),u=l.useMemo(()=>(0,d.Kl)(function(e){let{prose:t}=e;return"## The accessibility floor\n\n| Check | Level | Target |\n| --- | --- | --- |\n| Contrast [[3]](".concat(w,") | AA | 4.5 : 1 |\n| Zoom [[4]](").concat(k,") | AA | 200% |\n| Spacing [[2]](").concat(C,") | AA | 1.5 lines |\n| Measure [[1]](").concat(A,") | AAA | 80 chars |\n\n### This theme, live\n\n| Setting | Value |\n| --- | --- |\n| Body text | ").concat(t.fontSize," px \xb7 ").concat(S[e.font]," |\n| Line height | ").concat(t.lineHeight.toFixed(2)," |\n| Headings | ").concat(S[e.headingFont]," \xb7 ").concat(t.headingWeight," |\n| Accent | `").concat(e.primary,"` |")}(n)),[n]);return(0,i.jsx)(d.WB,{theme:n,fonts:f.e,component:"section","aria-label":"Theme preview","data-block-stream-fit":t?"":void 0,sx:{display:"flex",pb:t?"".concat(b.rs.bottomGapPx,"px"):0,boxSizing:"border-box"},children:(0,i.jsxs)(a.A,{ref:r,"data-testid":"theme-demo-frame",sx:{position:"relative",flex:1,minWidth:0,minHeight:0,overflow:"auto",...b.eL},children:[(0,i.jsx)(R,{}),(0,i.jsx)(j.A,{sx:{position:"relative",...y.Lc,pt:"".concat(h.CJ-1,"px"),pb:{xs:2,sm:3}},children:(0,i.jsxs)(a.A,{component:"article",ref:o,sx:{width:"100%","& .sw-prose":{fontSize:B(.82)}},children:[(0,i.jsxs)(a.A,{"data-testid":"feature-header",sx:{"& .sw-prose.sw-prose > p:first-of-type":{my:0,lineHeight:"calc(".concat(h.vy,"px / var(--fit-scale, 1))")}},children:[(0,i.jsx)(d.GL,{content:s}),(0,i.jsx)(d.GL,{content:c})]}),(0,i.jsxs)(a.A,{sx:{display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:"repeat(2, minmax(0, 1fr))"},alignItems:"start",columnGap:3.5,rowGap:2,mt:1.5,"& > :last-of-type":{borderLeft:{md:"1px solid"},borderColor:{md:"color-mix(in srgb, var(--joy-palette-primary-plainColor) 18%, transparent)"},pl:{md:3.5},alignSelf:"stretch"}},children:[(0,i.jsx)(d.GL,{content:p}),(0,i.jsx)(a.A,{children:(0,i.jsx)(d.GL,{content:u})})]}),(0,i.jsx)(a.A,{sx:{mt:1.5,"& .sw-prose":{fontSize:B(.74)}},children:(0,i.jsx)(d.GL,{content:x})})]})})]})})}var M=n(5262),O=n(84560),E=n(9435),F=n(35326),K=n(10913),N=n(77536),P=n(1830),U=n(93485);let _=l.createContext(!1),J={display:"flex",alignItems:"center",height:28,boxSizing:"border-box",minWidth:0,border:"1px solid",borderColor:"neutral.outlinedBorder",borderRadius:"6px",transition:"border-color 120ms ease-out","&:hover":{borderColor:"neutral.outlinedHoverBorder"},"&:focus-within":{borderColor:"primary.solidBg",boxShadow:"0 0 0 1px var(--joy-palette-primary-solidBg)"}},V={flex:1,width:"100%",minWidth:0,border:0,outline:0,p:0,bgcolor:"transparent",color:"text.primary",fontFamily:"body",fontSize:"13px",fontVariantNumeric:"tabular-nums","&:disabled":{color:"text.tertiary"}},Z=e=>"calc(".concat(e,"px / var(--fit-scale, 1))"),q={gridTemplateColumns:"56px repeat(2, minmax(0, 1fr))",columnGap:1};function X(e){let{title:t,columns:n,children:l}=e;return(0,i.jsxs)(a.A,{component:"fieldset",sx:{border:0,borderTop:"1px solid",borderColor:"divider",m:0,p:0,py:1,minWidth:0,"&:first-of-type":{borderTop:0,pt:Z(10)},"&:first-of-type > legend":{minHeight:Z(32)}},children:[(0,i.jsxs)(F.Ay,{component:"legend",level:"title-sm",sx:{float:"left",width:"100%",p:0,mb:1,display:n?"grid":"flex",...n?q:null,alignItems:"center",fontWeight:"xl"},children:[(0,i.jsx)("span",{children:t}),n]}),(0,i.jsx)(a.A,{sx:{clear:"both",display:"flex",flexDirection:"column",gap:.75},children:l})]})}function Y(e){let{label:t,value:n,children:l}=e;return(0,i.jsxs)(a.A,{sx:{minWidth:0},children:[(0,i.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:1,mb:.5},children:[(0,i.jsx)(F.Ay,{level:"body-sm",noWrap:!0,children:t}),n?(0,i.jsx)(F.Ay,{level:"body-xs",textColor:"text.tertiary",noWrap:!0,children:n}):null]}),l]})}function Q(e){let{label:t,value:n,columns:r,onChange:a,children:o}=e,s=l.useContext(_);return(0,i.jsx)(U.A,{size:"sm",variant:"plain",color:"neutral","aria-label":t,disabled:s,value:n,onChange:(e,t)=>t&&a(t),sx:{display:"grid",gridTemplateColumns:"repeat(".concat(r,", minmax(0, 1fr))"),gap:"2px",p:"2px",borderRadius:"8px",bgcolor:"background.level1","&& > button":{m:0,px:0,minWidth:0,"--IconButton-size":"0px",minHeight:24,border:0,borderRadius:"6px",bgcolor:"transparent",color:"text.secondary",fontSize:"13px",fontWeight:"md"},'&& > button:hover:not([aria-pressed="true"]):not(:disabled)':{color:"text.primary"},'&& > button[aria-pressed="true"]':{bgcolor:"background.surface",color:"text.primary",boxShadow:"0 1px 3px rgba(15,18,23,0.16)"}},children:o})}function $(e){let{label:t,value:n,onChange:r,note:o}=e,s=l.useContext(_),[c,h]=l.useState(null);return(0,i.jsxs)(a.A,{title:o,sx:{...J,gap:.75,pl:"4px",pr:.5,opacity:o?.55:1},children:[(0,i.jsx)(a.A,{component:"label",sx:{position:"relative",width:18,height:18,flexShrink:0,borderRadius:"4px",bgcolor:n,boxShadow:"inset 0 0 0 1px rgba(127,127,127,0.35)",cursor:s?"default":"pointer"},children:(0,i.jsx)(a.A,{component:"input",type:"color","aria-label":t,disabled:s,value:n,onChange:e=>r(e.target.value),sx:{position:"absolute",inset:0,opacity:0,width:"100%",height:"100%",cursor:"inherit"}})}),(0,i.jsx)(a.A,{component:"input",type:"text","aria-label":"".concat(t," hex"),spellCheck:!1,maxLength:7,size:7,disabled:s,value:null!=c?c:n.toUpperCase(),onChange:e=>(e=>{h(e);let t="#".concat(e.trim().replace(/^#/,""));(0,d.fd)(t)&&r(t.toLowerCase())})(e.target.value),onBlur:()=>h(null),sx:V})]})}function ee(e){let{label:t,value:n,range:r,onChange:o,unit:s,decimals:d=0,note:c}=e,h=l.useContext(_),[p,x]=l.useState(null),u="%"===s?100:1,m=(n*u).toFixed(d),g="".concat(m).concat(s?" ".concat(s):""),f=e=>e.trim()?Number(e)/u:NaN,b=e=>e>=r.min&&e<=r.max,y=()=>{if(null!==p){let e=f(p);Number.isFinite(e)&&!b(e)&&o(Math.min(r.max,Math.max(r.min,e)))}x(null)};return(0,i.jsxs)(a.A,{title:c,sx:{display:"grid",gridTemplateColumns:"".concat(104,"px minmax(0, 1fr) 68px"),alignItems:"center",columnGap:1.5,opacity:c?.5:1},children:[(0,i.jsx)(F.Ay,{level:"body-sm",noWrap:!0,children:t}),(0,i.jsx)(P.A,{size:"sm",variant:"solid",color:"primary",disabled:h,value:n,min:r.min,max:r.max,step:r.step,onChange:(e,t)=>o(t),slotProps:{input:{"aria-label":t,"aria-valuetext":g}},sx:{"--Slider-trackSize":"3px","--Slider-thumbSize":"12px","--Slider-thumbWidth":"12px",py:1}}),(0,i.jsxs)(a.A,{sx:{...J,px:.75,gap:.25},children:[(0,i.jsx)(a.A,{component:"input",type:"text",inputMode:"decimal","aria-label":"".concat(t," value"),size:4,disabled:h,value:null!=p?p:m,onChange:e=>(e=>{x(e);let t=f(e);b(t)&&o(t)})(e.target.value),onBlur:y,onKeyDown:e=>{"Enter"===e.key&&y()},sx:{...V,textAlign:"right"}}),s?(0,i.jsx)(F.Ay,{level:"body-xs",textColor:"text.tertiary","aria-hidden":!0,children:s}):null]})]})}let et={min:.6,max:1.1},en={light:"#25282d",dark:"#e4e8ee"},ei=[{id:"sans",label:"Sans serif"},{id:"serif",label:"Serif"},{id:"book",label:"Book serif"},{id:"display",label:"Display serif"},{id:"rounded",label:"Rounded"},{id:"mono",label:"Monospace"},{id:"apple",label:"Apple sans"},{id:"news",label:"Apple serif"}],el={off:{label:"Off",width:0},thin:{label:"Thin",width:1},regular:{label:"Regular",width:2},bold:{label:"Bold",width:3}};function er(e){let t=e.replace(/([A-Z])/g," $1").toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function ea(e){let{label:t,value:n,onChange:l}=e;return(0,i.jsx)(Y,{label:t,value:f.H[n],children:(0,i.jsx)(Q,{label:t,columns:ei.length,value:n,onChange:l,children:ei.map(e=>(0,i.jsx)(O.Ay,{value:e.id,"aria-label":e.label,title:"".concat(e.label," \xb7 ").concat(f.H[e.id]),sx:{"&&&":{fontFamily:f.e[e.id],fontSize:"15px"}},children:"Aa"},e.id))})})}function eo(e){let{value:t,onChange:n}=e,r=l.useContext(_);return(0,i.jsx)(a.A,{role:"group","aria-label":"Background gradient",sx:{display:"grid",gridTemplateColumns:"repeat(".concat(Object.keys(d.C3).length,", minmax(0, 1fr))"),gap:"6px",py:"2px"},children:Object.keys(d.C3).map(e=>(0,i.jsx)(E.A,{title:er(e),variant:"soft",size:"sm",children:(0,i.jsxs)(a.A,{component:"button",type:"button","aria-label":"Gradient ".concat(er(e)),"aria-pressed":t===e,disabled:r,onClick:()=>n(e),sx:{position:"relative",height:28,minWidth:0,display:"flex",alignItems:"center",justifyContent:"center",p:0,border:0,borderRadius:"6px",overflow:"hidden",cursor:r?"default":"pointer",boxShadow:t===e?"0 0 0 2px var(--joy-palette-primary-solidBg)":"inset 0 0 0 1px rgba(127,127,127,0.28)","&:focus-visible":{outline:"2px solid",outlineColor:"primary.solidBg",outlineOffset:2}},children:[(0,i.jsx)(a.A,{"aria-hidden":!0,sx:t=>({position:"absolute",inset:0,zIndex:-0,backgroundImage:d.C3[e].light,filter:"saturate(2.4) brightness(0.95)",[t.getColorSchemeSelector("dark")]:{backgroundImage:d.C3[e].dark}})}),t===e?(0,i.jsx)(N.A,{"aria-hidden":!0,sx:{position:"relative",fontSize:16,color:"text.primary"}}):null]})},e))})}function es(e){var t,n,r;let{theme:o}=e,s=(0,d.mu)(),c=l.useContext(_),h=(0,d.KJ)(e=>"none"===e.page.background),{mode:p,systemMode:x}=(0,K.Ut)(),u=("system"===p?x:p)==="dark",m=u?"shows in light mode":void 0,g=u?void 0:"shows in dark mode",f=e=>{c||s.saveTheme({...o,...e})},b=e=>f({prose:{...o.prose,...e}}),y=e=>f({glass:{...o.glass,...e}}),j=null!=(t=o.surface)?t:d.mn,v=null!=(n=o.ink)?n:en,A=(e,t)=>(0,i.jsx)(F.Ay,{level:"body-xs",textColor:"text.tertiary",title:t,sx:{opacity:t?.6:1},children:e});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(X,{title:"Colors",columns:(0,i.jsxs)(i.Fragment,{children:[A("Light",m),A("Dark",g)]}),children:[(0,i.jsxs)(a.A,{sx:{display:"grid",...q,alignItems:"center",rowGap:.75},children:[(0,i.jsx)(F.Ay,{level:"body-sm",children:"Card"}),(0,i.jsx)($,{label:"Card, light",value:j.light,note:m,onChange:e=>f({surface:{...j,light:e}})}),(0,i.jsx)($,{label:"Card, dark",value:j.dark,note:g,onChange:e=>f({surface:{...j,dark:e}})}),(0,i.jsx)(F.Ay,{level:"body-sm",children:"Text"}),(0,i.jsx)($,{label:"Text, light",value:v.light,note:m,onChange:e=>f({ink:{...v,light:e}})}),(0,i.jsx)($,{label:"Text, dark",value:v.dark,note:g,onChange:e=>f({ink:{...v,dark:e}})}),(0,i.jsx)(F.Ay,{level:"body-sm",children:"Accent"}),(0,i.jsx)(a.A,{sx:{gridColumn:"2 / -1"},children:(0,i.jsx)($,{label:"Accent",value:o.primary,onChange:e=>f({primary:e})})})]}),(0,i.jsxs)(Y,{label:"Background",value:er(o.gradient),children:[h?(0,i.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,mb:.5},children:[(0,i.jsx)(F.Ay,{level:"body-xs",textColor:"text.tertiary",children:"The page shows no color."}),(0,i.jsx)(M.A,{size:"sm",variant:"plain",onClick:()=>s.updatePage({background:"page"}),sx:{minHeight:20,py:0,fontSize:"xs"},children:"Show background"})]}):null,(0,i.jsx)(eo,{value:o.gradient,onChange:e=>f({gradient:e})})]})]}),(0,i.jsxs)(X,{title:"Typography",children:[(0,i.jsx)(ea,{label:"Body font",value:o.font,onChange:e=>f({font:e})}),(0,i.jsx)(ea,{label:"Heading font",value:o.headingFont,onChange:e=>f({headingFont:e})}),(0,i.jsx)(Y,{label:"Heading color",children:(0,i.jsxs)(Q,{label:"Heading color",columns:2,value:o.prose.headingTone,onChange:e=>b({headingTone:e}),children:[(0,i.jsx)(M.A,{value:"ink",children:"Text"}),(0,i.jsx)(M.A,{value:"accent",children:"Accent"})]})}),(0,i.jsx)(ee,{label:"Text size",unit:"px",value:o.prose.fontSize,range:d.HK.fontSize,onChange:e=>b({fontSize:e})}),(0,i.jsx)(ee,{label:"Line height",decimals:2,value:o.prose.lineHeight,range:d.HK.lineHeight,onChange:e=>b({lineHeight:e})}),(0,i.jsx)(ee,{label:"Heading weight",value:o.prose.headingWeight,range:d.HK.headingWeight,onChange:e=>b({headingWeight:e})}),(0,i.jsx)(ee,{label:"Heading scale",decimals:2,value:o.prose.headingScale,range:d.HK.headingScale,onChange:e=>b({headingScale:e})})]}),(0,i.jsxs)(X,{title:"Card",children:[(0,i.jsx)(Y,{label:"Border",children:(0,i.jsx)(Q,{label:"Card border",columns:d.T0.length,value:null!=(r=o.border)?r:"off",onChange:e=>f({border:e}),children:d.T0.map(e=>(0,i.jsx)(M.A,{value:e,children:el[e].label},e))})}),(0,i.jsx)(ee,{label:"Corner radius",unit:"px",value:o.radius,range:d.HK.radius,onChange:e=>f({radius:e})}),(0,i.jsx)(ee,{label:"Glass blur",unit:"px",value:o.glass.blur,range:d.HK.blur,onChange:e=>y({blur:e})}),(0,i.jsx)(ee,{label:"Light opacity",unit:"%",value:o.glass.lightOpacity,range:d.HK.opacity,note:m,onChange:e=>y({lightOpacity:e})}),(0,i.jsx)(ee,{label:"Dark opacity",unit:"%",value:o.glass.darkOpacity,range:d.HK.opacity,note:g,onChange:e=>y({darkOpacity:e})})]})]})}function ed(e){let{fill:t=!1}=e,n=(0,g.wM)(),r=(0,d.nB)(n.id),o=(0,d.KJ)(e=>"none"===e.page.background),s=l.useRef(null),c=l.useRef(null);return I(s,c,l.useMemo(()=>[n.id,o,t].join(),[n.id,o,t]),et),(0,i.jsx)(a.A,{ref:s,"data-testid":"theme-controls",sx:t?{height:"100%",minHeight:0,overflowY:"auto",overscrollBehavior:"contain",...b.eL}:void 0,children:(0,i.jsx)(j.A,{component:"section","aria-label":"Style",sx:{p:0,overflow:"hidden"},children:(0,i.jsx)(a.A,{ref:c,sx:{px:1.5,pb:.75},children:(0,i.jsx)(_.Provider,{value:r,children:(0,i.jsx)(es,{theme:n},n.id)})})})})}var ec=n(28257),eh=n(97363),ep=n(8964),ex=n(34809);function eu(e,t,n){let i={...t,glass:{...t.glass},prose:{...t.prose},id:(0,d.sX)("theme"),name:function(e,t){let n=new Set([...d.Cn,...t].map(e=>e.name)),i=e;for(let t=2;n.has(i);t+=1)i="".concat(e," ").concat(t);return i}(n,e.getSnapshot().themes)};return e.saveTheme(i),e.updatePage({themeId:i.id}),i}function em(e){let{focusName:t=0}=e,n=(0,d.mu)(),r=(0,g.wM)(),o=(0,d.nB)(r.id),s=l.useRef(null),c=l.useRef(0),p=()=>eu(n,r,"".concat(r.name," copy"));return l.useEffect(()=>{var e,n;t&&c.current!==t&&s.current&&(c.current=t,null==(e=(n=s.current).scrollIntoView)||e.call(n,{block:"nearest"}),s.current.focus({preventScroll:!0}),s.current.select())},[t,r.id]),(0,i.jsxs)(j.A,{component:"section","aria-label":"Theme settings",sx:{p:1.25},children:[(0,i.jsx)(h.xw,{title:"Theme settings"}),(0,i.jsxs)(a.A,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,i.jsxs)(a.A,{"data-testid":"theme-status",sx:{display:"flex",alignItems:"center",gap:1,minHeight:h.vy,px:.5},children:[o?(0,i.jsx)(F.Ay,{level:"title-sm",noWrap:!0,sx:{flex:1,minWidth:0},children:r.name}):(0,i.jsx)(eh.Ay,{size:"sm",variant:"outlined",value:r.name,placeholder:"Name your theme",onChange:e=>n.saveTheme({...r,name:e.target.value}),slotProps:{input:{ref:s,"aria-label":"Theme name",size:1}},sx:{flex:1,minWidth:0,ml:"-7px","--Input-paddingInline":"6px",fontSize:"sm",fontWeight:"lg"}}),(0,i.jsx)(ec.A,{size:"sm",variant:"soft",color:o?"neutral":"success",sx:{flexShrink:0},children:o?"Built-in \xb7 read-only":"Local \xb7 read-write"})]}),o?(0,i.jsx)(M.A,{size:"sm",variant:"soft",startDecorator:(0,i.jsx)(ep.A,{}),onClick:p,children:"Duplicate to edit"}):(0,i.jsxs)(a.A,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:1},children:[(0,i.jsx)(M.A,{size:"sm",variant:"soft","aria-label":"Duplicate theme",startDecorator:(0,i.jsx)(ep.A,{}),onClick:p,children:"Duplicate"}),(0,i.jsx)(M.A,{size:"sm",variant:"soft",color:"danger","aria-label":"Delete theme",startDecorator:(0,i.jsx)(ex.A,{}),onClick:()=>{window.confirm('Delete the theme "'.concat(r.name,'"?'))&&n.deleteTheme(r.id)},children:"Delete"})]})]})]})}var eg=n(86175),ef=n(13673),eb=n(12361);function ey(e){let{onClick:t,fullWidth:n}=e;return(0,i.jsx)(M.A,{fullWidth:n,onClick:t,size:"sm",variant:"outlined",color:"neutral",startDecorator:(0,i.jsx)(ef.A,{}),sx:{flexShrink:0},children:"Add new theme"})}function ej(e){let{onAdd:t}=e,n=(0,d.mu)(),{themes:l,page:r}=(0,d.b8)(),o=(0,d.eW)(l,r.themeId).id;return(0,i.jsxs)(eg.A,{direction:"row",spacing:1,sx:{alignItems:"center",overflowX:"auto",...b.eL},children:[[...d.Cn,...l].map(e=>{var t;return(0,i.jsx)(ec.A,{variant:e.id===o?"soft":"outlined",color:e.id===o?"primary":"neutral",startDecorator:(0,i.jsx)(a.A,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:null!=(t=e.swatch)?t:e.primary}}),onClick:()=>n.updatePage({themeId:e.id}),sx:{flexShrink:0},children:e.name||"Untitled theme"},e.id)}),(0,i.jsx)(ey,{onClick:t})]})}function ev(e){let{identity:t,onAdded:n}=e,l=(0,d.mu)(),r="horizontal"===(0,x.O)().viewLayout,a=(0,u.c)(),o=()=>{eu(l,d.SS,"New theme"),(null==a?void 0:a.paneCollapsed)&&a.togglePane(),n()};return(0,i.jsx)(c.Wx,{children:r?(0,i.jsx)(ej,{onAdd:o}):(0,i.jsxs)(eg.A,{spacing:2.5,children:[t,(0,i.jsx)(h.Ay,{title:"Theme",children:(0,i.jsxs)(eg.A,{spacing:1,children:[(0,i.jsx)(eb.A,{}),(0,i.jsx)(ey,{fullWidth:!0,onClick:o})]})}),(0,i.jsx)(h.Ay,{title:"Local data",children:(0,i.jsx)(p.A,{scope:"themes"})})]})})}let eA={wide:356,narrow:316};function eC(){var e;let{error:t}=(0,d.b8)(),n="horizontal"===(0,x.O)().viewLayout,[g,f]=l.useState(0),b=(0,i.jsx)(em,{focusName:g}),y=(0,i.jsx)(ed,{fill:!n}),j=(0,o.D)(),v=(0,s.A)(j.breakpoints.up("xl")),A=(null==(e=(0,u.c)())?void 0:e.columnsFit)===!1,C=(0,i.jsx)(ev,{identity:b,onAdded:()=>f(e=>e+1)});return(0,i.jsxs)(m.default.View,{barTitle:"Themes",navMinWidth:v?eA.wide:eA.narrow,paneMinWidth:v?eA.wide:eA.narrow,sideNav:A?void 0:C,sidePane:A?void 0:(0,i.jsx)(c.p,{fill:!0,children:n?(0,i.jsxs)(c.SK,{children:[b,y,(0,i.jsx)(h.Ay,{title:"Local data",children:(0,i.jsx)(p.A,{scope:"themes"})})]}):y}),children:[t?(0,i.jsx)(a.A,{children:(0,i.jsx)(r.A,{color:"warning",children:t})}):null,(0,i.jsx)(D,{fit:!A}),A?(0,i.jsx)(a.A,{children:C}):null,A?(0,i.jsx)(a.A,{children:(0,i.jsx)(ed,{})}):null]})}},59456:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var i=n(95155),l=n(12115),r=n(41530),a=n(5262),o=n(35326),s=n(83561),d=n(20258);let c={all:{hint:"The page, its sections and themes live in this browser. Importing replaces the page settings and entries with the same id.",file:"staffwriter-registry.json",exportLabel:"Export JSON",importLabel:"Import JSON",inputLabel:"Registry file"},themes:{hint:"Exports every theme. Importing adds them, replacing local themes with the same id; built-ins stay as they are.",file:"staffwriter-themes.json",exportLabel:"Export themes",importLabel:"Import themes",inputLabel:"Themes file"}};function h(e){let{scope:t="all",hint:n}=e,h=(0,s.mu)(),p=l.useRef(null),[x,u]=l.useState(""),m=c[t],g=async e=>{var n;let i=null==(n=e.target.files)?void 0:n[0];if(e.target.value="",i){if(i.size>5242880)return void u("The file is larger than 5 MB.");try{let e=h.importBundle(await new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(String(n.result)),n.onerror=()=>t(n.error),n.readAsText(i)}),{themesOnly:"themes"===t});u(e.ok?["themes"===t?"Imported ".concat(e.themes," theme(s)."):"Imported ".concat(e.sections," section(s) and ").concat(e.themes," theme(s)."),...e.errors].join(" "):e.errors.join(" "))}catch(e){u("The file could not be read.")}}};return(0,i.jsxs)(r.A,{sx:{display:"flex",flexDirection:"column",gap:1},children:[(0,i.jsx)(d.A,{markdown:"{{hint}}",values:{hint:null!=n?n:m.hint},sx:{color:"text.tertiary","& .sw-prose.sw-prose":{color:"inherit"}}}),(0,i.jsxs)(r.A,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:[(0,i.jsx)(a.A,{size:"sm",variant:"soft",onClick:()=>{let e="themes"===t?h.exportThemes():h.exportBundle(),n=URL.createObjectURL(new Blob([e],{type:"application/json"})),i=document.createElement("a");i.href=n,i.download=m.file,i.click(),URL.revokeObjectURL(n)},children:m.exportLabel}),(0,i.jsx)(a.A,{size:"sm",variant:"outlined",color:"neutral",onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()},children:m.importLabel})]}),(0,i.jsx)("input",{ref:p,type:"file",accept:"application/json,.json","aria-label":m.inputLabel,onChange:g,hidden:!0}),(0,i.jsx)(o.Ay,{level:"body-xs",role:"status",children:x})]})}}},e=>{e.O(0,[9627,277,5004,2246,7240,8859,8031,8245,7254,9057,8441,1255,7358],()=>e(e.s=3193)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7367,8555],{3945:(e,t,n)=>{Promise.resolve().then(n.bind(n,7612))},7612:(e,t,n)=>{"use strict";n.d(t,{HomeView:()=>C,default:()=>W});var s=n(95155),i=n(12115),r=n(41530),l=n(35326),c=n(83561),o=n(59506),a=n(58245),d=n(36080),x=n(35454),u=n(52619),h=n.n(u),m=n(67057),p=n(99640),f=n(47254),v=n(87654),j=n(8341),A=n(60459),g=n(31021),y=n(89280),b=n(20892),w=n(57794);let H={width:"100%",maxWidth:A.eT,mx:"auto"},z={xs:17,sm:A.B3+1},V={px:{xs:(0,A.nx)(z.xs),sm:(0,A.nx)(z.sm)},py:{xs:2,sm:3}};function k(e){let{whole:t}=e,{ready:n,page:o,sections:d}=(0,c.b8)(),u=(0,x.g1)(),{currentId:A}=(0,c.tF)(),k=t||(0,x.pA)(A,u)?null:u,S=i.useMemo(()=>{if(!k)return d;let e=(0,x.rv)(d,k);return e?[e]:[]},[d,k]),{activeSectionId:W,activeCardId:C}=(0,y.z)(S),E=S.find(e=>e.id===W);(0,b.l)(E,C);let{gradient:O}=(0,a.Wi)();return(0,w.r)(!k&&o.title||(null==E?void 0:E.title)||"StaffWriter"),(0,s.jsxs)(r.A,{component:"main",sx:{minHeight:"100dvh",isolation:"isolate",px:{xs:2,sm:4},py:{xs:4,sm:7}},children:[(0,s.jsx)(c.zs,{gradient:O,sx:{position:"fixed"}}),n?S.length>0||t&&(0,j.W)(o)?(0,s.jsxs)(r.A,{sx:{display:"flex",flexDirection:"column",gap:{xs:8,sm:12}},children:[!k&&(0,j.W)(o)?(0,s.jsx)(r.A,{sx:{...H,px:{xs:"".concat(z.xs,"px"),sm:"".concat(z.sm,"px")}},children:(0,s.jsx)(j.A,{page:o,sections:d})}):null,S.map(e=>(0,s.jsx)(r.A,{component:"article","aria-label":(0,g.a9)(e.title),sx:{display:"flex",flexDirection:"column",gap:5},children:e.cards.map((t,n)=>(0,s.jsx)(f.A,{section:e,card:t,component:"section","aria-label":(0,g.PY)(t.name,n),...(0,p.Cx)(e.id,t.id),sx:H,children:(0,s.jsx)(v.A,{sx:V,children:(0,s.jsx)(c.GL,{content:t.content})})},t.id))},e.id))]}):(0,s.jsxs)(l.Ay,{level:"body-md",textColor:"text.tertiary",textAlign:"center",children:[k?"Section not found.":"Nothing to render yet."," ",(0,s.jsx)(m.A,{component:h(),href:"/registry",children:"Open the registry"})]}):null]})}function S(e){let{snapshot:t,children:n}=e,[r]=i.useState(()=>(0,c.dZ)((0,c.z0)(JSON.stringify({version:c.Ny,...t}))));return(0,s.jsx)(a.eF,{store:r,children:n})}function W(e){let{page:t}=e,n=i.useMemo(()=>t&&(0,o.e)(t),[t]);return n?(0,s.jsx)(S,{snapshot:n,children:(0,s.jsx)(k,{whole:!0})}):(0,s.jsx)(r.A,{component:"main",sx:{px:2,py:7},children:(0,s.jsx)(l.Ay,{level:"body-md",textColor:"text.tertiary",textAlign:"center",children:"This page is not available."})})}function C(e){let{home:t}=e,n=(0,x.g1)();return t&&!n?(0,s.jsx)(W,{page:t.page}):(0,s.jsx)(d.default,{children:(0,s.jsx)(k,{})})}},8341:(e,t,n)=>{"use strict";n.d(t,{A:()=>d,W:()=>a});var s=n(95155);n(12115);var i=n(41530),r=n(35326),l=n(83561),c=n(20258),o=n(87344);function a(e){return!!(e.title.trim()||e.description.trim())}function d(e){let{page:t,sections:n}=e,a=t.title.trim(),d=t.description.trim();return(0,s.jsxs)(i.A,{role:"group","aria-label":"Page introduction",sx:{minWidth:0},children:[a?(0,s.jsx)(c.A,{markdown:"# {{title}}",values:{title:a},sx:{"& .sw-prose h1":{my:0,fontSize:"2em",lineHeight:1.25}}}):null,d?(0,s.jsx)(r.Ay,{level:"body-md",textColor:"text.tertiary",sx:{mt:.75*!!a,whiteSpace:"pre-line",overflowWrap:"anywhere"},children:d}):null,(0,s.jsx)(i.A,{sx:{mt:2,mb:1},children:(0,s.jsx)(c.A,{markdown:"---"})}),(0,s.jsx)(o.A,{createdAt:t.createdAt,editedAt:(0,l.u8)(t,n)})]})}},36080:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var s=n(95155),i=n(12115),r=n(83561),l=n(35454);function c(e){let{children:t}=e,n=(0,l.g1)(),c=(0,r.gG)(),{currentId:o}=(0,r.tF)(),[a,d]=i.useState(!1);return(i.useLayoutEffect(()=>{let e=c&&(0,l.zV)(c.getSnapshot().pages,n);e&&c.open(e.id),d(!0)},[c,n]),c&&!a)?null:(0,s.jsx)(i.Fragment,{children:t},o)}},49953:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var s=n(83694),i=n(95155);let r=(0,s.A)((0,i.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zm-7 5h5v5h-5z"}),"EventOutlined")},57794:(e,t,n)=>{"use strict";n.d(t,{r:()=>i});var s=n(12115);function i(e){s.useEffect(()=>{let t=()=>{document.title!==e&&(document.title=e)};t();let n=new MutationObserver(t);return n.observe(document.head,{childList:!0,characterData:!0,subtree:!0}),()=>n.disconnect()},[e])}},59506:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var s=n(83561);function i(e){if(e.snapshot)return e.snapshot;let{title:t,description:n,createdAt:i,updatedAt:r}=e,l=e.cards.filter(e=>e.markdown).map((e,t)=>({id:"card-cloud-".concat(t+1),name:e.name,content:(0,s.Kl)(e.markdown)}));return{page:{...s._U,title:t,description:n,createdAt:i,updatedAt:r},sections:l.length?[{schemaVersion:s.f$,id:"section-cloud",title:t,themeId:"",cards:l,updatedAt:r}]:[],themes:[]}}},78373:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var s=n(83694),i=n(95155);let r=(0,s.A)((0,i.jsx)("path",{d:"M5 10h14v2h2V6c0-1.1-.9-2-2-2h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h7v-2H5zm0-4h14v2H5zm17.84 10.28-.71.71-2.12-2.12.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41m-3.54-.7 2.12 2.12-5.3 5.3H14v-2.12z"}),"EditCalendarOutlined")}},e=>{e.O(0,[9627,277,5004,2246,7240,8245,7254,3861,8441,1255,7358],()=>e(e.s=3945)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194,492,848,1207,1438,1570,1900,1969,2164,2224,2427,2675,2772,3211,3481,3654,3734,3851,4051,6031,6259,6484,7310,7343,7772,8405,8523,8729,9782],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194,492,848,1207,1438,1570,1900,1969,2164,2224,2427,2675,2772,3211,3481,3654,3734,3851,4051,6031,6259,6484,7310,7343,7772,8405,8523,8729,9782],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194,492,848,1207,1438,1570,1900,1969,2164,2224,2427,2675,2772,3211,3481,3654,3734,3851,4051,6031,6259,6484,7310,7343,7772,8405,8523,8729,9782],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194,492,848,1207,1438,1570,1900,1969,2164,2224,2427,2675,2772,3211,3481,3654,3734,3851,4051,6031,6259,6484,7310,7343,7772,8405,8523,8729,9782],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194,492,848,1207,1438,1570,1900,1969,2164,2224,2427,2675,2772,3211,3481,3654,3734,3851,4051,6031,6259,6484,7310,7343,7772,8405,8523,8729,9782],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|