your-ai-workflow-firebase-os 2.0.2 → 2.0.3
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/dist/AccessNotice-BZ5Gt1nP.js +40 -0
- package/dist/AccessNotice-CN7kc70o.cjs +1 -0
- package/dist/{AddressField-B2YBRXcx.js → AddressField-9Sqn8TvC.js} +3 -3
- package/dist/{AddressField-BBv8NGX8.cjs → AddressField-B7wtV8yA.cjs} +1 -1
- package/dist/Assets-DBMwZ3bN.cjs +1 -0
- package/dist/Assets-DT-NU_WO.js +296 -0
- package/dist/Attachments-Bl9_dfsu.js +46 -0
- package/dist/Attachments-UVK9SRXf.cjs +1 -0
- package/dist/Billing-0RIHayHy.cjs +1 -0
- package/dist/Billing-FNE2r3_d.js +379 -0
- package/dist/BookingCalendar-BP5kiv3d.cjs +1 -0
- package/dist/BookingCalendar-DZ2fEFja.js +309 -0
- package/dist/Button-4lzOE31p.js +48 -0
- package/dist/Button-5DlB2MCi.cjs +1 -0
- package/dist/CalendarView-BimoXy_k.cjs +1 -0
- package/dist/CalendarView-D-ykjpvI.js +664 -0
- package/dist/ConfirmModal-Di9GR-vV.cjs +1 -0
- package/dist/ConfirmModal-gKQEpd4d.js +113 -0
- package/dist/ContactPopup-BXnHrRwl.js +1114 -0
- package/dist/ContactPopup-lxmRMoIa.cjs +1 -0
- package/dist/CopyLink-BpEQWmfI.cjs +1 -0
- package/dist/CopyLink-CBAVfcm1.js +43 -0
- package/dist/DashboardNav-CXa_ci-_.cjs +1 -0
- package/dist/DashboardNav-Dmn7PVSp.js +886 -0
- package/dist/EmailAdmin-CjN_rvxT.js +318 -0
- package/dist/EmailAdmin-lAEBdY1s.cjs +1 -0
- package/dist/EventCard-46EquygT.cjs +1 -0
- package/dist/EventCard-B6xD-mk3.js +97 -0
- package/dist/FileViewerPopup-CX-J75TM.js +1283 -0
- package/dist/FileViewerPopup-D8-MmIoS.cjs +3 -0
- package/dist/FormNote-BivRNA3J.js +50 -0
- package/dist/FormNote-BtdTGpml.cjs +1 -0
- package/dist/FormsAdmin-B5PBCG2W.js +812 -0
- package/dist/FormsAdmin-BQCULvi5.cjs +1 -0
- package/dist/Inbox-BPk2ZkE5.js +779 -0
- package/dist/Inbox-DNrcBx0o.cjs +3 -0
- package/dist/Loader-Bu89fsbB.cjs +1 -0
- package/dist/Loader-D4gwgBOq.js +32 -0
- package/dist/ManagePlanButton-B0dwqZBd.cjs +1 -0
- package/dist/ManagePlanButton-BSrOHYze.js +29 -0
- package/dist/MyBookings-6qr0GgzO.cjs +1 -0
- package/dist/MyBookings-BQjGM2LQ.js +113 -0
- package/dist/PageTitle-CZhgmmDT.cjs +3 -0
- package/dist/PageTitle-D93YCiN8.js +1606 -0
- package/dist/PagesAdmin-BcHIcqM5.cjs +34 -0
- package/dist/PagesAdmin-D69P9nRb.js +5802 -0
- package/dist/PagesAdmin-DNwZOKjA.cjs +1 -0
- package/dist/PagesAdmin-HUITEcHx.js +3 -0
- package/dist/PaymentsAdmin-C2iCI9qC.js +1291 -0
- package/dist/PaymentsAdmin-CoXi2vCm.cjs +2 -0
- package/dist/{PhoneInputField-B3P_vUDW.cjs → PhoneInputField-BEwYZMB7.cjs} +1 -1
- package/dist/{PhoneInputField-D3wWs-M8.js → PhoneInputField-BG0L2djE.js} +2 -2
- package/dist/PhoneInputField-DfOtCIH_.js +2 -0
- package/dist/{PhoneInputField-CdNTvWXQ.cjs → PhoneInputField-jhWvto8C.cjs} +1 -1
- package/dist/Popup-DHYGFl2-.cjs +1 -0
- package/dist/Popup-xROLytgr.js +142 -0
- package/dist/ProviderMark-BBfaM5Yl.js +52 -0
- package/dist/ProviderMark-xLkUN3Fx.cjs +1 -0
- package/dist/PublishApp-Bm-6r3Td.js +595 -0
- package/dist/PublishApp-D4XJUkJa.cjs +2 -0
- package/dist/Said-CoC15awL.js +94 -0
- package/dist/Said-IqCNofdh.cjs +1 -0
- package/dist/ScheduleAdmin-BKfQkrR8.js +1853 -0
- package/dist/ScheduleAdmin-DwK36GAZ.cjs +1 -0
- package/dist/SchedulePicker--urIH2Eb.js +112 -0
- package/dist/SchedulePicker-nmqzUnUH.cjs +1 -0
- package/dist/Setup-CHLgd-ag.js +849 -0
- package/dist/Setup-CaDranTm.cjs +1374 -0
- package/dist/SetupPayments-CVIwh1eQ.js +411 -0
- package/dist/SetupPayments-HNXWA25X.cjs +1 -0
- package/dist/SignInAdmin-C94-A-0w.cjs +4 -0
- package/dist/SignInAdmin-Yxgv_8U4.js +766 -0
- package/dist/SupportBar-CDT0HwdP.cjs +1 -0
- package/dist/SupportBar-CN_JGC-9.js +117 -0
- package/dist/SystemTabContent-L3vGGF3P.cjs +1 -0
- package/dist/SystemTabContent-QdxxLILE.js +35 -0
- package/dist/TemplateDrive-DV8zNjYe.cjs +1 -0
- package/dist/TemplateDrive-NJY_AAvV.js +1197 -0
- package/dist/ThemeAdmin-BzFjJkLg.js +269 -0
- package/dist/ThemeAdmin-DVnPNxe7.cjs +1 -0
- package/dist/ThemeAdmin-DY7Vc4Sj.cjs +3 -0
- package/dist/ThemeAdmin-DnC-D2N3.js +2 -0
- package/dist/{ContactPopup-Dsg2ntq3.js → TimeZoneField-DkI1Bkcz.js} +3191 -5322
- package/dist/TimeZoneField-qs7NPR30.cjs +12 -0
- package/dist/TransactionsAdmin-BsZ-oQWi.js +582 -0
- package/dist/TransactionsAdmin-CTSTiPld.cjs +1 -0
- package/dist/Trouble-9es_AI4F.cjs +1 -0
- package/dist/Trouble-oWt9fMsm.js +164 -0
- package/dist/Users-CTitWXyd.cjs +1 -0
- package/dist/Users-DJjQTWJF.js +1207 -0
- package/dist/aiModels-DIP9fn8T.cjs +1 -0
- package/dist/{aiModels-BHlEfuRJ.js → aiModels-DnDhNGup.js} +29 -61
- package/dist/arrivalRoads-BJ-35vkk.js +228 -0
- package/dist/arrivalRoads-qoU-B4jt.cjs +4 -0
- package/dist/{bake-BWG3y-15.cjs → bake-n2wyFw0B.cjs} +1 -1
- package/dist/{bake-BtYOG1Du.js → bake-naZeMu98.js} +1 -1
- package/dist/bookingPages-C7a3srPG.js +102 -0
- package/dist/bookingPages-DvbFbD9X.cjs +1 -0
- package/dist/components/CustomSelect.d.ts +7 -1
- package/dist/components/RegistrationFields.d.ts +6 -1
- package/dist/components/Reveal.d.ts +12 -0
- package/dist/components/ScrollToTop.d.ts +4 -0
- package/dist/contentFallback-C9MZjdq7.cjs +1 -0
- package/dist/contentFallback-CEDY0Pwp.js +96 -0
- package/dist/contentKey-Bwry4lDa.js +13 -0
- package/dist/contentKey-DJGYYnAE.cjs +1 -0
- package/dist/email-BfnZnMwD.cjs +1 -0
- package/dist/email-Ddj8Dlu6.js +58 -0
- package/dist/{fileBytes-BdwaFKRy.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
- package/dist/{fileBytes-DuW2K-H_.js → fileBytes-bjgvCfWu.js} +2 -2
- package/dist/forms-Bvx9HTM6.js +75 -0
- package/dist/forms-CmNeTETW.cjs +1 -0
- package/dist/lib/ThemeContext.d.ts +0 -14
- package/dist/lib/bareImgWatch.d.ts +6 -1
- package/dist/lib/localEdits.d.ts +2 -0
- package/dist/lib/paymentProducts.d.ts +8 -0
- package/dist/lib/payments.d.ts +11 -1
- package/dist/notices-B7iIrIEg.js +29 -0
- package/dist/notices-upMg8UVh.cjs +1 -0
- package/dist/openOnArrival-Buwqb86D.cjs +1 -0
- package/dist/openOnArrival-S2K6v-lB.js +35 -0
- package/dist/pageFiles--Ih60ITP.js +45 -0
- package/dist/pageFiles-UtBmlOcD.cjs +1 -0
- package/dist/pages/PagesAdmin.d.ts +69 -0
- package/dist/people-2jZE_pdI.js +102 -0
- package/dist/people-BpVvIr9-.cjs +1 -0
- package/dist/personName-CFw3pxuu.js +18 -0
- package/dist/personName-CbzN_i57.cjs +1 -0
- package/dist/publishSteps-C1cDFzzB.js +88 -0
- package/dist/publishSteps-SSm8afDw.cjs +1 -0
- package/dist/recordLock-DHVvI9bP.js +61 -0
- package/dist/recordLock-DWeIxiwh.cjs +1 -0
- package/dist/recordsKey-B7QrxdeU.cjs +1 -0
- package/dist/recordsKey-D5-wC0Aw.js +141 -0
- package/dist/registrationFields-CLeR2lQJ.js +181 -0
- package/dist/registrationFields-v4pOoRdn.cjs +1 -0
- package/dist/renderer.cjs.js +1 -1
- package/dist/renderer.es.js +1 -1
- package/dist/roles-D6VaHWfV.js +147 -0
- package/dist/roles-DQUFFBQe.cjs +1 -0
- package/dist/scheduleData-ATN8w5hI.js +727 -0
- package/dist/scheduleData-Cltj0ABZ.cjs +1 -0
- package/dist/server.cjs.js +6 -6
- package/dist/server.es.js +716 -715
- package/dist/serviceStatus-TQyZO_Y_.cjs +1 -0
- package/dist/serviceStatus-vS8AI7SZ.js +125 -0
- package/dist/tabAudience-BqpN6dsR.cjs +1 -0
- package/dist/tabAudience-CRyMvv0v.js +34 -0
- package/dist/transactions-BqMQDRx3.js +343 -0
- package/dist/transactions-CufFrdAM.cjs +1 -0
- package/dist/useIsPhone-BVGx_X3e.js +13 -0
- package/dist/useIsPhone-o63tNneA.cjs +1 -0
- package/dist/{validate-DzSJWuyL.js → validate-CmC_tLK-.js} +433 -351
- package/dist/validate-DZMwqSrb.cjs +103 -0
- package/dist/vite/validate.d.ts +14 -0
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/your-ai-workflow-firebase-os.cjs.js +15 -1431
- package/dist/your-ai-workflow-firebase-os.css +1 -1
- package/dist/your-ai-workflow-firebase-os.es.js +8200 -32421
- package/package.json +1 -1
- package/src/index.css +122 -2
- package/dist/ContactPopup-IwBm-eqz.cjs +0 -12
- package/dist/PhoneInputField-CVamkTJg.js +0 -2
- package/dist/aiModels-BIhoTNH0.cjs +0 -1
- package/dist/validate-e48WXJdP.cjs +0 -103
- /package/dist/{address-DI1YaCI4.cjs → address-Bsb8COq2.cjs} +0 -0
- /package/dist/{address-Ca1h_UZX.js → address-C2bHNxJU.js} +0 -0
- /package/dist/{dist-BkUiTtIb.js → dist-DUPvBnOA.js} +0 -0
- /package/dist/{dist-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
- /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +0 -0
- /package/dist/{lucide-react-ehRy1vqS.js → lucide-react-CA7GD7Nv.js} +0 -0
- /package/dist/{mediaKind-dk396a03.cjs → mediaKind-D0MWyv6b.cjs} +0 -0
- /package/dist/{mediaKind-De2Cx_kB.js → mediaKind-DmKMsjeY.js} +0 -0
- /package/dist/{pdf-u73U7-6s.js → pdf-DRXcPGkr.js} +0 -0
- /package/dist/{pdf-B24jYmSf.cjs → pdf-jLjjhvjp.cjs} +0 -0
- /package/dist/{pdf.worker.min-BPOWx2_9.js → pdf.worker.min-CfKZezeM.js} +0 -0
- /package/dist/{pdf.worker.min-BvhEiZFe.cjs → pdf.worker.min-bLgNWd7w.cjs} +0 -0
- /package/dist/{verifiedAccount-C1iCxopN.js → verifiedAccount-DRbRFJ6H.js} +0 -0
- /package/dist/{verifiedAccount-D3OeaOBo.cjs → verifiedAccount-DScyKk96.cjs} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require(`./chunk-CiTBaPhY.cjs`),t=require(`./TimeZoneField-qs7NPR30.cjs`),n=require(`./lucide-react-BwV6L6Is.cjs`),r=require(`./mediaKind-D0MWyv6b.cjs`),i=require(`./fileBytes-BJPaiX9Y.cjs`);let a=require(`react`);a=e.a(a,1);let o=require(`react/jsx-runtime`),s=require(`react-dom`);var c=[.5,.75,1,1.25,1.5,2],l=e=>{let t=Number.isFinite(e)&&e>0?e:0,n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=String(Math.floor(t%60)).padStart(2,`0`);return n?`${n}:${String(r).padStart(2,`0`)}:${i}`:`${r}:${i}`},u=`w-9 h-9 shrink-0 rounded-full flex items-center justify-center text-white/85 hover:text-white hover:bg-white/15 transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-accent`,d=`absolute inset-0 m-auto w-16 h-16 md:w-20 md:h-20 rounded-full bg-accent text-[var(--button-fg,#fff)] flex items-center justify-center shadow-2xl shadow-black/40 ring-8 ring-accent/25 hover:scale-105 active:scale-95 transition-transform cursor-pointer outline-none focus-visible:ring-white/70`,f=`relative w-full overflow-hidden rounded-2xl bg-black border border-[var(--panel-border)] shadow-xl`;function p({value:e,max:t,buffered:n=0,onSeek:r,tone:i,label:s,format:c=l,step:u=5}){let d=(0,a.useRef)(null),f=(0,a.useRef)(!1),[p,m]=(0,a.useState)(null),h=e=>{let t=d.current?.getBoundingClientRect();return t&&t.width?Math.min(1,Math.max(0,(e-t.left)/t.width)):0},g=t>0?Math.min(100,e/t*100):0,_=t>0?Math.min(100,n/t*100):0,v=i===`dark`,y=p!==null&&c&&t>0?c(p*t):null;return(0,o.jsxs)(`div`,{ref:d,role:`slider`,tabIndex:0,"aria-label":s,"aria-valuemin":0,"aria-valuemax":Math.round(t)||0,"aria-valuenow":Math.round(e)||0,"aria-valuetext":c?c(e):`${Math.round(g)}%`,className:`group/scrub relative h-4 flex items-center cursor-pointer touch-none outline-none rounded-full focus-visible:ring-2 focus-visible:ring-accent/60`,onPointerDown:e=>{e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),f.current=!0,r(h(e.clientX)*t)},onPointerMove:e=>{m(h(e.clientX)),f.current&&r(h(e.clientX)*t)},onPointerUp:()=>{f.current=!1},onPointerCancel:()=>{f.current=!1},onPointerLeave:()=>m(null),onKeyDown:n=>{let i=n.key;[`ArrowRight`,`ArrowUp`,`ArrowLeft`,`ArrowDown`,`Home`,`End`].includes(i)&&(n.preventDefault(),n.stopPropagation(),r(i===`Home`?0:i===`End`?t:Math.min(t,Math.max(0,e+(i===`ArrowRight`||i===`ArrowUp`?u:-u)))))},children:[(0,o.jsxs)(`div`,{className:`relative w-full h-1 group-hover/scrub:h-1.5 transition-[height] duration-150 rounded-full overflow-hidden ${v?`bg-white/25`:`bg-foreground/10`}`,children:[(0,o.jsx)(`div`,{className:`absolute inset-y-0 left-0 ${v?`bg-white/35`:`bg-foreground/15`}`,style:{width:`${_}%`}}),(0,o.jsx)(`div`,{className:`absolute inset-y-0 left-0 bg-accent`,style:{width:`${g}%`}})]}),(0,o.jsx)(`div`,{className:`absolute w-3 h-3 -ml-1.5 rounded-full bg-accent shadow-md scale-0 group-hover/scrub:scale-100 group-focus-visible/scrub:scale-100 transition-transform pointer-events-none`,style:{left:`${g}%`}}),y&&(0,o.jsx)(`div`,{className:`absolute bottom-full mb-2 -translate-x-1/2 px-1.5 py-0.5 rounded-md text-[11px] font-semibold tabular-nums whitespace-nowrap pointer-events-none ${v?`bg-black/80 text-white`:`bg-background text-foreground border border-[var(--panel-border)] shadow`}`,style:{left:`${p*100}%`},children:y})]})}function m({src:e,poster:t,title:r,autoPlay:i,loop:s,muted:m,aspect:h=`16 / 9`,className:g=``,onRatio:_}){let v=(0,a.useRef)(null),y=(0,a.useRef)(null),b=(0,a.useRef)(null),x=(0,a.useRef)(0),[S,C]=(0,a.useState)(!1),[w,T]=(0,a.useState)(!!i),[E,D]=(0,a.useState)(!1),[O,k]=(0,a.useState)(!1),[A,j]=(0,a.useState)(!1),[M,ee]=(0,a.useState)(0),[N,P]=(0,a.useState)(0),[te,ne]=(0,a.useState)(0),[F,re]=(0,a.useState)(1),[I,L]=(0,a.useState)(!!m||!!i),[R,ie]=(0,a.useState)(1),[z,ae]=(0,a.useState)(!1),[B,oe]=(0,a.useState)(!1),[V,H]=(0,a.useState)(!0),[U,se]=(0,a.useState)(null),W=(0,a.useCallback)(()=>{H(!0),window.clearTimeout(x.current),x.current=window.setTimeout(()=>H(!1),2600)},[]);(0,a.useEffect)(()=>()=>window.clearTimeout(x.current),[]),(0,a.useEffect)(()=>{let e=()=>oe(!!v.current&&document.fullscreenElement===v.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]),(0,a.useEffect)(()=>{if(!z)return;let e=e=>{b.current?.contains(e.target)||ae(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[z]);let G=()=>{let e=y.current;e&&(e.paused||e.ended?e.play().catch(()=>{}):e.pause())},K=e=>{let t=y.current;!t||!Number.isFinite(e)||(t.currentTime=Math.max(0,Math.min(e,Number.isFinite(t.duration)?t.duration:e)),ee(t.currentTime))},q=e=>{let t=y.current;t&&(t.volume=Math.min(1,Math.max(0,e)),t.muted=t.volume===0)},J=()=>{let e=y.current;e&&(e.muted||e.volume===0?(e.muted=!1,e.volume===0&&(e.volume=.6)):e.muted=!0)},Y=()=>{if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}let e=v.current;e?.requestFullscreen?e.requestFullscreen().catch(()=>{}):y.current?.webkitEnterFullscreen?.()},ce=typeof document<`u`&&`pictureInPictureEnabled`in document&&document.pictureInPictureEnabled,le=async()=>{try{document.pictureInPictureElement?await document.exitPictureInPicture():await y.current?.requestPictureInPicture()}catch{}},X=e=>{if(e.target!==v.current)return;let t=e.key.toLowerCase();if(t===` `||t===`k`)e.preventDefault(),G();else if(t===`arrowright`)e.preventDefault(),K(M+5);else if(t===`arrowleft`)e.preventDefault(),K(M-5);else if(t===`arrowup`)e.preventDefault(),q(F+.1);else if(t===`arrowdown`)e.preventDefault(),q(F-.1);else if(t===`m`)J();else if(t===`f`)Y();else return;W()},ue=!S||V||z,de=I||F===0?n.d:F<.5?n.p:n.f,Z=t||/#/.test(e)?e:`${e}#t=0.001`,fe=h===`auto`?U?String(U):`16 / 9`:h;return(0,o.jsxs)(`div`,{ref:v,tabIndex:0,role:`region`,"aria-label":r?`Video: ${r}`:`Video player`,onKeyDown:X,onPointerMove:W,onPointerLeave:()=>{S&&H(!1)},className:`fbos-video group/player ${f} outline-none focus-visible:ring-2 focus-visible:ring-accent ${ue?``:`cursor-none`} ${B?`!rounded-none !border-0`:``} ${g}`,style:B?void 0:{aspectRatio:fe},children:[!N&&!A&&(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`fbos-picture-tint fbos-video-tint absolute inset-0`}),(0,o.jsx)(`video`,{ref:y,src:Z,poster:t,playsInline:!0,preload:`metadata`,autoPlay:i,loop:s,muted:I,className:`absolute inset-0 w-full h-full object-contain`,onClick:()=>{G(),W()},onDoubleClick:Y,onPlay:()=>{C(!0),T(!0),k(!1),W()},onPause:()=>{C(!1),H(!0)},onEnded:()=>{k(!0),C(!1),H(!0)},onTimeUpdate:e=>ee(e.currentTarget.currentTime),onLoadedMetadata:e=>{let t=e.currentTarget;if(P(t.duration),t.videoWidth&&t.videoHeight){let e=t.videoWidth/t.videoHeight;se(e),_?.(e)}},onDurationChange:e=>P(e.currentTarget.duration),onProgress:e=>{let t=e.currentTarget.buffered;t.length&&ne(t.end(t.length-1))},onWaiting:()=>D(!0),onPlaying:()=>D(!1),onCanPlay:()=>D(!1),onVolumeChange:e=>{re(e.currentTarget.volume),L(e.currentTarget.muted)},onRateChange:e=>ie(e.currentTarget.playbackRate),onError:()=>j(!0)}),r&&!A&&(0,o.jsx)(`div`,{className:`absolute inset-x-0 top-0 px-4 pt-3 pb-10 bg-gradient-to-b from-black/60 to-transparent text-white text-[13px] md:text-[14px] font-semibold truncate pointer-events-none transition-opacity duration-300 ${ue?`opacity-100`:`opacity-0`}`,children:r}),A?(0,o.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 text-white/75 text-[13px] font-medium text-center px-6`,children:[(0,o.jsx)(n.Pt,{className:`w-8 h-8 opacity-60`}),`This video could not be played here.`]}):!S&&!E?(0,o.jsx)(`button`,{type:`button`,onClick:G,"aria-label":O?`Play again`:`Play`,className:d,children:O?(0,o.jsx)(n.L,{className:`w-7 h-7 md:w-8 md:h-8`}):(0,o.jsx)(n.q,{className:`w-7 h-7 md:w-8 md:h-8 translate-x-0.5 fill-current`})}):null,E&&!A&&(0,o.jsx)(n.ht,{className:`absolute inset-0 m-auto w-10 h-10 text-white/90 animate-spin pointer-events-none`}),!A&&(0,o.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 px-2.5 md:px-4 pb-1.5 md:pb-2.5 pt-12 bg-gradient-to-t from-black/75 via-black/35 to-transparent transition-opacity duration-300 ${ue&&w?`opacity-100`:`opacity-0 pointer-events-none`}`,children:[(0,o.jsx)(p,{value:M,max:N,buffered:te,onSeek:K,tone:`dark`,label:`Time`}),(0,o.jsxs)(`div`,{className:`flex items-center gap-0.5 md:gap-1 mt-0.5`,children:[(0,o.jsx)(`button`,{type:`button`,className:u,onClick:G,"aria-label":S?`Pause`:`Play`,children:S?(0,o.jsx)(n.Q,{className:`w-[18px] h-[18px] fill-current`}):(0,o.jsx)(n.q,{className:`w-[18px] h-[18px] fill-current translate-x-px`})}),(0,o.jsxs)(`div`,{className:`group/vol flex items-center`,children:[(0,o.jsx)(`button`,{type:`button`,className:u,onClick:J,"aria-label":I?`Turn the sound on`:`Mute`,children:(0,o.jsx)(de,{className:`w-[18px] h-[18px]`})}),(0,o.jsx)(`div`,{className:`max-sm:hidden w-0 group-hover/vol:w-[76px] group-focus-within/vol:w-[76px] overflow-hidden transition-[width] duration-200`,children:(0,o.jsx)(`div`,{className:`w-[68px] ml-1`,children:(0,o.jsx)(p,{value:I?0:F,max:1,onSeek:q,tone:`dark`,label:`Volume`,format:null,step:.1})})})]}),(0,o.jsxs)(`span`,{className:`px-1.5 text-[12px] md:text-[12.5px] font-semibold text-white/90 tabular-nums whitespace-nowrap select-none`,children:[l(M),` `,(0,o.jsxs)(`span`,{className:`text-white/50`,children:[`/ `,l(N)]})]}),(0,o.jsx)(`div`,{className:`flex-1`}),(0,o.jsxs)(`div`,{ref:b,className:`relative`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`${u} !w-auto px-2.5 text-[12px] font-bold tabular-nums`,onClick:()=>ae(e=>!e),"aria-label":`Playback speed`,"aria-expanded":z,children:[R,`×`]}),z&&(0,o.jsx)(`div`,{role:`menu`,className:`absolute bottom-full right-0 mb-2 py-1 min-w-[108px] rounded-xl bg-black/85 backdrop-blur-md border border-white/10 shadow-2xl`,children:c.map(e=>(0,o.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":e===R,onClick:()=>{y.current&&(y.current.playbackRate=e),ae(!1)},className:`w-full px-3 py-1.5 flex items-center justify-between gap-3 text-left text-[12.5px] font-semibold tabular-nums hover:bg-white/10 cursor-pointer ${e===R?`text-accent`:`text-white/85`}`,children:[e===1?`Normal`:`${e}×`,e===R&&(0,o.jsx)(n.sn,{className:`w-3.5 h-3.5`})]},e))})]}),ce&&(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:(0,o.jsx)(`button`,{type:`button`,className:u,onClick:le,"aria-label":`Picture in picture`,children:(0,o.jsx)(n.J,{className:`w-[18px] h-[18px]`})})}),(0,o.jsx)(`button`,{type:`button`,className:u,onClick:Y,"aria-label":B?`Leave full screen`:`Full screen`,children:B?(0,o.jsx)(n.at,{className:`w-[18px] h-[18px]`}):(0,o.jsx)(n.st,{className:`w-[18px] h-[18px]`})})]})]})]})}function h({src:e,embed:i,title:s,aspect:c=`16 / 9`,autoPlay:l,className:u=``}){let[p,m]=(0,a.useState)(!!l),[h,g]=(0,a.useState)(!1),_=h?null:r.r(e),v=p?`${i}${i.includes(`?`)?`&`:`?`}autoplay=1`:i;return(0,o.jsx)(`div`,{className:`fbos-video ${f} ${u}`,style:{aspectRatio:c===`auto`?`16 / 9`:c},children:p?(0,o.jsx)(`iframe`,{src:v,title:s||`Video`,className:`absolute inset-0 w-full h-full border-0`,allow:`autoplay; encrypted-media; picture-in-picture; fullscreen; clipboard-write`,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`}):(0,o.jsxs)(`button`,{type:`button`,onClick:()=>m(!0),"aria-label":s?`Play ${s}`:`Play the video`,className:`group/facade absolute inset-0 w-full h-full cursor-pointer`,children:[_?(0,o.jsx)(t.Nn,{src:_,alt:``,className:`absolute inset-0`,onError:()=>g(!0)}):(0,o.jsx)(`span`,{className:`absolute inset-0 bg-gradient-to-br from-accent/30 via-black to-black`}),(0,o.jsx)(`span`,{className:`absolute inset-0 bg-gradient-to-t from-black/55 via-transparent to-black/35`}),s&&(0,o.jsx)(`span`,{className:`absolute left-4 right-4 top-3 text-left text-white text-[14px] font-semibold truncate`,children:s}),(0,o.jsx)(`span`,{className:`${d} pointer-events-none group-hover/facade:scale-105`,children:(0,o.jsx)(n.q,{className:`w-7 h-7 md:w-8 md:h-8 translate-x-0.5 fill-current`})})]})})}function g({src:e,title:t,autoPlay:i,loop:s,className:c=``}){let u=(0,a.useRef)(null),[d,f]=(0,a.useState)(!1),[m,h]=(0,a.useState)(0),[g,_]=(0,a.useState)(0),[v,y]=(0,a.useState)(0),[b,x]=(0,a.useState)(!1),[S,C]=(0,a.useState)(1),[w,T]=(0,a.useState)(!1);return(0,o.jsxs)(`div`,{role:`region`,"aria-label":`Recording: ${t||r.o(e)}`,className:`fbos-audio w-full flex items-center gap-3 rounded-2xl border border-[var(--panel-border)] bg-[var(--panel-bg)] px-3 py-2.5 ${c}`,children:[(0,o.jsx)(`audio`,{ref:u,src:e,preload:`metadata`,autoPlay:i,loop:s,className:`hidden`,onPlay:()=>f(!0),onPause:()=>f(!1),onEnded:()=>f(!1),onTimeUpdate:e=>h(e.currentTarget.currentTime),onLoadedMetadata:e=>_(e.currentTarget.duration),onDurationChange:e=>_(e.currentTarget.duration),onProgress:e=>{let t=e.currentTarget.buffered;t.length&&y(t.end(t.length-1))},onVolumeChange:e=>x(e.currentTarget.muted),onRateChange:e=>C(e.currentTarget.playbackRate),onError:()=>T(!0)}),(0,o.jsx)(`button`,{type:`button`,onClick:()=>{let e=u.current;e&&(e.paused?e.play().catch(()=>{}):e.pause())},disabled:w,"aria-label":d?`Pause`:`Play`,className:`w-10 h-10 shrink-0 rounded-full bg-accent text-[var(--button-fg,#fff)] flex items-center justify-center shadow-md hover:scale-105 active:scale-95 transition-transform cursor-pointer disabled:opacity-40`,children:d?(0,o.jsx)(n.Q,{className:`w-4 h-4 fill-current`}):(0,o.jsx)(n.q,{className:`w-4 h-4 fill-current translate-x-px`})}),(0,o.jsxs)(`div`,{className:`flex-1 min-w-0 flex flex-col`,children:[(0,o.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,o.jsx)(`span`,{className:`text-[13px] font-semibold text-foreground truncate`,children:t||r.o(e)}),(0,o.jsx)(`span`,{className:`text-[11.5px] font-medium text-foreground/50 tabular-nums whitespace-nowrap`,children:w?`Could not be played`:`${l(m)} / ${l(g)}`})]}),(0,o.jsx)(p,{value:m,max:g,buffered:v,onSeek:e=>{let t=u.current;!t||!Number.isFinite(e)||(t.currentTime=Math.max(0,Math.min(e,Number.isFinite(t.duration)?t.duration:e)),h(t.currentTime))},tone:`theme`,label:`Time`})]}),(0,o.jsxs)(`button`,{type:`button`,onClick:()=>{let e=u.current;if(!e)return;let t=[1,1.25,1.5,2,.75];e.playbackRate=t[(t.indexOf(e.playbackRate)+1)%t.length]||1},"aria-label":`Playback speed`,className:`h-8 px-2 shrink-0 rounded-lg text-[12px] font-bold tabular-nums text-foreground/60 hover:text-foreground hover:bg-foreground/5 transition-colors cursor-pointer`,children:[S,`×`]}),(0,o.jsx)(`button`,{type:`button`,onClick:()=>{u.current&&(u.current.muted=!u.current.muted)},"aria-label":b?`Turn the sound on`:`Mute`,className:`w-8 h-8 shrink-0 rounded-lg flex items-center justify-center text-foreground/60 hover:text-foreground hover:bg-foreground/5 transition-colors cursor-pointer`,children:b?(0,o.jsx)(n.d,{className:`w-4 h-4`}):(0,o.jsx)(n.f,{className:`w-4 h-4`})})]})}function _(e){let t=r.i(e.src);return t?(0,o.jsx)(h,{...e,embed:t}):r.l(e.src,e.type)===`audio`?(0,o.jsx)(g,{...e}):(0,o.jsx)(m,{...e},e.src)}var v=new Set([`csv`,`tsv`,`xls`,`xlsx`,`ods`,`numbers`]),y=new Set([`ppt`,`pptx`,`odp`,`key`]),b=new Set([`json`,`xml`,`yml`,`yaml`,`log`,`ics`]);function x({kind:e,name:t=``,className:i=`w-4 h-4`}){let a=r.a(t);return(0,o.jsx)(e===`image`?n.Et:e===`video`?n.Pt:e===`audio`?n.nt:e===`link`?n.vt:v.has(a)?n.Lt:y.has(a)?n.U:b.has(a)?n.Rt:e===`file`?n.Ft:n.It,{className:i,"aria-hidden":!0})}var S=`shrink-0 flex items-center justify-center rounded-xl bg-gradient-to-br from-accent/25 via-accent/10 to-transparent border border-accent/30 text-accent`,C=16,w=980;function T({doc:e,index:t,cssW:r,cssH:s,root:c,strokes:l,drawing:u,ink:d,onStroke:f}){let p=(0,a.useRef)(null),m=(0,a.useRef)(null),[h,g]=(0,a.useState)(t<2),[_,v]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=p.current;if(!e||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(([e])=>{g(e.isIntersecting),!e.isIntersecting&&m.current&&m.current.width&&(m.current.width=0,m.current.height=0,v(0))},{root:c,rootMargin:`1500px 0px`});return t.observe(e),()=>t.disconnect()},[c]),(0,a.useEffect)(()=>{if(!h||!r||Math.abs(_-r)<.5)return;let n=!1,i=null,a=window.setTimeout(async()=>{try{let a=await e.getPage(t+1);if(n)return;let o=Math.min(window.devicePixelRatio||1,2),s=a.getViewport({scale:1}),c=a.getViewport({scale:r/s.width*o}),l=document.createElement(`canvas`);l.width=Math.ceil(c.width),l.height=Math.ceil(c.height),i=a.render({canvas:l,viewport:c}),await i.promise;let u=m.current;if(n||!u)return;u.width=l.width,u.height=l.height,u.getContext(`2d`)?.drawImage(l,0,0),v(r)}catch{}},_?140:0);return()=>{n=!0,window.clearTimeout(a),i?.cancel()}},[h,r,e,t,_]),(0,o.jsxs)(`div`,{ref:p,"data-page":t+1,className:`relative shrink-0 bg-white rounded-[3px] ring-1 ring-black/5 shadow-[0_1px_3px_rgba(0,0,0,0.12),0_12px_32px_-16px_rgba(0,0,0,0.35)]`,style:{width:r,height:s},children:[(0,o.jsx)(`canvas`,{ref:m,className:`absolute inset-0 w-full h-full rounded-[3px]`,"aria-label":`Page ${t+1}`,role:`img`}),!_&&(0,o.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,o.jsx)(n.ht,{className:`w-5 h-5 text-black/20 animate-spin`})}),(0,o.jsx)(i.i,{strokes:l,active:u,ink:d,onStroke:e=>f(t,e)})]})}var E=(0,a.forwardRef)(function({data:e,zoom:t,drawing:r,ink:s,strokes:c,onStroke:l,onReady:u,onPage:d,onFail:f},p){let m=(0,a.useRef)(null),[h,g]=(0,a.useState)(null),[_,v]=(0,a.useState)([]),[y,b]=(0,a.useState)(0),[x,S]=(0,a.useState)(null),E=(0,a.useRef)({onReady:u,onPage:d,onFail:f});(0,a.useEffect)(()=>{E.current={onReady:u,onPage:d,onFail:f}});let D=(0,a.useRef)(0);(0,a.useEffect)(()=>{let t=!1,n=null;return(async()=>{let r=await i.r(),a=new Uint8Array(await e.arrayBuffer()),o=r.getDocument({data:a});n=o;let s=await o.promise;if(t)return;let c=await Promise.all(Array.from({length:s.numPages},(e,t)=>s.getPage(t+1)));t||(v(c.map(e=>{let t=e.getViewport({scale:1});return{w:t.width,h:t.height}})),g(s),E.current.onReady(s.numPages))})().catch(e=>{t||E.current.onFail(e?.name===`PasswordException`?`locked`:`broken`)}),()=>{t=!0,n?.destroy()}},[e]),(0,a.useLayoutEffect)(()=>{let e=m.current;if(!e)return;S(e);let t=()=>b(e.clientWidth);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let O=_.reduce((e,t)=>Math.max(e,t.w),0)||612,k=y<640?12:32,A=Math.max(120,Math.min(y-k*2,w))/O*t,j=(0,a.useRef)(A);return(0,a.useLayoutEffect)(()=>{let e=m.current,t=j.current;if(j.current=A,!e||!t||t===A)return;let n=A/t;e.scrollTop=(e.scrollTop+e.clientHeight/2)*n-e.clientHeight/2,e.scrollLeft=(e.scrollLeft+e.clientWidth/2)*n-e.clientWidth/2},[A]),(0,a.useEffect)(()=>()=>cancelAnimationFrame(D.current),[]),(0,a.useImperativeHandle)(p,()=>({goTo:e=>{let t=m.current,n=t?.querySelector(`[data-page="${e}"]`);t&&n&&t.scrollTo({top:n.offsetTop-C,behavior:`smooth`})}}),[]),(0,o.jsx)(`div`,{ref:m,onScroll:()=>{cancelAnimationFrame(D.current),D.current=requestAnimationFrame(()=>{let e=m.current;if(!e)return;let t=e.scrollTop+e.clientHeight*.35,n=1;for(let r of Array.from(e.querySelectorAll(`[data-page]`)))if(r.offsetTop<=t)n=Number(r.dataset.page);else break;E.current.onPage(n)})},className:`absolute inset-0 overflow-auto overscroll-contain`,children:h?(0,o.jsx)(`div`,{className:`relative w-max min-w-full flex flex-col items-center`,style:{gap:C,padding:`${k/2+4}px ${k}px ${k+56}px`},children:_.map((e,t)=>(0,o.jsx)(T,{doc:h,index:t,cssW:e.w*A,cssH:e.h*A,root:x,strokes:c[t]||[],drawing:r,ink:s,onStroke:l},t))}):(0,o.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,o.jsx)(n.ht,{className:`w-6 h-6 text-accent animate-spin`})})})}),D=[.5,.75,1,1.25,1.5,2,3],O=`h-9 min-w-9 px-2 shrink-0 rounded-xl flex items-center justify-center gap-1.5 text-[12.5px] font-semibold text-foreground/65 hover:text-foreground hover:bg-foreground/[0.06] transition-colors cursor-pointer disabled:opacity-35 disabled:pointer-events-none outline-none focus-visible:ring-2 focus-visible:ring-accent/50`,k=`items-center h-9 shrink-0 rounded-xl border border-[var(--panel-border)] bg-[var(--panel-bg)] px-0.5`,A=`w-8 h-8 rounded-lg flex items-center justify-center text-foreground/60 hover:text-foreground hover:bg-foreground/[0.06] transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none`,j=new Set([`json`,`xml`,`yml`,`yaml`,`log`,`ics`]),M=4e5;function ee(e,t=`,`){let n=[],r=[],i=``,a=!1;for(let o=0;o<e.length;o++){let s=e[o];if(a){s===`"`?e[o+1]===`"`?(i+=`"`,o++):a=!1:i+=s;continue}s===`"`?a=!0:s===t?(r.push(i),i=``):s===`
|
|
2
|
+
`||s===`\r`?(s===`\r`&&e[o+1]===`
|
|
3
|
+
`&&o++,r.push(i),n.push(r),r=[],i=``):i+=s}return(i||r.length)&&(r.push(i),n.push(r)),n}var N=(e,t)=>{let n=e.lastIndexOf(`.`);return`${n>0?e.slice(0,n):e} (with drawing).${t===`pdf`?`pdf`:`png`}`};function P(){return(0,o.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,o.jsx)(n.ht,{className:`w-6 h-6 text-accent animate-spin`})})}function te({src:e,alt:t,zoom:n,drawing:r,ink:s,strokes:c,onStroke:l,onSize:u}){let d=(0,a.useRef)(null),f=(0,a.useRef)(null),[p,m]=(0,a.useState)({w:0,h:0}),[h,g]=(0,a.useState)(null),[_,v]=(0,a.useState)(!1);(0,a.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{let t=e.clientWidth<640?24:48;m({w:Math.max(0,e.clientWidth-t),h:Math.max(0,e.clientHeight-t)})};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let y=h&&p.w&&p.h?Math.min(p.w/h.w,p.h/h.h,1):0,b=h?h.w*y*n:0,x=h?h.h*y*n:0,S=!r&&n>1;return(0,o.jsxs)(`div`,{ref:d,className:`absolute inset-0 overflow-auto overscroll-contain flex p-3 sm:p-6 ${S?`cursor-grab active:cursor-grabbing`:``}`,onPointerDown:e=>{!S||e.button>0||!d.current||(f.current={x:e.clientX,y:e.clientY,left:d.current.scrollLeft,top:d.current.scrollTop},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=f.current;!t||!d.current||(d.current.scrollLeft=t.left-(e.clientX-t.x),d.current.scrollTop=t.top-(e.clientY-t.y))},onPointerUp:()=>{f.current=null},onPointerCancel:()=>{f.current=null},children:[_?(0,o.jsx)(`p`,{className:`m-auto text-[13px] font-medium text-foreground/50`,children:`This picture could not be shown.`}):(0,o.jsxs)(`div`,{className:`relative m-auto shrink-0 rounded-lg overflow-hidden shadow-lg`,style:h?{width:b,height:x}:{width:0,height:0},children:[(0,o.jsx)(`img`,{src:e,alt:t,draggable:!1,onLoad:e=>{let t={w:e.currentTarget.naturalWidth||800,h:e.currentTarget.naturalHeight||600};g(t),u(t.w,t.h)},onError:()=>v(!0),className:`absolute inset-0 w-full h-full select-none`}),h&&(0,o.jsx)(i.i,{strokes:c,active:r,ink:s,onStroke:l})]}),!h&&!_&&(0,o.jsx)(P,{})]})}function ne({blob:e,name:t}){let[n,i]=(0,a.useState)(null);if((0,a.useEffect)(()=>{let t=!1;return e.text().then(e=>{t||i(e)},()=>{t||i(``)}),()=>{t=!0}},[e]),n===null)return(0,o.jsx)(P,{});let s=r.a(t),c=n.length>M,l=c?n.slice(0,M):n,u=c&&(0,o.jsx)(`p`,{className:`px-4 sm:px-8 pb-8 text-[12px] font-medium text-foreground/45`,children:`The rest of this file is too long to show here — download it to read it all.`});if(s===`csv`||s===`tsv`){let[e,...t]=ee(l,s===`tsv`?` `:`,`).slice(0,2e3);return(0,o.jsxs)(`div`,{className:`absolute inset-0 overflow-auto`,children:[(0,o.jsxs)(`table`,{className:`min-w-full text-[12.5px] border-separate border-spacing-0`,children:[e&&(0,o.jsx)(`thead`,{className:`sticky top-0 z-10`,children:(0,o.jsx)(`tr`,{children:e.map((e,t)=>(0,o.jsx)(`th`,{className:`px-3 py-2 text-left font-bold text-foreground bg-[var(--panel-bg)] backdrop-blur-md border-b border-[var(--panel-border)] whitespace-nowrap`,children:e},t))})}),(0,o.jsx)(`tbody`,{children:t.map((e,t)=>(0,o.jsx)(`tr`,{className:`hover:bg-foreground/[0.03]`,children:e.map((e,t)=>(0,o.jsx)(`td`,{className:`px-3 py-1.5 text-foreground/80 border-b border-[var(--panel-border)]/50 whitespace-nowrap`,children:e},t))},t))})]}),u]})}let d=l;if(s===`json`)try{d=JSON.stringify(JSON.parse(l),null,2)}catch{}return(0,o.jsxs)(`div`,{className:`absolute inset-0 overflow-auto`,children:[(0,o.jsx)(`pre`,{className:`m-0 mx-auto max-w-4xl p-4 sm:p-8 whitespace-pre-wrap break-words text-foreground/85 leading-relaxed ${j.has(s)?`font-mono text-[12.5px]`:`font-sans text-[14px]`}`,children:d}),u]})}function F({src:e,type:t,title:n}){let r=(0,a.useRef)(null),[i,s]=(0,a.useState)(16/9),[c,l]=(0,a.useState)({w:0,h:0});(0,a.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>l({w:e.clientWidth,h:e.clientHeight});if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let u=c.w&&c.h?Math.min(c.w,c.h*i):0;return(0,o.jsx)(`div`,{className:`absolute inset-0 p-3 sm:p-6`,children:(0,o.jsx)(`div`,{ref:r,className:`w-full h-full flex items-center justify-center`,children:(0,o.jsx)(`div`,{style:u?{width:u}:{width:`100%`},children:(0,o.jsx)(_,{src:e,type:t,title:n,aspect:String(i),onRatio:s})})})})}function re({kind:e,title:t,src:i,onDownload:a,busy:s,canDownload:c}){let l=r.a(t)||r.a(i),u=e===`link`?`This is a link to another website.`:e===`document`?`${l?`A ${l.toUpperCase()} file`:`This file`} opens in its own app — download it to read it.`:`This kind of file cannot be shown here. Download it to open it.`;return(0,o.jsx)(`div`,{className:`absolute inset-0 overflow-auto flex p-6`,children:(0,o.jsxs)(`div`,{className:`m-auto flex flex-col items-center text-center max-w-sm gap-3`,children:[(0,o.jsx)(`span`,{className:`${S} w-16 h-16 rounded-2xl`,children:(0,o.jsx)(x,{kind:e,name:t||i,className:`w-7 h-7`})}),(0,o.jsx)(`p`,{className:`text-[16px] font-bold text-foreground break-all`,children:t}),(0,o.jsx)(`p`,{className:`text-[13px] text-foreground/55 leading-relaxed`,children:u}),e===`link`?(0,o.jsxs)(`a`,{href:i,target:`_blank`,rel:`noopener noreferrer`,className:`btn-primary inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-[13px] font-bold mt-1`,children:[(0,o.jsx)(n.Ht,{className:`w-4 h-4`}),` Open it`]}):c?(0,o.jsxs)(`button`,{type:`button`,onClick:a,disabled:s,className:`btn-primary inline-flex items-center gap-2 px-5 py-2.5 rounded-xl text-[13px] font-bold mt-1 cursor-pointer`,children:[s?(0,o.jsx)(n.ht,{className:`w-4 h-4 animate-spin`}):(0,o.jsx)(n.Gt,{className:`w-4 h-4`}),` Download`]}):null]})})}function I({src:e,name:t,type:s,height:c,className:l=``,draw:u=!0,download:d=!0,actions:f,onClose:p}){let m=r.l(e,s),h=t||r.o(e),g=m===`pdf`||m===`text`,v=(0,a.useRef)(null),y=(0,a.useRef)(null),b=(0,a.useRef)(null),[C,w]=(0,a.useState)(null),[T,j]=(0,a.useState)(!1),[M,ee]=(0,a.useState)(0),[I,L]=(0,a.useState)(1),[R,ie]=(0,a.useState)(`1`),[z,ae]=(0,a.useState)(null),[B,oe]=(0,a.useState)(null),[V,H]=(0,a.useState)(1),[U,se]=(0,a.useState)(!1),[W,G]=(0,a.useState)(`black`),[K,q]=(0,a.useState)({}),[J,Y]=(0,a.useState)([]),[ce,le]=(0,a.useState)(!1),[X,ue]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!g)return;let t=!1;return i.t(e).then(e=>{t||w(e)},()=>{t||j(!0)}),()=>{t=!0}},[e,g]),(0,a.useEffect)(()=>{let e=()=>ue(!!v.current&&document.fullscreenElement===v.current);return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let de=m===`pdf`&&!!C&&!T&&!z,Z=de&&M>0||m===`image`&&!!B,fe=u&&Z,pe=J.length>0,Q=(0,a.useCallback)(e=>{H(t=>{let n=D.findIndex(e=>e>=t-.001);return D[Math.min(D.length-1,Math.max(0,(n<0?2:n)+e))]??t})},[]);(0,a.useEffect)(()=>{let e=y.current;if(!e||!Z)return;let t=e=>{!e.ctrlKey&&!e.metaKey||(e.preventDefault(),Q(e.deltaY<0?1:-1))};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[Z,Q]);let me=(e,t)=>{q(n=>({...n,[e]:[...n[e]||[],t]})),Y(t=>[...t,e])},he=()=>{let e=J[J.length-1];e!==void 0&&(q(t=>({...t,[e]:(t[e]||[]).slice(0,-1)})),Y(e=>e.slice(0,-1)))},ge=()=>{q({}),Y([])},$=e=>{let t=Math.min(M,Math.max(1,Math.round(e)||1));L(t),ie(String(t)),b.current?.goTo(t)},_e=async()=>{le(!0);try{if(pe&&(m===`pdf`||m===`image`)){let{bakePdf:t,bakeImage:n}=await Promise.resolve().then(()=>require(`./bake-n2wyFw0B.cjs`));i.n(m===`pdf`&&C?await t(C,K):await n(e,K[0]||[]),N(h,m))}else m===`video`||m===`audio`||m===`link`?window.open(e,`_blank`,`noopener,noreferrer`):i.n(C||await i.t(e),h)}catch{window.open(e,`_blank`,`noopener,noreferrer`)}le(!1)},ve=()=>{document.fullscreenElement?document.exitFullscreen().catch(()=>{}):v.current?.requestFullscreen?.().catch(()=>{})},ye=e=>{if(!e.target.closest(`input, textarea, [role="slider"], .fbos-video`)){if(e.key===`Escape`&&U){e.preventDefault(),se(!1);return}!Z||e.metaKey||e.ctrlKey||(e.key===`+`||e.key===`=`?(e.preventDefault(),Q(1)):e.key===`-`?(e.preventDefault(),Q(-1)):e.key===`0`&&(e.preventDefault(),H(1)))}},be=[r.t[m],M?`${M} page${M===1?``:`s`}`:``,B?`${B.w} × ${B.h}`:``].filter(Boolean).join(` · `),xe;return xe=m===`image`?(0,o.jsx)(te,{src:e,alt:h,zoom:V,drawing:U,ink:W,strokes:K[0]||[],onStroke:e=>me(0,e),onSize:(e,t)=>oe({w:e,h:t})}):m===`video`||m===`audio`?m===`audio`?(0,o.jsx)(`div`,{className:`absolute inset-0 flex p-6`,children:(0,o.jsx)(`div`,{className:`m-auto w-full max-w-lg`,children:(0,o.jsx)(_,{src:e,type:s,title:h})})}):(0,o.jsx)(F,{src:e,type:s,title:h}):g&&T?(0,o.jsx)(`iframe`,{src:e,title:h,className:`absolute inset-0 w-full h-full border-0 bg-white`}):m===`pdf`&&z?(0,o.jsx)(`div`,{className:`absolute inset-0 flex p-6`,children:(0,o.jsxs)(`div`,{className:`m-auto flex flex-col items-center text-center gap-3 max-w-sm`,children:[(0,o.jsx)(`span`,{className:`${S} w-14 h-14 rounded-2xl`,children:z===`locked`?(0,o.jsx)(n.mt,{className:`w-6 h-6`}):(0,o.jsx)(x,{kind:`pdf`,className:`w-6 h-6`})}),(0,o.jsx)(`p`,{className:`text-[14px] font-semibold text-foreground`,children:z===`locked`?`This PDF is locked with a password.`:`This PDF could not be opened here.`}),(0,o.jsx)(`p`,{className:`text-[13px] text-foreground/55`,children:`Download it to open it on your own device.`})]})}):m===`pdf`?C?(0,o.jsx)(E,{ref:b,data:C,zoom:V,drawing:U,ink:W,strokes:K,onStroke:me,onReady:e=>ee(e),onPage:e=>{L(e),ie(String(e))},onFail:ae}):(0,o.jsx)(P,{}):m===`text`?C?(0,o.jsx)(ne,{blob:C,name:r.a(h)?h:r.o(e)}):(0,o.jsx)(P,{}):(0,o.jsx)(re,{kind:m,title:h,src:e,onDownload:_e,busy:ce,canDownload:d}),(0,o.jsxs)(`div`,{ref:v,tabIndex:-1,onKeyDown:ye,className:`fbos-file-viewer relative flex flex-col w-full overflow-hidden bg-background border border-[var(--panel-border)] shadow-2xl outline-none ${X?``:`rounded-2xl sm:rounded-3xl`} ${l}`,style:{height:X?`100vh`:c??`min(80vh, 760px)`},children:[(0,o.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute top-0 inset-x-0 h-[2px] z-20 bg-gradient-to-r from-transparent via-accent/60 to-transparent`}),(0,o.jsxs)(`div`,{className:`relative z-10 shrink-0 flex items-center gap-1.5 sm:gap-2 h-14 px-2.5 sm:px-3.5 border-b border-[var(--panel-border)]/60 bg-background/85 backdrop-blur-md`,children:[(0,o.jsx)(`span`,{className:`max-sm:hidden shrink-0`,children:(0,o.jsx)(`span`,{className:`${S} w-9 h-9`,children:(0,o.jsx)(x,{kind:m,name:h})})}),(0,o.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1 mr-1`,children:[(0,o.jsx)(`span`,{className:`text-[13.5px] sm:text-[14px] font-bold text-foreground truncate leading-tight`,title:h,children:h}),(0,o.jsx)(`span`,{className:`text-[11px] sm:text-[11.5px] font-medium text-foreground/45 truncate leading-tight mt-0.5`,children:be})]}),de&&M>1&&(0,o.jsxs)(`div`,{className:`${k} inline-flex`,children:[(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:(0,o.jsx)(`button`,{type:`button`,className:A,onClick:()=>$(I-1),disabled:I<=1,"aria-label":`Previous page`,children:(0,o.jsx)(n.an,{className:`w-4 h-4`})})}),(0,o.jsxs)(`span`,{className:`flex items-center gap-1 px-1.5 text-[12.5px] font-semibold text-foreground/70 tabular-nums`,children:[(0,o.jsx)(`input`,{value:R,onChange:e=>ie(e.target.value.replace(/\D/g,``)),onBlur:()=>$(Number(R)),onKeyDown:e=>{e.key===`Enter`&&$(Number(R))},"aria-label":`Page`,inputMode:`numeric`,className:`no-glow w-7 h-7 text-center rounded-md bg-transparent outline-none focus:bg-foreground/[0.06] text-foreground`}),(0,o.jsxs)(`span`,{className:`text-foreground/40`,children:[`/ `,M]})]}),(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:(0,o.jsx)(`button`,{type:`button`,className:A,onClick:()=>$(I+1),disabled:I>=M,"aria-label":`Next page`,children:(0,o.jsx)(n.in,{className:`w-4 h-4`})})})]}),Z&&(0,o.jsxs)(`div`,{className:`${k} max-sm:hidden sm:inline-flex`,children:[(0,o.jsx)(`button`,{type:`button`,className:A,onClick:()=>Q(-1),disabled:V<=D[0],"aria-label":`Zoom out`,children:(0,o.jsx)(n.i,{className:`w-4 h-4`})}),(0,o.jsxs)(`button`,{type:`button`,onClick:()=>H(1),title:`Fit to the window`,className:`min-w-[48px] h-8 px-1 rounded-lg text-[12px] font-semibold text-foreground/70 tabular-nums hover:bg-foreground/[0.06] cursor-pointer`,children:[Math.round(V*100),`%`]}),(0,o.jsx)(`button`,{type:`button`,className:A,onClick:()=>Q(1),disabled:V>=D[D.length-1],"aria-label":`Zoom in`,children:(0,o.jsx)(n.r,{className:`w-4 h-4`})})]}),fe&&(0,o.jsxs)(`button`,{type:`button`,onClick:()=>se(e=>!e),"aria-pressed":U,title:U?`Stop drawing`:`Draw on it`,className:`${O} ${U?`!text-accent bg-accent/10 hover:bg-accent/15`:``}`,children:[(0,o.jsx)(n.Z,{className:`w-4 h-4`}),(0,o.jsx)(`span`,{className:`max-md:hidden`,children:`Draw`})]}),d&&m!==`link`&&(0,o.jsxs)(`button`,{type:`button`,onClick:_e,disabled:ce,title:pe?`Download with your drawing`:`Download`,className:O,children:[ce?(0,o.jsx)(n.ht,{className:`w-4 h-4 animate-spin`}):(0,o.jsx)(n.Gt,{className:`w-4 h-4`}),(0,o.jsx)(`span`,{className:`max-md:hidden`,children:`Download`})]}),!p&&typeof document<`u`&&document.fullscreenEnabled&&(0,o.jsx)(`span`,{className:`max-sm:hidden`,children:(0,o.jsx)(`button`,{type:`button`,onClick:ve,"aria-label":X?`Leave full screen`:`Full screen`,className:O,children:X?(0,o.jsx)(n.k,{className:`w-4 h-4`}):(0,o.jsx)(n.Ut,{className:`w-4 h-4`})})}),f,p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":!0,className:`w-px h-6 bg-[var(--panel-border)] mx-0.5`}),(0,o.jsx)(`button`,{type:`button`,onClick:p,"aria-label":`Close`,className:O,children:(0,o.jsx)(n.o,{className:`w-[18px] h-[18px]`})})]})]}),(0,o.jsxs)(`div`,{ref:y,className:`relative flex-1 min-h-0 bg-foreground/[0.035]`,children:[xe,U&&(0,o.jsxs)(`div`,{className:`absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex items-center gap-0.5 p-1.5 rounded-full border border-[var(--panel-border)] bg-background shadow-2xl dark:bg-[color-mix(in_srgb,var(--accent-color)_9%,var(--bg-color))] dark:border-accent/30`,children:[(0,o.jsx)(`span`,{"aria-hidden":!0,className:`pointer-events-none absolute top-0 inset-x-4 h-px bg-gradient-to-r from-transparent via-accent/60 to-transparent`}),i.a.map(e=>(0,o.jsx)(`button`,{type:`button`,onClick:()=>G(e.id),"aria-label":e.label,"aria-pressed":W===e.id,title:e.label,className:`w-8 h-8 rounded-full flex items-center justify-center cursor-pointer transition-colors ${W===e.id?`bg-foreground/[0.08]`:`hover:bg-foreground/5`}`,children:(0,o.jsx)(`span`,{className:`block ${e.id===`marker`?`w-5 h-2.5 rounded-sm`:`w-4 h-4 rounded-full`} border border-foreground/25 ring-2 ring-offset-2 ring-offset-background ${W===e.id?`ring-accent`:`ring-transparent`}`,style:{background:e.color,opacity:e.id===`marker`?.85:1}})},e.id)),(0,o.jsx)(`span`,{"aria-hidden":!0,className:`w-px h-5 bg-[var(--panel-border)] mx-1`}),(0,o.jsx)(`button`,{type:`button`,onClick:he,disabled:!pe,"aria-label":`Undo`,title:`Undo`,className:`${O} !h-8 !min-w-8 !rounded-full`,children:(0,o.jsx)(n.b,{className:`w-4 h-4`})}),(0,o.jsx)(`button`,{type:`button`,onClick:ge,disabled:!pe,"aria-label":`Clear the drawing`,title:`Clear the drawing`,className:`${O} !h-8 !min-w-8 !rounded-full hover:!text-red-500`,children:(0,o.jsx)(n.C,{className:`w-4 h-4`})}),(0,o.jsx)(`button`,{type:`button`,onClick:()=>se(!1),className:`btn-primary ml-1 h-8 px-3.5 rounded-full text-[12.5px] font-bold cursor-pointer`,children:`Done`})]})]})]})}function L(e){return(0,o.jsx)(I,{...e},e.src)}function R({open:e,onClose:n,...i}){return(0,a.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&!e.defaultPrevented&&n()};window.addEventListener(`keydown`,t);let r=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{window.removeEventListener(`keydown`,t),document.body.style.overflow=r}},[e,n]),typeof document>`u`?null:(0,s.createPortal)((0,o.jsx)(t.cr,{children:e&&i.src&&(0,o.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":i.name||r.o(i.src),className:`fixed inset-0 z-[9999] flex items-center justify-center p-2 sm:p-4 md:p-8`,children:[(0,o.jsx)(t.sr.div,{onClick:n,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`absolute inset-0 bg-background/80 backdrop-blur-xl cursor-pointer`}),(0,o.jsx)(t.sr.div,{initial:{opacity:0,scale:.97,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:8},transition:{duration:.18},className:`relative z-10 w-full max-w-6xl h-full max-h-[min(92vh,1000px)]`,children:(0,o.jsx)(L,{...i,onClose:n,height:`100%`})})]})}),document.body)}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return R}});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { sr as e } from "./TimeZoneField-DkI1Bkcz.js";
|
|
2
|
+
import { o as t, sn as n, wt as r } from "./lucide-react-CA7GD7Nv.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/FormNote.tsx
|
|
6
|
+
var o = {
|
|
7
|
+
error: {
|
|
8
|
+
Icon: t,
|
|
9
|
+
tint: "bg-red-500/12 text-red-500"
|
|
10
|
+
},
|
|
11
|
+
done: {
|
|
12
|
+
Icon: n,
|
|
13
|
+
tint: "bg-emerald-500/12 text-emerald-500"
|
|
14
|
+
},
|
|
15
|
+
note: {
|
|
16
|
+
Icon: r,
|
|
17
|
+
tint: "bg-amber-500/12 text-amber-600 dark:text-amber-400"
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
function s({ tone: t = "error", children: n, className: r = "" }) {
|
|
21
|
+
let { Icon: s, tint: c } = o[t];
|
|
22
|
+
return /* @__PURE__ */ a(e.div, {
|
|
23
|
+
role: t === "error" ? "alert" : "status",
|
|
24
|
+
initial: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
y: -4
|
|
27
|
+
},
|
|
28
|
+
animate: {
|
|
29
|
+
opacity: 1,
|
|
30
|
+
y: 0
|
|
31
|
+
},
|
|
32
|
+
transition: {
|
|
33
|
+
duration: .25,
|
|
34
|
+
ease: "easeOut"
|
|
35
|
+
},
|
|
36
|
+
className: `flex items-start gap-2.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.035] px-3.5 py-3 text-left ${r}`,
|
|
37
|
+
children: [/* @__PURE__ */ i("span", {
|
|
38
|
+
className: `mt-[1px] w-[18px] h-[18px] rounded-full flex items-center justify-center shrink-0 ${c}`,
|
|
39
|
+
children: /* @__PURE__ */ i(s, {
|
|
40
|
+
className: "w-[11px] h-[11px]",
|
|
41
|
+
strokeWidth: 3
|
|
42
|
+
})
|
|
43
|
+
}), /* @__PURE__ */ i("div", {
|
|
44
|
+
className: "min-w-0 text-[13px] sm:text-[13.5px] font-medium text-foreground/75 leading-[1.55] [&_a]:text-accent [&_a]:font-bold [&_a]:no-underline hover:[&_a]:underline",
|
|
45
|
+
children: n
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { s as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./chunk-CiTBaPhY.cjs`),t=require(`./TimeZoneField-qs7NPR30.cjs`),n=require(`./lucide-react-BwV6L6Is.cjs`);let r=require(`react`);r=e.a(r,1);let i=require(`react/jsx-runtime`);var a={error:{Icon:n.o,tint:`bg-red-500/12 text-red-500`},done:{Icon:n.sn,tint:`bg-emerald-500/12 text-emerald-500`},note:{Icon:n.wt,tint:`bg-amber-500/12 text-amber-600 dark:text-amber-400`}};function o({tone:e=`error`,children:n,className:r=``}){let{Icon:o,tint:s}=a[e];return(0,i.jsxs)(t.sr.div,{role:e===`error`?`alert`:`status`,initial:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.25,ease:`easeOut`},className:`flex items-start gap-2.5 rounded-2xl border border-[var(--panel-border)] bg-foreground/[0.035] px-3.5 py-3 text-left ${r}`,children:[(0,i.jsx)(`span`,{className:`mt-[1px] w-[18px] h-[18px] rounded-full flex items-center justify-center shrink-0 ${s}`,children:(0,i.jsx)(o,{className:`w-[11px] h-[11px]`,strokeWidth:3})}),(0,i.jsx)(`div`,{className:`min-w-0 text-[13px] sm:text-[13.5px] font-medium text-foreground/75 leading-[1.55] [&_a]:text-accent [&_a]:font-bold [&_a]:no-underline hover:[&_a]:underline`,children:n})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|