1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7648],{5588:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/orders",function(){return r(79892)}])},46907:(e,t,r)=>{"use strict";function s(e){if(!e)return"";let t=[];if(e.refundedCents>0&&t.push("refunds"),e.feesCents>0&&t.push("fees"),!t.length)return e.needFee>0?"fees not yet known":"net";let r=`net of ${t.join(" + ")}`;return e.needFee>0?`${r} (partial)`:r}function n(e,t){return e?e.todayFees>0?` \xb7 less ${t(e.todayFees)} fees`:e.needFee>0?" \xb7 fees not yet known":"":""}function i(e,t){if(!e)return"";let r=e.grossCents||0,s=e.feesCents||0;if(!r&&!s)return"";let n=[`Gross ${t(r)}`];return(e.refundedCents||0)>0&&n.push(`less ${t(e.refundedCents)} refunded`),s>0&&n.push(`less ${t(s)} fees`),n.join(" \xb7 ")}function a(e){if(!e)return"";let t=e.needFee||0;if(t<=0)return"";let r=e.withFee||0;return`fees known for ${r} of ${r+t} paid orders`}r.d(t,{Bh:()=>s,ST:()=>i,bb:()=>a,jS:()=>n})},63706:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var s=r(37876),n=r(46907);function i({stats:e,money:t,className:r=""}){let i=(0,n.ST)(e,t);if(!i)return null;let a=(0,n.bb)(e);return(0,s.jsxs)("div",{className:r,children:[(0,s.jsx)("p",{className:"text-[11px] text-center",children:i}),a&&(0,s.jsx)("p",{className:"text-[11px] text-center mt-0.5",children:a})]})}},72552:()=>{},72784:(e,t,r)=>{"use strict";var s=r(65364);r(72552);var n=r(14232),i=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(n),a=void 0!==s&&s.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},d=function(){function e(e){var t=void 0===e?{}:e,r=t.name,s=void 0===r?"stylesheet":r,n=t.optimizeForSpeed,i=void 0===n?a:n;l(o(s),"`name` must be a string"),this._name=s,this._deletedRulePlaceholder="#"+s+"-deleted-rule____{}",l("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var d=document.querySelector('meta[property="csp-nonce"]');this._nonce=d?d.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){l("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),l(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(l(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(l(o(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return a||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var s=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,s))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed){var r=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(s){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var s=this._tags[e];l(s,"old rule at index `"+e+"` not found"),s.textContent=t}return e},r.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];l(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEac
1h(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},r.cssRules=function(){var e=this;return this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&l(o(t),"makeStyleTag accepts only strings as second parameter");var s=document.createElement("style");this._nonce&&s.setAttribute("nonce",this._nonce),s.type="text/css",s.setAttribute("data-"+e,""),t&&s.appendChild(document.createTextNode(t));var n=document.head||document.getElementsByTagName("head")[0];return r?n.insertBefore(s,r):n.appendChild(s),s},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(e.prototype,t),e}();function l(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var r=String(t),s=e+r;return u[s]||(u[s]="jsx-"+c(e+"-"+r)),u[s]}function p(e,t){var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var f=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,s=void 0===r?null:r,n=t.optimizeForSpeed,i=void 0!==n&&n;this._sheet=s||new d({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),s&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),s=r.styleId,n=r.rules;if(s in this._instancesCounts){this._instancesCounts[s]+=1;return}var i=n.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[s]=i,this._instancesCounts[s]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var s=this._fromServer&&this._fromServer[r];s?(s.parentNode.removeChild(s),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],s=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:s}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,s=e.id;if(r){var n=h(s,r);return{styleId:n,rules:Array.isArray(t)?t.map(function(e){return p(n,e)}):[p(n,t)]}}return{styleId:h(s),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=n.createContext(null);m.displayName="StyleSheetContext";var x=i.default.useInsertionEffect||i.default.useLayoutEffect,y=new f;function g(e){var t=y||n.useContext(m);return t&&x(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}g.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=g},75961:(e,t,r)=>{"use strict";e.exports=r(72784).style},79892:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var s=r(37876),n=r(14232),i=r(90030),a=r(63706);let o=e=>e>0?`$${(e/100).toFixed(2)}`:"Free",d=e=>`$${((e||0)/100).toFixed(2)}`,l={active:{label:"Active",cls:"bg-green-50 dark:bg-green-400/10 text-[#2e9664]"},refunded:{label:"Refunded",cls:"bg-amber-50 dark:bg-amber-400/10 text-amber-700"},void:{label:"Void",cls:"bg-gray-100 dark:bg-white/10 text-gray-500"}};function c(){let{isAdmin:e}
1=(0,i.It)(),[t,r]=(0,n.useState)([]),[c,u]=(0,n.useState)(null),[h,p]=(0,n.useState)([]),[f,m]=(0,n.useState)(""),[x,y]=(0,n.useState)(""),[g,_]=(0,n.useState)(!0),[v,b]=(0,n.useState)(""),[S,w]=(0,n.useState)("");function j(){_(!0);let e=new URLSearchParams;f&&e.set("eventId",f),x.trim()&&e.set("q",x.trim()),fetch(`/api/admin/orders?${e}`).then(e=>e.json()).then(e=>{r(e.orders||[]),u(e.stats||null),_(!1)}).catch(()=>_(!1))}async function k(e,t,r){if(!r||confirm(r)){b(t+e),w("");try{let r=await fetch("/api/admin/orders",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,code:t})}),s=await r.json().catch(()=>({}));if(!r.ok)throw Error(s.error||"Action failed");if("resend"===e){let e=s.attached?" (with Apple Wallet pass)":s.appleConfigured?" â but the Apple Wallet pass failed to generate (check certs)":" â no wallet pass attached (Apple Wallet not configured)";w(`Ticket email re-sent to ${s.to}${e}.`)}else w("refund"===e?"Refunded.":"void"===e?"Voided.":"Updated.");j()}catch(e){w(e.message)}finally{b("")}}}return(0,n.useEffect)(()=>{fetch("/api/admin/orders?events=1").then(e=>e.json()).then(e=>p(e.events||[])).catch(()=>{})},[]),(0,n.useEffect)(()=>{let e=setTimeout(j,250);return()=>clearTimeout(e)},[f,x]),(0,s.jsx)(i.Ay,{title:"Orders",children:(0,s.jsxs)("div",{className:"max-w-6xl space-y-4",children:[(0,s.jsx)("p",{className:"text-gray-500 dark:text-white/60 text-sm",children:"Ticket orders â refund, resend the ticket email, or void a ticket. Search by name, email, or order number."}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,s.jsxs)("select",{value:f,onChange:e=>m(e.target.value),className:"border border-gray-200 dark:border-white/10 rounded-xl px-3 py-2.5 text-sm bg-white dark:bg-white/4 dark:text-white sm:w-1/2",children:[(0,s.jsx)("option",{value:"",children:"All events"}),h.filter(e=>!e.archived).map(e=>(0,s.jsxs)("option",{value:e.id,children:[e.title,e.date?` \xb7 ${e.date}`:""]},e.id)),h.some(e=>e.archived)&&(0,s.jsx)("optgroup",{label:"Archived (past)",children:h.filter(e=>e.archived).map(e=>(0,s.jsxs)("option",{value:e.id,children:[e.title,e.date?` \xb7 ${e.date}`:""]},e.id))})]}),(0,s.jsx)("input",{value:x,onChange:e=>y(e.target.value),placeholder:"Search name, email, order #â¦",className:"flex-1 border border-gray-200 dark:border-white/10 rounded-xl px-4 py-2.5 text-sm dark:text-white dark:placeholder-white/30"})]}
1),c&&(0,s.jsxs)("div",{className:"bg-white dark:bg-white/4 rounded-2xl border border-gray-100 dark:border-white/10 shadow-xs p-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 text-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-2xl font-extrabold text-gray-900 dark:text-white",children:c.ticketsSold}),(0,s.jsx)("p",{className:"text-gray-500 dark:text-white/60 text-[11px] font-semibold uppercase tracking-wide",children:"Tickets sold"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-2xl font-extrabold text-[#2e9664]",children:c.checkedIn}),(0,s.jsx)("p",{className:"text-gray-500 dark:text-white/60 text-[11px] font-semibold uppercase tracking-wide",children:"Checked in"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-2xl font-extrabold text-[#0F2044] dark:text-white",children:d(c.netAfterFeesCents)}),(0,s.jsx)("p",{className:"text-gray-500 dark:text-white/60 text-[11px] font-semibold uppercase tracking-wide",children:"Net after fees"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-2xl font-extrabold text-gray-900 dark:text-white",children:c.orders}),(0,s.jsx)("p",{className:"text-gray-500 dark:text-white/60 text-[11px] font-semibold uppercase tracking-wide",children:"Orders"})]})]}),(0,s.jsx)(a.A,{stats:c,money:d,className:"text-gray-400 dark:text-white/40 mt-2"}),c.waitlist>0&&(0,s.jsxs)("p",{className:"text-amber-600 text-[11px] font-bold text-center mt-2",children:[c.waitlist," on the waitlist â voiding/refunding a ticket or raising capacity notifies them automatically."]})]}),S&&(0,s.jsx)("p",{className:"text-sm text-gray-600 dark:text-white/60",children:S}),g?(0,s.jsx)("p",{className:"text-gray-400 dark:text-white/40 text-sm text-center py-10",children:"Loadingâ¦"}):0===t.length?(0,s.jsx)("p",{className:"text-gray-400 dark:text-white/40 text-sm text-center py-10",children:"No orders found."}):(0,s.jsx)("div",{className:"space-y-2",children:t.map(t=>{let r,n=l[t.status]||{label:t.status,cls:"bg-gray-100 text-gray-500"},i=t.amount_cents>0&&t.payment_intent;return(0,s.jsxs)("div",{className:"bg-white dark:bg-white/4 roun
1ded-2xl border border-gray-100 dark:border-white/10 shadow-xs p-4",children:[(0,s.jsx)("div",{className:"flex items-start justify-between gap-3",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("p",{className:"font-bold text-gray-900 dark:text-white",children:[t.holder_name||"â"," ",(0,s.jsx)("span",{className:`text-[10px] font-bold rounded-full px-2 py-0.5 ml-1 ${n.cls}`,children:n.label})]}),(0,s.jsxs)("p",{className:"text-gray-500 dark:text-white/60 text-xs mt-0.5",children:[t.holder_email||"no email"," \xb7 ",t.event_label]}),(0,s.jsxs)("p",{className:"text-gray-400 dark:text-white/40 text-[11px] mt-0.5",children:["Admits ",t.quantity," \xb7 ",t.checked_in," in \xb7 ",o(t.amount_cents)," \xb7 ",(0,s.jsxs)("span",{className:"font-mono",children:["#",t.code]})]}),t.created_at&&(0,s.jsxs)("p",{className:"text-gray-400 dark:text-white/40 text-[11px] mt-0.5",children:["Purchased ",(r=t.created_at)?new Date(r).toLocaleString("en-US",{timeZone:"America/New_York",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})+" ET":""]})]})}),e&&(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 mt-3",children:[(0,s.jsx)("button",{onClick:()=>k("resend",t.code),disabled:!t.holder_email||v===t.code+"resend",className:"border border-gray-200 dark:border-white/10 text-gray-800 dark:text-white text-xs font-bold rounded-lg px-3 py-1.5 disabled:opacity-40",children:v===t.code+"resend"?"Sendingâ¦":"Resend email"}),i&&"active"===t.status&&(0,s.jsx)("button",{onClick:()=>k("refund",t.code,`Refund ${o(t.amount_cents)} to ${t.holder_name||t.holder_email}? This also voids the ticket.`),disabled:v===t.code+"refund",className:"border border-amber-200 text-amber-700 text-xs font-bold rounded-lg px-3 py-1.5 disabled:opacity-40",children:v===t.code+"refund"?"Refundingâ¦":"Refund"}),"active"===t.status?i?(0,s.jsx)("span",{className:"text-gray-400 dark:text-white/40 text-[11px] font-semibold self-center",children:"Paid â refund to cancel"}):(0,s.jsx)("button",{onClick:()=>k("void",t.code,"Void this ticket? It will no longer scan at the door."),disabled:v===t.code+"void",className:"border border-red-200 text-red-600 text-xs font-bold rounded-lg px-3 py-1.5 disabled:opacity-40",children:"Void"}):"void"===t.status&&(0,s.jsx)("button",{onClick:()=>k("reactivate",t.code),disabled:v===t.code+"reactivate",className:"border border-gray-200 dark:border-white/10 text-gray-700 dark:text-white/60 text-xs font-bold rounded-lg px-3 py-1.5 disabled:opacity-40",children:"Reactivate"})]})]},t.id)})})]})})}}},e=>{e.O(0,[8230,6475,30,636,6593,8792],()=>e(e.s=5588)),_N_E=e.O()}]);
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.