PageSourceSearch

https://ticketsmart.ai/_next/static/chunks/11179.40c8993d38255274.js

js ticketsmart.ai collected 2026-10-05 12:46:20 UTC 6,715 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6811f42a-53d0-413c-9e46-e98ece139d1a",e._sentryDebugIdIdentifier="sentry-dbid-6811f42a-53d0-413c-9e46-e98ece139d1a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11179],{11179:(e,t,r)=>{r.r(t),r.d(t,{QrScanner:()=>d});var n=r(95155),c=r(12115);let a=(0,r(90425).A)("camera-off",[["path",{d:"M14.564 14.558a3 3 0 1 1-4.122-4.121",key:"1rnrzw"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175",key:"1x3arw"}],["path",{d:"M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344",key:"1i84u0"}]]);var s=r(78697),u=r(50910);function l(e){return!!e&&"object"==typeof e&&"kind"in e}function i(e){return e.current+=1,e.current}function o(e,t){return e.current===t}function d({onScan:e,onScanTimeout:t,onScannerStopReady:f,disabled:m=!1}){let h=(0,u.c)("dashboard"),[y,x]=(0,c.useState)(!1),[g,b]=(0,c.useState)(!1),[p,v]=(0,c.useState)(""),w=(0,c.useRef)(null),k=(0,c.useRef)({recentScans:new Map,retryAfter:new Map,scanInFlight:!1}),j=(0,c.useRef)(null),I=(0,c.useRef)({current:0}),A=(0,c.useRef)(!1),N=(0,c.useRef)(m),S=(0,c.useRef)(e),C=(0,c.useRef)(t),R=(0,c.useRef)(async()=>{}),F=(0,c.useRef)(!1),_=(0,c.useId)();N.current=m,S.current=e,C.current=t;let D=(0,c.useCallback)(e=>{if(N.current)return;let t=Date.now(),r=e.trim(),n=r.match(/\/tickets\/(TS-[A-Z0-9]+-[A-Z0-9]+)/i),c=r.match(/\bTS-[A-Z0-9]+-[A-Z0-9]+\b/i),a=(n?.[1]||c?.[0]||r).toUpperCase();if(!a)return;let s=null,u=null,i=I.current.current;(s=function({state:e,ticketNumber:t,now:r,timeoutMs:n=8e3,onScan:c,onRecovery:a,onTimeout:s,onSettled:u}){if(!(!e.scanInFlight&&function(e,t,r){for(let[t,n]of e.retryAfter)r>=n&&e.retryAfter.delete(t);if(e.retryAfter.has(t))return!1;for(let[t,n]of e.recentScans)r-n>=1500&&e.recentScans.delete(t);let n=e.recentScans.get(t);return(void 0===n||!(r-n<1500))&&(e.recentScans.set(t,r),!0)}(e,t,r))||(e.scanInFlight=!0,0))return null;let i=new AbortController,o=!1,d=!1,f=null,m=n=>{if(!o){var c;o=!0,f&&clearTimeout(f),"failed"===n&&(c=Date.now(),e.recentScans.get(t)===r&&(e.recentScans.delete(t),e.retryAfter.set(t,c+300))),e.scanInFlight=!1,u?.()}},h=e=>{let t;if(!o&&!d){d=!0,i.abort(e);try{t=a?.()??s?.()}catch{t=void 0}Promise.resolve(t).then(()=>m("cancelled"),()=>m("cancelled"))}};f=setTimeout(()=>{h("timeout")},n);try{Promise.resolve(c(i.signal)).then(e=>{i.signal.aborted||(!1===e||l(e)&&"retry"===e.kind?m("failed"):l(e)&&"ambiguous"===e.kind?h("ambiguous"):m("success"))},()=>{i.signal.aborted||h("ambiguous")})}catch{h("ambiguous")}return{cancel:(e=!0)=>{e?h("cancelled"):(i.abort("cancelled"),m("cancelled"))}}}({state:k.current,ticketNumber:a,now:t,onScan:e=>S.current(r,e,e=>{u=e}),onRecovery:async()=>{null!==u&&await C.current(u),o(I.current,i)&&await R.current(!1)},onSettled:()=>{j.current===s&&(j.current=null)}}))&&k.current.scanInFlight&&(j.current=s)},[]),E=(0,c.useCallback)(async()=>{var e,t,n,c,a,s,u,l,d,f,y,p;if(w.current||g||m)return;let k=i(I.current);A.current=!0,v(""),b(!0);let j=null;try{let{Html5Qrcode:i}=await Promise.all([r.e(75604),r.e(21935)]).then(r.bind(r,21935));if(e=I.current,t=A.current,n=F.current,!(t&&n&&o(e,k)))return;if(w.current=j=new i(_),await j.start({facingMode:"environment"},{fps:10},e=>{var t,r,n,c;t=I.current,r=A.current,n=F.current,c=w.current===j,!N.current&&c&&r&&n&&o(t,k)&&D(e)},()=>{}),w.current!==j||(c=I.current,a=A.current,s=F.current,!(a&&s&&o(c,k)))){w.current===j&&(w.current=null);try{await j.stop()}catch{}try{j.clear()}catch{}return}u=I.current,l=A.current,d=F.current,l&&d&&o(u,k)&&x(!0)}catch(t){if(w.current===j&&(w.current=null),j)try{j.clear()}catch{}let e=t instanceof Error?t.message:"";f=I.current,y=A.current,p=F.current,y&&p&&o(f,k)&&v(e.includes("Permission")?h("checkIn.scanner.permissionDenied"):h("checkIn.scanner.startFailed"))}finally{F.current&&o(I.current,k)&&b(!1)}},[D,_,g]),M=(0,c.useCallback)(async(e=!0,t=!0)=>{e&&(A.current=!1,i(I.current),j.current?.cancel(t),j.current=null);let r=w.current;w.current=null;try{r&&await r.stop()}catch{}try{r?.clear()}catch{}F.current&&(x(!1),b(!1))},[]);return(0,c.useEffect)(()=>{R.current=M},[M]),(0,c.useEffect)(()=>{f?.(()=>M())},[f,M]),(0,c.useEffect)(()=>(F.current=!0,()=>{F.current=!1,M(!0,!1)}),[M]),(0,n.jsxs)("div",{className:"section-shell p-5",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:h("checkIn.scanner.eyebrow")}),(0,n.jsx)("h2",{className:"mt-1 text-2xl font-semibold",children:h("checkIn.scanner.title")})]}),(0,n.jsx)("button",{type:"button",onClick:()=>{y||g?M():E()},disabled:!y&&!g&&m,className:`flex items-center gap-2 rounded-lg px-4 py-2 text-xs font-semibold ${y?"bg-destructive/10 text-destructive hover:bg-destructive/20":"bg-primary text-primary-foreground hover:bg-primary-hover transition-colors"}`,children:y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a,{className:"h-3.5 w-3.5"})," ",h("checkIn.scanner.stopCamera")]}):g?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a,{className:"h-3.5 w-3.5"})," ",h("checkIn.scanner.startingCamera")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.A,{className:"h-3.5 w-3.5"})," ",h("checkIn.scanner.startCamera")]})})]}),p&&(0,n.jsx)("p",{className:"mt-3 text-sm text-destructive",children:p}),(0,n.jsxs)("div",{className:`relative mt-4 overflow-hidden rounded-lg ${y?"":"bg-muted/70"}`,children:[(0,n.jsx)("div",{id:_,className:"min-h-56 w-full"}),!y&&!g&&(0,n.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center text-sm text-muted-foreground",children:[(0,n.jsx)(s.A,{className:"mx-auto h-8 w-8 op
1acity-50"}),(0,n.jsx)("p",{className:"mt-2",children:h("checkIn.scanner.emptyState")})]}),g&&(0,n.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-center text-sm text-muted-foreground",children:[(0,n.jsx)(a,{className:"mx-auto h-8 w-8 animate-pulse opacity-50"}),(0,n.jsx)("p",{className:"mt-2",children:h("checkIn.scanner.startingCamera")})]})]})]})}},78697:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(90425).A)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])}}]);

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.