PageSourceSearch

https://edgemxtiming.com/assets/OrgKioskWorkspace-rzHzV4j6.js

js edgemxtiming.com collected 2026-09-24 14:43:41 UTC 14,654 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BCH4IFx8.js","assets/index-0Cwll2Tp.css"])))=>i.map(i=>d[i]);
2import{E as ue,i as he,h as fe,bh as ge,r as s,a1 as T,j as e,B as v,a4 as xe,J as ve,W as ke,G as be,F as Se}from"./index-BCH4IFx8.js";import{C as we,a as Ne,b as je}from"./collapsible-xcd2iWHA.js";import{K as ye,b as Ee,c as _e,d as Ce,e as Ie,f as Pe,g as Re,h as Le,a as We}from"./KioskCheckoutProcessing-wz6VqwAu.js";import{e as ze,K as Q}from"./KioskAdapterContext-CQ7aRBR0.js";import{M as Ke}from"./monitor-MHmyhpPu.js";import{M as Me}from"./minimize-7UgKNdFY.js";import{M as $e}from"./maximize-Drdx8_u2.js";import{U as Oe}from"./user-plus-Czkg6EX3.js";import{A as qe}from"./arrow-left-CX5CfIFs.js";import{H as Ae}from"./history-Bo2cYU1t.js";import"./index-DKPz-1vL.js";import"./BpSpinner-Bqvfph1h.js";import"./scroll-area-hNK22iDX.js";import"./useRidersForOrg-Dz50QkTj.js";import"./useTimingEnabled-jfD7nqrK.js";import"./barcode-scanner-button-BK1woQQZ.js";import"./camera-DhQTGO9F.js";import"./signupLabel-CoOzVGDj.js";import"./selectedRoundsFromResponses-CREygxYZ.js";import"./searchTokens-CTUj4aZL.js";import"./nicknameVariants-CT_QG-k6.js";import"./search-GvbQAZxx.js";import"./circle-x-CCb710d9.js";import"./user-check-DJgc59q-.js";import"./clock-DEKHqbRJ.js";import"./checkbox-D7mWENF4.js";import"./card-DaE3Hwfn.js";import"./tabs-eUqQwHgv.js";import"./separator-BJTOU-8g.js";import"./useSaveRider-Bnhoxod6.js";import"./AssignCouponPackDialog-ChWPtPBI.js";import"./useSeriesNames-DWxLNrfK.js";import"./useTimingClassesForOrg-CU6BNWOr.js";import"./useBikeMakeLogos-B-qqkSzN.js";import"./BikeMakeChip-DYEJrZnJ.js";import"./bikeMakeStyle-RND07Se0.js";import"./textarea-C9Po2OuC.js";import"./radio-group-CA2dgSse.js";import"./external-link-C5SQDLFH.js";import"./triangle-alert-m5K6MENR.js";import"./credit-card-DWFX6dPl.js";import"./banknote-CPxVp1Z4.js";import"./alert-dialog-CJdQZTQ5.js";import"./layers-CuqFRUiS.js";import"./calendar-BcfRHKCP.js";import"./trash-2-CrxPrdNf.js";import"./plus-BhX-wvbj.js";import"./circle-alert-BU1rIcjn.js";import"./save-C6KbuPF0.js";import"./package-DNqMdpAz.js";import"./circle-check-big-C6zQJrMP.js";import"./popover-BVAS7-gK.js";import"./accordion-BhWFpyA1.js";import"./useBikeMakes-BpqgI2R0.js";import"./DynamicFormField-DGTEpORF.js";import"./phone-input-CqSS1MA6.js";import"./phone-Ltld9YKt.js";import"./sanitized-html-DPAQvfI8.js";import"./purify.es-C5KSVp3G.js";import"./calendar-B9rBEyrA.js";import"./format-ybceeo2k.js";import"./en-US-CGO0aXMi.js";import"./startOfMonth-B1VOnNUT.js";import"./endOfMonth--R-WtYph.js";import"./differenceInCalendarMonths-D2gXU8RP.js";import"./chevron-left-BfsUvDbz.js";import"./SignatureCanvas-ufOzCVFd.js";import"./eraser-BjlB-yev.js";import"./BikeMakeBadge-ogaJPLaU.js";import"./useClassTierPricing-C18zMvw6.js";import"./use-mobile-UoW3qA0a.js";import"./calendar-days-YI2yIyuJ.js";import"./circle-help-h2AkoHBZ.js";import"./ImageLightbox-ey1BtFuB.js";import"./SocialShareButtons-UkiY_bNb.js";import"./share-2-BRqKvXQJ.js";import"./copy-CIGjrFWu.js";import"./EnduranceEntryField-Bi_0cumQ.js";import"./teams-Dc2EtOTA.js";import"./inline-rich-text-editor-DJmEa-L9.js";import"./index-CNSwMYTP.js";import"./index-7Wu8hD2L.js";import"./index-Dh4i1-J3.js";import"./underline-BSHnBAnM.js";import"./list-ordered-DMG1_MP3.js";import"./link-CRYWBnin.js";import"./unlink-bKKG2pa6.js";import"./users-Cp35uMGZ.js";import"./sanitizeUrl-CAP9M8eB.js";import"./formImageStyles-BX6ecPWb.js";import"./image-CG8pJg5g.js";import"./minus-DdEXcKKQ.js";import"./upload-DCg56Dks.js";import"./mail-a7kSoD61.js";import"./phone-BoQi_8-c.js";import"./map-pin-Eqsqtagn.js";import"./star-CILQxhrW.js";import"./heart-DlsJc9lx.js";import"./share-DEkuJuTQ.js";import"./play-CSYR7nMW.js";import"./info-D-iSIGln.js";import"./trash-DEmd3ohH.js";import"./video-p_tYJZV_.js";import"./house-c8G1GW9E.js";import"./settings-BTLJRKc5.js";import"./square-pen-DGpFzMTR.js";import"./globe-U-LYO4AP.js";import"./shopping-cart-B70C3eZm.js";import"./gift-D6KMZtGY.js";import"./tag-Mk6oilZH.js";import"./trophy-vILI8AG3.js";import"./flag-CvB2R2ls.js";import"./bike-Dps5BhUi.js";import"./useUnifiedEditorFlag-BoGgea6M.js";import"./useRiderDatabaseLookup-Ck207LjN.js";import"./RegistrationActivityTimeline-B-ZqzB5E.js";import"./useRegistrationActivity-DhO0_06V.js";import"./file-text-BuQtBEyd.js";import"./pen-DnmiT5dx.js";import"./refresh-cw-Bp2bbqxH.js";import"./useRegistrationTransactions-wyCgzRNM.js";import"./table-BgVITkDQ.js";import"./shopping-bag-Dkab3ewO.js";import"./useEditableEventClasses-E56e_mV1.js";import"./reconstructLineItems-CaO-q4lF.js";import"./user-cog-BIIJsLPt.js";import"./RiderTransponderManager-CfuZ6Aes.js";import"./radio-DbgeS3_C.js";import"./user-x-BBDJccig.js";import"./link-2-BbA-YcEU.js";import"./dollar-sign-DZ3kPgTb.js";import"./kioskReturn-BDgNN9U0.js";import"./kioskCashContext-C5rYJs9s.js";import"./RegistrationClosedMessage-qwyFFN8q.js";import"./calendar-check-D98g4nlx.js";import"./key-round-DESqIiUD.js";import"./CheckoutProcessing-Cn-coUub.js";import"./progress-CL2A5cKM.js";import"./file-check-Dv96N6dK.js";
2const kr=()=>{var F,B;const{orgSlug:n}=ue(),k=he(),[p,d]=fe(),{setOrganizationFromSlug:P}=ge();s.useEffect(()=>{n&&P(n)},[n,P]);const[R,L]=s.useState(null);s.useEffect(()=>{const t=p.get("registered"),r=p.get("cancelled"),i=p.get("edited");t?(L(t),d({},{replace:!0})):i?(T(async()=>{const{toast:l}=await import("./index-BCH4IFx8.js").then(c=>c.bq);return{toast:l}},__vite__mapDeps([0,1])).then(({toast:l})=>{l({title:"Payment received",description:`Changes saved for ${i}.`})}),d({},{replace:!0})):r&&(T(async()=>{const{toast:l}=await import("./index-BCH4IFx8.js").then(c=>c.bq);return{toast:l}},__vite__mapDeps([0,1])).then(({toast:l})=>{l({title:"Payment Cancelled",description:"The Stripe payment was cancelled. The registration is still pending.",variant:"destructive"})}),d({},{replace:!0}))},[p,d]);const[a,V]=s.useState(null),[o,f]=s.useState(null),[W,g]=s.useState(null),[z,H]=s.useState(!1),[K,b]=s.useState(!1),[G,Ue]=s.useState(0),[M,N]=s.useState(!1),[u,$]=s.useState(null),J=s.useCallback(t=>{f(t),g(null),b(!1)},[]),X=s.useCallback(t=>{g(t),f(null),b(!1)},[]),Y=s.useCallback(t=>{f(r=>r?{...r,...t}:t)},[]);s.useEffect(()=>{document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light")},[]);const[O,Z]=s.useState(!1);s.useEffect(()=>{const t=()=>Z(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[]);const ee=s.useCallback(()=>{var t,r,i;document.fullscreenElement?(i=document.exitFullscreen)==null||i.call(document).catch(()=>{}):(r=(t=document.documentElement).requestFullscreen)==null||r.call(t).catch(()=>{})},[]);s.useEffect(()=>{n&&localStorage.setItem("kiosk_pwa_org",n)},[n]),s.useEffect(()=>{var i;const t=(i=a==null?void 0:a.organization)==null?void 0:i.favicon_url;if(!t)return;const r=l=>{let c=document.querySelector(`link[rel="${l}"]`);return c||(c=document.createElement("link"),c.rel=l,document.head.appendChild(c)),c.href=t,c};r("icon"),r("shortcut icon"),r("apple-touch-icon")},[(F=a==null?void 0:a.organization)==null?void 0:F.favicon_url,(B=a==null?void 0:a.organization)==null?void 0:B.logo_url]);const[x,E]=s.useState(null),[te,_]=s.useState(!1),[q,se]=s.useState([]),m=s.useCallback(t=>{const r=`[${new Date().toISOString()}] ${t}`;console.log("[PWA-DEBUG]",t),se(i=>[...i.slice(-19),r])},[]);s.useEffect(()=>{const t=window.matchMedia("(display-mode: standalone)").matches;m(`standalone=${t}
2, ua=${navigator.userAgent.slice(0,80)}`);const r=document.querySelector('link[rel="manifest"]');if(m(`manifest href: ${(r==null?void 0:r.getAttribute("href"))||"NONE"}`),"serviceWorker"in navigator?navigator.serviceWorker.getRegistrations().then(h=>{m(`SW count: ${h.length}`),h.forEach(w=>m(`  scope=${w.scope} active=${!!w.active}`))}):m("serviceWorker NOT supported"),t){_(!0);return}const i=h=>{h.preventDefault(),m("beforeinstallprompt FIRED"),E(h)};window.addEventListener("beforeinstallprompt",i);const l=()=>{m("appinstalled FIRED"),_(!0),E(null)};window.addEventListener("appinstalled",l);const c=setTimeout(()=>{m("beforeinstallprompt NOT fired after 5s")},5e3);return()=>{clearTimeout(c),window.removeEventListener("beforeinstallprompt",i),window.removeEventListener("appinstalled",l)}},[m]);const re=s.useCallback(async()=>{if(!x){m("Install clicked but NO prompt available");return}n&&localStorage.setItem("kiosk_pwa_org",n),m("Calling prompt()..."),x.prompt();const t=await x.userChoice;m(`userChoice outcome: ${t.outcome}`),t.outcome==="accepted"&&_(!0),E(null)},[x,m,n]);s.useEffect(()=>{var r;const t=sessionStorage.getItem("kiosk_session");if(!t){k(`/org/${n}/kiosk`,{replace:!0});return}try{const i=JSON.parse(t);if(((r=i.organization)==null?void 0:r.slug)!==n){k(`/org/${n}/kiosk`,{replace:!0});return}V(i)}catch{k(`/org/${n}/kiosk`,{replace:!0})}},[n,k]);const C=s.useMemo(()=>a?ze(a.organization.id,a.kiosk_user.id):null,[a]),j=(o==null?void 0:o.event_id)||"",S=(o==null?void 0:o.event)||{},oe=o==null?void 0:o._seriesMysqlName,ie=Number((o==null?void 0:o._seriesChildCount)||0),A=o==null?void 0:o._signupVariant,U=!!S.mysql_series_name&&ie>0&&(A==="series"||A==="multi"),ae=U?void 0:S.mysql_event_name||S.name||void 0,ne=U&&(oe||S.mysql_series_name||S.series_name)||void 0,y=()=>{f(null),g(null),b(!1),N(!1),$(null)},I=s.useCallback((t,r,i)=>{$({userId:t,familyMemberId:r,organizationId:i}),f(null),g(null),b(!1)},[]),[le,me]=s.useState(void 0);s.useEffect(()=>{const t=p.get("bp");t&&(me(t),d(r=>{const i=new URLSearchParams(r);return i.delete("bp"),i},{replace:!0}))},[p,d]),s.useEffect(()=>{const t=p.get("wallet");if(t&&!u){const r=t.split(":");if(r.length===3){const[i,l,c]=r;I(i,l==="none"?null:l,c),d(h=>{const w=new URLSearchParams(h);return w.delete("wallet"),w},{replace:!0})}}},[p,u,I,d]);const ce=()=>{sessionStorage.removeItem("kiosk_session"),k(`/org/${n}/kiosk`,{replace:!0})},D=o||W||K||M||u;if(!a||!C)return null;if(R)return e.jsx(Q,{adapter:C,children:e.jsx("div",{className:"h-screen flex flex-col bg-background text-foreground",children:e.jsx(ye,{confirmationNumber:R,onComplete:()=>{L(null),y()}})})});const pe=e.jsxs("div",{className:"h-screen flex flex-col bg-background text-foreground overflow-hidden",children:[e.jsxs("header",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between px-3 sm:px-6 py-2 sm:py-3 border-b border-border bg-card shrink-0 gap-2 sm:gap-0",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-4",children:[e.jsx(Ke,{className:"h-5 w-5 text-primary shrink-0"}),e.jsx("h1",{className:"font-display text-lg sm:text-2xl text-foreground tracking-wider",children:"KIOSK"}),e.jsxs("span",{className:"text-xs sm:text-sm text-muted-foreground",children:["— ",a.organization.name]})]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[j&&e.jsx(Ee,{eventId:j}),e.jsx("span",{className:"text-xs text-muted-foreground hidden md:inline",children:a.kiosk_user.display_name}),!te&&e.jsxs(v,{variant:"ghost",size:"sm",onClick:x?re:()=>m("No install prompt captured yet"),className:"h-8 gap-1",title:"Install as app",children:[e.jsx(xe,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:x?"Install":"Install (waiting…)"})]}),q.length>0&&e.jsx(v,{variant:"ghost",size:"sm",onClick:()=>{var r;const t=q.join(`
3`);(r=navigator.clipboard)==null||r.writeText(t).then(()=>m("Copied to clipboard")),alert(t)},className:"h-8 text-xs",title:"Show PWA debug log",children:"🐛"}),e.jsx(v,{variant:"ghost",size:"icon",onClick:ee,className:"h-8 w-8",title:O?"Exit fullscreen":"Fullscreen",children:O?e.jsx(Me,{className:"h-4 w-4"}):e.jsx($e,{className:"h-4 w-4"})}),e.jsxs(v,{variant:"ghost",size:"sm",onClick:ce,className:"h-8 gap-1",children:[e.jsx(ve,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Sign Out"})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col lg:flex-row overflow-hidden",children:[e.jsxs("div",{className:`${D?"hidden lg:flex lg:w-1/3 lg:border-r lg:border-border":"flex w-full"} p-3 sm:p-6 flex-col transition-all shrink-0 h-full min-h-0 overflow-hidden`,children:[e.jsxs(v,{variant:"outline",className:"mb-3 sm:mb-4 h-10 sm:h-12 text-sm sm:text-base border-dashed border-2",onClick:()=>{b(!0),f(null),g(null)},children:[e.jsx(Oe,{className:"h-4 w-4 sm:h-5 sm:w-5 mr-2"}),"New Walk-Up Registration"]}),e.jsx(_e,{organizationId:a.organization.id,onSelectRegistration:J,onSelectMySQLRider:X,onWalletQRScan:I,resetKey:G,initialSearch:le})]}),D&&e.jsxs("div",{className:"flex-1 flex flex-col overflow-auto",children:[e.jsx("div",{className:"lg:hidden flex items-center gap-2 px-3 py-2 border-b border-border bg-card/50 shrink-0",children:e.jsxs(v,{variant:"ghost",size:"sm",onClick:y,className:"gap-1",children:[e.jsx(qe,{className:"h-4 w-4"}),"Back to Search"]})}),e.jsx("div",{className:"flex-1 p-3 sm:p-6 overflow-auto",children:K?e.jsx(Ce,{orgSlug:n,organizationId:a.organization.id,returnPath:`/org/${n}/kiosk/workspace`,onCancel:y}):M&&o?e.jsx(Ie,{eventId:o._formEventId||o.event_id,registration:{...o,id:o._formRegistrationId||o.id,event_id:o._formEventId||o.event_id},onBack:()=>N(!1),onRegistrationUpdated:Y,onComplete:()=>{N(!1)}}
3):u?e.jsxs("div",{className:"max-w-md mx-auto space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(ke,{className:"h-5 w-5 text-primary"}),e.jsx("h2",{className:"text-lg font-semibold",children:"Wallet Redemption"})]}),e.jsx(Pe,{userId:u.userId,organizationId:u.organizationId,familyMemberId:u.familyMemberId||void 0,riderName:"Scanned Rider",onRedeemed:()=>{}})]}):e.jsx(Re,{eventId:(o==null?void 0:o.event_id)||"",registration:o,mysqlRider:W,onBack:y,mysqlEventName:ae,mysqlSeriesName:ne,onEditRegistration:o?()=>N(!0):void 0,standaloneSession:a,onRiderSaved:t=>g(t)})})]})]}),j&&e.jsxs(we,{open:z,onOpenChange:H,className:"border-t border-border bg-card shrink-0",children:[e.jsx(Ne,{asChild:!0,children:e.jsxs("button",{className:"w-full flex items-center justify-between px-3 sm:px-6 py-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-4 w-4"}),"Activity Log"]}),z?e.jsx(be,{className:"h-4 w-4"}):e.jsx(Se,{className:"h-4 w-4"})]})}),e.jsx(je,{className:"px-3 sm:px-6 pb-4",children:e.jsx(Le,{eventId:j})})]})]}),de={displayName:a.kiosk_user.display_name,operatorId:a.kiosk_user.id,source:"pos"};return e.jsx(Q,{adapter:C,children:e.jsx(We,{operator:de,children:pe})})};export{kr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.