@voxket-ai/events-sdk 1.0.38 → 1.0.39
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/events-sdk.js +2 -2
- package/dist/events-sdk.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/events-sdk.js
CHANGED
|
@@ -2027,7 +2027,7 @@ var Ct = {
|
|
|
2027
2027
|
children: [s && /* @__PURE__ */ p("span", {
|
|
2028
2028
|
className: "text-[13px] font-bold tabular-nums",
|
|
2029
2029
|
style: { color: R },
|
|
2030
|
-
children: n ? "Included" : c > 0 ? `+ ${X(c)}` : "
|
|
2030
|
+
children: n ? "Included" : c > 0 ? `+ ${X(c)}` : "Included"
|
|
2031
2031
|
}), (r > 0 || i > 0) && /* @__PURE__ */ p("span", {
|
|
2032
2032
|
className: `text-[11px] font-semibold px-2 py-0.5 rounded-full ${a ? "bg-amber-100 text-amber-700" : i > 0 ? _ ? "bg-emerald-950/60 text-emerald-300" : "bg-emerald-50 text-emerald-700" : _ ? "bg-zinc-800 text-zinc-300" : "bg-slate-100 text-slate-600"}`,
|
|
2033
2033
|
children: r > 0 ? `${i}/${r} chosen` : `${i} chosen`
|
|
@@ -2064,7 +2064,7 @@ var Ct = {
|
|
|
2064
2064
|
/* @__PURE__ */ p("span", {
|
|
2065
2065
|
className: "shrink-0 text-[13px] font-bold tabular-nums",
|
|
2066
2066
|
style: { color: R },
|
|
2067
|
-
children: l ? "Included" : Number(e.price) > 0 ? `+ ${X(Number(e.price))}` : "
|
|
2067
|
+
children: l ? "Included" : Number(e.price) > 0 ? `+ ${X(Number(e.price))}` : "Included"
|
|
2068
2068
|
})
|
|
2069
2069
|
]
|
|
2070
2070
|
}, e.name);
|
package/dist/events-sdk.umd.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react-dom/client"),require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define==`function`&&define.amd?define([`exports`,`react-dom/client`,`react`,`react/jsx-runtime`,`react-dom`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.VoxketEventsSdk={},e.ReactDOM,e.React,e.ReactJSXRuntime,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule||!u.call(e,`default`)?o(n,`default`,{value:e,enumerable:!0}):n,e)))(n,1);var f=class{isDebug;constructor(e){this.isDebug=e??(window.location.hostname===`localhost`||window.location.hostname===`127.0.0.1`)}log(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.log(`%c[Widget-Log] ${n}`,`color: #0bd649; font-weight: bold;`,e,...t)}warn(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.warn(`%c[Widget-Warn] ${n}`,`color: #f59e0b; font-weight: bold;`,e,...t)}error(e,...t){if(!this.isDebug)return;let n=this.getCallerInfo();console.error(`%c[Widget-Error] ${n}`,`color: #ff0000; font-weight: bold;`,e,...t)}getCallerInfo(){let e=(Error().stack?.split(`
|
|
2
|
-
`)[3]||``).match(/(?:at\s+.*?\s+\()?(?:.*?\/([^/]+?)):(\d+):\d+\)?$/);return e?`[${e[1]}:${e[2]}]`:``}},p=class{baseUrl;slug;logger;timeoutMs;constructor(e,t,n,r=12e4){this.baseUrl=e,this.slug=t,this.logger=n,this.timeoutMs=r}async fetchApi(e,t={}){let n=`${this.baseUrl}${e}`;this.logger.log(`API Call: ${t.method||`GET`} ${n} (timeout: ${this.timeoutMs/1e3}s)`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);t.signal&&t.signal.addEventListener(`abort`,()=>r.abort());try{let e=await fetch(n,{...t,signal:r.signal,headers:{"Content-Type":`application/json`,...t.headers}});clearTimeout(i);let a=null;try{a=await e.json()}catch{}if(!e.ok){let t=`API Error`;if(a){if(typeof a.message==`string`)t=a.message;else if(typeof a.detail==`string`)t=a.detail;else if(typeof a.error==`string`)t=a.error;else if(typeof a==`object`){let e=Object.values(a)[0];Array.isArray(e)&&typeof e[0]==`string`?t=e[0]:typeof e==`string`&&(t=e)}}throw Object.assign(Error(t),{status:e.status})}return a}catch(t){if(clearTimeout(i),t?.name===`AbortError`){let t=Error(`Request timed out after ${this.timeoutMs/1e3} seconds`);throw this.logger.error(`API Request timed out for ${e}`,t),t}throw this.logger.error(`API Request failed for ${e}`,t),t}}async getFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/form-schema/`)}async submitRegistration(e){return this.fetchApi(`/api/public/events/${this.slug}/register/`,{method:`POST`,body:JSON.stringify(e)})}async verifyPayment(e){return this.fetchApi(`/api/payments/verify/`,{method:`POST`,body:JSON.stringify({slug:this.slug,registration_number:e})})}async submitCustomQrPayment(e,t){return this.fetchApi(`/api/payments/custom-qr/`,{method:`POST`,body:JSON.stringify({slug:this.slug,registration_number:e,answers:t})})}async trackProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/track/`,{method:`POST`,body:JSON.stringify(e)})}async getDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}async getDraftByEmail(e){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?email=${encodeURIComponent(e)}`)}catch(t){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}catch{throw t}}}async getReviewFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/review/form-schema/`)}async submitReview(e){return this.fetchApi(`/api/public/events/${this.slug}/review/submit/`,{method:`POST`,body:JSON.stringify(e)})}async trackReviewProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/`,{method:`POST`,body:JSON.stringify(e)})}async getReviewDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/?xref=${encodeURIComponent(e)}`)}async getReviewDraftByEmail(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/?email=${encodeURIComponent(e)}`)}async portalLogin(e){return this.fetchApi(`/api/portal/${this.slug}/login/`,{method:`POST`,body:JSON.stringify(e)})}async portalRequestPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify({identifier:e})})}async portalConfirmPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify(e)})}async portalGetProfile(e){return this.fetchApi(`/api/portal/${this.slug}/me/`,{method:`GET`,headers:{Authorization:`Bearer ${e}`}})}async uploadFile(e,t,n,r){let i=new FormData;return i.append(`file`,e),r&&i.append(`label`,r),!t&&n&&i.append(`email`,n),this.postAsset(i,t)}async submitTextAnswer(e,t,n,r){let i=new FormData;return i.append(`text`,e),r&&i.append(`label`,r),!t&&n&&i.append(`email`,n),this.postAsset(i,t)}async postAsset(e,t){let n=t||null,r={};n&&(r.Authorization=`Bearer ${n}`);let i=`${this.baseUrl}/api/portal/${this.slug}/me/upload/`;this.logger.log(`API Call: POST ${i} (upload)`);let a=new AbortController,o=setTimeout(()=>a.abort(),this.timeoutMs);try{let t=await fetch(i,{method:`POST`,signal:a.signal,headers:r,body:e});clearTimeout(o);let n=null;try{n=await t.json()}catch{}if(t.ok)return n;let s=n?.message||n?.error||n?.detail||`File upload failed`;throw Error(s)}catch(e){throw clearTimeout(o),e?.name===`AbortError`?Error(`File upload timed out after ${this.timeoutMs/1e3} seconds`):e}}async deleteFile(e,t,n){let r=encodeURIComponent(String(e).trim()),i=t||null,a={};i&&(a.Authorization=`Bearer ${i}`);let o=!i&&n?`?email=${encodeURIComponent(n)}`:``,s=[`/api/portal/${this.slug}/me/upload/${r}/${o}`,`/api/portal/${this.slug}/me/upload/${r}${o}`],c=null;for(let e=0;e<s.length;e++){let t=s[e];this.logger.log(`API Call: DELETE ${t}`);try{return await this.fetchApi(t,{method:`DELETE`,headers:a})}catch(t){if(c=t,(t?.status===404||t?.status===405)&&e<s.length-1)continue;throw t}}throw c}async portalUploadFile(e,t){return this.uploadFile(t,e)}async portalDeleteFile(e,t){return this.deleteFile(t,e)}async portalUpdateProfile(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/`;this.logger.log(`API Call: PATCH ${n}`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);try{let a=await fetch(n,{method:`PATCH`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});a.status===405&&(a=await fetch(n,{method:`PUT`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)})),clearTimeout(i);let o=null;try{o=await a.json()}catch{}if(!a.ok){let e=o?.message||o?.error||o?.detail||`Failed to update profile`;throw Error(e)}return o}catch(e){throw clearTimeout(i),e?.name===`AbortError`?Error(`Profile update timed out after ${this.timeoutMs/1e3} seconds`):e}}async portalUpdateSubmission(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/submission/`;this.logger.log(`API Call: PATCH ${n}`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);try{let a=await fetch(n,{method:`PATCH`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});clearTimeout(i);let o=null;try{o=await a.json()}catch{}if(!a.ok){let e=o?.message||o?.error||o?.detail||`Failed to update submission`;throw Error(e)}return o}catch(e){throw clearTimeout(i),e?.name===`AbortError`?Error(`Submission update timed out after ${this.timeoutMs/1e3} seconds`):e}}},m=class{prefix;constructor(e){this.prefix=`voxket_${e}_`}generateId(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}getXrefId(){let e=`${this.prefix}xref_id`,t=localStorage.getItem(e);return t||(t=this.generateId(),localStorage.setItem(e,t)),t}updateXrefId(){let e=`${this.prefix}xref_id`,t=this.generateId();return localStorage.setItem(e,t),t}clearXrefId(){let e=`${this.prefix}xref_id`;localStorage.removeItem(e)}setToken(e){localStorage.setItem(`${this.prefix}token`,e)}getToken(){return localStorage.getItem(`${this.prefix}token`)}clearToken(){localStorage.removeItem(`${this.prefix}token`)}setPendingCustomQr(e){try{localStorage.setItem(`${this.prefix}pending_custom_qr`,JSON.stringify(e))}catch{}}getPendingCustomQr(){try{let e=localStorage.getItem(`${this.prefix}pending_custom_qr`),t=e?JSON.parse(e):null;return t&&typeof t==`object`?t:null}catch{return null}}clearPendingCustomQr(){try{localStorage.removeItem(`${this.prefix}pending_custom_qr`)}catch{}}},h=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function g(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:h(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var _=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},v=e=>{let t=_(e);return t.charAt(0).toUpperCase()+t.slice(1)},y=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),b={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function x(e){return e!=null}function S(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??b.width,a=e.size??e.height??b.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?y(...c):y(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??b[`stroke-width`])*Number(e.size??e.width??b.width)/Number(t.size??t.width??b.width):t.strokeWidth??b[`stroke-width`];return[`svg`,{...Object.entries(b).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&x(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&x(t.width)&&{[r(`width`)]:t.width},...`height`in t&&x(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function C(e,t={}){return S(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},T=(0,n.createContext)({}),E=()=>(0,n.useContext)(T),ee=(0,n.forwardRef)(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:b=``}=E()??{},x=!!l||w(f),[S,T,ee=[]]=C(d,{color:e??v,width:r??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:y(b,c),hasA11yProp:x,attributes:f});return(0,n.createElement)(S,{ref:p,...T},[...ee.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function D(e,t=[],r=[]){let i=typeof e==`string`?g(e,t,r):e,a=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(ee,{ref:r,icon:i,className:e,...t}));return i.name&&(a.displayName=v(i.name)),a}var te={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};te.node;var O=D(te),k={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};k.node;var ne=D(k),A={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};A.node;var j=D(A),M={name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]};M.node;var N=D(M),P={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};P.node;var re=D(P),F={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};F.node;var ie=D(F),ae={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};ae.node;var oe=D(ae),se={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};se.node;var ce=D(se),le={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};le.node;var I=D(le),L={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};L.node;var ue=D(L),de={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};de.node;var fe=D(de),pe={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};pe.node;var me=D(pe),R={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};R.node;var he=D(R),ge={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};ge.node;var _e=D(ge),ve={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};ve.node;var ye=D(ve),be={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};be.node;var xe=D(be),Se={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};Se.node;var Ce=D(Se),we={name:`id-card`,size:24,node:[[`path`,{d:`M13 19a4 4 0 00-8 0`,key:`cugzd5`}],[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]};we.node;var Te=D(we),Ee={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Ee.node;var De=D(Ee),z={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};z.node;var Oe=D(z),ke={name:`key`,size:24,node:[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]};ke.node;var Ae=D(ke),je={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};je.node;var Me=D(je),Ne={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Ne.node;var Pe=D(Ne),Fe={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};Fe.node;var Ie=D(Fe),B={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};B.node;var Le=D(B),V={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};V.node;var H=D(V),U={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};U.node;var Re=D(U),W={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};W.node;var ze=D(W),G={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};G.node;var Be=D(G),K={name:`move`,size:24,node:[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m19 9 3 3-3 3`,key:`1mg7y2`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`m5 9-3 3 3 3`,key:`j64kie`}],[`path`,{d:`m9 5 3-3 3 3`,key:`l8vdw6`}]]};K.node;var Ve=D(K),q={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};q.node;var He=D(q),Ue={name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]};Ue.node;var We=D(Ue),J={name:`receipt`,size:24,node:[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]};J.node;var Ge=D(J),Ke={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ke.node;var qe=D(Ke),Je={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Je.node;var Ye=D(Je),Xe={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};Xe.node;var Ze=D(Xe),Qe={name:`ticket`,size:24,node:[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]};Qe.node;var $e=D(Qe),Y={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Y.node;var et=D(Y),tt={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};tt.node;var nt=D(tt),X={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};X.node;var rt=D(X),it={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};it.node;var Z=D(it),at={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};at.node;var ot=D(at),st={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};st.node;var ct=D(st),Q={fontFamily:`var(--vx-font-heading)`},$=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;function lt(e){let t=e,n=typeof e==`string`?e:t?.serve_url||t?.url||t?.id||``;return String(n||``).match($)?.[0]||``}function ut(e,t){if(!e)return``;if(/^field_\d+/i.test(e)&&t&&typeof t==`string`){let e=t.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);if(e)return e}return e}function dt(e,t=``){if(e&&typeof e==`string`){let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);if(t)return t}return ut(t,e)||t}function ft(e){let t=(e||``).trim();return t?t.split(/\s+/).length:0}function pt(e,t){for(let n of e||[]){if(n.type===`file`)continue;let e=String(t(n)??``).trim(),r=n.label||`This field`;if(n.required&&!e)return`${r} is required.`;let i=Number(n.word_limit)||0;if(n.type===`textarea`&&i&&ft(e)>i)return`${r} is over the ${i}-word limit.`}return null}function mt(e,t){let n=Number(e?.value)||0,r=e?.type===`percent`?t*n/100:n;return Math.min(Math.max(Math.round(r*100)/100,0),Math.max(t,0))}function ht(e,t){let n=null;for(let r of e||[]){let e=mt(r,t);e>0&&(!n||e>n.saving)&&(n={...r,saving:e})}return n}function gt(e,t){return(e||[]).filter(e=>!e?.registration_type||String(e.registration_type)===String(t||``))}function _t(e,t){let n=Number(e?.value)||0;return e?.type===`percent`?`${n%1==0?n:n.toFixed(2)}% off`:`${[t,n.toLocaleString()].filter(Boolean).join(` `)} off`}function vt(e,t){let n=(t||``).trim().toLowerCase();return(e||[]).find(e=>String(e?.code||``).toLowerCase()===n)||null}var yt={email:`email`,phone:`tel`,number:`number`,date:`date`,url:`url`},bt=({field:e,value:t,onChange:n,className:i,isDark:a,id:o,part:s=`input`,disabled:c,placeholder:l})=>{let u=t==null?``:String(t),d=l??e.placeholder??``,f=a?`bg-zinc-900 text-white`:`bg-white text-slate-900`;if(e.type===`select`)return(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsxs)(`select`,{part:`${s} select`,id:o,required:e.required,disabled:c,value:u,onChange:e=>n(e.target.value),className:`${i} pr-10 appearance-none cursor-pointer`,children:[(0,r.jsx)(`option`,{value:``,className:f,children:e.placeholder||`Select ${e.label||`an option`}...`}),(e.options||[]).map((e,t)=>(0,r.jsx)(`option`,{value:e,className:f,children:e},`${t}-${e}`))]}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 right-0 flex items-center pr-3.5 pointer-events-none ${a?`text-zinc-400`:`text-slate-400`}`,children:(0,r.jsx)(ie,{size:16})})]});if(e.type===`checkbox`)return(0,r.jsxs)(`label`,{className:`flex items-start gap-2.5 text-sm cursor-pointer ${c?`opacity-60 cursor-not-allowed`:``} ${a?`text-zinc-200`:`text-slate-700`}`,children:[(0,r.jsx)(`input`,{part:`${s} checkbox`,id:o,type:`checkbox`,required:e.required,disabled:c,checked:u===`Yes`||u===`true`,onChange:e=>n(e.target.checked?`Yes`:``),className:`mt-0.5 w-4 h-4 shrink-0 cursor-pointer accent-(--vx-accent)`}),(0,r.jsx)(`span`,{children:e.placeholder||e.label})]});if(e.type===`textarea`){let t=Number(e.word_limit)||0,l=ft(u);return(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`textarea`,{part:`${s} textarea`,id:o,rows:4,required:e.required,disabled:c,value:u,placeholder:d,onChange:e=>n(e.target.value),className:`${i} resize-y`}),t>0&&(0,r.jsxs)(`div`,{className:`text-2xs font-medium mt-1 text-right ${l>t?`text-red-500`:a?`text-zinc-500`:`text-slate-500`}`,children:[l,` / `,t,` words`]})]})}return(0,r.jsx)(`input`,{part:s,id:o,type:yt[e.type]||`text`,required:e.required,disabled:c,value:u,placeholder:e.type===`url`&&!d?`https://`:d,onChange:e=>n(e.target.value),className:i})},xt=new Set([`salutation`,`name`,`email`,`phone`]),St=({schema:e,onSubmit:t,onBack:i,theme:a,displayMode:o,isExpanded:s,onToggleExpand:c,onClose:l,onChange:u,initialValues:d,fileAnswers:f,isDark:p=!1,apiClient:m,onError:h,onEvent:g,backgroundStyle:_,ticketType:v,offers:y,showReviewFields:b=!1})=>{let[x,S]=(0,n.useState)(d||{}),[C,w]=(0,n.useState)(null),[T,E]=(0,n.useState)(null),[ee,D]=(0,n.useState)({}),[te,k]=(0,n.useState)({}),[A,j]=(0,n.useState)(null),[M,N]=(0,n.useState)(null),[P,F]=(0,n.useState)({}),[ae,oe]=(0,n.useState)({}),[se,ce]=(0,n.useState)({}),[le,I]=(0,n.useState)({}),[L,ue]=(0,n.useState)(``),[de,fe]=(0,n.useState)(null),[pe,me]=(0,n.useState)(!1),R=a?.primaryColor||`#c026d3`;(0,n.useEffect)(()=>{if(d&&Object.keys(d).length>0){S(e=>({...d,...e}));let t={},n={},r=e?.fields||[];r.forEach(e=>{if(e.type===`file`){let r=d[e.id];r&&(String(r).startsWith(`http://`)||String(r).startsWith(`https://`)?(n[e.id]=String(r),lt(r)&&(t[e.id]=lt(r))):t[e.id]=String(r))}}),Object.keys(t).length>0&&D(e=>({...t,...e})),Object.keys(n).length>0&&k(e=>({...n,...e})),r.forEach(e=>{let t=f?.[e.id];t?.text?(ce(n=>({[e.id]:t.text,...n})),oe(n=>({[e.id]:t.text,...n})),F(t=>({[e.id]:`text`,...t}))):t?.serve_url&&k(n=>({[e.id]:t.serve_url,...n}))})}},[d,e,f]);let[he,ge]=(0,n.useState)(null),ve=(e,t)=>{S(n=>{let r={...n,[e]:t};return u?.(r),r})},be=(e,t=!1)=>{let n=t=>{let n={...t};return delete n[e],n};D(n),k(n),ce(n),t||oe(n),S(t=>{let n={...t,[e]:``};return u?.(n),n})},Se=async(e,t)=>{if(!b||!t||!z())return!1;try{await m.deleteFile(lt(t)||t,null,z()),g?.(`file_deleted`,{fieldId:e,assetId:t}),be(e,!0)}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}return!0},Ce=async(t,n)=>{if(!m)return;w(t),j(null),N(null);let r=ee[t],i=(e?.fields||[]).find(e=>e.id===t);try{let e=await Se(t,r),a=await m.uploadFile(n,null,z(),i?.label),o=a?.data?.asset_id||a?.asset_id,s=a?.data?.serve_url||a?.serve_url;if(!o&&!s)throw Error(`Upload response missing asset_id`);let c=String(o||lt(s)),l=String(s||``);if(D(e=>({...e,[t]:c})),l&&k(e=>({...e,[t]:l})),ce(e=>{let n={...e};return delete n[t],n}),S(e=>{let n={...e,[t]:l||c};return u?.(n),n}),g?.(`file_uploaded`,{fieldId:t,assetId:c,serveUrl:l}),!e&&r&&r!==c)try{await m.deleteFile(lt(r)||r,null,z()),g?.(`file_deleted`,{fieldId:t,assetId:r})}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}}catch(e){let n=e?.message||`File upload failed. Please try again.`;j(n),N(t),h?.({type:`file_upload_error`,message:n,error:e})}finally{w(null)}},we=async e=>{if(!m)return;let t=ee[e]||x[e],n=lt(t)||t;E(e),j(null),N(null);try{n&&(await m.deleteFile(n,null,z()),g?.(`file_deleted`,{fieldId:e,assetId:n})),be(e)}catch(t){let n=t?.message||`Failed to delete file. Please try again.`;j(n),N(e),h?.({type:`file_delete_error`,message:n,error:t})}finally{E(null)}},Te=async(t,n)=>{if(!m||!n.trim())return;let r=ee[t],i=(e?.fields||[]).find(e=>e.id===t),a=Number(i?.word_limit)||0;if(a&&ft(n)>a){j(`${i?.label||`This answer`} is over the ${a}-word limit.`),N(t);return}w(t),j(null),N(null);try{let e=await Se(t,r),a=await m.submitTextAnswer(n.trim(),null,z(),i?.label),o=a?.data?.asset_id||a?.asset_id;if(!o)throw Error(`Submission response missing asset_id`);let s=String(o);if(D(e=>({...e,[t]:s})),k(e=>{let n={...e};return delete n[t],n}),ce(e=>({...e,[t]:n.trim()})),S(e=>{let n={...e,[t]:s};return u?.(n),n}),g?.(`file_uploaded`,{fieldId:t,assetId:s,isText:!0}),!e&&r&&r!==s)try{await m.deleteFile(lt(r)||r,null,z()),g?.(`file_deleted`,{fieldId:t,assetId:r})}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}}catch(e){let n=e?.message||`Could not submit your answer. Please try again.`;j(n),N(t),h?.({type:`file_upload_error`,message:n,error:e})}finally{w(null)}},Ee=()=>{let t=(e?.fields||[]).find(e=>e.type===`email`||(e.label||e.id||``).toLowerCase().includes(`email`));return String(t&&x[t.id]||x.email||``).trim()},z=()=>b&&Ee()||null,Oe=e?.fields||[],ke=Array.isArray(v?.items)?v.items.filter(e=>e?.name):[],Ae=ke.filter(e=>e.mode===`optional`),je=ke.filter(e=>e.mode===`group`),Me=ke.filter(e=>e.mode!==`optional`&&e.mode!==`group`),Ne=Array.isArray(x.selected_items)?x.selected_items:[],Pe=e=>e?.label??e?.name,Fe=e=>e?.options?.length?e.options.flatMap(Fe):Pe(e)?[Pe(e)]:[],Ie=(e,t=Ne)=>Fe(e).some(e=>t.includes(e)),B=(e,t=Ne)=>(e?.options||[]).filter(e=>Ie(e,t)).length,Le=(e,t=[])=>{S(n=>{let r=Array.isArray(n.selected_items)?n.selected_items:[],i=r.includes(e),a=i?r.filter(t=>t!==e):[...r,e];if(!i&&t.some(e=>Number(e?.max)&&B(e,a)>Number(e.max)))return n;let o={...n,selected_items:a};return u?.(o),o})},V=b?null:v?.accompany_form_schema||null,H=V?.fields||[],U=Number(V?.price)||0,Re=Number(V?.max)||0,W=Array.isArray(x.accompanying)?x.accompanying:[],G=!Re||W.length<Re,K=e=>{S(t=>{let n=Array.isArray(t.accompanying)?t.accompanying:[],r={...t,accompanying:e(n)};return u?.(r),r})},Ve=()=>K(e=>[...e,{salutation:``,name:``,email:``,phone:``,custom_data:{}}]),q=e=>K(t=>t.filter((t,n)=>n!==e)),He=e=>xt.has(e.id)?e.id:ut(e.id,e.label),Ue=(e,t)=>(xt.has(t.id)?e[t.id]:(e.custom_data||{})[He(t)])??``,We=(e,t,n)=>K(r=>r.map((r,i)=>i===e?xt.has(t.id)?{...r,[t.id]:n}:{...r,custom_data:{...r.custom_data||{},[He(t)]:n}}:r)),J=(e,t)=>`guest:${e}:${t.id}`,Ge=async(e,t,n)=>{if(!m)return;let r=J(e,t);w(r),j(null),N(null);try{let i=await m.uploadFile(n,null,z(),t.label),a=i?.data?.serve_url||i?.serve_url||``,o=i?.data?.asset_id||i?.asset_id||``;if(!a&&!o)throw Error(`Upload response missing asset_id`);We(e,t,String(a||o)),g?.(`file_uploaded`,{fieldId:r,assetId:o,serveUrl:a})}catch(e){let t=e?.message||`File upload failed. Please try again.`;j(t),N(r),h?.({type:`file_upload_error`,message:t,error:e})}finally{w(null)}},Ke=async(e,t)=>{if(!m)return;let n=J(e,t),r=Ue(W[e]||{},t),i=lt(r)||r;E(n),j(null),N(null);try{i&&(await m.deleteFile(i,null,z()),g?.(`file_deleted`,{fieldId:n,assetId:i})),We(e,t,``)}catch(e){let t=e?.message||`Failed to delete file. Please try again.`;j(t),N(n),h?.({type:`file_delete_error`,message:t,error:e})}finally{E(null)}},qe=e=>{if(e.description)return e.description;if(e.helperText)return e.helperText;let t=(e.label||e.id||``).toLowerCase(),n=e.type;return n===`email`?b?`Please enter a valid email address. Your abstract acknowledgement, review updates, and final communication will be sent to this mailbox.`:`Please enter a valid email address. Your registration confirmation and event updates will be sent to this mailbox.`:n===`phone`?`Please enter a valid mobile number for SMS confirmations and important notifications.`:n===`text`&&(t.includes(`council`)||t.includes(`registration no`)||t.includes(`mci`))?`Enter your State Medical Council or National Medical Commission registration number.`:n===`file`?b?`Upload your document, or answer with text instead.`:`Upload your document for registration review and verification, or answer with text instead.`:e.id===`salutation`?`Choose your professional title or academic prefix.`:null},Je=e=>{let t=te[e.id]||(x[e.id]&&String(x[e.id]).startsWith(`http`)?x[e.id]:``),n=se[e.id],i=P[e.id]||`file`,a=C===e.id||T===e.id,o=C!==null||T!==null,s=ae[e.id]||``,c=ft(s),l=!!Number(e.word_limit)&&c>Number(e.word_limit);return(0,r.jsx)(`div`,{className:`space-y-2 mt-2`,children:(0,r.jsxs)(`div`,{part:`upload`,className:`p-4 sm:p-5 rounded-2xl border border-dashed transition-all ${p?`bg-zinc-850/80 border-zinc-700 hover:border-zinc-600`:`bg-slate-50 border-slate-300 hover:border-[color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`div`,{className:`w-10 h-10 rounded-xl flex items-center justify-center shrink-0 border`,style:{backgroundColor:p?`rgba(255,255,255,0.06)`:`color-mix(in srgb, ${R} 10%, white)`,borderColor:p?`rgba(255,255,255,0.12)`:`color-mix(in srgb, ${R} 25%, white)`,color:R},children:(0,r.jsx)(xe,{size:18})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`p`,{className:`text-xs font-bold ${p?`text-zinc-200`:`text-gray-900`}`,children:e.label}),(0,r.jsx)(`p`,{className:`text-2xs font-medium ${p?`text-zinc-400`:`text-gray-500`}`,children:t?`Document attached successfully`:n?`Text submitted successfully`:i===`file`?`Click to choose or upload your document (PDF, JPG, PNG)`:`Enter your text below`})]})]}),(0,r.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>F(t=>({...t,[e.id]:i===`file`?`text`:`file`})),className:`flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-lg border cursor-pointer transition-colors hover:opacity-80 disabled:opacity-50 shrink-0`,style:{color:R,borderColor:`color-mix(in srgb, ${R} 35%, transparent)`},children:i===`file`?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ye,{size:11}),` Send text only`]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nt,{size:11}),` Send file`]})})]}),i===`file`?(0,r.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-3`,children:[(0,r.jsxs)(`label`,{className:`relative ${o?`cursor-not-allowed`:`cursor-pointer`} ${o&&!a?`opacity-50`:``}`,children:[(0,r.jsx)(`input`,{type:`file`,className:`hidden`,style:{display:`none`},tabIndex:-1,disabled:o,onChange:t=>{let n=t.target.files?.[0];n&&Ce(e.id,n),t.target.value=``}}),(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold border transition-all shadow-2xs ${p?`border-zinc-700 hover:border-zinc-600 text-zinc-200 bg-zinc-800 hover:bg-zinc-750`:`border-slate-200 hover:border-slate-300 text-slate-700 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(nt,{size:14,style:{color:R}}),(0,r.jsx)(`span`,{children:C===e.id?`Uploading...`:t?`Replace File`:`Choose File`})]})]}),t&&typeof t==`string`&&t.trim()!==``&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`button`,{type:`button`,onClick:()=>window.open(t,`_blank`,`noopener,noreferrer`),className:`flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0 cursor-pointer`,style:{backgroundColor:R},title:`Open file in new tab`,children:[(0,r.jsx)(ye,{size:13}),(0,r.jsx)(`span`,{children:`View`}),(0,r.jsx)(_e,{size:11})]}),(0,r.jsxs)(`button`,{type:`button`,disabled:o,onClick:()=>we(e.id),className:`flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${p?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50 text-red-600 hover:bg-red-100`}`,title:`Delete uploaded file`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:T===e.id?`Deleting...`:`Delete`})]})]})]}):(0,r.jsxs)(`div`,{className:`mt-3 pt-3 border-t space-y-2 ${p?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsx)(`textarea`,{part:`input textarea`,rows:3,disabled:a||!!n,value:n??s,onChange:t=>oe(n=>({...n,[e.id]:t.target.value})),placeholder:`Enter your answer...`,className:`w-full px-3 py-2 text-sm rounded-xl border focus:outline-none transition-all disabled:opacity-70 ${p?`bg-zinc-900 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`}),(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[e.word_limit?(0,r.jsxs)(`span`,{className:`text-2xs font-medium ${l?`text-red-500`:p?`text-zinc-500`:`text-gray-500`}`,children:[c,`/`,e.word_limit,` words`,l&&!n?` — over the limit`:``]}):(0,r.jsx)(`span`,{}),n?(0,r.jsxs)(`button`,{type:`button`,disabled:o,onClick:()=>we(e.id),className:`flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${p?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50 text-red-600 hover:bg-red-100`}`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:T===e.id?`Clearing...`:`Clear & Re-enter`})]}):(0,r.jsxs)(`button`,{type:`button`,disabled:o||!s.trim()||l,onClick:()=>Te(e.id,s),style:{backgroundColor:R},className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-bold text-white shadow-sm hover:opacity-90 transition-all cursor-pointer disabled:opacity-50`,children:[(0,r.jsx)(nt,{size:13}),(0,r.jsx)(`span`,{children:C===e.id?`Submitting...`:`Submit Text`})]})]})]}),t&&(0,r.jsxs)(`div`,{className:`mt-2.5 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${p?`border-zinc-800 text-zinc-300`:`border-gray-200 text-gray-700 font-medium`}`,children:[(0,r.jsx)(re,{size:12,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`Attached: `,t]})]}),A&&M===e.id&&(0,r.jsx)(`div`,{className:`text-xs text-red-500 mt-2 font-medium`,children:A})]})})},Ye=e=>{if(!e)return null;let t=x[e.id]??``,n=qe(e),i=e.type===`email`,a=e.id===`name`,o=`vx-field-${e.id}`,s=`w-full px-4 py-3 text-[15px] font-medium rounded-xl border transition-all focus:outline-none ${p?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`;return(0,r.jsxs)(`div`,{part:`field`,className:`px-5 sm:px-8 py-5 sm:py-6`,children:[(0,r.jsx)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:(0,r.jsxs)(`label`,{part:`field-label`,htmlFor:o,className:`block text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500 font-semibold ml-0.5`,children:`*`})]})}),n&&(0,r.jsx)(`p`,{part:`field-description`,className:`text-xs leading-relaxed mb-3 ${p?`text-zinc-400`:`text-slate-500`}`,children:n}),!n&&(0,r.jsx)(`div`,{className:`h-1.5`}),e.type===`file`?Je(e):(0,r.jsx)(bt,{field:e,id:o,value:t,onChange:t=>ve(e.id,t),className:s,isDark:p,placeholder:e.placeholder||(i?`Enter your email address`:a?`Your full name`:`Enter your ${(e.label||``).toLowerCase()}`)})]},e.id)},Xe=(e,t,n)=>{let i=J(t,e),a=C!==null||T!==null;return(0,r.jsxs)(`div`,{children:[n?(0,r.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2.5 rounded-xl border ${p?`border-zinc-700 bg-zinc-900`:`border-slate-200 bg-white`}`,children:[(0,r.jsx)(ye,{size:15,className:`shrink-0`,style:{color:R}}),(0,r.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:`flex-1 min-w-0 truncate text-xs font-medium underline-offset-2 hover:underline ${p?`text-zinc-200`:`text-slate-700`}`,children:`View file`}),(0,r.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>Ke(t,e),title:`Remove file`,className:`shrink-0 p-1 rounded-lg cursor-pointer disabled:opacity-40 ${p?`text-zinc-500 hover:text-red-400`:`text-slate-400 hover:text-red-500`}`,children:(0,r.jsx)(et,{size:14})})]}):(0,r.jsxs)(`label`,{className:`flex items-center justify-center gap-2 px-3 py-2.5 rounded-xl border border-dashed cursor-pointer text-xs font-semibold transition-opacity hover:opacity-80 ${p?`border-zinc-700 text-zinc-300`:`border-slate-300 text-slate-600`} ${a?`opacity-50 pointer-events-none`:``}`,children:[(0,r.jsx)(nt,{size:14}),C===i?`Uploading...`:`Choose file`,(0,r.jsx)(`input`,{type:`file`,className:`hidden`,onChange:n=>{let r=n.target.files?.[0];r&&Ge(t,e,r),n.target.value=``}})]}),A&&M===i&&(0,r.jsx)(`div`,{className:`text-xs text-red-500 mt-1.5 font-medium`,children:A})]})},Qe=(e,t,n)=>{let i=Ue(t,e),a=`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${p?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500 focus:border-(--vx-accent)`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 focus:border-(--vx-accent)`}`;return(0,r.jsxs)(`label`,{part:`field`,className:`block`,children:[(0,r.jsxs)(`span`,{className:`block text-xs font-semibold mb-1.5 ${p?`text-zinc-300`:`text-slate-700`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`})]}),e.type===`file`?Xe(e,n,String(i||``)):(0,r.jsx)(bt,{field:e,value:i,onChange:t=>We(n,e,t),className:a,isDark:p})]},e.id)},Y=e=>{e.preventDefault(),ge(null);for(let e of Oe)if(e.type===`file`&&e.required&&!x[e.id]){j(`Please upload ${e.label||`a file`}`),N(e.id);return}for(let e=0;e<W.length;e++)for(let t of H)if(t.type===`file`&&t.required&&!Ue(W[e],t)){j(`Please upload ${t.label||`a file`} for guest ${e+1}`),N(J(e,t));return}let n=pt(Oe,e=>x[e.id]);for(let e=0;!n&&e<W.length;e++){let t=pt(H,t=>Ue(W[e],t));t&&(n=`Guest ${e+1}: ${t}`)}if(n){ge(n);return}let r={};Object.entries(te).forEach(([e,t])=>{r[e]={serve_url:t}}),Object.entries(se).forEach(([e,t])=>{r[e]={text:t}}),t(x,{fileAnswers:r})},tt=v?.type||v?.name||v?.label||(b?`Abstract Submission Form`:`Registration Form`),X=e=>[v?.currency,e.toLocaleString()].filter(Boolean).join(` `),it=e=>{if(!e?.options?.length)return Ne.includes(Pe(e))&&Number(e?.price)||0;if(!Ie(e))return 0;let t=e.options.reduce((e,t)=>e+it(t),0);return e.price==null||e.price===``?t:Number(e.price)||0},Z=[...Ae,...je].reduce((e,t)=>e+it(t),0),at=(e,t=[],n=!1)=>{let i=Number(e.max)||0,a=B(e),o=i>0&&a>=i,s=(e.options||[]).length,c=e.price!=null&&e.price!==``,l=c&&Number(e.price)||0,u=n||c,d=le[e.name]??a>0,f=[...t,e];return(0,r.jsxs)(`div`,{part:`addon-group`,className:`pt-1`,children:[(0,r.jsxs)(`button`,{type:`button`,part:`addon-group-toggle`,"aria-expanded":d,onClick:()=>I(t=>({...t,[e.name]:!d})),className:`w-full flex items-center justify-between gap-2 mb-2 px-3.5 py-3 rounded-2xl border cursor-pointer transition-colors ${p?`border-zinc-800 bg-zinc-950/60 hover:border-zinc-700`:`border-slate-200 bg-slate-50 hover:border-slate-300`}`,children:[(0,r.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,r.jsx)(ie,{size:15,className:`shrink-0 transition-transform duration-200 ${d?`rotate-180`:``} ${p?`text-zinc-400`:`text-slate-500`}`}),(0,r.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider truncate ${p?`text-zinc-300`:`text-slate-600`}`,children:e.name}),(0,r.jsxs)(`span`,{className:`shrink-0 text-[11px] font-medium ${p?`text-zinc-500`:`text-slate-400`}`,children:[s,` `,s===1?`option`:`options`]})]}),(0,r.jsxs)(`span`,{className:`flex items-center gap-2 shrink-0`,children:[c&&(0,r.jsx)(`span`,{className:`text-[13px] font-bold tabular-nums`,style:{color:R},children:n?`Included`:l>0?`+ ${X(l)}`:`Free`}),(i>0||a>0)&&(0,r.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-full ${o?`bg-amber-100 text-amber-700`:a>0?p?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`:p?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:i>0?`${a}/${i} chosen`:`${a} chosen`})]})]}),(0,r.jsx)(`div`,{className:d?`space-y-2`:`hidden`,children:(e.options||[]).map(e=>{if(e.options?.length)return(0,r.jsx)(`div`,{className:`pl-3`,children:at(e,f,u)},e.name);let t=Pe(e),n=Ne.includes(t),i=o&&!n;return(0,r.jsxs)(`label`,{part:n?`addon addon-selected`:`addon`,className:`p-3.5 rounded-2xl border flex items-center gap-3 transition-all ${i?`opacity-50 cursor-not-allowed`:`cursor-pointer`} ${n?``:p?`border-zinc-800 bg-zinc-900 hover:border-zinc-700`:`border-slate-200 bg-white hover:border-slate-300`}`,style:n?{borderColor:R,backgroundColor:`color-mix(in srgb, ${R} ${p?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:n,disabled:i,onChange:()=>Le(t,f),className:`w-4 h-4 rounded cursor-pointer shrink-0 disabled:cursor-not-allowed`,style:{accentColor:R}}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[13px] font-bold tabular-nums`,style:{color:R},children:u?`Included`:Number(e.price)>0?`+ ${X(Number(e.price))}`:`Free`})]},e.name)})})]},e.name)},st=Number(v?.price)||0,$=U*W.length,dt=st+Z+$,gt=b?[]:y||[],yt=vt(gt,x.discount_code),St=yt?mt(yt,dt):0,Ct=ht(gt,dt),wt=dt-St,Tt=v?wt>0?X(wt):`Free`:null;(0,n.useEffect)(()=>{if(pe||b||dt<=0)return;let e=Ct?.code||``;(x.discount_code||``)!==e&&S(t=>({...t,discount_code:e}))},[pe,b,dt,Ct?.code,x.discount_code]);let Et=(0,n.useRef)(v?.id);(0,n.useEffect)(()=>{Et.current!==v?.id&&(Et.current=v?.id,me(!1),fe(null),S(e=>e.discount_code?{...e,discount_code:``}:e))},[v?.id]);let Dt=e=>{me(!0),fe(null),ue(``),S(t=>({...t,discount_code:e}))},Ot=()=>{let e=L.trim();if(!e)return Dt(``);let t=vt(gt,e);if(!t){me(!0),fe(`That code is not valid for this event.`);return}Dt(t.code)};return(0,r.jsxs)(`div`,{part:`form-page`,className:`w-full flex-1 flex flex-col relative ${p?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,style:_,children:[(0,r.jsx)(`div`,{part:`form-header`,className:`sticky top-0 z-30 px-4 sm:px-6 py-3 border-b backdrop-blur-xl transition-colors ${p?`bg-zinc-900/85 border-zinc-800`:`bg-white/85 border-slate-200/80`}`,children:(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto flex items-center justify-between gap-3`,children:[(0,r.jsxs)(`button`,{part:`button button-secondary back-button`,type:`button`,onClick:i,className:`inline-flex items-center gap-2 text-sm font-semibold rounded-full pl-2.5 pr-4 py-2 border transition-colors cursor-pointer ${p?`bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-zinc-200`:`bg-white border-slate-200 hover:bg-slate-50 text-slate-700 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`,children:[(0,r.jsx)(O,{size:16}),(0,r.jsx)(`span`,{children:`All forms`})]}),(0,r.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{part:`form-type-name`,title:tt,className:`hidden sm:inline-block truncate max-w-[16rem] text-xs font-semibold px-3 py-1.5 rounded-full ${p?`bg-zinc-800 text-zinc-200`:`bg-slate-100 text-slate-700`}`,children:tt}),!b&&(0,r.jsx)(`span`,{part:`form-type-price`,className:`shrink-0 text-xs font-bold px-3 py-1.5 rounded-full tabular-nums`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:Tt})]}),o===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 ml-2 border-l pl-2 ${p?`border-zinc-700`:`border-slate-200`}`,children:[(0,r.jsx)(`button`,{onClick:c,className:`p-1.5 opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,title:s?`Minimize`:`Expand`,children:s?(0,r.jsx)(Be,{size:16}):(0,r.jsx)(ze,{size:16})}),(0,r.jsx)(`button`,{onClick:l,className:`p-1.5 opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:18})})]})]})]})}),(0,r.jsx)(`div`,{className:`w-full flex-1 overflow-y-auto`,children:(0,r.jsxs)(`form`,{part:`form`,onSubmit:Y,className:`max-w-3xl mx-auto w-full px-4 sm:px-6 py-8 sm:py-10 space-y-5`,children:[(0,r.jsxs)(`div`,{part:`form-intro`,className:`px-1`,children:[(0,r.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-wider`,style:{color:R},children:b?`Abstract submission`:`Registration form`}),(0,r.jsx)(`h2`,{part:`form-title`,className:`mt-1.5 text-2xl sm:text-3xl font-bold tracking-tight ${p?`text-white`:`text-slate-900`}`,style:Q,children:tt})]}),d&&Object.keys(d).length>0&&(0,r.jsxs)(`div`,{className:`text-sm px-4 py-3 rounded-2xl flex items-center gap-2.5 ${p?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-800 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(re,{size:16,className:`shrink-0`}),(0,r.jsx)(`span`,{className:`font-medium`,children:`We restored your previously saved progress.`})]}),(0,r.jsxs)(`div`,{part:`notice`,className:`rounded-2xl p-4 flex items-start gap-3`,style:{backgroundColor:`color-mix(in srgb, ${R} ${p?14:7}%, transparent)`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${R} 20%, transparent)`},children:[(0,r.jsx)(`div`,{className:`shrink-0 mt-0.5`,style:{color:R},children:(0,r.jsx)(De,{size:18})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{part:`notice-title`,className:`text-xs font-bold uppercase tracking-wider`,style:{color:R},children:`Before you submit`}),(0,r.jsxs)(`p`,{className:`text-sm mt-0.5 leading-relaxed ${p?`text-zinc-300`:`text-slate-600`}`,children:[`Ensure you are a registered delegate. Fields marked `,(0,r.jsx)(`span`,{className:`text-red-500 font-semibold`,children:`*`}),` are required.`]})]})]}),(0,r.jsx)(`div`,{part:`form-card`,className:`rounded-3xl border overflow-hidden divide-y ${p?`bg-zinc-900 border-zinc-800 divide-zinc-800`:`bg-white border-slate-200/80 divide-slate-100 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:Oe.map(e=>Ye(e))}),!b&&ke.length>0&&(0,r.jsxs)(`div`,{part:`addons-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)($e,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{part:`addons-title`,className:`text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,style:Q,children:`Add-ons`}),(0,r.jsx)(`p`,{className:`text-xs ${p?`text-zinc-400`:`text-slate-500`}`,children:Ae.length>0||je.length>0?`Optional extras — charges are added to your total.`:`Included with this registration.`})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 pb-5 sm:pb-6 space-y-2`,children:[Ae.map(e=>{let t=Ne.includes(e.name);return(0,r.jsxs)(`label`,{part:t?`addon addon-selected`:`addon`,className:`p-3.5 rounded-2xl border flex items-center gap-3 cursor-pointer transition-all ${t?``:p?`border-zinc-800 bg-zinc-900 hover:border-zinc-700`:`border-slate-200 bg-white hover:border-slate-300`}`,style:t?{borderColor:R,backgroundColor:`color-mix(in srgb, ${R} ${p?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>Le(e.name),className:`w-4 h-4 rounded cursor-pointer shrink-0`,style:{accentColor:R}}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[13px] font-bold tabular-nums`,style:{color:R},children:Number(e.price)>0?`+ ${X(Number(e.price))}`:`Free`})]},e.name)}),je.map(e=>at(e)),Me.map(e=>(0,r.jsxs)(`div`,{part:`addon addon-included`,className:`p-3.5 rounded-2xl border flex items-center gap-3 ${p?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsx)(re,{size:16,className:`text-emerald-500 shrink-0`}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-zinc-300`:`text-slate-700`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[11px] font-semibold px-2.5 py-1 rounded-full ${p?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:`Included`})]},e.name))]})]}),V&&(0,r.jsxs)(`div`,{part:`accompany-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)(ot,{size:17})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{part:`accompany-title`,className:`text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,style:Q,children:`Accompanying people`}),(0,r.jsxs)(`p`,{className:`text-xs ${p?`text-zinc-400`:`text-slate-500`}`,children:[U>0?`${X(U)} per guest`:`No extra charge`,Re?` · up to ${Re}`:``]})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 pb-5 sm:pb-6 space-y-3`,children:[W.map((e,t)=>(0,r.jsxs)(`div`,{part:`accompany-guest`,className:`rounded-2xl border p-4 ${p?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50/70`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-3`,children:[(0,r.jsxs)(`span`,{className:`text-xs font-bold uppercase tracking-wider ${p?`text-zinc-400`:`text-slate-500`}`,children:[`Guest `,t+1]}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>q(t),title:`Remove guest`,className:`shrink-0 p-1.5 rounded-lg cursor-pointer transition-colors ${p?`text-zinc-500 hover:text-red-400`:`text-slate-400 hover:text-red-500`}`,children:(0,r.jsx)(et,{size:15})})]}),(0,r.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:H.map(n=>Qe(n,e,t))})]},t)),(0,r.jsxs)(`button`,{type:`button`,onClick:Ve,disabled:!G,style:{borderColor:R,color:R},className:`w-full h-12 rounded-2xl border border-dashed text-sm font-semibold flex items-center justify-center gap-2 transition-opacity hover:opacity-80 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed`,children:[(0,r.jsx)(rt,{size:16}),G?`Add guest`:`Limit of ${Re} reached`]})]})]}),!b&&dt>0&&(0,r.jsxs)(`div`,{part:`summary-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)(Ze,{size:17})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{className:`text-base font-semibold leading-tight ${p?`text-white`:`text-slate-900`}`,style:Q,children:`Order summary`}),(0,r.jsx)(`p`,{className:`text-xs mt-0.5 ${p?`text-zinc-400`:`text-slate-500`}`,children:`This is what you will be asked to pay at checkout.`})]})]}),(0,r.jsxs)(`div`,{part:`summary-lines`,className:`px-5 sm:px-8 pb-4 space-y-2.5 text-sm`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`span`,{className:`min-w-0 truncate ${p?`text-zinc-400`:`text-slate-500`}`,children:tt}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X(st)})]}),Z>0&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`span`,{className:p?`text-zinc-400`:`text-slate-500`,children:`Add-ons`}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X(Z)})]}),$>0&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsxs)(`span`,{className:p?`text-zinc-400`:`text-slate-500`,children:[`Accompanying `,W.length===1?`person`:`people`,` x `,W.length]}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X($)})]}),St>0&&(0,r.jsxs)(`div`,{part:`summary-discount`,className:`flex items-center justify-between gap-3 pt-2.5 border-t border-dashed ${p?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsxs)(`span`,{className:`min-w-0 truncate font-semibold ${p?`text-emerald-400`:`text-emerald-600`}`,children:[`Discount (`,yt.code,`)`]}),(0,r.jsxs)(`span`,{className:`shrink-0 tabular-nums font-semibold ${p?`text-emerald-400`:`text-emerald-600`}`,children:[`- `,X(St)]})]})]}),(0,r.jsxs)(`div`,{part:`coupon`,className:`px-5 sm:px-8 pb-5`,children:[yt?(0,r.jsxs)(`div`,{className:`flex items-center gap-3 p-3.5 rounded-2xl border border-dashed ${p?`border-emerald-900 bg-emerald-950/30`:`border-emerald-200 bg-emerald-50/60`}`,children:[(0,r.jsx)(re,{size:16,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsxs)(`p`,{className:`text-sm font-semibold ${p?`text-emerald-200`:`text-emerald-800`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:yt.code}),` applied`]}),(0,r.jsxs)(`p`,{className:`text-xs mt-0.5 ${p?`text-emerald-500/80`:`text-emerald-700/80`}`,children:[_t(yt,v?.currency),` — you save `,X(St),`.`]})]}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>Dt(``),className:`shrink-0 text-xs font-semibold px-3 py-1.5 rounded-full border cursor-pointer transition-colors ${p?`border-zinc-700 text-zinc-300 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-600 hover:bg-slate-50`}`,children:`Remove`})]}):(0,r.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2`,children:[(0,r.jsx)(`input`,{part:`input coupon-input`,type:`text`,value:L,onChange:e=>{ue(e.target.value),fe(null)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),Ot())},placeholder:`Have a coupon code?`,"aria-label":`Coupon code`,className:`flex-1 h-11 px-4 text-sm rounded-xl border uppercase tracking-wider transition-all focus:outline-none focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)] ${p?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 placeholder:normal-case`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 placeholder:normal-case`}`}),(0,r.jsx)(`button`,{type:`button`,onClick:Ot,className:`shrink-0 h-11 px-6 text-sm font-semibold rounded-xl border cursor-pointer transition-colors ${p?`border-zinc-700 text-zinc-200 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-700 hover:bg-slate-50`}`,children:`Apply`})]}),de&&(0,r.jsx)(`p`,{part:`coupon-error`,role:`alert`,className:`mt-2 text-xs font-medium text-red-500`,children:de}),!yt&>.length>0&&(0,r.jsxs)(`div`,{className:`mt-3`,children:[(0,r.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-wider ${p?`text-zinc-500`:`text-slate-400`}`,children:`Running offers`}),(0,r.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:gt.map(e=>(0,r.jsxs)(`button`,{type:`button`,onClick:()=>Dt(e.code),className:`inline-flex items-center gap-2 text-xs font-semibold px-3 py-1.5 rounded-full border cursor-pointer transition-colors ${p?`bg-zinc-950 border-emerald-900 text-emerald-200 hover:bg-emerald-950/40`:`bg-white border-emerald-200 text-emerald-700 hover:bg-emerald-50`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:e.code}),(0,r.jsx)(`span`,{className:p?`text-zinc-700`:`text-slate-300`,children:`|`}),(0,r.jsx)(`span`,{children:_t(e,v?.currency)})]},e.code))})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 py-4 border-t flex items-center justify-between gap-3 ${p?`border-zinc-800 bg-zinc-950/40`:`border-slate-100 bg-slate-50/70`}`,children:[(0,r.jsx)(`span`,{className:`text-sm font-semibold ${p?`text-zinc-300`:`text-slate-600`}`,children:`Total payable`}),(0,r.jsx)(`span`,{part:`summary-total`,className:`text-lg font-bold tabular-nums`,style:{color:R},children:X(wt)})]})]}),(0,r.jsxs)(`div`,{className:`pt-2 pb-10`,children:[he&&(0,r.jsx)(`div`,{part:`form-error`,role:`alert`,className:`mb-3 text-sm font-medium text-red-500 text-center`,children:he}),(0,r.jsxs)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:C!==null||T!==null,style:{background:`linear-gradient(135deg, ${R}, color-mix(in srgb, ${R} 80%, black))`,boxShadow:`0 12px 28px -12px color-mix(in srgb, ${R} 70%, transparent)`},className:`group w-full h-14 px-8 text-base font-semibold text-white rounded-2xl hover:brightness-110 active:scale-[0.99] transition-all cursor-pointer flex items-center justify-center gap-2.5 disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,r.jsx)(`span`,{children:b?`Submit Abstract`:`Complete Registration`}),(0,r.jsx)(ne,{size:18,className:`transition-transform group-hover:translate-x-0.5`})]}),(0,r.jsx)(`p`,{className:`mt-3 text-center text-xs ${p?`text-zinc-500`:`text-slate-400`}`,children:`Please review your details before submitting.`})]})]})})]})},Ct=({qrUrl:e,schema:t,amount:i,currency:a,registrationNumber:o,apiClient:s,primaryColor:c,isDark:l,onSubmitted:u})=>{let[d,f]=(0,n.useState)({}),[p,m]=(0,n.useState)({}),[h,g]=(0,n.useState)(null),[_,v]=(0,n.useState)(!1),[y,b]=(0,n.useState)(null),x=`w-full px-3 py-2.5 rounded-lg border text-sm outline-none transition-colors ${l?`bg-zinc-900 border-zinc-700 text-white placeholder-zinc-500 focus:border-zinc-500`:`bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500`}`,S=async(e,t)=>{g(e.id),b(null);try{let n=await s.uploadFile(t,null,null,e.label),r=n?.data?.asset_id||n?.asset_id;if(!r)throw Error(`Upload response missing asset_id`);f(t=>({...t,[e.id]:r})),m(n=>({...n,[e.id]:t.name}))}catch(e){b(e?.message||`File upload failed. Please try again.`)}finally{g(null)}};return(0,r.jsxs)(`div`,{part:`custom-qr`,className:`w-full max-w-sm text-left`,children:[e&&(0,r.jsxs)(`div`,{className:`flex flex-col items-center p-4 mb-5 rounded-xl border ${l?`bg-zinc-900 border-zinc-700`:`bg-gray-50 border-gray-200`}`,children:[(0,r.jsx)(`img`,{part:`custom-qr-image`,src:e,alt:`Payment QR code`,className:`w-44 h-44 object-contain rounded-lg bg-white p-2`}),i&&(0,r.jsxs)(`p`,{className:`mt-3 text-lg font-bold ${l?`text-white`:`text-gray-900`}`,style:Q,children:[a,` `,i]}),(0,r.jsx)(`p`,{className:`mt-1 text-xs text-center ${l?`text-zinc-400`:`text-gray-500`}`,children:`Scan the code to pay, then fill in the details below.`})]}),(0,r.jsx)(`div`,{className:`space-y-4`,children:t.map(e=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`label`,{className:`block text-xs font-bold mb-1.5 ${l?`text-zinc-300`:`text-gray-700`}`,children:[e.label,e.is_required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-1`,children:`*`})]}),e.type===`file`?(0,r.jsxs)(`label`,{part:`custom-qr-file`,className:`flex items-center gap-2 px-3 py-2.5 rounded-lg border border-dashed cursor-pointer text-sm transition-colors ${l?`border-zinc-700 text-zinc-300 hover:border-zinc-500`:`border-gray-300 text-gray-600 hover:border-gray-500`}`,children:[h===e.id?(0,r.jsx)(Me,{size:15,className:`animate-spin shrink-0`}):d[e.id]?(0,r.jsx)(re,{size:15,className:`shrink-0`,style:{color:c}}):(0,r.jsx)(nt,{size:15,className:`shrink-0`}),(0,r.jsx)(`span`,{className:`truncate`,children:h===e.id?`Uploading…`:p[e.id]||`Choose a file`}),(0,r.jsx)(`input`,{type:`file`,className:`hidden`,disabled:h===e.id||_,onChange:t=>{let n=t.target.files?.[0];n&&S(e,n)}})]}):(0,r.jsx)(`input`,{type:e.type===`number`?`number`:`text`,className:x,value:d[e.id]??``,disabled:_,onChange:t=>f(n=>({...n,[e.id]:t.target.value}))})]},e.id))}),y&&(0,r.jsx)(`p`,{part:`custom-qr-error`,className:`mt-3 text-sm text-red-500`,children:y}),(0,r.jsxs)(`button`,{part:`button button-primary`,type:`button`,onClick:async()=>{let e=t.find(e=>e.is_required&&!String(d[e.id]??``).trim());if(e){b(`${e.label} is required.`);return}if(!o){b(`Registration number missing — please reload and try again.`);return}v(!0),b(null);try{await s.submitCustomQrPayment(o,d),u(d)}catch(e){b(e?.message||`Could not submit your payment details. Please try again.`)}finally{v(!1)}},disabled:_||!!h,style:{backgroundColor:c},className:`mt-5 w-full flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg text-white shadow-md transition-opacity hover:opacity-90 disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer`,children:[_&&(0,r.jsx)(Me,{size:16,className:`animate-spin`}),(0,r.jsx)(`span`,{children:_?`Submitting…`:`I have paid`})]})]})},wt=new Set([`salutation`,`name`,`email`,`phone`]),Tt=new Set([`salutation`,`name`,`email`,`phone`]),Et=e=>(e||[]).flatMap(e=>e?.options?.length?Et(e.options):e?.name?[e]:[]),Dt=(e,t)=>{let n=new Set,r=Array.isArray(t)?t:[],i=new Set(r.filter(e=>typeof e==`string`).map(e=>e.trim())),a=(e,t)=>{for(let r of e||[]){let e=(t||[]).find(e=>e&&typeof e==`object`&&String(e.name||``).trim()===r?.name);if(r?.options?.length){a(r.options,e?.options||[]);continue}let o=r?.label??r?.name;o&&(r.purchased||e||i.has(o))&&n.add(o)}};return a(e,r),n},Ot=(e,t)=>e?.status?e.required===!1&&Number(e.amount||0)<=0?`not_required`:e.status===`paid`?`paid`:e.status===`pending`||e.status===`created`?`pending`:e.status:e?.state?e.state:e?.required===!1?`not_required`:t===`confirmed`?`paid`:`pending`,kt=e=>{let t=[];e?.base_amount!=null&&t.push({label:[e.type||`Registration`,e.tier].filter(Boolean).join(` · `),amount:e.base_amount});for(let n of e?.items||[]){let e=Array.isArray(n.options)?n.options.filter(Boolean):[];t.push({label:e.length?`${n.name} (${e.join(`, `)})`:n.name,amount:n.price})}return e?.accompany?.count&&t.push({label:`Accompanying guests × ${e.accompany.count}`,amount:e.accompany.total}),e?.discount&&t.push({label:`Discount · ${e.discount.code}`,amount:e.discount.amount,sign:`−`}),t},At=({apiClient:e,baseUrl:t=``,storage:i,logger:a,primaryColor:o,isDark:s=!1,isWidgetPage:c=!1,onEvent:l,onError:u})=>{let[d,f]=(0,n.useState)(()=>i.getToken()?`profile`:`login`),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[y,b]=(0,n.useState)(null),[x,S]=(0,n.useState)(null),[C,w]=(0,n.useState)(``),[T,E]=(0,n.useState)(``),[ee,D]=(0,n.useState)(``),[te,k]=(0,n.useState)(``),[A,M]=(0,n.useState)(``),[P,F]=(0,n.useState)(``),[ie,ae]=(0,n.useState)(``),[se,le]=(0,n.useState)(!1),[I,L]=(0,n.useState)(null),[ue,de]=(0,n.useState)({}),[fe,pe]=(0,n.useState)([]),[R,ge]=(0,n.useState)({}),[ve,be]=(0,n.useState)(null),[Se,we]=(0,n.useState)(null),[Ee,De]=(0,n.useState)(null),[z,ke]=(0,n.useState)(null),[je,Me]=(0,n.useState)(!1),[Ne,Fe]=(0,n.useState)(!1),[B,V]=(0,n.useState)({}),[U,W]=(0,n.useState)(!1),[ze,G]=(0,n.useState)(null),[Be,K]=(0,n.useState)({}),[Ve,q]=(0,n.useState)({}),[Ue,J]=(0,n.useState)(null),[Ke,qe]=(0,n.useState)(`details`),[Je,Xe]=(0,n.useState)({}),[Ze,Qe]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=i.getToken();e&&Y(e)},[]);let Y=async t=>{m(!0),b(null);try{let n=await e.portalGetProfile(t),r=n?.data||n||{};L(r);let o=r.registration||{},s=o.custom_data||{},c=o.email||r.email||``,u=null;if(c)try{let t=await e.getDraftByEmail(c);u=t?.data||t,a.log(`Portal resume draft data loaded by email:`,u)}catch(e){a.log(`No draft found for email in portal`,e)}else{let t=i.getXrefId();if(t)try{let n=await e.getDraft(t);u=n?.data||n}catch{}}let d=u?.custom_data||{};o.name?D(o.name):u?.name?D(u.name):r.name&&D(r.name);let p=0,m={},h=[...r.editable_fields||[]];L({...r,editable_fields:h});let g={};o.asset_id&&(g.asset_id=String(o.asset_id)),o.photo_id&&(g.photo_id=String(o.photo_id)),s.asset_id&&(g.asset_id=String(s.asset_id)),s.photo_id&&(g.photo_id=String(s.photo_id)),r.asset_id&&(g.asset_id=String(r.asset_id)),h.forEach(e=>{if(e.type===`file`){let t=o[`${e.id}_asset_id`]||s[`${e.id}_asset_id`]||o.asset_id||s.asset_id||r.asset_id;t&&(g[e.id]=String(t))}}),ge(e=>({...g,...e}));let _=o.asset_id||o.photo_id||s.asset_id||s.photo_id||r.asset_id;_&&be(String(_)),h.length>0?h.forEach(e=>{let t=e.label||e.name||e.id,n=ut(e.id,e.label),r=dt(e.label,e.id),i=!!e.builtin||Tt.has(e.id),a=``;if(i?t&&o[t]!==void 0&&o[t]!==null&&o[t]!==``?a=o[t]:o[r]!==void 0&&o[r]!==null&&o[r]!==``?a=o[r]:o[n]!==void 0&&o[n]!==null&&o[n]!==``?a=o[n]:o[e.id]!==void 0&&o[e.id]!==null&&o[e.id]!==``?a=o[e.id]:t&&s[t]!==void 0&&s[t]!==null&&s[t]!==``?a=s[t]:s[r]!==void 0&&s[r]!==null&&s[r]!==``?a=s[r]:s[n]!==void 0&&s[n]!==null&&s[n]!==``?a=s[n]:s[e.id]!==void 0&&s[e.id]!==null&&s[e.id]!==``&&(a=s[e.id]):s[n]!==void 0&&s[n]!==null&&s[n]!==``?a=s[n]:s[e.id]!==void 0&&s[e.id]!==null&&s[e.id]!==``&&(a=s[e.id]),u){let t=i?u[n]??u[e.id]??d[n]??d[e.id]??(e.id===`salutation`?u.salutation||u.title:void 0)??(e.id===`name`?u.name||u.fullName||u.full_name:void 0)??(e.id===`email`?u.email:void 0)??(e.id===`phone`?u.phone||u.mobile||u.phoneNumber:void 0):d[n]??d[e.id];t!=null&&t!==``&&(a=t,p++)}m[e.id]=a}):Object.entries(r).forEach(([e,t])=>{e.toLowerCase()!==`token`&&(m[e]=t)}),de(m),p>0&&Me(!0);let v=[...Dt(r.addons?.items||[],r.registration?.custom_data?.selected_items)];u?.selected_items&&Array.isArray(u.selected_items)&&u.selected_items.forEach(e=>{let t=typeof e==`string`?e:e?.name;t&&!v.includes(t)&&v.push(t)}),pe(v),f(`profile`),l?.(`attendee_profile_loaded`,{profile:r,draft:u})}catch(e){a.error(`Failed to load profile`,e),e?.status===401||e?.status===403?(i.clearToken(),f(`login`)):b(e?.message||`Could not load your profile. Please try again.`)}finally{m(!1)}},tt=async t=>{if(t.preventDefault(),!C.trim()||!T){b(`Please enter both your identifier and password.`);return}m(!0),b(null),S(null);try{let t=await e.portalLogin({identifier:C.trim(),password:T}),n=t?.data?.token||t?.token;if(!n)throw Error(t?.message||`No authentication token received.`);(t?.data?.name||t?.name)&&D(t.data?.name||t.name),i.setToken(n),l?.(`attendee_logged_in`,{identifier:C,response:t}),await Y(n)}catch(e){a.error(`Login failed`,e);let t=e.message||`Login failed. Please check your credentials.`;b(t),u?.({type:`login_error`,message:t,error:e})}finally{m(!1)}},X=async t=>{t.preventDefault();let n=(te||C).trim();if(!n){b(`Please enter your registration number or email to receive a code.`);return}le(!0),b(null),S(null);try{await e.portalRequestPasswordReset(n),S(`A verification code has been sent to your registered email.`),l?.(`password_reset_code_requested`,{identifier:n}),f(`reset`)}catch(e){a.error(`Failed to send reset code`,e);let t=e.message||`Failed to send code. Please verify your identifier.`;b(t),u?.({type:`portal_error`,message:t,error:e})}finally{le(!1)}},rt=async t=>{t.preventDefault();let n=(te||C).trim();if(!n){b(`Please enter your registration number or email.`);return}if(!A.trim()){b(`Please enter the verification code sent to your email.`);return}if(!P){b(`Please enter a new password.`);return}if(P!==ie){b(`New password and confirm password do not match.`);return}m(!0),b(null),S(null);try{let t=await e.portalConfirmPasswordReset({identifier:n,code:A.trim(),new_password:P}),r=t?.data?.token||t?.token;(t?.data?.name||t?.name)&&D(t.data?.name||t.name),l?.(`password_reset_success`,{identifier:n,response:t}),r?(i.setToken(r),M(``),F(``),ae(``),await Y(r)):(w(n),E(``),M(``),F(``),ae(``),f(`login`),S(`Password updated successfully! Please login with your new password.`))}catch(e){a.error(`Password reset failed`,e);let t=e.message||`Failed to update password. Please check the code.`;b(t),u?.({type:`portal_error`,message:t,error:e})}finally{m(!1)}},it=()=>{i.clearToken(),L(null),de({}),pe([]),ge({}),be(null),De(null),ke(null),D(``),E(``),Me(!1),Fe(!1),V({}),q({}),K({}),J(null),Xe({}),qe(`details`),b(null),f(`login`),S(`Logged out successfully.`),l?.(`attendee_logged_out`,{})},at=(e,t)=>L(n=>{if(!n)return n;let r=(n.editable_fields||[]).find(t=>t.id===e),i={...n.file_answers||{}};return[e,r?ut(r.id,r.label):e].forEach(e=>{t?i[e]=t:delete i[e]}),{...n,file_answers:i}}),st=async(t,n)=>{let r=i.getToken();if(!r){b(`Session expired. Please log in again.`);return}let o=lt(ue[t])||I?.file_answers?.[t]?.id||``;v(t),b(null),S(null);try{let i=await e.uploadFile(n,r),s=i?.data?.serve_url||i?.serve_url||``,c=i?.data?.asset_id||i?.asset_id;if(!c&&!s)throw Error(`Upload response missing asset_id`);de(e=>({...e,[t]:s||String(c)})),c&&(ge(e=>({...e,[t]:String(c)})),be(String(c)));let u=String(c||lt(s));if(at(t,{id:u,file_name:n.name,serve_url:s||null,text:``}),S(`File "${n.name}" uploaded successfully!`),l?.(`portal_file_uploaded`,{fieldId:t,serveUrl:s,assetId:c,response:i}),o&&o!==u)try{await e.portalDeleteFile(r,o),l?.(`portal_file_deleted`,{assetId:o,fieldId:t})}catch(e){a.error(`Could not delete replaced file`,e)}}catch(e){a.error(`File upload failed`,e);let t=e.message||`File upload failed. Please try again.`;b(t),u?.({type:`file_upload_error`,message:t,error:e})}finally{v(null)}},ct=async t=>{let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=ue[t],o=lt(r)||R[t]||ve;we(t),b(null),S(null);try{o&&(a.log(`Deleting asset ${o} for field ${t}...`),await e.portalDeleteFile(n,o),a.log(`Asset ${o} deleted successfully.`),l?.(`portal_file_deleted`,{assetId:o,fieldId:t})),de(e=>({...e,[t]:``})),ge(e=>{let n={...e};return delete n[t],n}),ve===o&&be(null),at(t,null),S(`File removed successfully.`)}catch(e){a.error(`Failed to delete file`,e);let t=e.message||`Failed to delete file. Please try again.`;b(t),u?.({type:`file_delete_error`,message:t,error:e})}finally{we(null)}},$=(e,t)=>{t||pe(t=>t.includes(e)?t.filter(t=>t!==e):mt(e,t)?t:[...t,e])},mt=(e,t=fe)=>{let n=e=>e?.options?.length?e.options.some(n):t.includes(e?.label??e?.name),r=t=>(t||[]).some(t=>{if(!t?.options?.length||!Et([t]).some(t=>(t.label??t.name)===e))return!1;let i=Number(t.max)||0;return i&&t.options.filter(n).length>=i||r(t.options)});return r(I?.addons?.items||[])},ht=async t=>{t.preventDefault();let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=I?.locked_fields||[],o=pt((I?.editable_fields||[]).filter(e=>!r.includes(e.id)&&!r.includes(ut(e.id,e.label))),e=>ue[e.id]);if(o){S(null),b(o);return}g(!0),b(null),S(null);try{let t=I?.editable_fields||[],r={...I?.registration?.custom_data||{}},i={};if(t.forEach(e=>{let t=ue[e.id],n=e.label||e.name||e.id,a=dt(e.label,e.id),o=ut(e.id,e.label),s=!!e.builtin||Tt.has(e.id);if(e.type===`file`){let s=typeof t==`string`?t:t?.serve_url||t?.url||``;delete r[n],delete r[a],r[o]=s,i[e.id]=s}else s?(i[o]=t,o!==e.id&&(i[e.id]=t)):(r[o]=t,o!==e.id&&(r[e.id]=t),i[e.id]=t)}),i.custom_data=r,i.addons=fe,typeof window<`u`){let e=new URL(window.location.href);e.searchParams.delete(`rn`),i.success_url=e.toString()}let a=await e.portalUpdateProfile(n,i);l?.(`attendee_profile_updated`,{payload:i,response:a});let o=a?.data?.addon_checkout||a?.addon_checkout;if(o?.custom_qr){ke({qr_url:o.custom_qr.qr_url??null,schema:o.custom_qr.schema||[],amount:o.amount??null,currency:o.currency??null}),S(`Add-ons updated! Scan the QR code below to pay for them.`),l?.(`addon_custom_qr_opened`,{order_number:o.order_number}),await Y(n);return}let s=a?.data?.addon_checkout?.payment_url||a?.addon_checkout?.payment_url||a?.data?.payment_url||a?.payment_url;if(s&&typeof s==`string`&&s.trim()!==``){De(s),S(`Add-ons updated! Opening payment page in a new tab...`),l?.(`addon_payment_opened`,{payment_url:s}),window.open(s,`_blank`,`noopener,noreferrer`),await Y(n);return}S(`Profile updated successfully!`),await Y(n)}catch(e){a.error(`Failed to update profile`,e);let t=e.message||`Failed to update profile. Please try again.`;b(t),u?.({type:`profile_update_error`,message:t,error:e})}finally{g(!1)}},gt=()=>{let e=I?.review_submission;if(!e)return;let t=e.custom_data||{},n={},r={};(e.editable_fields||[]).forEach(i=>{i.id===`name`?n[i.id]=e.name||``:i.id===`phone`?n[i.id]=e.phone||``:i.id===`registration_type`?n[i.id]=e.registration_type||``:n[i.id]=t[i.id]??t[ut(i.id,i.label)]??``,i.type===`file`&&(r[i.id]=i.current_file?.text||``)}),V(n),q(r),K({}),Fe(!0)},_t=e=>{if(Be[e.id])return Be[e.id];let t=e.current_file;return t&&!t.serve_url&&t.text?`text`:`file`},vt=async(t,n)=>{if(!i.getToken()){b(`Session expired. Please log in again.`);return}let r=(I?.review_submission?.editable_fields||[]).find(e=>e.id===t),o=r?.current_file?.id,s=I?.review_submission?.email||I?.registration?.email||null;G(t),b(null),S(null);try{if(o)try{await e.deleteFile(o,null,s)}catch(e){a.error(`Could not delete replaced submission file`,e)}let i=await e.uploadFile(n,null,s,r?.label),c=i?.data?.asset_id||i?.asset_id;if(!c)throw Error(`Upload response missing asset_id`);V(e=>({...e,[t]:String(c)}));let u=i?.data?.serve_url||i?.serve_url||null;L(e=>e?.review_submission?{...e,review_submission:{...e.review_submission,editable_fields:(e.review_submission.editable_fields||[]).map(e=>e.id===t?{...e,current_file:{id:String(c),file_name:n.name,serve_url:u,text:``}}:e)}}:e),S(`File "${n.name}" uploaded successfully!`),l?.(`portal_submission_file_uploaded`,{fieldId:t,assetId:c,response:i})}catch(e){a.error(`Submission file upload failed`,e);let t=e.message||`File upload failed. Please try again.`;b(t),u?.({type:`file_upload_error`,message:t,error:e})}finally{G(null)}},yt=async t=>{let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=(Ve[t]||``).trim();if(!r)return;let o=(I?.review_submission?.editable_fields||[]).find(e=>e.id===t),s=Number(o?.word_limit)||0;if(s&&ft(r)>s){S(null),b(`${o?.label||`This answer`} is over the ${s}-word limit.`);return}G(t),b(null),S(null);try{let i=await e.portalUpdateSubmission(n,{[t]:{text:r}}),a=i?.data||i;L(e=>({...e,review_submission:a}));let o=(a?.editable_fields||[]).find(e=>e.id===t)?.current_file?.id;o&&V(e=>({...e,[t]:String(o)})),S(`Text answer saved!`),l?.(`portal_submission_text_saved`,{fieldId:t})}catch(e){a.error(`Submission text answer failed`,e);let t=e.message||`Could not save your answer. Please try again.`;b(t),u?.({type:`submission_text_error`,message:t,error:e})}finally{G(null)}},xt=async t=>{t.preventDefault();let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=pt((I?.review_submission?.editable_fields||[]).filter(e=>e.id!==`registration_type`),e=>B[e.id]);if(r){S(null),b(r);return}W(!0),b(null),S(null);try{let t=await e.portalUpdateSubmission(n,B),r=t?.data||t;L(e=>({...e,review_submission:r})),Fe(!1),S(`Your submission was updated successfully!`),l?.(`attendee_submission_updated`,{payload:B,response:t})}catch(e){a.error(`Failed to update submission`,e);let t=e.message||`Failed to update submission. Please try again.`;b(t),u?.({type:`submission_update_error`,message:t,error:e})}finally{W(!1)}},St=e=>wt.has(e.id)?e.id:ut(e.id,e.label),At=(e,t)=>(wt.has(t.id)?e[t.id]:(e.custom_data||{})[St(t)])??``,jt=(e,t)=>Xe(n=>wt.has(e.id)?{...n,[e.id]:t}:{...n,custom_data:{...n.custom_data||{},[St(e)]:t}}),Mt=e=>{J(e.id),b(null),Xe({id:e.id,salutation:e.salutation||``,name:e.name||``,email:e.email||``,phone:e.phone||``,custom_data:{...e.custom_data||{}}})},Nt=async()=>{let t=i.getToken();if(!t){b(`Session expired. Please log in again.`);return}let n=pt(I?.accompany_fields||[],e=>At(Je,e));if(n){S(null),b(n);return}Qe(!0),b(null),S(null);try{let n=await e.portalUpdateProfile(t,{accompanying:[Je]});J(null),S(`Accompanying person updated.`),l?.(`attendee_accompanying_updated`,{payload:Je,response:n}),await Y(t)}catch(e){a.error(`Failed to update accompanying person`,e);let t=e.message||`Could not update this person. Please try again.`;b(t),u?.({type:`accompanying_update_error`,message:t,error:e})}finally{Qe(!1)}},Pt=()=>(0,r.jsxs)(`div`,{className:`absolute inset-0 pointer-events-none overflow-hidden z-0 select-none`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 pointer-events-none`,style:{background:s?`linear-gradient(180deg, rgba(9,9,11,0.5) 0%, rgba(9,9,11,0.7) 100%)`:`linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(248,250,252,0.2) 100%)`}}),(0,r.jsx)(`div`,{className:`absolute -top-16 -right-16 w-72 h-72 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 16%, transparent) 0%, color-mix(in srgb, ${o} 3%, transparent) 60%, transparent 80%)`}}),(0,r.jsx)(`div`,{className:`absolute top-1/3 -left-20 w-80 h-80 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 12%, transparent) 0%, color-mix(in srgb, ${o} 2%, transparent) 55%, transparent 75%)`}}),(0,r.jsx)(`div`,{className:`absolute -bottom-10 right-1/4 w-64 h-64 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 9%, transparent) 0%, transparent 70%)`}}),!s&&(0,r.jsx)(`div`,{className:`absolute inset-0 opacity-[0.03]`,style:{backgroundImage:`radial-gradient(${o} 1px, transparent 1px)`,backgroundSize:`16px 16px`}})]}),Ft=e=>{let t=(e.label||e.id||``).toLowerCase(),n=e.type;return n===`email`||t.includes(`email`)||t.includes(`mail`)?(0,r.jsx)(H,{size:13,className:`shrink-0`,style:{color:o}}):n===`phone`||t.includes(`phone`)||t.includes(`mobile`)||t.includes(`contact`)?(0,r.jsx)(We,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`salutation`)||t.includes(`title`)||t.includes(`prefix`)?(0,r.jsx)(Ye,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`name`)||t.includes(`attendee`)?(0,r.jsx)(Z,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`designat`)||t.includes(`role`)||t.includes(`position`)||t.includes(`profession`)?(0,r.jsx)(j,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`specialis`)||t.includes(`specializ`)||t.includes(`department`)||t.includes(`degree`)?(0,r.jsx)(Ce,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`organi`)||t.includes(`institute`)||t.includes(`hospital`)||t.includes(`company`)||t.includes(`college`)?(0,r.jsx)(N,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`city`)||t.includes(`state`)||t.includes(`country`)||t.includes(`address`)?(0,r.jsx)(Re,{size:13,className:`shrink-0`,style:{color:o}}):n===`file`?(0,r.jsx)(xe,{size:13,className:`shrink-0`,style:{color:o}}):(0,r.jsx)(ye,{size:13,className:`shrink-0`,style:{color:o}})},It=(e,t=`w-full`,n=[])=>{if(!e)return null;let i=n.includes(e.id)||n.includes(ut(e.id,e.label)),a=ue[e.id]??``,o=`vx-profile-${e.id}`,c=`w-full min-h-11 px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${i?s?`bg-zinc-800/60 text-zinc-500 border-zinc-800 cursor-not-allowed`:`bg-slate-50 text-slate-500 border-slate-200 cursor-not-allowed`:s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`;return(0,r.jsxs)(`div`,{className:`${t} px-2 mb-4`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1.5`,children:[(0,r.jsxs)(`label`,{part:`field-label`,htmlFor:o,className:`flex items-center gap-1.5 text-[13px] font-semibold ${s?`text-zinc-200`:`text-slate-800`}`,children:[(0,r.jsx)(`span`,{className:s?`text-zinc-500`:`text-slate-400`,children:Ft(e)}),(0,r.jsx)(`span`,{children:e.label}),e.required&&(0,r.jsx)(`span`,{className:`text-red-500 font-semibold`,children:`*`})]}),i?(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full ${s?`text-zinc-400 bg-zinc-800`:`text-slate-500 bg-slate-100`}`,children:[(0,r.jsx)(Pe,{size:10}),` Locked`]}):null]}),e.type===`file`?Lt(e,i,a):(0,r.jsx)(bt,{field:e,id:o,value:a,disabled:i,onChange:t=>de({...ue,[e.id]:t}),className:c,isDark:s,placeholder:e.placeholder||`Enter ${(e.label||``).toLowerCase()}`})]},e.id)},Lt=(e,t,n)=>{let i=_===e.id,a=e.label||e.name||e.id,c=I?.file_answers?.[e.id],l=typeof n==`string`?/^https?:\/\//i.test(n)?n:``:n?.serve_url||n?.url||``,u=c?.serve_url||l,d=c?.text||``,f=c?.file_name||(typeof n==`string`?u:n?.file_name||u);return(0,r.jsx)(`div`,{className:`space-y-2`,children:(0,r.jsxs)(`div`,{part:`upload`,className:`p-4 rounded-2xl border border-dashed transition-all ${s?`bg-zinc-950/60 border-zinc-700 hover:border-zinc-600`:`bg-slate-50 border-slate-300 hover:border-[color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,r.jsx)(`div`,{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border`,style:{backgroundColor:s?`rgba(255,255,255,0.06)`:`color-mix(in srgb, ${o} 8%, white)`,borderColor:s?`rgba(255,255,255,0.12)`:`color-mix(in srgb, ${o} 20%, white)`,color:o},children:(0,r.jsx)(xe,{size:16})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`p`,{className:`text-xs font-bold ${s?`text-zinc-200`:`text-gray-900`}`,children:a}),(0,r.jsx)(`p`,{className:`text-2xs font-medium ${s?`text-zinc-400`:`text-gray-500`}`,children:d?`Answered with text`:n?`Document attached`:`Choose a file to upload`})]})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-2`,children:(u.trim()!==``||d)&&(0,r.jsxs)(r.Fragment,{children:[u.trim()!==``&&(0,r.jsxs)(`a`,{href:u,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 py-1.5 px-3 rounded-lg text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0`,style:{backgroundColor:o},title:`Open file in new tab`,children:[(0,r.jsx)(ye,{size:13}),(0,r.jsx)(`span`,{children:`View`}),(0,r.jsx)(_e,{size:11})]}),!t&&(0,r.jsxs)(`button`,{type:`button`,disabled:Se===e.id||i,onClick:()=>ct(e.id),className:`flex items-center gap-1 py-1.5 px-2.5 rounded-lg text-xs font-semibold border backdrop-blur-sm transition-colors cursor-pointer ${s?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50/80 text-red-600 hover:bg-red-100`}`,title:`Remove file`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:Se===e.id?`Deleting...`:`Delete`})]})]})})]}),d?(0,r.jsx)(`div`,{className:`mt-2 pt-2 border-t ${s?`border-zinc-800`:`border-gray-200`}`,children:(0,r.jsx)(`p`,{className:`text-2xs whitespace-pre-wrap break-words m-0 max-h-48 overflow-y-auto ${s?`text-zinc-300`:`text-gray-700`}`,children:d})}):n?(0,r.jsxs)(`div`,{className:`mt-2 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${s?`border-zinc-800 text-zinc-300`:`border-gray-200 text-gray-700 font-medium`}`,children:[(0,r.jsx)(re,{size:12,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`Attached: `,f]})]}):null,!t&&(0,r.jsx)(`div`,{className:`mt-3 pt-3 border-t ${s?`border-zinc-800`:`border-slate-200`}`,children:(0,r.jsxs)(`label`,{className:`cursor-pointer relative`,children:[(0,r.jsx)(`input`,{type:`file`,className:`hidden`,style:{display:`none`},tabIndex:-1,disabled:i,onChange:t=>{let n=t.target.files?.[0];n&&st(e.id,n),t.target.value=``}}),(0,r.jsxs)(`div`,{className:`inline-flex items-center gap-1.5 py-1.5 px-3 rounded-lg text-xs font-semibold border transition-all shadow-2xs ${s?`border-zinc-700 hover:border-zinc-600 text-zinc-200 bg-zinc-800 hover:bg-zinc-750`:`border-gray-300 hover:border-gray-400 text-gray-800 bg-white hover:bg-gray-50`}`,children:[(0,r.jsx)(nt,{size:13,style:{color:o}}),(0,r.jsx)(`span`,{children:i?`Uploading...`:n?`Replace File`:`Choose File`})]})]})})]})})};if(d===`profile`&&!I&&!p&&y)return(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[Pt(),(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-3 relative z-10`,children:[(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsx)(`button`,{part:`button button-primary`,type:`button`,onClick:()=>{let e=i.getToken();e?Y(e):f(`login`)},className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white cursor-pointer`,style:{backgroundColor:o},children:`Try again`})]})]});if(d===`profile`&&!I){let e=`vx-skeleton rounded-full`,t=`rounded-3xl border p-5 sm:p-6 ${s?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`;return(0,r.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:`Loading your profile…`}),Pt(),(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-5 relative z-10`,children:[(0,r.jsxs)(`div`,{className:t,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-12 h-12 sm:w-14 sm:h-14 rounded-2xl shrink-0`}),(0,r.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-5 w-48 max-w-full`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-64 max-w-full`})]})]}),(0,r.jsx)(`div`,{className:`mt-5 pt-5 border-t grid grid-cols-2 sm:grid-cols-3 gap-4 ${s?`border-zinc-800`:`border-slate-100`}`,children:[0,1,2].map(t=>(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-2.5 w-20`}),(0,r.jsx)(`div`,{className:`${e} h-4 w-28`})]},t))})]}),(0,r.jsxs)(`div`,{className:t,children:[(0,r.jsx)(`div`,{className:`${e} h-4 w-32`}),(0,r.jsx)(`div`,{className:`mt-6 grid gap-4 md:grid-cols-2`,children:[0,1,2,3].map(t=>(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-3 w-24`}),(0,r.jsx)(`div`,{className:`vx-skeleton h-11 w-full rounded-xl`})]},t))})]})]})]})}if(d===`profile`){let n=I?.registration||{},a=I?.editable_fields||[],u=I?.locked_fields||[],d=(Array.isArray(I?.payment)?I.payment:I?.payment?[I.payment]:[]).map(e=>({...e,state:Ot(e,n.status)})).filter(e=>e.state!==`not_required`),f=d.filter(e=>e.state===`pending`),p=d[0]?.currency||``,m=e=>e.reduce((e,t)=>e+Number(t.amount||0),0),g=I?.addons?.items||[],v=Dt(g,I?.registration?.custom_data?.selected_items),C=fe.some(e=>!v.has(e)),w=(e,t=!1)=>{if(e?.options?.length){let n=e.price!=null&&e.price!==``,i=n&&Number(e.price)||0;return(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-1 pt-1`,children:[(0,r.jsxs)(`span`,{className:`text-xs font-bold uppercase tracking-wider ${s?`text-zinc-300`:`text-slate-600`}`,children:[e.name,Number(e.max)>0&&(0,r.jsxs)(`span`,{className:`ml-2 font-medium normal-case tracking-normal ${s?`text-zinc-500`:`text-slate-400`}`,children:[`up to `,e.max]})]}),n&&(0,r.jsx)(`span`,{className:`text-[13px] font-bold tabular-nums shrink-0`,style:{color:o},children:t?`Included`:i>0?`${e.currency} ${i.toLocaleString()}`:`Free`})]}),(0,r.jsx)(`div`,{className:`space-y-2 pl-3`,children:e.options.map(e=>w(e,t||n))})]},e.name)}let n=e.label??e.name,i=v.has(n),a=fe.includes(n),c=!i&&!a&&mt(n);return(0,r.jsxs)(`label`,{className:`p-3.5 rounded-2xl border flex items-center gap-3 transition-all ${c?`opacity-50`:``} ${i?s?`bg-zinc-950/60 border-zinc-800 cursor-default`:`bg-slate-50 border-slate-200 cursor-default`:a?`cursor-pointer`:s?`border-zinc-800 bg-zinc-900 hover:border-zinc-700 cursor-pointer`:`border-slate-200 bg-white hover:border-slate-300 cursor-pointer`}`,style:a&&!i?{borderColor:o,backgroundColor:`color-mix(in srgb, ${o} ${s?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:a,disabled:i||c,onChange:()=>$(n,i),className:`w-4 h-4 rounded cursor-pointer shrink-0 disabled:cursor-default`,style:{accentColor:o}}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold leading-snug ${s?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`div`,{className:`text-[13px] font-semibold mt-0.5 tabular-nums`,style:{color:o},children:t?`Included`:`${e.currency} ${Number(e.price).toLocaleString()}`})]}),i&&(0,r.jsxs)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold flex items-center gap-1 shrink-0 ${s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(re,{size:12}),` Purchased`]})]},e.name)},T=I?.badge||null,E=I?.accompanying||[],D=I?.accompany_fields||[],te=`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`,O=I?.review_submission||null,k=ee||`Attendee`,ne=k.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()).join(``)||`A`,A=`rounded-3xl border p-5 sm:p-6 ${s?`bg-zinc-900 border-zinc-800 text-white`:`bg-white border-slate-200/80 text-slate-900 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,j=s?`text-zinc-400`:`text-slate-500`,M=`text-base font-semibold tracking-tight ${s?`text-white`:`text-slate-900`}`,N=[{label:`Registration no.`,value:n.registration_number||`N/A`,mono:!0},{label:`Registration type`,value:n.registration_type||`N/A`},...d.length>0?[{label:`Payment`,value:f.length?`Pending · ${p} ${m(f).toLocaleString()}`:`Paid · ${p} ${m(d.filter(e=>e.state===`paid`)).toLocaleString()}`,capitalize:!0}]:[]],P=[{key:`details`,label:`Details`,icon:Z,count:0},...g.length>0?[{key:`addons`,label:`Add-ons`,icon:$e,count:Et(g).length}]:[],...T?[{key:`badge`,label:`Badge`,icon:Te,count:0}]:[],...E.length>0?[{key:`guests`,label:`Guests`,icon:ot,count:E.length}]:[],...d.length>0?[{key:`payments`,label:`Payments`,icon:Ge,count:d.length}]:[],...O?[{key:`submission`,label:`Submission`,icon:ye,count:0}]:[]],F=P.some(e=>e.key===Ke)?Ke:`details`,ie=e=>{qe(e),b(null),S(null)};return(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,style:c?void 0:{overflow:`clip`},onScroll:c?void 0:e=>{e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0)},children:[Pt(),(0,r.jsx)(`div`,{className:`${c?`w-full flex-1`:`flex-1 overflow-y-auto min-h-0 overscroll-contain`} relative z-10`,children:(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-5`,children:[(0,r.jsxs)(`div`,{part:`portal-card profile-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 sm:gap-4 min-w-0`,children:[(0,r.jsx)(`div`,{className:`w-12 h-12 sm:w-14 sm:h-14 rounded-2xl flex items-center justify-center shrink-0 text-base sm:text-lg font-bold text-white`,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 75%, black))`},"aria-hidden":`true`,children:ne}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,r.jsx)(`h3`,{part:`portal-title`,style:Q,className:`text-lg sm:text-xl font-bold tracking-tight break-words ${s?`text-white`:`text-slate-900`}`,children:k}),n.status&&(0,r.jsx)(`span`,{className:`px-2.5 py-0.5 rounded-full text-[11px] font-semibold capitalize ${s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:n.status})]}),(0,r.jsx)(`p`,{className:`text-[13px] mt-0.5 ${j}`,children:`Manage your registration and details`})]})]}),(0,r.jsxs)(`button`,{part:`button button-secondary logout-button`,onClick:it,className:`shrink-0 inline-flex items-center justify-center gap-1.5 h-9 w-9 sm:w-auto sm:px-3.5 text-[13px] font-semibold rounded-full border transition-colors cursor-pointer ${s?`text-zinc-300 border-zinc-700 hover:bg-zinc-800 hover:text-red-300`:`text-slate-600 border-slate-200 bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200`}`,title:`Logout`,"aria-label":`Logout`,children:[(0,r.jsx)(Le,{size:14}),(0,r.jsx)(`span`,{className:`hidden sm:inline`,children:`Logout`})]})]}),(0,r.jsx)(`dl`,{className:`mt-5 pt-5 border-t grid grid-cols-2 ${N.length===3?`sm:grid-cols-3`:`sm:grid-cols-2`} gap-4 ${s?`border-zinc-800`:`border-slate-100`}`,children:N.map(e=>(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:e.label}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold break-words ${e.mono?`font-mono`:``} ${e.capitalize?`capitalize`:``} ${s?`text-white`:`text-slate-900`}`,children:e.value})]},e.label))}),n.status===`pending`&&f.length>0&&(0,r.jsxs)(`div`,{part:`provisional-note`,role:`note`,className:`mt-4 flex items-start gap-2 rounded-xl px-3.5 py-2.5 text-[13px] leading-relaxed ${s?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(oe,{size:15,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:`This is a temporary registration number. Your registration will be confirmed once your payment is verified.`})]})]}),P.length>1&&(0,r.jsx)(`div`,{part:`portal-tabs`,role:`tablist`,className:`${c?``:`sticky top-0`} z-20 flex gap-1 p-1 rounded-2xl border overflow-x-auto backdrop-blur-xl ${s?`bg-zinc-900/90 border-zinc-800`:`bg-white/90 border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_8px_24px_-14px_rgba(15,23,42,0.18)]`}`,style:{scrollbarWidth:`none`},children:P.map(e=>{let t=e.icon,n=e.key===F;return(0,r.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n,part:`portal-tab${n?` portal-tab-active`:``}`,onClick:()=>ie(e.key),className:`flex-1 min-w-fit inline-flex items-center justify-center gap-1.5 h-10 px-3.5 rounded-xl text-[13px] font-semibold whitespace-nowrap transition-all cursor-pointer ${n?`text-white shadow-sm`:s?`text-zinc-400 hover:text-white hover:bg-zinc-800`:`text-slate-500 hover:text-slate-900 hover:bg-slate-100`}`,style:n?{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`}:void 0,children:[(0,r.jsx)(t,{size:15}),(0,r.jsx)(`span`,{children:e.label}),e.count>0&&(0,r.jsx)(`span`,{className:`min-w-[18px] h-[18px] px-1 rounded-full text-[10.5px] font-bold inline-flex items-center justify-center tabular-nums ${n?`bg-white/25 text-white`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.count})]},e.key)})}),(F===`details`||F===`addons`)&&(0,r.jsxs)(`form`,{onSubmit:ht,className:`space-y-5`,children:[F===`details`&&(a.length===0?(0,r.jsx)(`div`,{className:`${A} text-center text-sm ${j}`,children:`No editable fields configured.`}):(0,r.jsxs)(`div`,{part:`portal-card details-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-5`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your details`}),(0,r.jsx)(`p`,{className:`text-[13px] mt-0.5 ${j}`,children:`Keep your information up to date.`})]}),je&&(0,r.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full shrink-0 ${s?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(re,{size:11}),` Draft restored`]})]}),(0,r.jsx)(`div`,{className:`flex flex-wrap -mx-2 -mb-4`,children:a.map(e=>It(e,e.type===`file`||e.width===`full`?`w-full`:`w-full md:w-1/2`,u))})]})),F===`addons`&&g.length>0&&(0,r.jsxs)(`div`,{part:`portal-card addons-card`,className:A,children:[(0,r.jsx)(`div`,{className:`flex items-start justify-between gap-3 mb-4`,children:(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)($e,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Add-ons`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Select items to add to your registration`})]})]})}),(0,r.jsx)(`div`,{className:`space-y-2`,children:g.map(e=>w(e))})]}),(0,r.jsx)(`div`,{className:`pt-1 pb-6`,children:(0,r.jsx)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:h||_!==null||F===`addons`&&!C,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${o} 70%, transparent)`},className:`w-full h-12 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed`,children:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Saving...`})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(He,{size:16}),(0,r.jsx)(`span`,{children:F===`addons`?`Update add-ons`:`Save changes`})]})})})]}),F===`badge`&&T&&(0,r.jsxs)(`div`,{part:`portal-card badge-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(Te,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your badge`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`View or download your event badge.`})]})]}),(0,r.jsx)(`div`,{className:`rounded-2xl border overflow-hidden ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:(0,r.jsx)(`img`,{src:T,alt:`Your event badge`,className:`w-full max-h-96 object-contain`})}),(0,r.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2.5`,children:[(0,r.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(_e,{size:13}),(0,r.jsx)(`span`,{children:`View badge`})]}),(0,r.jsxs)(`a`,{href:T,download:!0,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white`,style:{backgroundColor:o},children:[(0,r.jsx)(he,{size:13}),(0,r.jsx)(`span`,{children:`Download badge`})]})]})]}),F===`guests`&&E.length>0&&(0,r.jsxs)(`div`,{part:`portal-card accompanying-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(ot,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Accompanying people`}),(0,r.jsxs)(`p`,{className:`text-[13px] ${j}`,children:[E.length,` registered with you, each with their own badge.`]})]})]}),(0,r.jsx)(`div`,{className:`space-y-3`,children:E.map(e=>(0,r.jsxs)(`div`,{part:`accompanying-person`,className:`rounded-2xl border p-4 ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold ${s?`text-white`:`text-slate-900`}`,children:[e.salutation,e.name].filter(Boolean).join(` `)}),(0,r.jsx)(`div`,{className:`text-xs mt-0.5 truncate ${j}`,children:[e.registration_number,e.email].filter(Boolean).join(` · `)})]}),(0,r.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,r.jsx)(`span`,{className:`text-[11px] font-semibold px-2.5 py-1 rounded-full ${e.status===`confirmed`?`bg-emerald-100 text-emerald-700`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-200 text-slate-600`}`,children:e.status}),D.length>0&&Ue!==e.id&&(0,r.jsxs)(`button`,{type:`button`,onClick:()=>Mt(e),className:`inline-flex items-center gap-1.5 h-8 px-3 rounded-full text-xs font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(Z,{size:12}),(0,r.jsx)(`span`,{children:`Edit`})]})]})]}),Ue===e.id&&(0,r.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[D.map(t=>{let n=e.file_answers?.[St(t)];return(0,r.jsxs)(`label`,{className:`block`,children:[(0,r.jsxs)(`span`,{className:`block text-xs font-semibold mb-1.5 ${s?`text-zinc-300`:`text-slate-700`}`,children:[t.label,t.required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`})]}),t.type===`file`?(0,r.jsx)(`p`,{className:`text-[13px] m-0 whitespace-pre-wrap break-words max-h-48 overflow-y-auto ${j}`,children:n?.serve_url?(0,r.jsx)(`a`,{href:n.serve_url,target:`_blank`,rel:`noopener noreferrer`,style:{color:o},children:n.file_name||`View file`}):n?.text||`—`}):(0,r.jsx)(bt,{field:t,value:At(Je,t),onChange:e=>jt(t,e),className:te,isDark:s})]},t.id)}),(0,r.jsxs)(`div`,{className:`flex flex-wrap gap-2.5 pt-1`,children:[(0,r.jsxs)(`button`,{type:`button`,disabled:Ze,onClick:Nt,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white disabled:opacity-60`,style:{backgroundColor:o},children:[(0,r.jsx)(re,{size:13}),(0,r.jsx)(`span`,{children:Ze?`Saving...`:`Save changes`})]}),(0,r.jsx)(`button`,{type:`button`,disabled:Ze,onClick:()=>J(null),className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:`Cancel`})]})]}),e.badge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`div`,{className:`mt-3 rounded-xl border overflow-hidden ${s?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`img`,{src:e.badge,alt:`${e.name} badge`,className:`w-full max-h-64 object-contain`})}),(0,r.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2.5`,children:[(0,r.jsxs)(`a`,{href:e.badge,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(_e,{size:13}),(0,r.jsx)(`span`,{children:`View badge`})]}),(0,r.jsxs)(`a`,{href:e.badge,download:!0,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white`,style:{backgroundColor:o},children:[(0,r.jsx)(he,{size:13}),(0,r.jsx)(`span`,{children:`Download badge`})]})]})]})]},e.id))})]}),F===`payments`&&d.length>0&&(0,r.jsxs)(`div`,{part:`portal-card payments-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(Ge,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Payments`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Every order on your registration, with receipts.`})]})]}),(0,r.jsx)(`div`,{className:`space-y-2`,children:d.map((e,t)=>{let n=e.state===`paid`,i=kt(e.pricing_breakdown);return(0,r.jsxs)(`div`,{className:`p-3.5 rounded-2xl border flex items-center gap-3 ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold leading-snug truncate ${s?`text-white`:`text-slate-900`}`,children:e.order_number||`Registration fee`}),e.amount&&(0,r.jsx)(`div`,{className:`text-[13px] font-semibold mt-0.5 tabular-nums`,style:{color:o},children:[e.currency,Number(e.amount).toLocaleString()].filter(Boolean).join(` `)}),i.length>0&&(0,r.jsx)(`div`,{className:`mt-1.5 space-y-0.5`,children:i.map((t,n)=>(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[12px] ${j}`,children:[(0,r.jsx)(`span`,{className:`truncate`,children:t.label}),(0,r.jsxs)(`span`,{className:`tabular-nums shrink-0`,children:[t.sign,e.currency,` `,Number(t.amount).toLocaleString()]})]},n))})]}),(0,r.jsx)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold capitalize shrink-0 ${n?s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`:e.state===`pending`?s?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.state}),e.receipt_url&&(0,r.jsxs)(`a`,{href:e.receipt_url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px] font-semibold hover:underline underline-offset-4 shrink-0`,style:{color:o},children:[(0,r.jsx)(`span`,{children:`Receipt`}),(0,r.jsx)(_e,{size:11})]})]},e.order_number||t)})})]}),F===`submission`&&O&&(0,r.jsxs)(`div`,{part:`portal-card submission-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(ye,{size:17})}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your submission`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:O.registration_type_label||`Abstract submission`})]}),(0,r.jsx)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold capitalize shrink-0 ${O.verdict===`accepted`?s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`:O.verdict===`rejected`?s?`bg-red-950/60 text-red-300`:`bg-red-50 text-red-700`:s?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`}`,children:O.verdict})]}),(0,r.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:`Submission no.`}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold font-mono ${s?`text-white`:`text-slate-900`}`,children:O.submission_number||`N/A`})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:`Status`}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold capitalize ${s?`text-white`:`text-slate-900`}`,children:O.status})]})]}),Ne?(0,r.jsxs)(`form`,{onSubmit:xt,className:`mt-4 pt-4 border-t space-y-3.5 ${s?`border-zinc-800`:`border-slate-100`}`,children:[(O.editable_fields||[]).map(e=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`label`,{className:`block text-[13px] font-semibold mb-1.5 ${s?`text-zinc-200`:`text-slate-800`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500`,children:` *`})]}),e.type===`file`?(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`button`,{type:`button`,disabled:ze===e.id,onClick:()=>K(t=>({...t,[e.id]:_t(e)===`file`?`text`:`file`})),className:`mb-1.5 text-[12px] font-semibold underline disabled:opacity-50 ${s?`text-zinc-400`:`text-slate-500`}`,children:_t(e)===`file`?`Send text instead`:`Send file instead`}),_t(e)===`file`?(0,r.jsxs)(`div`,{children:[e.current_file?.serve_url&&(0,r.jsx)(`a`,{href:e.current_file.serve_url,target:`_blank`,rel:`noopener noreferrer`,className:`block mb-2 text-[12.5px] font-medium underline ${s?`text-zinc-300`:`text-slate-600`}`,children:`View current file`}),(0,r.jsx)(`input`,{type:`file`,disabled:ze===e.id,onChange:t=>{let n=t.target.files?.[0];n&&vt(e.id,n)},className:`w-full text-[13px] ${j}`}),ze===e.id&&(0,r.jsx)(`p`,{className:`mt-1 text-[12.5px] ${j}`,children:`Uploading…`})]}):(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`textarea`,{rows:4,disabled:ze===e.id,value:Ve[e.id]??``,placeholder:`Enter your answer...`,onChange:t=>q({...Ve,[e.id]:t.target.value}),className:`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none resize-y ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`}),(()=>{let t=Number(e.word_limit)||0,n=ft(Ve[e.id]),i=t>0&&n>t;return(0,r.jsxs)(`div`,{className:`mt-1.5 flex items-center justify-between gap-2`,children:[(0,r.jsx)(`button`,{type:`button`,disabled:ze===e.id||!(Ve[e.id]||``).trim()||i,onClick:()=>yt(e.id),className:`inline-flex items-center h-8 px-3.5 rounded-full text-[12.5px] font-semibold text-white disabled:opacity-50 cursor-pointer`,style:{backgroundColor:o},children:ze===e.id?`Saving…`:`Save text answer`}),t>0&&(0,r.jsxs)(`span`,{className:`text-2xs font-medium ${i?`text-red-500`:j}`,children:[n,`/`,t,` words`,i?` — over the limit`:``]})]})})()]})]}):e.id===`registration_type`?(0,r.jsxs)(`select`,{value:B[e.id]??``,required:e.required,onChange:t=>V({...B,[e.id]:t.target.value}),className:`w-full h-11 px-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white`:`bg-white border-slate-200 text-slate-900`}`,children:[(0,r.jsxs)(`option`,{value:``,children:[`Select `,e.label,`...`]}),(O.registration_types||[]).map(e=>(0,r.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,r.jsx)(bt,{field:e,value:B[e.id]??``,onChange:t=>V({...B,[e.id]:t}),className:`w-full min-h-11 px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`,isDark:s,placeholder:e.placeholder||`Enter ${(e.label||``).toLowerCase()}`})]},e.id)),(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5 pt-1`,children:[(0,r.jsx)(`button`,{type:`submit`,disabled:U,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0 cursor-pointer disabled:opacity-60`,style:{backgroundColor:o},children:U?`Saving...`:`Save changes`}),(0,r.jsx)(`button`,{type:`button`,disabled:U,onClick:()=>Fe(!1),className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors cursor-pointer ${s?`text-zinc-300 border-zinc-700 hover:bg-zinc-800`:`text-slate-600 border-slate-200 bg-white hover:bg-slate-50`}`,children:`Cancel`})]})]}):(0,r.jsxs)(`div`,{className:`mt-4 pt-4 border-t flex items-center justify-between gap-3 flex-wrap ${s?`border-zinc-800`:`border-slate-100`}`,children:[(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:O.editable?`You can still edit your answers until a reviewer picks this up.`:`This submission has been assigned to a reviewer and can no longer be edited.`}),O.editable&&(0,r.jsx)(`button`,{type:`button`,onClick:gt,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0 cursor-pointer`,style:{backgroundColor:o},children:`Edit submission`})]})]}),z&&(0,r.jsxs)(`div`,{part:`portal-card addon-qr-card`,className:`${A} flex flex-col items-center`,children:[(0,r.jsxs)(`div`,{className:`w-full flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(me,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Pay for your add-ons`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Scan the code to pay, then tell us about the transfer.`})]})]}),(0,r.jsx)(Ct,{qrUrl:!z.qr_url||/^https?:\/\//i.test(z.qr_url)?z.qr_url:`${t.replace(/\/$/,``)}${z.qr_url}`,schema:z.schema||[],amount:z.amount,currency:z.currency,registrationNumber:n.registration_number||null,apiClient:e,primaryColor:o,isDark:s,onSubmitted:e=>{ke(null),b(null),S(`We have your payment details. Your add-ons are confirmed once the transfer is verified.`),l?.(`addon_custom_qr_submitted`,{registration_number:n.registration_number,answers:e});let t=i.getToken();t&&Y(t)}})]}),Ee&&(0,r.jsxs)(`div`,{className:`p-4 rounded-2xl flex flex-wrap items-center justify-between gap-3 text-sm`,style:{backgroundColor:`color-mix(in srgb, ${o} ${s?14:7}%, transparent)`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${o} 22%, transparent)`},children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5 ${s?`text-zinc-200`:`text-slate-700`}`,children:[(0,r.jsx)(me,{size:17,className:`shrink-0`,style:{color:o}}),(0,r.jsx)(`span`,{children:`Payment page opened in a new tab. If it didn't open:`})]}),(0,r.jsxs)(`a`,{href:Ee,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0`,style:{backgroundColor:o},children:[(0,r.jsx)(`span`,{children:`Complete payment`}),(0,r.jsx)(_e,{size:12})]})]}),y&&(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),x&&(0,r.jsxs)(`div`,{role:`status`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(ce,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:x})]})]})})]})}let Rt=`w-full h-11 pl-10 pr-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`,zt=(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),Bt=e=>{f(e),b(null),S(null)},Vt=({id:e,label:t,icon:n,type:i=`text`,value:a,onChange:o,placeholder:c,autoComplete:l,aside:u})=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1.5`,children:[(0,r.jsx)(`label`,{part:`field-label`,htmlFor:e,className:`block text-[13px] font-semibold ${s?`text-zinc-200`:`text-slate-800`}`,children:t}),u]}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none ${s?`text-zinc-500`:`text-slate-400`}`,children:(0,r.jsx)(n,{size:16})}),(0,r.jsx)(`input`,{part:`input`,id:e,type:i,required:!0,value:a,autoComplete:l,onChange:e=>o(e.target.value),placeholder:c,className:Rt})]})]}),Ht=()=>(0,r.jsxs)(r.Fragment,{children:[y&&(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),x&&(0,r.jsxs)(`div`,{role:`status`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(ce,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:x})]})]}),Ut=(e,t,n)=>(0,r.jsx)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:e,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${o} 70%, transparent)`},className:`group w-full h-11 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed`,children:e?(0,r.jsxs)(r.Fragment,{children:[zt,(0,r.jsx)(`span`,{children:n})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{children:t}),(0,r.jsx)(ne,{size:16,className:`transition-transform group-hover:translate-x-0.5`})]})}),Wt=({icon:e,title:t,subtitle:n,onBack:i,children:a})=>(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-y-auto`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[Pt(),(0,r.jsxs)(`div`,{className:`px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} flex-1 max-w-[400px] mx-auto w-full flex flex-col justify-center relative z-10`,children:[i&&(0,r.jsxs)(`button`,{part:`button button-link back-button`,type:`button`,onClick:i,className:`self-start inline-flex items-center gap-1.5 mb-4 text-sm font-semibold transition-colors cursor-pointer ${s?`text-zinc-400 hover:text-white`:`text-slate-500 hover:text-slate-900`}`,children:[(0,r.jsx)(O,{size:16}),(0,r.jsx)(`span`,{children:`Back to login`})]}),(0,r.jsxs)(`div`,{part:`portal-card`,className:`p-6 sm:p-7 rounded-3xl border space-y-5 ${s?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.18)]`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`div`,{className:`w-10 h-10 rounded-xl flex items-center justify-center mb-4`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(e,{size:19})}),(0,r.jsx)(`h3`,{part:`portal-title`,style:Q,className:`text-xl font-bold tracking-tight ${s?`text-white`:`text-slate-900`}`,children:t}),(0,r.jsx)(`p`,{className:`text-[13px] mt-1 leading-relaxed ${s?`text-zinc-400`:`text-slate-500`}`,children:n})]}),Ht(),a]})]})]}),Gt=`font-semibold hover:underline underline-offset-4 cursor-pointer`;return Wt(d===`request_code`?{icon:H,title:`Get verification code`,subtitle:`We will email a verification code to your registered address.`,onBack:()=>Bt(`login`),children:(0,r.jsxs)(`form`,{onSubmit:X,className:`space-y-4`,children:[Vt({id:`vx-portal-code-identifier`,label:`Registration number or email`,icon:H,value:te||C,onChange:e=>{k(e),w(e)},placeholder:`e.g. attendee@example.com or REG12345`,autoComplete:`username`}),Ut(se,`Send verification code`,`Sending code...`),(0,r.jsxs)(`p`,{className:`text-center text-[13px] ${s?`text-zinc-400`:`text-slate-500`}`,children:[`Already have a code?`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>Bt(`reset`),className:Gt,style:{color:o},children:`Set your password`})]})]})}:d===`reset`?{icon:Oe,title:`Set your password`,subtitle:`Enter the code from your email and choose a new password.`,onBack:()=>Bt(`login`),children:(0,r.jsxs)(`form`,{onSubmit:rt,className:`space-y-4`,children:[Vt({id:`vx-portal-reset-identifier`,label:`Registration number or email`,icon:H,value:te||C,onChange:e=>{k(e),w(e)},placeholder:`e.g. attendee@example.com or REG12345`,autoComplete:`username`}),Vt({id:`vx-portal-reset-code`,label:`Verification code`,icon:Ae,value:A,onChange:M,placeholder:`Enter code from email`,autoComplete:`one-time-code`,aside:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(te||C),Bt(`request_code`)},className:`text-xs font-semibold hover:underline underline-offset-4 cursor-pointer`,style:{color:o},children:`Get code on email`})}),Vt({id:`vx-portal-reset-password`,label:`New password`,icon:Pe,type:`password`,value:P,onChange:F,placeholder:`Enter new password`,autoComplete:`new-password`}),Vt({id:`vx-portal-reset-confirm`,label:`Confirm password`,icon:Pe,type:`password`,value:ie,onChange:ae,placeholder:`Re-enter new password`,autoComplete:`new-password`}),Ut(p,`Set new password`,`Updating password...`)]})}:{icon:Ie,title:`Attendee login`,subtitle:`Sign in with your email or registration number.`,children:(0,r.jsxs)(`form`,{onSubmit:tt,className:`space-y-4`,children:[Vt({id:`vx-portal-login-identifier`,label:`Email or registration number`,icon:H,value:C,onChange:w,placeholder:`Enter email or registration number`,autoComplete:`username`}),Vt({id:`vx-portal-login-password`,label:`Password`,icon:Pe,type:`password`,value:T,onChange:E,placeholder:`Enter password`,autoComplete:`current-password`,aside:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`reset`)},className:`text-xs font-semibold hover:underline underline-offset-4 cursor-pointer`,style:{color:o},children:`Forgot password?`})}),Ut(p,`Login`,`Logging in...`),(0,r.jsxs)(`p`,{className:`pt-4 border-t text-center text-[13px] ${s?`border-zinc-800 text-zinc-400`:`border-slate-100 text-slate-500`}`,children:[`First time here?`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`request_code`)},className:Gt,style:{color:o},children:`Get code`}),` `,`or`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`reset`)},className:Gt,style:{color:o},children:`generate password`})]})]})})};function jt(e,t,n){if(!e)return;let r=t?`rgba(9,9,11,0.88)`:`rgba(248,250,252,0.88)`;return{backgroundImage:`linear-gradient(${r}, ${r}), url(${e})`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:n?`fixed`:`scroll`}}function Mt(e){if(!e)return`bottom-right`;switch(e){case`bottom-left`:case`left-bottom`:return`bottom-left`;case`top-right`:case`right-top`:return`top-right`;case`top-left`:case`left-top`:return`top-left`;default:return`bottom-right`}}var Nt=e=>{switch(e){case`bottom-left`:return{bottom:`20px`,left:`20px`,top:`auto`,right:`auto`};case`top-right`:return{top:`20px`,right:`20px`,bottom:`auto`,left:`auto`};case`top-left`:return{top:`20px`,left:`20px`,bottom:`auto`,right:`auto`};default:return{bottom:`20px`,right:`20px`,top:`auto`,left:`auto`}}},Pt=e=>{switch(e){case`bottom-left`:return`bottom-5 left-5`;case`top-right`:return`top-5 right-5`;case`top-left`:return`top-5 left-5`;default:return`bottom-5 right-5`}},Ft=e=>{let t=new Set,n=e=>{e?.options?.length?e.options.forEach(n):e?.name&&e?.mode!==`included`&&t.add(e.label??e.name)};return(Array.isArray(e?.items)?e.items:[]).forEach(n),t},It=e=>(Array.isArray(e)?e:[]).flatMap(e=>typeof e==`string`?[e]:e?.options?It(e.options):e?.name?[e.name]:[]),Lt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Rt=({config:e})=>{let[t,i]=(0,n.useState)(`registration`),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{t===`attendee`&&o(!0)},[t]);let[s]=(0,n.useState)(()=>typeof window<`u`?new URLSearchParams(window.location.search).get(`rn`):null),[c,l]=(0,n.useState)(e.displayMode!==`popup`||!!s),[u,d]=(0,n.useState)(!1),[h,g]=(0,n.useState)([]),[_,v]=(0,n.useState)([]),[y,b]=(0,n.useState)(``),[x,S]=(0,n.useState)(null),[C,w]=(0,n.useState)(null),T=(0,n.useMemo)(()=>C&&{fields:C.fields.filter(e=>e.id!==`registration_type`)},[C]),[E,ee]=(0,n.useState)(!0),[D,te]=(0,n.useState)(``),[k,A]=(0,n.useState)(null),[j,M]=(0,n.useState)(!!s),[N,P]=(0,n.useState)(null),[F,ie]=(0,n.useState)(null),[ae,se]=(0,n.useState)(s),[ce,le]=(0,n.useState)(null),[L,de]=(0,n.useState)(null),[pe,me]=(0,n.useState)(!1),[R,he]=(0,n.useState)({amount:null,currency:null}),[ge,ve]=(0,n.useState)(null),[be,xe]=(0,n.useState)(null),[Se,Ce]=(0,n.useState)(null),[we,Te]=(0,n.useState)(!1),[Ee,De]=(0,n.useState)(()=>Mt(e.position)),[z,Oe]=(0,n.useState)(null),[ke,Ae]=(0,n.useState)(null),[je,Me]=(0,n.useState)(!1),[Ne,Pe]=(0,n.useState)(!1),Fe=(0,n.useRef)(null),B=(0,n.useRef)(null),Le=(0,n.useRef)(!1);(0,n.useEffect)(()=>{e.position&&De(Mt(e.position))},[e.position]);let V=e.themeMode===`dark`||e.theme?.mode===`dark`,H=e.theme?.primaryColor||`#2563eb`,U=!!e.isAbstract,Re=e.headerBannerImage,W=e.backgroundImage,G=(0,n.useMemo)(()=>new f(e.debug),[e.debug]),K=(0,n.useMemo)(()=>new p(e.baseUrl,e.eventSlug,G,e.timeoutMs??12e4),[e.baseUrl,e.eventSlug,G,e.timeoutMs]),q=(0,n.useMemo)(()=>new m(e.eventSlug),[e.eventSlug]),He=(0,n.useRef)(null);(0,n.useEffect)(()=>{s&&He.current!==s&&(He.current=s,K.verifyPayment(s).then(t=>{let n=!!(t?.data?.confirmed??t?.confirmed);le(n),e.onEvent?.(`payment_verified`,{registration_number:s,confirmed:n})}).catch(e=>{le(!1),G.error(`Payment verification failed`,e)}))},[s,K,G]);let Ue=(0,n.useRef)(e.displayMode),We=(0,n.useRef)(null),[J,Ge]=(0,n.useState)(null),Ke=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(e.displayMode!==`widget`)return;let t=Ke.current;t&&t.getBoundingClientRect().top<0&&t.scrollIntoView({behavior:`smooth`,block:`start`})},[e.displayMode,j,E,x]),(0,n.useEffect)(()=>{q.getXrefId()},[q]),(0,n.useEffect)(()=>{if(s)return;let e=q.getPendingCustomQr();e?.registrationNumber&&e.customQr&&(se(String(e.registrationNumber)),de(e.customQr),me(!1),he({amount:e.amountDue?.amount??null,currency:e.amountDue?.currency??null}),ve(e.regStatus??`pending`),M(!0))},[q,s]),(0,n.useEffect)(()=>{if(!c)return;let t=q.getXrefId();t&&(U?K.getReviewDraft(t):K.getDraft(t)).then(t=>{let n=t?.data||t;n&&n.registration_type&&(Ge(n),e.onEvent?.(`draft_loaded`,n))}).catch(e=>{G.log(`No draft found for this session`,e)})},[c,K,q,G,U]),(0,n.useEffect)(()=>{Ce(null)},[x]);let Je=(0,n.useMemo)(()=>{if(!J||!x||String(J.registration_type)!==String(x.id))return{};let e={...J.custom_data||{}};if(Array.isArray(J.accompanying)&&(e.accompanying=J.accompanying),Array.isArray(e.selected_items)){let t=Ft(x);e.selected_items=It(e.selected_items).filter(e=>t.has(e))}if(J.salutation&&(e.salutation=J.salutation,e.title=J.salutation),J.name){e.name=J.name,e.full_name=J.name,e.fullName=J.name;let t=J.name.trim().split(/\s+/);t.length>0&&!e.first_name&&(e.first_name=t[0]),t.length>1&&!e.last_name&&(e.last_name=t.slice(1).join(` `))}return J.email&&(e.email=J.email),J.phone&&(e.phone=J.phone,e.mobile=J.phone,e.phoneNumber=J.phone),((U?C?.fields:x?.form_schema?.fields)||[]).forEach(t=>{let n=ut(t.id,t.label);e[t.id]===void 0&&e[n]!==void 0&&(e[t.id]=e[n])}),e},[J,x,U,C]);(0,n.useEffect)(()=>()=>{We.current&&clearTimeout(We.current)},[]);let Xe=(0,n.useCallback)(t=>{We.current&&clearTimeout(We.current),We.current=setTimeout(async()=>{if(!Object.values(t).some(e=>e!==``&&e!=null))return;let n=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`selected_items`,`custom_data`,`accompanying`,`discount_code`]),r=(U?C?.fields:x?.form_schema?.fields)||[],i=new Map;r.forEach(e=>i.set(e.id,e));let a={...t.custom_data||{}};for(let[e,r]of Object.entries(t))if(!n.has(e)){let t=ut(e,i.get(e)?.label);a[t]=r}let o=String(t.email||``).trim(),s={xref_id:q.getXrefId(),salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,...!o||Lt.test(o)?{email:o}:{},phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:x?.id,custom_data:a,selected_items:t.selected_items||[],accompanying:t.accompanying||[]};try{U?await K.trackReviewProgress(s):await K.trackProgress(s),e.onEvent?.(`draft_saved`,s)}catch(e){G.error(`Failed to save draft progress`,e)}},600)},[q,K,x,e,G,U,C]);(0,n.useEffect)(()=>{Ue.current!==e.displayMode&&(Ue.current=e.displayMode,l(e.displayMode!==`popup`),d(!1))},[e.displayMode]),(0,n.useEffect)(()=>{(U?K.getReviewFormSchema():K.getFormSchema()).then(t=>{g(t?.data?.types||[]),v(t?.data?.offers||[]),U&&w({fields:t?.data?.fields||[]}),(t?.data?.event_name||t?.data?.title||t?.data?.name)&&b(t.data.event_name||t.data.title||t.data.name),e.onEvent?.(`form_loaded`,t?.data)}).catch(t=>{G.error(`Failed to load schema`,t),g([]),v([]);let n={type:`schema_load`,message:t?.message||`Failed to load event schema`,error:t};e.onEvent?.(`error`,n),e.onError?.(n)}).finally(()=>ee(!1))},[K,U]);let Qe=async(t,n)=>{We.current&&clearTimeout(We.current),ee(!0),P(null),xe(null);let r=q.getXrefId(),i=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`registration_type`,`selected_items`,`custom_data`,`xref_id`,`accompanying`,`discount_code`]),a=(U?C?.fields:x?.form_schema?.fields)||[],o=new Map;a.forEach(e=>o.set(e.id,e));let s={...t.custom_data||{}};for(let[e,n]of Object.entries(t))if(!i.has(e)){let t=ut(e,o.get(e)?.label);s[t]=n}let c={xref_id:r,salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,email:t.email||``,phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:x.id,custom_data:s,selected_items:It(t.selected_items).filter(e=>Ft(x).has(e)),accompanying:t.accompanying||[],discount_code:t.discount_code||``};try{let t=U?await K.submitReview(c):await K.submitRegistration(c);q.updateXrefId(),Ge(null),Ce(null);let n=U?null:t?.data?.payment_url||t?.payment_url||null;ie(n);let r=U?null:t?.data?.custom_qr||t?.custom_qr||null;de(r),me(!1),he({amount:t?.data?.amount??null,currency:t?.data?.currency??null}),ve(t?.data?.status||t?.status||null);let i=t?.data?.submission_number||t?.submission_number||t?.data?.registration_number||t?.registration_number||t?.data?.registration?.registration_number||t?.registration?.registration_number||null;se(i?String(i):null),Te(!1);let a=U?null:t?.data?.payment_error||t?.payment_error||null;xe(a?String(a):null),r&&i?q.setPendingCustomQr({registrationNumber:String(i),customQr:r,amountDue:{amount:t?.data?.amount??null,currency:t?.data?.currency??null},regStatus:t?.data?.status||t?.status||null}):q.clearPendingCustomQr(),n&&typeof n==`string`&&n.trim()!==``&&window.open(n,`_blank`,`noopener,noreferrer`),M(!0);let o={registrationType:x.id,payload:c,response:t,paymentUrl:n};e.onEvent?.(`submitted`,o),e.onRegister?.(o),e.onRegistered?.(o)}catch(r){G.error(`Submission failed`,r);let i=r?.message||(U?`Submission failed. Please check your information and try again.`:`Registration failed. Please check your information and try again.`),a={type:`submit_error`,message:i,error:r};e.onEvent?.(`error`,a),e.onError?.(a),P(i);let o=!!t.discount_code&&/coupon/i.test(i);if(o){let e=String(t.discount_code).toLowerCase();v(t=>t.filter(t=>String(t?.code||``).toLowerCase()!==e))}Ce({values:o?{...t,discount_code:``}:t,fileAnswers:n?.fileAnswers||{}})}finally{ee(!1)}},Y=()=>{if(M(!1),P(null),ie(null),de(null),me(!1),se(null),ve(null),le(null),he({amount:null,currency:null}),xe(null),Ce(null),q.clearPendingCustomQr(),Te(!1),S(null),Ge(null),typeof window<`u`&&new URLSearchParams(window.location.search).has(`rn`)){let e=new URL(window.location.href);e.searchParams.delete(`rn`),window.history.replaceState(window.history.state,``,e.toString())}},et=(0,n.useCallback)(e=>{if(e.stopPropagation(),e.button!==0||!Fe.current)return;let t=Fe.current.getBoundingClientRect();B.current={startX:e.clientX,startY:e.clientY,rect:t,corner:Ee},Le.current=!1,Me(!0)},[Ee]);(0,n.useEffect)(()=>{if(!je)return;let t=e=>{if(!B.current)return;let t=e.clientX-B.current.startX,n=e.clientY-B.current.startY;Le.current||Math.hypot(t,n)>5&&(Le.current=!0),Le.current&&Oe({x:t,y:n})},n=t=>{if(!B.current){Me(!1),Oe(null),Le.current=!1;return}let{rect:n,startX:r,startY:i}=B.current,a=t.clientX-r,o=t.clientY-i,s=Le.current;if(B.current=null,Me(!1),setTimeout(()=>{Le.current=!1},100),!s){Oe(null);return}let c=n.left+a,l=n.top+o,u=c+n.width/2,d=l+n.height/2,f=typeof window<`u`?window.innerWidth:1024,p=typeof window<`u`?window.innerHeight:768,m=u>=f/2,h=d>=p/2,g=h?m?`bottom-right`:`bottom-left`:m?`top-right`:`top-left`,_=m?f-n.width-20:20,v=h?p-n.height-20:20,y=c-_,b=l-v;Ae({transform:`translate3d(${y}px, ${b}px, 0)`,transition:`none`}),Oe(null),De(g),e.onEvent?.(`position_changed`,{position:g}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ae({transform:`translate3d(0, 0, 0)`,transition:`transform 0.35s cubic-bezier(0.16, 1, 0.3, 1)`}),setTimeout(()=>{Ae(null)},360)})})};return window.addEventListener(`pointermove`,t),window.addEventListener(`pointerup`,n),window.addEventListener(`pointercancel`,n),()=>{window.removeEventListener(`pointermove`,t),window.removeEventListener(`pointerup`,n),window.removeEventListener(`pointercancel`,n)}},[je,e]);let tt=async()=>{if(ae){try{await navigator.clipboard.writeText(ae)}catch{let e=document.createElement(`textarea`);e.value=ae,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}Te(!0),setTimeout(()=>Te(!1),2e3)}},nt=t=>!t||/^https?:\/\//i.test(t)?t:`${e.baseUrl.replace(/\/$/,``)}${t}`,X=!U&&ce!==!0&&(ge===`pending`&&Number(R.amount)>0||ce===!1),rt=()=>ae?(0,r.jsxs)(`div`,{className:`w-full max-w-xs mb-6`,children:[(0,r.jsx)(`p`,{className:`text-2xs font-bold uppercase tracking-wider mb-1.5 ${V?`text-zinc-400`:`text-gray-500`}`,children:U?`Submission Number`:X?`Temporary Registration Number`:`Registration Number`}),(0,r.jsxs)(`div`,{part:`registration-number`,className:`flex items-center gap-2 pl-4 pr-1.5 py-1.5 rounded-xl border ${V?`bg-zinc-900 border-zinc-700`:`bg-gray-50 border-gray-200`}`,children:[(0,r.jsx)(`span`,{className:`flex-1 text-left font-mono font-bold text-base select-all break-all`,children:ae}),(0,r.jsxs)(`button`,{part:`copy-button`,type:`button`,onClick:tt,className:`flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-bold text-white shrink-0 cursor-pointer hover:opacity-90 transition-opacity`,style:{backgroundColor:H},title:`Copy registration number`,children:[we?(0,r.jsx)(re,{size:13}):(0,r.jsx)(fe,{size:13}),(0,r.jsx)(`span`,{children:we?`Copied`:`Copy`})]})]}),X&&(0,r.jsxs)(`div`,{part:`provisional-note`,role:`note`,className:`mt-2.5 flex items-start gap-2 rounded-xl px-3 py-2.5 text-left text-xs leading-relaxed ${V?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(ue,{size:14,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:`This is a temporary registration number. Your registration will be confirmed once your payment is verified.`})]})]}):null;if(!c&&e.displayMode===`popup`){let e={...Nt(Ee),...z?{transform:`translate3d(${z.x}px, ${z.y}px, 0) scale(1.05)`,transition:`none`,userSelect:`none`}:ke?{transform:ke.transform,transition:ke.transition}:{transition:`all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`}},t=Ne||je;return(0,r.jsxs)(`div`,{ref:Fe,onMouseEnter:()=>Pe(!0),onMouseLeave:()=>Pe(!1),className:`fixed ${Pt(Ee)} z-50 select-none group`,style:e,children:[(0,r.jsx)(`div`,{onPointerDown:et,className:`absolute -top-1.5 -left-1.5 w-7 h-7 rounded-full bg-slate-900 text-white shadow-lg border-2 border-white flex items-center justify-center cursor-grab active:cursor-grabbing hover:bg-black hover:scale-110 active:scale-95 transition-all duration-200 z-10 touch-none ${t?`opacity-100 scale-100 pointer-events-auto`:`opacity-0 scale-75 pointer-events-none group-hover:opacity-100 group-hover:scale-100 group-hover:pointer-events-auto`}`,title:`Hold and drag to change position`,children:(0,r.jsx)(Ve,{size:13,className:`pointer-events-none text-white`})}),(0,r.jsx)(`button`,{part:`launcher`,type:`button`,onClick:e=>{e.stopPropagation(),!je&&l(!0)},className:`w-16 h-16 rounded-full text-white shadow-xl flex items-center justify-center cursor-pointer hover:scale-105 active:scale-95 transition-transform`,style:{backgroundColor:H},title:`Click to open registration`,children:(0,r.jsx)(`span`,{className:`font-bold text-sm tracking-wide pointer-events-none`,children:`Join`})})]})}let it=e.displayMode===`fullscreen`||e.displayMode===`popup`&&u,Z=e.displayMode===`widget`,at=jt(W,V,Z),ot=`${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`} flex flex-col transition-all duration-300 ease-in-out `,st=e.theme?.fontFamily,$=!st||st===`inherit`?{}:{fontFamily:`var(--vx-font-family, ${st})`};$[`--vx-accent`]=H,it?ot+=`fixed inset-0 z-[9999] rounded-none overflow-hidden `:e.displayMode===`popup`?(ot+=`fixed ${Pt(Ee)} z-50 rounded-xl shadow-2xl border ${V?`border-zinc-800`:`border-gray-200`} overflow-hidden `,$.width=e.width||`400px`,$.height=e.height||`700px`,$.maxHeight=`90vh`,$.maxWidth=`calc(100vw - 32px)`,Object.assign($,Nt(Ee))):(ot+=`relative w-full min-h-screen border-none shadow-none rounded-none `,$.width=`100%`,$.minHeight=`100vh`);let lt=U?`Abstract Submission`:t===`registration`?y||`Registration`:`Attendee Portal`,dt=D.trim().toLowerCase(),ft=dt?h.filter(e=>[e.type,e.name,e.category,e.description,e.currency,e.price,e.tax_info,...Array.isArray(e.items)?e.items.map(e=>e?.name).filter(Boolean):[]].filter(e=>e!=null&&e!==``).join(` `).toLowerCase().includes(dt)):h,pt=_.filter(e=>!e?.registration_type),mt=`max-w-2xl mx-auto w-full rounded-3xl border overflow-hidden ${V?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.16)]`}`,vt=()=>{if(h.length===0)return null;let e=h.find(e=>String(e.id)===k)||(h.length===1?h[0]:null),t=e?e.type||e.name||e.label:``;return(0,r.jsxs)(`div`,{part:`category-panel`,className:mt,children:[(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 pt-6 sm:pt-7 pb-5 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(ye,{size:20})}),(0,r.jsx)(`div`,{className:`min-w-0`,children:(0,r.jsx)(`h3`,{part:`list-title`,className:`text-lg sm:text-xl font-semibold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:`Choose a submission category`})})]}),(0,r.jsx)(`div`,{role:`radiogroup`,"aria-label":`Submission category`,className:`border-t divide-y ${V?`border-zinc-800 divide-zinc-800`:`border-slate-100 divide-slate-100`}`,children:h.map(t=>{let n=t.type||t.name||t.label,i=!!e&&String(e.id)===String(t.id);return(0,r.jsxs)(`button`,{part:i?`category category-active`:`category`,type:`button`,role:`radio`,"aria-checked":i,onClick:()=>A(String(t.id)),className:`group w-full flex items-center gap-4 px-5 sm:px-7 py-4 text-left transition-colors cursor-pointer outline-none focus-visible:bg-[color-mix(in_srgb,var(--vx-accent)_8%,transparent)] ${i?``:V?`hover:bg-zinc-800/60`:`hover:bg-slate-50`}`,style:i?{backgroundColor:`color-mix(in srgb, ${H} ${V?14:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:`w-5 h-5 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors ${i?``:V?`border-zinc-600`:`border-slate-300`}`,style:i?{borderColor:H}:void 0,children:i&&(0,r.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full`,style:{backgroundColor:H}})}),(0,r.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`span`,{className:`block text-[15px] font-semibold leading-snug ${V?`text-white`:`text-slate-900`}`,children:n}),t.description&&(0,r.jsx)(`span`,{className:`block text-[13px] mt-0.5 line-clamp-1 ${V?`text-zinc-400`:`text-slate-500`}`,children:t.description})]}),t.category&&(0,r.jsx)(`span`,{className:`hidden sm:inline-block text-[10px] font-semibold uppercase tracking-wider px-2.5 py-1 rounded-full shrink-0 ${V?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:t.category}),(0,r.jsx)(ne,{size:16,className:`shrink-0 transition-all ${i?`translate-x-0.5`:`${V?`text-zinc-600`:`text-slate-300`} group-hover:translate-x-0.5`}`,style:i?{color:H}:void 0})]},t.id)})}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 py-5 border-t flex flex-col-reverse sm:flex-row sm:items-center sm:justify-between gap-3 ${V?`border-zinc-800`:`border-slate-100`}`,children:[(0,r.jsx)(`p`,{className:`text-[13px] truncate ${V?`text-zinc-400`:`text-slate-500`}`,children:e?(0,r.jsxs)(r.Fragment,{children:[`Selected: `,(0,r.jsx)(`span`,{className:`font-semibold ${V?`text-zinc-200`:`text-slate-700`}`,children:t})]}):`Select a category to continue`}),(0,r.jsxs)(`button`,{part:`button button-primary continue-button`,type:`button`,disabled:!e,onClick:()=>e&&S(e),style:{background:`linear-gradient(135deg, ${H}, color-mix(in srgb, ${H} 80%, black))`,boxShadow:e?`0 10px 24px -12px color-mix(in srgb, ${H} 70%, transparent)`:void 0},className:`group shrink-0 inline-flex items-center justify-center gap-2 h-11 px-5 rounded-xl text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.99] cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:brightness-100`,children:[(0,r.jsx)(`span`,{children:`Continue to submission`}),(0,r.jsx)(ne,{size:16,className:`transition-transform group-hover:translate-x-0.5`})]})]})]})},yt=e=>(0,r.jsxs)(`div`,{part:`category-panel`,className:mt,children:[(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 pt-6 sm:pt-7 pb-5 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-11 h-11 rounded-xl`}),(0,r.jsx)(`div`,{className:`${e} h-4 w-56`})]}),(0,r.jsx)(`div`,{className:`border-t divide-y ${V?`border-zinc-800 divide-zinc-800`:`border-slate-100 divide-slate-100`}`,children:[0,1,2].map(t=>(0,r.jsxs)(`div`,{className:`flex items-center gap-4 px-5 sm:px-7 py-4`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-5 h-5 rounded-full`,style:{animationDelay:`${t*90}ms`}}),(0,r.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-3.5 w-1/2`,style:{animationDelay:`${t*90}ms`}}),(0,r.jsx)(`div`,{className:`${e} h-3 w-3/4`,style:{animationDelay:`${t*90}ms`}})]})]},t))}),(0,r.jsx)(`div`,{className:`px-5 sm:px-7 py-5 border-t flex justify-end ${V?`border-zinc-800`:`border-slate-100`}`,children:(0,r.jsx)(`div`,{className:`${e} h-11 w-52`})})]}),bt=()=>{let e=`vx-skeleton rounded-full`,t=Z?6:3;return(0,r.jsxs)(`div`,{part:`page`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex flex-col ${Z?`w-full flex-1`:`h-full min-h-0`} ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:`Loading form types…`}),(0,r.jsx)(`div`,{part:`header`,className:`relative overflow-hidden z-10 shrink-0 text-white`,style:{background:`linear-gradient(135deg, ${H} 0%, color-mix(in srgb, ${H} 76%, black) 100%)`},children:(0,r.jsxs)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-5 sm:py-6 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-2xl bg-white/15 ring-1 ring-inset ring-white/30 shrink-0`}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-5 w-48`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-64 max-w-[60vw]`})]})]})}),!U&&(0,r.jsx)(`div`,{part:`tabs`,className:`shrink-0 border-b ${V?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-3`,children:(0,r.jsxs)(`div`,{className:`grid grid-cols-2 gap-1 p-1 rounded-xl max-w-md ${V?`bg-zinc-800`:`bg-slate-100`}`,children:[(0,r.jsx)(`div`,{className:`h-9 rounded-lg ${V?`bg-zinc-950`:`bg-white shadow-sm`}`}),(0,r.jsx)(`div`,{className:`h-9`})]})})}),(0,r.jsx)(`div`,{part:`list`,className:`${Z?`w-full flex-1`:`overflow-hidden flex-1 min-h-0`} relative ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8 space-y-5`,children:U?yt(e):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`div`,{part:`search`,className:`flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-4 w-56`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-28`})]}),(0,r.jsx)(`div`,{className:`h-10 w-full sm:w-72 rounded-xl border ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200`}`})]}),(0,r.jsx)(`div`,{part:`card-grid`,className:Z?`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`:`space-y-3`,children:Array.from({length:t},(t,n)=>{let i={animationDelay:`${n*90}ms`};return(0,r.jsxs)(`div`,{part:`card`,className:`rounded-2xl border p-5 sm:p-6 flex flex-col ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-11 h-11 rounded-xl`,style:i}),(0,r.jsx)(`div`,{className:`${e} mt-5 h-5 w-3/5`,style:i}),(0,r.jsx)(`div`,{className:`${e} mt-3 h-3 w-4/5`,style:i}),(0,r.jsxs)(`div`,{className:`mt-6 pt-5 border-t border-dashed flex items-end justify-between gap-3 ${V?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-2.5 w-20`,style:i}),(0,r.jsx)(`div`,{className:`${e} h-6 w-28`,style:i})]}),(0,r.jsx)(`div`,{className:`${e} h-10 w-28`,style:i})]})]},n)})})]})})})]})},xt=()=>{let e=!!x,t=U?ye:$e,n=e?U?`Submitting your abstract`:`Submitting your registration`:`Loading your registration`,i=x?x.type||x.name||x.label:``,a=!U&&x&&x.price!==void 0&&x.price!==null&&x.price!==``?Number(x.price)>0?[x.currency,Number(x.price).toLocaleString()].filter(Boolean).join(` `):`Free`:``;return(0,r.jsx)(`div`,{part:`screen screen-submitting`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex-1 flex items-center justify-center px-4 py-16 ${Z?`min-h-[70vh]`:`h-full`} ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsxs)(`div`,{part:`portal-card`,className:`w-full max-w-sm rounded-3xl border p-8 text-center ${V?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.18)]`}`,children:[(0,r.jsxs)(`div`,{className:`relative mx-auto w-16 h-16`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-full`,style:{boxShadow:`inset 0 0 0 4px color-mix(in srgb, ${H} 14%, transparent)`}}),(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-full motion-safe:animate-spin`,style:{background:`conic-gradient(from 0deg, transparent 0deg, ${H} 300deg, transparent 360deg)`,mask:`radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))`,WebkitMask:`radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))`}}),(0,r.jsx)(`div`,{className:`absolute inset-[10px] rounded-full flex items-center justify-center`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(t,{size:20})})]}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`mt-6 text-xl font-bold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:n}),(0,r.jsx)(`p`,{part:`screen-message`,className:`mt-1.5 text-[13px] leading-relaxed text-balance ${V?`text-zinc-400`:`text-slate-500`}`,children:`This usually takes a few seconds. Please keep this page open.`}),i&&(0,r.jsxs)(`div`,{className:`mt-5 inline-flex max-w-full items-center gap-2 rounded-full px-3 py-1.5 text-xs font-semibold ${V?`bg-zinc-800 text-zinc-200`:`bg-slate-100 text-slate-700`}`,children:[(0,r.jsx)(`span`,{className:`truncate`,children:i}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:V?`text-zinc-600`:`text-slate-300`,children:`•`}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums`,style:{color:H},children:a})]})]}),(0,r.jsx)(`div`,{className:`mt-6 h-1 w-full overflow-hidden rounded-full ${V?`bg-zinc-800`:`bg-slate-100`}`,children:(0,r.jsx)(`div`,{className:`vx-progress-bar h-full w-2/5 rounded-full`,style:{backgroundColor:H}})})]})})};return(0,r.jsx)(`div`,{ref:Ke,part:`widget`,className:ot,style:{...$,overflow:Z?`visible`:`clip`,scrollMarginTop:Z?96:void 0},onScroll:e=>{Z||(e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0))},children:E&&!x&&!j?bt():E?xt():j?L&&!pe?(0,r.jsxs)(`div`,{part:`screen screen-custom-qr`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{part:`screen-header`,className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:H,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{part:`screen-header-title`,className:`text-xl font-bold`,style:Q,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:24})})]})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center p-6 text-center`,children:[rt(),(0,r.jsx)(Ct,{qrUrl:nt(L.qr_url),schema:L.schema||[],amount:R.amount,currency:R.currency,registrationNumber:ae,apiClient:K,primaryColor:H,isDark:V,onSubmitted:t=>{me(!0),q.clearPendingCustomQr(),e.onEvent?.(`custom_qr_submitted`,{registration_number:ae,answers:t})}}),(0,r.jsx)(`button`,{part:`button button-link`,onClick:Y,className:`mt-4 w-full max-w-sm py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Register Another Person`})]})]}):F?(0,r.jsxs)(`div`,{part:`screen screen-payment`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{part:`screen-header`,className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:H,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{part:`screen-header-title`,className:`text-xl font-bold`,style:Q,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:24})})]})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:`💳`}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`text-2xl font-bold mb-2 ${V?`text-white`:`text-gray-900`}`,style:Q,children:`Done Your Payment First`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:`Please complete your payment in the new tab to confirm your booking and finalize your registration.`}),rt(),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsxs)(`a`,{part:`button button-primary`,href:F,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full`,style:{backgroundColor:H},children:[(0,r.jsx)(`span`,{children:`Open Payment Page`}),(0,r.jsx)(_e,{size:16})]}),(0,r.jsx)(`button`,{part:`button button-link`,onClick:Y,className:`w-full py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Register Another Person`})]})]})]}):(0,r.jsxs)(`div`,{part:`screen screen-success`,className:`flex flex-col h-full items-center justify-center p-8 text-center relative ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[e.displayMode===`popup`&&(0,r.jsx)(`div`,{className:`absolute top-4 right-4 flex items-center gap-2`,children:(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-400 hover:text-gray-900`}`,children:(0,r.jsx)(ct,{size:24})})}),(0,r.jsx)(`div`,{className:`w-20 h-20 rounded-full flex items-center justify-center mb-6 text-4xl shadow-md`,style:{backgroundColor:H,color:`white`},children:`✓`}),(0,r.jsx)(`h2`,{part:`screen-title`,className:`text-3xl font-bold mb-3 ${V?`text-white`:`text-gray-900`}`,style:Q,children:U?`Abstract Submitted Successfully`:`Thank You!`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`mb-6 ${V?`text-zinc-300`:`text-gray-600`}`,children:U?`Your reference submission number is below.`:`Your registration has been successfully received.`}),rt(),be&&(0,r.jsxs)(`div`,{part:`payment-error`,role:`alert`,className:`w-full max-w-xs mb-6 flex items-start gap-2 rounded-xl px-3 py-2.5 text-left text-xs leading-relaxed ${V?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(oe,{size:14,className:`shrink-0 mt-0.5`}),(0,r.jsxs)(`span`,{children:[`Your registration was saved under the number above, but we couldn't start the payment. Please try again later or contact the organiser to complete it.`,(0,r.jsx)(`span`,{className:`block mt-1 font-semibold`,children:be})]})]}),pe&&(0,r.jsx)(`p`,{part:`payment-status`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:`We have your payment details. Your registration is confirmed once the transfer is verified.`}),ce!==null&&(0,r.jsx)(`p`,{part:`payment-status`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:ce?`Your payment is confirmed.`:`We haven't received your payment yet. If you have just paid, it will be confirmed shortly.`}),(0,r.jsx)(`button`,{part:`button button-primary`,onClick:Y,style:{backgroundColor:H},className:`text-white font-bold py-3 px-8 rounded-md hover:opacity-90 transition-opacity shadow-md cursor-pointer`,children:`Back`})]}):N?(()=>{let t=!U&&/already registered/i.test(String(N));return(0,r.jsxs)(`div`,{part:`screen screen-error`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,style:at,children:[e.displayMode===`popup`&&(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`absolute top-4 right-4 z-10 cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-slate-400 hover:text-slate-900`}`,"aria-label":`Close`,children:(0,r.jsx)(ct,{size:22})}),(0,r.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-6 sm:p-10`,children:(0,r.jsxs)(`div`,{part:`error-card`,className:`w-full max-w-md rounded-3xl border p-7 sm:p-9 text-center ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.22)]`}`,children:[(0,r.jsx)(`div`,{className:`mx-auto mb-5 w-14 h-14 rounded-2xl flex items-center justify-center`,style:{backgroundColor:`color-mix(in srgb, ${t?H:`#f59e0b`} ${V?18:10}%, transparent)`,color:t?H:`#d97706`},children:t?(0,r.jsx)(Ie,{size:24}):(0,r.jsx)(oe,{size:26})}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`text-xl sm:text-2xl font-bold tracking-tight mb-2 ${V?`text-white`:`text-slate-900`}`,style:Q,children:t?`You're already registered`:U?`We couldn't submit your abstract`:`We couldn't complete your registration`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`text-sm leading-relaxed mb-7 ${V?`text-zinc-400`:`text-slate-500`}`,children:t?`This email already has a registration for this event. Log in to view or update it.`:N}),(0,r.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,r.jsx)(`button`,{part:`button button-primary`,onClick:()=>{P(null),t&&(S(null),i(`attendee`))},style:{background:`linear-gradient(135deg, ${H}, color-mix(in srgb, ${H} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${H} 70%, transparent)`},className:`w-full h-12 inline-flex items-center justify-center gap-2 rounded-xl text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.99] cursor-pointer`,children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ie,{size:16}),` Go to Attendee Login`]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O,{size:16}),` Back to the form`]})}),(0,r.jsx)(`button`,{part:`button button-secondary`,onClick:()=>{P(null),Ce(null),S(null)},className:`w-full h-11 inline-flex items-center justify-center rounded-xl text-sm font-semibold border transition-colors cursor-pointer ${V?`border-zinc-700 text-zinc-300 hover:bg-zinc-800`:`border-slate-200 text-slate-600 bg-white hover:bg-slate-50`}`,children:t?`Register someone else`:U?`Choose another category`:`Choose another ticket`})]})]})})]})})():x?(0,r.jsx)(St,{schema:U?T:x.form_schema,ticketType:x,offers:gt(_,x?.id),theme:e.theme,displayMode:e.displayMode,backgroundStyle:at,isExpanded:u,onToggleExpand:()=>d(!u),onClose:()=>l(!1),onSubmit:Qe,onChange:Xe,initialValues:Se?Se.values:Je,fileAnswers:Se?Se.fileAnswers:J?.file_answers,isDark:V,apiClient:K,storage:q,onError:e.onError,onEvent:e.onEvent,showReviewFields:U,onBack:()=>{We.current&&clearTimeout(We.current),S(null)}}):(0,r.jsxs)(`div`,{part:`page`,className:`flex flex-col ${Z?`w-full flex-1`:`h-full min-h-0`} ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,children:[(0,r.jsxs)(`div`,{part:`header`,className:`relative overflow-hidden z-10 shrink-0 text-white`,style:{backgroundColor:H,background:`linear-gradient(135deg, ${H} 0%, color-mix(in srgb, ${H} 76%, black) 100%)`},children:[(0,r.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 opacity-[0.14]`,style:{backgroundImage:`radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px)`,backgroundSize:`18px 18px`,maskImage:`linear-gradient(to right, transparent, black 30%, black 70%, transparent)`}}),(0,r.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-24 -right-10 h-64 w-64 rounded-full bg-white/15 blur-3xl`}),Re&&(0,r.jsxs)(`div`,{className:`absolute inset-y-0 right-0 flex max-w-[65%] pointer-events-none select-none`,children:[(0,r.jsx)(`img`,{src:Re,alt:``,"aria-hidden":`true`,className:`h-full w-auto object-cover object-right`}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 w-2/5`,style:{background:`linear-gradient(to right, color-mix(in srgb, ${H} 80%, black) 0%, transparent 100%)`}})]}),(0,r.jsxs)(`div`,{className:`relative z-[1] max-w-6xl mx-auto w-full px-4 sm:px-6 py-5 sm:py-6 flex justify-between items-center gap-3 min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3.5 min-w-0`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-2xl bg-white/15 ring-1 ring-inset ring-white/30 flex items-center justify-center shrink-0 shadow-[inset_0_1px_0_rgba(255,255,255,0.25)]`,children:(0,r.jsx)(Ye,{size:20,className:`text-white`})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,r.jsx)(`h2`,{part:`header-title`,className:`text-lg sm:text-2xl font-bold tracking-tight leading-tight break-words`,style:Q,children:lt}),(0,r.jsxs)(`span`,{className:`hidden sm:inline-flex shrink-0 items-center gap-1.5 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-white/15 ring-1 ring-inset ring-white/25 uppercase tracking-wider`,children:[(0,r.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-300`}),`Official Portal`]})]}),(0,r.jsx)(`p`,{part:`header-subtitle`,className:`text-xs sm:text-sm text-white/80 mt-0.5`,children:U?`Select a category below to submit your abstract`:t===`registration`?`Select a registration type below to begin your application`:`Registration & Profile Management`})]})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1`,children:(0,r.jsx)(ct,{size:22})})]})})]})]}),!U&&(0,r.jsx)(`div`,{part:`tabs`,className:`shrink-0 border-b ${V?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-3`,children:(0,r.jsx)(`div`,{role:`tablist`,className:`grid grid-cols-2 gap-1 p-1 rounded-xl max-w-md ${V?`bg-zinc-800`:`bg-slate-100`}`,children:[{key:`registration`,label:`Registration Forms`,Icon:I},{key:`attendee`,label:`Attendee Login`,Icon:Ie}].map(({key:e,label:n,Icon:a})=>{let o=t===e;return(0,r.jsxs)(`button`,{part:o?`tab tab-active`:`tab`,role:`tab`,"aria-selected":o,type:`button`,onClick:()=>i(e),className:`inline-flex items-center justify-center gap-1.5 sm:gap-2 py-2 px-2 sm:px-3 text-[13px] sm:text-sm font-semibold rounded-lg transition-all cursor-pointer ${o?V?`bg-zinc-950 shadow-sm`:`bg-white shadow-sm ring-1 ring-slate-200/70`:V?`text-zinc-400 hover:text-zinc-200`:`text-slate-500 hover:text-slate-800`}`,style:o?{color:H}:void 0,children:[(0,r.jsx)(a,{size:15,className:`hidden sm:block shrink-0`}),(0,r.jsx)(`span`,{className:`truncate`,children:n})]},e)})})})}),(U||t===`registration`)&&(0,r.jsx)(`div`,{part:`list`,className:`${Z?`w-full flex-1`:`overflow-y-auto flex-1 min-h-0 overscroll-contain`} relative ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8 space-y-5`,children:U?vt():(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`div`,{part:`search`,className:`flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{part:`list-title`,className:`text-base sm:text-lg font-semibold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:U?`Choose a submission category`:`Choose your registration type`}),h.length>0&&(0,r.jsx)(`p`,{part:`list-count`,className:`text-xs mt-0.5 ${V?`text-zinc-400`:`text-slate-500`}`,children:dt?`${ft.length} of ${h.length} options`:`${h.length} ${h.length===1?`option`:`options`} available`})]}),(0,r.jsxs)(`div`,{className:`relative w-full sm:w-72`,children:[(0,r.jsx)(`input`,{part:`input search-input`,type:`text`,value:D,onChange:e=>te(e.target.value),placeholder:U?`Search categories…`:`Search registration types…`,"aria-label":`Search`,className:`w-full h-10 pl-9 pr-8 text-sm rounded-xl border transition-all focus:outline-none focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)] ${V?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-3 flex items-center pointer-events-none ${V?`text-zinc-500`:`text-slate-400`}`,children:(0,r.jsx)(qe,{size:15,className:`block`})}),D&&(0,r.jsx)(`button`,{type:`button`,onClick:()=>te(``),"aria-label":`Clear search`,className:`absolute inset-y-0 right-2.5 flex items-center cursor-pointer ${V?`text-zinc-500 hover:text-zinc-300`:`text-slate-400 hover:text-slate-600`}`,children:(0,r.jsx)(ct,{size:14})})]})]}),!U&&pt.length>0&&h.length>0&&(0,r.jsxs)(`div`,{part:`offers`,className:`rounded-2xl border border-dashed px-4 py-3.5 sm:px-5 ${V?`bg-emerald-950/30 border-emerald-900`:`bg-emerald-50/60 border-emerald-200`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold ${V?`text-emerald-300`:`text-emerald-800`}`,children:[(0,r.jsx)(Ze,{size:14,className:`shrink-0`}),(0,r.jsx)(`span`,{children:pt.length===1?`Offer available`:`${pt.length} offers available`})]}),(0,r.jsx)(`div`,{className:`mt-2.5 flex flex-wrap gap-2`,children:pt.map(e=>(0,r.jsxs)(`span`,{part:`offer-chip`,className:`inline-flex items-center gap-2 text-xs font-semibold px-3 py-1.5 rounded-full border ${V?`bg-zinc-900 border-emerald-900 text-emerald-200`:`bg-white border-emerald-200 text-emerald-700`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:e.code}),(0,r.jsx)(`span`,{className:V?`text-zinc-700`:`text-slate-300`,children:`|`}),(0,r.jsx)(`span`,{children:_t(e,h[0]?.currency)}),e.ends_at&&(0,r.jsxs)(`span`,{className:`font-normal ${V?`text-zinc-500`:`text-slate-400`}`,children:[`till `,new Date(e.ends_at).toLocaleDateString()]})]},e.code))}),(0,r.jsx)(`p`,{className:`mt-2 text-[11px] ${V?`text-emerald-500/80`:`text-emerald-700/80`}`,children:`The best offer is applied automatically at checkout — you can swap it for another code there.`})]}),h.length===0?null:ft.length===0?(0,r.jsxs)(`div`,{part:`empty-state`,className:`flex flex-col items-center text-center py-16 px-6 rounded-3xl border border-dashed ${V?`bg-zinc-900/60 border-zinc-800 text-zinc-400`:`bg-white/70 border-slate-300 text-slate-500`}`,children:[(0,r.jsx)(`div`,{className:`w-12 h-12 rounded-2xl flex items-center justify-center mb-4 ${V?`bg-zinc-800`:`bg-slate-100`}`,children:(0,r.jsx)(qe,{size:20})}),(0,r.jsxs)(`p`,{className:`text-base font-semibold ${V?`text-white`:`text-slate-900`}`,children:[`No matches for “`,D.trim(),`”`]}),(0,r.jsx)(`p`,{className:`text-sm mt-1`,children:`Try a different search term.`}),(0,r.jsx)(`button`,{part:`button button-secondary`,onClick:()=>te(``),className:`mt-5 px-4 py-2 rounded-full text-sm font-semibold border cursor-pointer transition-colors ${V?`border-zinc-700 text-zinc-200 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-700 hover:bg-slate-50`}`,children:`Clear search`})]}):(0,r.jsx)(`div`,{part:`card-grid`,className:Z?`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`:`space-y-3`,children:ft.map(e=>{let t=e.type||e.name||e.label,n=e.price!==void 0&&e.price!==null&&e.price!==``,i=n&&(Number(e.price)===0||String(e.price).toLowerCase()===`free`),a=(Array.isArray(e.items)?e.items:[]).filter(e=>e?.name).map(t=>t.mode===`optional`&&Number(t.price)>0?`${t.name} (+ ${[e.currency,Number(t.price).toLocaleString()].filter(Boolean).join(` `)})`:t.name),o=U?ye:$e,s=Number(e.price)||0,c=t=>[e.currency,t.toLocaleString()].filter(Boolean).join(` `),l=U||i||!n?null:ht(gt(_,e.id),s);return(0,r.jsxs)(`div`,{part:`card`,role:`button`,tabIndex:0,"aria-label":`Select ${t}`,onClick:()=>S(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),S(e))},className:`group relative flex flex-col rounded-2xl border p-5 sm:p-6 cursor-pointer transition-all duration-300 hover:-translate-y-1 outline-none focus-visible:ring-4 focus-visible:ring-[color-mix(in_srgb,var(--vx-accent)_25%,transparent)] hover:border-[color-mix(in_srgb,var(--vx-accent)_35%,transparent)] ${V?`bg-zinc-900 border-zinc-800 hover:shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04)] hover:shadow-[0_24px_48px_-24px_color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-8 top-0 h-[3px] rounded-b-full opacity-0 transition-opacity duration-300 group-hover:opacity-100`,style:{background:`linear-gradient(90deg, transparent, ${H}, transparent)`}}),(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-xl flex items-center justify-center shrink-0 transition-transform duration-300 group-hover:scale-105`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(o,{size:20})}),(e.category||e.seats_left||l)&&(0,r.jsxs)(`div`,{className:`flex flex-wrap justify-end items-center gap-1.5`,children:[l&&(0,r.jsxs)(`span`,{part:`card-offer-badge`,className:`text-[10px] font-semibold px-2.5 py-1 rounded-full flex items-center gap-1 ${V?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(Ze,{size:10}),(0,r.jsx)(`span`,{children:_t(l,e.currency)})]}),e.category&&(0,r.jsx)(`span`,{part:`card-category`,className:`text-[10px] font-semibold uppercase tracking-wider px-2.5 py-1 rounded-full ${V?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.category}),e.seats_left&&(0,r.jsxs)(`span`,{part:`card-seats`,className:`text-[10px] font-semibold px-2.5 py-1 rounded-full flex items-center gap-1 ${V?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`}`,children:[(0,r.jsx)(ue,{size:10}),(0,r.jsx)(`span`,{children:e.seats_left})]})]})]}),(0,r.jsx)(`h3`,{part:`card-title`,className:`mt-4 text-lg font-semibold leading-snug tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:t}),e.description&&(0,r.jsx)(`p`,{part:`card-description`,className:`mt-1.5 text-sm leading-relaxed line-clamp-2 ${V?`text-zinc-400`:`text-slate-500`}`,children:e.description}),a.length>0&&(0,r.jsx)(`ul`,{part:`card-perks`,className:`mt-4 space-y-2`,children:a.map((e,t)=>(0,r.jsxs)(`li`,{className:`flex items-start gap-2 text-sm`,children:[(0,r.jsx)(`span`,{className:`mt-0.5 w-4 h-4 rounded-full flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${H} 14%, transparent)`,color:H},children:(0,r.jsx)(re,{size:10,strokeWidth:3})}),(0,r.jsx)(`span`,{className:V?`text-zinc-300`:`text-slate-600`,children:e})]},t))}),(0,r.jsx)(`div`,{className:`flex-1`}),(0,r.jsxs)(`div`,{className:`mt-6 pt-5 border-t border-dashed flex items-end justify-between gap-3 ${V?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsx)(`div`,{className:`min-w-0`,children:n&&!U?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-wider ${V?`text-zinc-500`:`text-slate-400`}`,children:`Registration fee`}),(0,r.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,r.jsx)(`p`,{part:`card-price`,className:`text-2xl font-bold tracking-tight tabular-nums leading-tight`,style:{color:H},children:i?`Free`:c(l?s-l.saving:s)}),l&&(0,r.jsx)(`p`,{part:`card-price-was`,className:`text-sm font-semibold tabular-nums line-through ${V?`text-zinc-500`:`text-slate-400`}`,children:c(s)})]}),l&&(0,r.jsxs)(`p`,{part:`card-offer`,className:`text-[11px] font-semibold mt-0.5 ${V?`text-emerald-400`:`text-emerald-600`}`,children:[`Save `,c(l.saving),` with `,l.code]}),e.tax_info&&(0,r.jsx)(`p`,{part:`card-tax`,className:`text-[11px] mt-0.5 ${V?`text-zinc-500`:`text-slate-400`}`,children:e.tax_info})]}):null}),(0,r.jsxs)(`span`,{part:`button button-primary card-button`,className:`inline-flex shrink-0 items-center gap-2 h-10 pl-4 pr-1.5 rounded-full text-sm font-semibold text-white transition-shadow duration-300 group-hover:shadow-[0_8px_20px_-6px_color-mix(in_srgb,var(--vx-accent)_70%,transparent)]`,style:{backgroundColor:H},children:[U?`Submit`:`Register`,(0,r.jsx)(`span`,{className:`w-7 h-7 rounded-full bg-white/20 flex items-center justify-center transition-transform duration-300 group-hover:translate-x-0.5`,children:(0,r.jsx)(ne,{size:14})})]})]})]},e.id)})})]})})}),!U&&(a||t===`attendee`)&&(0,r.jsx)(`div`,{part:`portal`,className:`${t===`attendee`?`flex`:`hidden`} flex-col ${Z?`w-full flex-1`:`flex-1 overflow-hidden min-h-0`}`,style:{...Z?{}:{overflow:`clip`},...at},onScroll:Z?void 0:e=>{e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0)},children:(0,r.jsx)(At,{apiClient:K,baseUrl:e.baseUrl,storage:q,logger:G,primaryColor:H,isDark:V,isWidgetPage:Z,onEvent:e.onEvent,onError:e.onError})})]})})},zt=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
`)[3]||``).match(/(?:at\s+.*?\s+\()?(?:.*?\/([^/]+?)):(\d+):\d+\)?$/);return e?`[${e[1]}:${e[2]}]`:``}},p=class{baseUrl;slug;logger;timeoutMs;constructor(e,t,n,r=12e4){this.baseUrl=e,this.slug=t,this.logger=n,this.timeoutMs=r}async fetchApi(e,t={}){let n=`${this.baseUrl}${e}`;this.logger.log(`API Call: ${t.method||`GET`} ${n} (timeout: ${this.timeoutMs/1e3}s)`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);t.signal&&t.signal.addEventListener(`abort`,()=>r.abort());try{let e=await fetch(n,{...t,signal:r.signal,headers:{"Content-Type":`application/json`,...t.headers}});clearTimeout(i);let a=null;try{a=await e.json()}catch{}if(!e.ok){let t=`API Error`;if(a){if(typeof a.message==`string`)t=a.message;else if(typeof a.detail==`string`)t=a.detail;else if(typeof a.error==`string`)t=a.error;else if(typeof a==`object`){let e=Object.values(a)[0];Array.isArray(e)&&typeof e[0]==`string`?t=e[0]:typeof e==`string`&&(t=e)}}throw Object.assign(Error(t),{status:e.status})}return a}catch(t){if(clearTimeout(i),t?.name===`AbortError`){let t=Error(`Request timed out after ${this.timeoutMs/1e3} seconds`);throw this.logger.error(`API Request timed out for ${e}`,t),t}throw this.logger.error(`API Request failed for ${e}`,t),t}}async getFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/form-schema/`)}async submitRegistration(e){return this.fetchApi(`/api/public/events/${this.slug}/register/`,{method:`POST`,body:JSON.stringify(e)})}async verifyPayment(e){return this.fetchApi(`/api/payments/verify/`,{method:`POST`,body:JSON.stringify({slug:this.slug,registration_number:e})})}async submitCustomQrPayment(e,t){return this.fetchApi(`/api/payments/custom-qr/`,{method:`POST`,body:JSON.stringify({slug:this.slug,registration_number:e,answers:t})})}async trackProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/track/`,{method:`POST`,body:JSON.stringify(e)})}async getDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}async getDraftByEmail(e){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?email=${encodeURIComponent(e)}`)}catch(t){try{return await this.fetchApi(`/api/public/events/${this.slug}/track/?xref=${encodeURIComponent(e)}`)}catch{throw t}}}async getReviewFormSchema(){return this.fetchApi(`/api/public/events/${this.slug}/review/form-schema/`)}async submitReview(e){return this.fetchApi(`/api/public/events/${this.slug}/review/submit/`,{method:`POST`,body:JSON.stringify(e)})}async trackReviewProgress(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/`,{method:`POST`,body:JSON.stringify(e)})}async getReviewDraft(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/?xref=${encodeURIComponent(e)}`)}async getReviewDraftByEmail(e){return this.fetchApi(`/api/public/events/${this.slug}/review/track/?email=${encodeURIComponent(e)}`)}async portalLogin(e){return this.fetchApi(`/api/portal/${this.slug}/login/`,{method:`POST`,body:JSON.stringify(e)})}async portalRequestPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify({identifier:e})})}async portalConfirmPasswordReset(e){return this.fetchApi(`/api/portal/${this.slug}/password-reset/`,{method:`POST`,body:JSON.stringify(e)})}async portalGetProfile(e){return this.fetchApi(`/api/portal/${this.slug}/me/`,{method:`GET`,headers:{Authorization:`Bearer ${e}`}})}async uploadFile(e,t,n,r){let i=new FormData;return i.append(`file`,e),r&&i.append(`label`,r),!t&&n&&i.append(`email`,n),this.postAsset(i,t)}async submitTextAnswer(e,t,n,r){let i=new FormData;return i.append(`text`,e),r&&i.append(`label`,r),!t&&n&&i.append(`email`,n),this.postAsset(i,t)}async postAsset(e,t){let n=t||null,r={};n&&(r.Authorization=`Bearer ${n}`);let i=`${this.baseUrl}/api/portal/${this.slug}/me/upload/`;this.logger.log(`API Call: POST ${i} (upload)`);let a=new AbortController,o=setTimeout(()=>a.abort(),this.timeoutMs);try{let t=await fetch(i,{method:`POST`,signal:a.signal,headers:r,body:e});clearTimeout(o);let n=null;try{n=await t.json()}catch{}if(t.ok)return n;let s=n?.message||n?.error||n?.detail||`File upload failed`;throw Error(s)}catch(e){throw clearTimeout(o),e?.name===`AbortError`?Error(`File upload timed out after ${this.timeoutMs/1e3} seconds`):e}}async deleteFile(e,t,n){let r=encodeURIComponent(String(e).trim()),i=t||null,a={};i&&(a.Authorization=`Bearer ${i}`);let o=!i&&n?`?email=${encodeURIComponent(n)}`:``,s=[`/api/portal/${this.slug}/me/upload/${r}/${o}`,`/api/portal/${this.slug}/me/upload/${r}${o}`],c=null;for(let e=0;e<s.length;e++){let t=s[e];this.logger.log(`API Call: DELETE ${t}`);try{return await this.fetchApi(t,{method:`DELETE`,headers:a})}catch(t){if(c=t,(t?.status===404||t?.status===405)&&e<s.length-1)continue;throw t}}throw c}async portalUploadFile(e,t){return this.uploadFile(t,e)}async portalDeleteFile(e,t){return this.deleteFile(t,e)}async portalUpdateProfile(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/`;this.logger.log(`API Call: PATCH ${n}`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);try{let a=await fetch(n,{method:`PATCH`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});a.status===405&&(a=await fetch(n,{method:`PUT`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)})),clearTimeout(i);let o=null;try{o=await a.json()}catch{}if(!a.ok){let e=o?.message||o?.error||o?.detail||`Failed to update profile`;throw Error(e)}return o}catch(e){throw clearTimeout(i),e?.name===`AbortError`?Error(`Profile update timed out after ${this.timeoutMs/1e3} seconds`):e}}async portalUpdateSubmission(e,t){let n=`${this.baseUrl}/api/portal/${this.slug}/me/submission/`;this.logger.log(`API Call: PATCH ${n}`);let r=new AbortController,i=setTimeout(()=>r.abort(),this.timeoutMs);try{let a=await fetch(n,{method:`PATCH`,signal:r.signal,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify(t)});clearTimeout(i);let o=null;try{o=await a.json()}catch{}if(!a.ok){let e=o?.message||o?.error||o?.detail||`Failed to update submission`;throw Error(e)}return o}catch(e){throw clearTimeout(i),e?.name===`AbortError`?Error(`Submission update timed out after ${this.timeoutMs/1e3} seconds`):e}}},m=class{prefix;constructor(e){this.prefix=`voxket_${e}_`}generateId(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}getXrefId(){let e=`${this.prefix}xref_id`,t=localStorage.getItem(e);return t||(t=this.generateId(),localStorage.setItem(e,t)),t}updateXrefId(){let e=`${this.prefix}xref_id`,t=this.generateId();return localStorage.setItem(e,t),t}clearXrefId(){let e=`${this.prefix}xref_id`;localStorage.removeItem(e)}setToken(e){localStorage.setItem(`${this.prefix}token`,e)}getToken(){return localStorage.getItem(`${this.prefix}token`)}clearToken(){localStorage.removeItem(`${this.prefix}token`)}setPendingCustomQr(e){try{localStorage.setItem(`${this.prefix}pending_custom_qr`,JSON.stringify(e))}catch{}}getPendingCustomQr(){try{let e=localStorage.getItem(`${this.prefix}pending_custom_qr`),t=e?JSON.parse(e):null;return t&&typeof t==`object`?t:null}catch{return null}}clearPendingCustomQr(){try{localStorage.removeItem(`${this.prefix}pending_custom_qr`)}catch{}}},h=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function g(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:h(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var _=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},v=e=>{let t=_(e);return t.charAt(0).toUpperCase()+t.slice(1)},y=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),b={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function x(e){return e!=null}function S(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??b.width,a=e.size??e.height??b.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?y(...c):y(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??b[`stroke-width`])*Number(e.size??e.width??b.width)/Number(t.size??t.width??b.width):t.strokeWidth??b[`stroke-width`];return[`svg`,{...Object.entries(b).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&x(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&x(t.width)&&{[r(`width`)]:t.width},...`height`in t&&x(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function C(e,t={}){return S(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},T=(0,n.createContext)({}),E=()=>(0,n.useContext)(T),ee=(0,n.forwardRef)(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:b=``}=E()??{},x=!!l||w(f),[S,T,ee=[]]=C(d,{color:e??v,width:r??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:y(b,c),hasA11yProp:x,attributes:f});return(0,n.createElement)(S,{ref:p,...T},[...ee.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function D(e,t=[],r=[]){let i=typeof e==`string`?g(e,t,r):e,a=(0,n.forwardRef)(({className:e,...t},r)=>(0,n.createElement)(ee,{ref:r,icon:i,className:e,...t}));return i.name&&(a.displayName=v(i.name)),a}var te={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};te.node;var O=D(te),k={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};k.node;var ne=D(k),A={name:`briefcase`,size:24,node:[[`path`,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,key:`jecpp`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,key:`i6l2r4`}]]};A.node;var j=D(A),M={name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]};M.node;var N=D(M),P={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};P.node;var re=D(P),F={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};F.node;var ie=D(F),ae={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};ae.node;var oe=D(ae),se={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]};se.node;var ce=D(se),le={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};le.node;var I=D(le),L={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};L.node;var ue=D(L),de={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};de.node;var fe=D(de),pe={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}],[`path`,{d:`M6 14h2`,key:`mk7k0u`}]]};pe.node;var me=D(pe),R={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};R.node;var he=D(R),ge={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};ge.node;var _e=D(ge),ve={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};ve.node;var ye=D(ve),be={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};be.node;var xe=D(be),Se={name:`graduation-cap`,size:24,node:[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]};Se.node;var Ce=D(Se),we={name:`id-card`,size:24,node:[[`path`,{d:`M13 19a4 4 0 00-8 0`,key:`cugzd5`}],[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`circle`,{cx:`9`,cy:`12`,r:`3`,key:`u3jwor`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]};we.node;var Te=D(we),Ee={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};Ee.node;var De=D(Ee),z={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};z.node;var Oe=D(z),ke={name:`key`,size:24,node:[[`path`,{d:`m2 21 9.6-9.6`,key:`9l79m3`}],[`path`,{d:`m7.5 15.5 2.3 2.3a1 1 0 0 1 0 1.4l-2.1 2.1a1 1 0 0 1-1.4 0L4 19`,key:`fw8biw`}],[`circle`,{cx:`15.5`,cy:`7.5`,r:`5.5`,key:`4wxmhb`}]]};ke.node;var Ae=D(ke),je={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};je.node;var Me=D(je),Ne={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Ne.node;var Pe=D(Ne),Fe={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};Fe.node;var Ie=D(Fe),B={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};B.node;var Le=D(B),V={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};V.node;var H=D(V),U={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};U.node;var Re=D(U),W={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};W.node;var ze=D(W),G={name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]};G.node;var Be=D(G),K={name:`move`,size:24,node:[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m19 9 3 3-3 3`,key:`1mg7y2`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}],[`path`,{d:`m5 9-3 3 3 3`,key:`j64kie`}],[`path`,{d:`m9 5 3-3 3 3`,key:`l8vdw6`}]]};K.node;var Ve=D(K),q={name:`package-check`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]};q.node;var He=D(q),Ue={name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]};Ue.node;var We=D(Ue),J={name:`receipt`,size:24,node:[[`path`,{d:`M12 17V7`,key:`pyj7ub`}],[`path`,{d:`M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8`,key:`1elt7d`}],[`path`,{d:`M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z`,key:`ycz6yz`}]]};J.node;var Ge=D(J),Ke={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Ke.node;var qe=D(Ke),Je={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Je.node;var Ye=D(Je),Xe={name:`tag`,size:24,node:[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]};Xe.node;var Ze=D(Xe),Qe={name:`ticket`,size:24,node:[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]};Qe.node;var $e=D(Qe),Y={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Y.node;var et=D(Y),tt={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};tt.node;var nt=D(tt),X={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};X.node;var rt=D(X),it={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};it.node;var Z=D(it),at={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};at.node;var ot=D(at),st={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};st.node;var ct=D(st),Q={fontFamily:`var(--vx-font-heading)`},$=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;function lt(e){let t=e,n=typeof e==`string`?e:t?.serve_url||t?.url||t?.id||``;return String(n||``).match($)?.[0]||``}function ut(e,t){if(!e)return``;if(/^field_\d+/i.test(e)&&t&&typeof t==`string`){let e=t.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);if(e)return e}return e}function dt(e,t=``){if(e&&typeof e==`string`){let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);if(t)return t}return ut(t,e)||t}function ft(e){let t=(e||``).trim();return t?t.split(/\s+/).length:0}function pt(e,t){for(let n of e||[]){if(n.type===`file`)continue;let e=String(t(n)??``).trim(),r=n.label||`This field`;if(n.required&&!e)return`${r} is required.`;let i=Number(n.word_limit)||0;if(n.type===`textarea`&&i&&ft(e)>i)return`${r} is over the ${i}-word limit.`}return null}function mt(e,t){let n=Number(e?.value)||0,r=e?.type===`percent`?t*n/100:n;return Math.min(Math.max(Math.round(r*100)/100,0),Math.max(t,0))}function ht(e,t){let n=null;for(let r of e||[]){let e=mt(r,t);e>0&&(!n||e>n.saving)&&(n={...r,saving:e})}return n}function gt(e,t){return(e||[]).filter(e=>!e?.registration_type||String(e.registration_type)===String(t||``))}function _t(e,t){let n=Number(e?.value)||0;return e?.type===`percent`?`${n%1==0?n:n.toFixed(2)}% off`:`${[t,n.toLocaleString()].filter(Boolean).join(` `)} off`}function vt(e,t){let n=(t||``).trim().toLowerCase();return(e||[]).find(e=>String(e?.code||``).toLowerCase()===n)||null}var yt={email:`email`,phone:`tel`,number:`number`,date:`date`,url:`url`},bt=({field:e,value:t,onChange:n,className:i,isDark:a,id:o,part:s=`input`,disabled:c,placeholder:l})=>{let u=t==null?``:String(t),d=l??e.placeholder??``,f=a?`bg-zinc-900 text-white`:`bg-white text-slate-900`;if(e.type===`select`)return(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsxs)(`select`,{part:`${s} select`,id:o,required:e.required,disabled:c,value:u,onChange:e=>n(e.target.value),className:`${i} pr-10 appearance-none cursor-pointer`,children:[(0,r.jsx)(`option`,{value:``,className:f,children:e.placeholder||`Select ${e.label||`an option`}...`}),(e.options||[]).map((e,t)=>(0,r.jsx)(`option`,{value:e,className:f,children:e},`${t}-${e}`))]}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 right-0 flex items-center pr-3.5 pointer-events-none ${a?`text-zinc-400`:`text-slate-400`}`,children:(0,r.jsx)(ie,{size:16})})]});if(e.type===`checkbox`)return(0,r.jsxs)(`label`,{className:`flex items-start gap-2.5 text-sm cursor-pointer ${c?`opacity-60 cursor-not-allowed`:``} ${a?`text-zinc-200`:`text-slate-700`}`,children:[(0,r.jsx)(`input`,{part:`${s} checkbox`,id:o,type:`checkbox`,required:e.required,disabled:c,checked:u===`Yes`||u===`true`,onChange:e=>n(e.target.checked?`Yes`:``),className:`mt-0.5 w-4 h-4 shrink-0 cursor-pointer accent-(--vx-accent)`}),(0,r.jsx)(`span`,{children:e.placeholder||e.label})]});if(e.type===`textarea`){let t=Number(e.word_limit)||0,l=ft(u);return(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`textarea`,{part:`${s} textarea`,id:o,rows:4,required:e.required,disabled:c,value:u,placeholder:d,onChange:e=>n(e.target.value),className:`${i} resize-y`}),t>0&&(0,r.jsxs)(`div`,{className:`text-2xs font-medium mt-1 text-right ${l>t?`text-red-500`:a?`text-zinc-500`:`text-slate-500`}`,children:[l,` / `,t,` words`]})]})}return(0,r.jsx)(`input`,{part:s,id:o,type:yt[e.type]||`text`,required:e.required,disabled:c,value:u,placeholder:e.type===`url`&&!d?`https://`:d,onChange:e=>n(e.target.value),className:i})},xt=new Set([`salutation`,`name`,`email`,`phone`]),St=({schema:e,onSubmit:t,onBack:i,theme:a,displayMode:o,isExpanded:s,onToggleExpand:c,onClose:l,onChange:u,initialValues:d,fileAnswers:f,isDark:p=!1,apiClient:m,onError:h,onEvent:g,backgroundStyle:_,ticketType:v,offers:y,showReviewFields:b=!1})=>{let[x,S]=(0,n.useState)(d||{}),[C,w]=(0,n.useState)(null),[T,E]=(0,n.useState)(null),[ee,D]=(0,n.useState)({}),[te,k]=(0,n.useState)({}),[A,j]=(0,n.useState)(null),[M,N]=(0,n.useState)(null),[P,F]=(0,n.useState)({}),[ae,oe]=(0,n.useState)({}),[se,ce]=(0,n.useState)({}),[le,I]=(0,n.useState)({}),[L,ue]=(0,n.useState)(``),[de,fe]=(0,n.useState)(null),[pe,me]=(0,n.useState)(!1),R=a?.primaryColor||`#c026d3`;(0,n.useEffect)(()=>{if(d&&Object.keys(d).length>0){S(e=>({...d,...e}));let t={},n={},r=e?.fields||[];r.forEach(e=>{if(e.type===`file`){let r=d[e.id];r&&(String(r).startsWith(`http://`)||String(r).startsWith(`https://`)?(n[e.id]=String(r),lt(r)&&(t[e.id]=lt(r))):t[e.id]=String(r))}}),Object.keys(t).length>0&&D(e=>({...t,...e})),Object.keys(n).length>0&&k(e=>({...n,...e})),r.forEach(e=>{let t=f?.[e.id];t?.text?(ce(n=>({[e.id]:t.text,...n})),oe(n=>({[e.id]:t.text,...n})),F(t=>({[e.id]:`text`,...t}))):t?.serve_url&&k(n=>({[e.id]:t.serve_url,...n}))})}},[d,e,f]);let[he,ge]=(0,n.useState)(null),ve=(e,t)=>{S(n=>{let r={...n,[e]:t};return u?.(r),r})},be=(e,t=!1)=>{let n=t=>{let n={...t};return delete n[e],n};D(n),k(n),ce(n),t||oe(n),S(t=>{let n={...t,[e]:``};return u?.(n),n})},Se=async(e,t)=>{if(!b||!t||!z())return!1;try{await m.deleteFile(lt(t)||t,null,z()),g?.(`file_deleted`,{fieldId:e,assetId:t}),be(e,!0)}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}return!0},Ce=async(t,n)=>{if(!m)return;w(t),j(null),N(null);let r=ee[t],i=(e?.fields||[]).find(e=>e.id===t);try{let e=await Se(t,r),a=await m.uploadFile(n,null,z(),i?.label),o=a?.data?.asset_id||a?.asset_id,s=a?.data?.serve_url||a?.serve_url;if(!o&&!s)throw Error(`Upload response missing asset_id`);let c=String(o||lt(s)),l=String(s||``);if(D(e=>({...e,[t]:c})),l&&k(e=>({...e,[t]:l})),ce(e=>{let n={...e};return delete n[t],n}),S(e=>{let n={...e,[t]:l||c};return u?.(n),n}),g?.(`file_uploaded`,{fieldId:t,assetId:c,serveUrl:l}),!e&&r&&r!==c)try{await m.deleteFile(lt(r)||r,null,z()),g?.(`file_deleted`,{fieldId:t,assetId:r})}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}}catch(e){let n=e?.message||`File upload failed. Please try again.`;j(n),N(t),h?.({type:`file_upload_error`,message:n,error:e})}finally{w(null)}},we=async e=>{if(!m)return;let t=ee[e]||x[e],n=lt(t)||t;E(e),j(null),N(null);try{n&&(await m.deleteFile(n,null,z()),g?.(`file_deleted`,{fieldId:e,assetId:n})),be(e)}catch(t){let n=t?.message||`Failed to delete file. Please try again.`;j(n),N(e),h?.({type:`file_delete_error`,message:n,error:t})}finally{E(null)}},Te=async(t,n)=>{if(!m||!n.trim())return;let r=ee[t],i=(e?.fields||[]).find(e=>e.id===t),a=Number(i?.word_limit)||0;if(a&&ft(n)>a){j(`${i?.label||`This answer`} is over the ${a}-word limit.`),N(t);return}w(t),j(null),N(null);try{let e=await Se(t,r),a=await m.submitTextAnswer(n.trim(),null,z(),i?.label),o=a?.data?.asset_id||a?.asset_id;if(!o)throw Error(`Submission response missing asset_id`);let s=String(o);if(D(e=>({...e,[t]:s})),k(e=>{let n={...e};return delete n[t],n}),ce(e=>({...e,[t]:n.trim()})),S(e=>{let n={...e,[t]:s};return u?.(n),n}),g?.(`file_uploaded`,{fieldId:t,assetId:s,isText:!0}),!e&&r&&r!==s)try{await m.deleteFile(lt(r)||r,null,z()),g?.(`file_deleted`,{fieldId:t,assetId:r})}catch(e){console.warn(`[DynamicForm] Could not delete old file`,e)}}catch(e){let n=e?.message||`Could not submit your answer. Please try again.`;j(n),N(t),h?.({type:`file_upload_error`,message:n,error:e})}finally{w(null)}},Ee=()=>{let t=(e?.fields||[]).find(e=>e.type===`email`||(e.label||e.id||``).toLowerCase().includes(`email`));return String(t&&x[t.id]||x.email||``).trim()},z=()=>b&&Ee()||null,Oe=e?.fields||[],ke=Array.isArray(v?.items)?v.items.filter(e=>e?.name):[],Ae=ke.filter(e=>e.mode===`optional`),je=ke.filter(e=>e.mode===`group`),Me=ke.filter(e=>e.mode!==`optional`&&e.mode!==`group`),Ne=Array.isArray(x.selected_items)?x.selected_items:[],Pe=e=>e?.label??e?.name,Fe=e=>e?.options?.length?e.options.flatMap(Fe):Pe(e)?[Pe(e)]:[],Ie=(e,t=Ne)=>Fe(e).some(e=>t.includes(e)),B=(e,t=Ne)=>(e?.options||[]).filter(e=>Ie(e,t)).length,Le=(e,t=[])=>{S(n=>{let r=Array.isArray(n.selected_items)?n.selected_items:[],i=r.includes(e),a=i?r.filter(t=>t!==e):[...r,e];if(!i&&t.some(e=>Number(e?.max)&&B(e,a)>Number(e.max)))return n;let o={...n,selected_items:a};return u?.(o),o})},V=b?null:v?.accompany_form_schema||null,H=V?.fields||[],U=Number(V?.price)||0,Re=Number(V?.max)||0,W=Array.isArray(x.accompanying)?x.accompanying:[],G=!Re||W.length<Re,K=e=>{S(t=>{let n=Array.isArray(t.accompanying)?t.accompanying:[],r={...t,accompanying:e(n)};return u?.(r),r})},Ve=()=>K(e=>[...e,{salutation:``,name:``,email:``,phone:``,custom_data:{}}]),q=e=>K(t=>t.filter((t,n)=>n!==e)),He=e=>xt.has(e.id)?e.id:ut(e.id,e.label),Ue=(e,t)=>(xt.has(t.id)?e[t.id]:(e.custom_data||{})[He(t)])??``,We=(e,t,n)=>K(r=>r.map((r,i)=>i===e?xt.has(t.id)?{...r,[t.id]:n}:{...r,custom_data:{...r.custom_data||{},[He(t)]:n}}:r)),J=(e,t)=>`guest:${e}:${t.id}`,Ge=async(e,t,n)=>{if(!m)return;let r=J(e,t);w(r),j(null),N(null);try{let i=await m.uploadFile(n,null,z(),t.label),a=i?.data?.serve_url||i?.serve_url||``,o=i?.data?.asset_id||i?.asset_id||``;if(!a&&!o)throw Error(`Upload response missing asset_id`);We(e,t,String(a||o)),g?.(`file_uploaded`,{fieldId:r,assetId:o,serveUrl:a})}catch(e){let t=e?.message||`File upload failed. Please try again.`;j(t),N(r),h?.({type:`file_upload_error`,message:t,error:e})}finally{w(null)}},Ke=async(e,t)=>{if(!m)return;let n=J(e,t),r=Ue(W[e]||{},t),i=lt(r)||r;E(n),j(null),N(null);try{i&&(await m.deleteFile(i,null,z()),g?.(`file_deleted`,{fieldId:n,assetId:i})),We(e,t,``)}catch(e){let t=e?.message||`Failed to delete file. Please try again.`;j(t),N(n),h?.({type:`file_delete_error`,message:t,error:e})}finally{E(null)}},qe=e=>{if(e.description)return e.description;if(e.helperText)return e.helperText;let t=(e.label||e.id||``).toLowerCase(),n=e.type;return n===`email`?b?`Please enter a valid email address. Your abstract acknowledgement, review updates, and final communication will be sent to this mailbox.`:`Please enter a valid email address. Your registration confirmation and event updates will be sent to this mailbox.`:n===`phone`?`Please enter a valid mobile number for SMS confirmations and important notifications.`:n===`text`&&(t.includes(`council`)||t.includes(`registration no`)||t.includes(`mci`))?`Enter your State Medical Council or National Medical Commission registration number.`:n===`file`?b?`Upload your document, or answer with text instead.`:`Upload your document for registration review and verification, or answer with text instead.`:e.id===`salutation`?`Choose your professional title or academic prefix.`:null},Je=e=>{let t=te[e.id]||(x[e.id]&&String(x[e.id]).startsWith(`http`)?x[e.id]:``),n=se[e.id],i=P[e.id]||`file`,a=C===e.id||T===e.id,o=C!==null||T!==null,s=ae[e.id]||``,c=ft(s),l=!!Number(e.word_limit)&&c>Number(e.word_limit);return(0,r.jsx)(`div`,{className:`space-y-2 mt-2`,children:(0,r.jsxs)(`div`,{part:`upload`,className:`p-4 sm:p-5 rounded-2xl border border-dashed transition-all ${p?`bg-zinc-850/80 border-zinc-700 hover:border-zinc-600`:`bg-slate-50 border-slate-300 hover:border-[color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`div`,{className:`w-10 h-10 rounded-xl flex items-center justify-center shrink-0 border`,style:{backgroundColor:p?`rgba(255,255,255,0.06)`:`color-mix(in srgb, ${R} 10%, white)`,borderColor:p?`rgba(255,255,255,0.12)`:`color-mix(in srgb, ${R} 25%, white)`,color:R},children:(0,r.jsx)(xe,{size:18})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`p`,{className:`text-xs font-bold ${p?`text-zinc-200`:`text-gray-900`}`,children:e.label}),(0,r.jsx)(`p`,{className:`text-2xs font-medium ${p?`text-zinc-400`:`text-gray-500`}`,children:t?`Document attached successfully`:n?`Text submitted successfully`:i===`file`?`Click to choose or upload your document (PDF, JPG, PNG)`:`Enter your text below`})]})]}),(0,r.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>F(t=>({...t,[e.id]:i===`file`?`text`:`file`})),className:`flex items-center gap-1 text-2xs font-semibold px-2.5 py-1 rounded-lg border cursor-pointer transition-colors hover:opacity-80 disabled:opacity-50 shrink-0`,style:{color:R,borderColor:`color-mix(in srgb, ${R} 35%, transparent)`},children:i===`file`?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ye,{size:11}),` Send text only`]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(nt,{size:11}),` Send file`]})})]}),i===`file`?(0,r.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap mt-3`,children:[(0,r.jsxs)(`label`,{className:`relative ${o?`cursor-not-allowed`:`cursor-pointer`} ${o&&!a?`opacity-50`:``}`,children:[(0,r.jsx)(`input`,{type:`file`,className:`hidden`,style:{display:`none`},tabIndex:-1,disabled:o,onChange:t=>{let n=t.target.files?.[0];n&&Ce(e.id,n),t.target.value=``}}),(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold border transition-all shadow-2xs ${p?`border-zinc-700 hover:border-zinc-600 text-zinc-200 bg-zinc-800 hover:bg-zinc-750`:`border-slate-200 hover:border-slate-300 text-slate-700 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(nt,{size:14,style:{color:R}}),(0,r.jsx)(`span`,{children:C===e.id?`Uploading...`:t?`Replace File`:`Choose File`})]})]}),t&&typeof t==`string`&&t.trim()!==``&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`button`,{type:`button`,onClick:()=>window.open(t,`_blank`,`noopener,noreferrer`),className:`flex items-center gap-1.5 py-2 px-3.5 rounded-xl text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0 cursor-pointer`,style:{backgroundColor:R},title:`Open file in new tab`,children:[(0,r.jsx)(ye,{size:13}),(0,r.jsx)(`span`,{children:`View`}),(0,r.jsx)(_e,{size:11})]}),(0,r.jsxs)(`button`,{type:`button`,disabled:o,onClick:()=>we(e.id),className:`flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${p?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50 text-red-600 hover:bg-red-100`}`,title:`Delete uploaded file`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:T===e.id?`Deleting...`:`Delete`})]})]})]}):(0,r.jsxs)(`div`,{className:`mt-3 pt-3 border-t space-y-2 ${p?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsx)(`textarea`,{part:`input textarea`,rows:3,disabled:a||!!n,value:n??s,onChange:t=>oe(n=>({...n,[e.id]:t.target.value})),placeholder:`Enter your answer...`,className:`w-full px-3 py-2 text-sm rounded-xl border focus:outline-none transition-all disabled:opacity-70 ${p?`bg-zinc-900 border-zinc-700 text-white placeholder-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`}),(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[e.word_limit?(0,r.jsxs)(`span`,{className:`text-2xs font-medium ${l?`text-red-500`:p?`text-zinc-500`:`text-gray-500`}`,children:[c,`/`,e.word_limit,` words`,l&&!n?` — over the limit`:``]}):(0,r.jsx)(`span`,{}),n?(0,r.jsxs)(`button`,{type:`button`,disabled:o,onClick:()=>we(e.id),className:`flex items-center gap-1 py-2 px-3 rounded-xl text-xs font-semibold border transition-colors cursor-pointer ${p?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50 text-red-600 hover:bg-red-100`}`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:T===e.id?`Clearing...`:`Clear & Re-enter`})]}):(0,r.jsxs)(`button`,{type:`button`,disabled:o||!s.trim()||l,onClick:()=>Te(e.id,s),style:{backgroundColor:R},className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-xs font-bold text-white shadow-sm hover:opacity-90 transition-all cursor-pointer disabled:opacity-50`,children:[(0,r.jsx)(nt,{size:13}),(0,r.jsx)(`span`,{children:C===e.id?`Submitting...`:`Submit Text`})]})]})]}),t&&(0,r.jsxs)(`div`,{className:`mt-2.5 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${p?`border-zinc-800 text-zinc-300`:`border-gray-200 text-gray-700 font-medium`}`,children:[(0,r.jsx)(re,{size:12,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`Attached: `,t]})]}),A&&M===e.id&&(0,r.jsx)(`div`,{className:`text-xs text-red-500 mt-2 font-medium`,children:A})]})})},Ye=e=>{if(!e)return null;let t=x[e.id]??``,n=qe(e),i=e.type===`email`,a=e.id===`name`,o=`vx-field-${e.id}`,s=`w-full px-4 py-3 text-[15px] font-medium rounded-xl border transition-all focus:outline-none ${p?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`;return(0,r.jsxs)(`div`,{part:`field`,className:`px-5 sm:px-8 py-5 sm:py-6`,children:[(0,r.jsx)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:(0,r.jsxs)(`label`,{part:`field-label`,htmlFor:o,className:`block text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500 font-semibold ml-0.5`,children:`*`})]})}),n&&(0,r.jsx)(`p`,{part:`field-description`,className:`text-xs leading-relaxed mb-3 ${p?`text-zinc-400`:`text-slate-500`}`,children:n}),!n&&(0,r.jsx)(`div`,{className:`h-1.5`}),e.type===`file`?Je(e):(0,r.jsx)(bt,{field:e,id:o,value:t,onChange:t=>ve(e.id,t),className:s,isDark:p,placeholder:e.placeholder||(i?`Enter your email address`:a?`Your full name`:`Enter your ${(e.label||``).toLowerCase()}`)})]},e.id)},Xe=(e,t,n)=>{let i=J(t,e),a=C!==null||T!==null;return(0,r.jsxs)(`div`,{children:[n?(0,r.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2.5 rounded-xl border ${p?`border-zinc-700 bg-zinc-900`:`border-slate-200 bg-white`}`,children:[(0,r.jsx)(ye,{size:15,className:`shrink-0`,style:{color:R}}),(0,r.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:`flex-1 min-w-0 truncate text-xs font-medium underline-offset-2 hover:underline ${p?`text-zinc-200`:`text-slate-700`}`,children:`View file`}),(0,r.jsx)(`button`,{type:`button`,disabled:a,onClick:()=>Ke(t,e),title:`Remove file`,className:`shrink-0 p-1 rounded-lg cursor-pointer disabled:opacity-40 ${p?`text-zinc-500 hover:text-red-400`:`text-slate-400 hover:text-red-500`}`,children:(0,r.jsx)(et,{size:14})})]}):(0,r.jsxs)(`label`,{className:`flex items-center justify-center gap-2 px-3 py-2.5 rounded-xl border border-dashed cursor-pointer text-xs font-semibold transition-opacity hover:opacity-80 ${p?`border-zinc-700 text-zinc-300`:`border-slate-300 text-slate-600`} ${a?`opacity-50 pointer-events-none`:``}`,children:[(0,r.jsx)(nt,{size:14}),C===i?`Uploading...`:`Choose file`,(0,r.jsx)(`input`,{type:`file`,className:`hidden`,onChange:n=>{let r=n.target.files?.[0];r&&Ge(t,e,r),n.target.value=``}})]}),A&&M===i&&(0,r.jsx)(`div`,{className:`text-xs text-red-500 mt-1.5 font-medium`,children:A})]})},Qe=(e,t,n)=>{let i=Ue(t,e),a=`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${p?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500 focus:border-(--vx-accent)`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 focus:border-(--vx-accent)`}`;return(0,r.jsxs)(`label`,{part:`field`,className:`block`,children:[(0,r.jsxs)(`span`,{className:`block text-xs font-semibold mb-1.5 ${p?`text-zinc-300`:`text-slate-700`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`})]}),e.type===`file`?Xe(e,n,String(i||``)):(0,r.jsx)(bt,{field:e,value:i,onChange:t=>We(n,e,t),className:a,isDark:p})]},e.id)},Y=e=>{e.preventDefault(),ge(null);for(let e of Oe)if(e.type===`file`&&e.required&&!x[e.id]){j(`Please upload ${e.label||`a file`}`),N(e.id);return}for(let e=0;e<W.length;e++)for(let t of H)if(t.type===`file`&&t.required&&!Ue(W[e],t)){j(`Please upload ${t.label||`a file`} for guest ${e+1}`),N(J(e,t));return}let n=pt(Oe,e=>x[e.id]);for(let e=0;!n&&e<W.length;e++){let t=pt(H,t=>Ue(W[e],t));t&&(n=`Guest ${e+1}: ${t}`)}if(n){ge(n);return}let r={};Object.entries(te).forEach(([e,t])=>{r[e]={serve_url:t}}),Object.entries(se).forEach(([e,t])=>{r[e]={text:t}}),t(x,{fileAnswers:r})},tt=v?.type||v?.name||v?.label||(b?`Abstract Submission Form`:`Registration Form`),X=e=>[v?.currency,e.toLocaleString()].filter(Boolean).join(` `),it=e=>{if(!e?.options?.length)return Ne.includes(Pe(e))&&Number(e?.price)||0;if(!Ie(e))return 0;let t=e.options.reduce((e,t)=>e+it(t),0);return e.price==null||e.price===``?t:Number(e.price)||0},Z=[...Ae,...je].reduce((e,t)=>e+it(t),0),at=(e,t=[],n=!1)=>{let i=Number(e.max)||0,a=B(e),o=i>0&&a>=i,s=(e.options||[]).length,c=e.price!=null&&e.price!==``,l=c&&Number(e.price)||0,u=n||c,d=le[e.name]??a>0,f=[...t,e];return(0,r.jsxs)(`div`,{part:`addon-group`,className:`pt-1`,children:[(0,r.jsxs)(`button`,{type:`button`,part:`addon-group-toggle`,"aria-expanded":d,onClick:()=>I(t=>({...t,[e.name]:!d})),className:`w-full flex items-center justify-between gap-2 mb-2 px-3.5 py-3 rounded-2xl border cursor-pointer transition-colors ${p?`border-zinc-800 bg-zinc-950/60 hover:border-zinc-700`:`border-slate-200 bg-slate-50 hover:border-slate-300`}`,children:[(0,r.jsxs)(`span`,{className:`flex items-center gap-2 min-w-0`,children:[(0,r.jsx)(ie,{size:15,className:`shrink-0 transition-transform duration-200 ${d?`rotate-180`:``} ${p?`text-zinc-400`:`text-slate-500`}`}),(0,r.jsx)(`span`,{className:`text-xs font-bold uppercase tracking-wider truncate ${p?`text-zinc-300`:`text-slate-600`}`,children:e.name}),(0,r.jsxs)(`span`,{className:`shrink-0 text-[11px] font-medium ${p?`text-zinc-500`:`text-slate-400`}`,children:[s,` `,s===1?`option`:`options`]})]}),(0,r.jsxs)(`span`,{className:`flex items-center gap-2 shrink-0`,children:[c&&(0,r.jsx)(`span`,{className:`text-[13px] font-bold tabular-nums`,style:{color:R},children:n?`Included`:l>0?`+ ${X(l)}`:`Included`}),(i>0||a>0)&&(0,r.jsx)(`span`,{className:`text-[11px] font-semibold px-2 py-0.5 rounded-full ${o?`bg-amber-100 text-amber-700`:a>0?p?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`:p?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:i>0?`${a}/${i} chosen`:`${a} chosen`})]})]}),(0,r.jsx)(`div`,{className:d?`space-y-2`:`hidden`,children:(e.options||[]).map(e=>{if(e.options?.length)return(0,r.jsx)(`div`,{className:`pl-3`,children:at(e,f,u)},e.name);let t=Pe(e),n=Ne.includes(t),i=o&&!n;return(0,r.jsxs)(`label`,{part:n?`addon addon-selected`:`addon`,className:`p-3.5 rounded-2xl border flex items-center gap-3 transition-all ${i?`opacity-50 cursor-not-allowed`:`cursor-pointer`} ${n?``:p?`border-zinc-800 bg-zinc-900 hover:border-zinc-700`:`border-slate-200 bg-white hover:border-slate-300`}`,style:n?{borderColor:R,backgroundColor:`color-mix(in srgb, ${R} ${p?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:n,disabled:i,onChange:()=>Le(t,f),className:`w-4 h-4 rounded cursor-pointer shrink-0 disabled:cursor-not-allowed`,style:{accentColor:R}}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[13px] font-bold tabular-nums`,style:{color:R},children:u?`Included`:Number(e.price)>0?`+ ${X(Number(e.price))}`:`Included`})]},e.name)})})]},e.name)},st=Number(v?.price)||0,$=U*W.length,dt=st+Z+$,gt=b?[]:y||[],yt=vt(gt,x.discount_code),St=yt?mt(yt,dt):0,Ct=ht(gt,dt),wt=dt-St,Tt=v?wt>0?X(wt):`Free`:null;(0,n.useEffect)(()=>{if(pe||b||dt<=0)return;let e=Ct?.code||``;(x.discount_code||``)!==e&&S(t=>({...t,discount_code:e}))},[pe,b,dt,Ct?.code,x.discount_code]);let Et=(0,n.useRef)(v?.id);(0,n.useEffect)(()=>{Et.current!==v?.id&&(Et.current=v?.id,me(!1),fe(null),S(e=>e.discount_code?{...e,discount_code:``}:e))},[v?.id]);let Dt=e=>{me(!0),fe(null),ue(``),S(t=>({...t,discount_code:e}))},Ot=()=>{let e=L.trim();if(!e)return Dt(``);let t=vt(gt,e);if(!t){me(!0),fe(`That code is not valid for this event.`);return}Dt(t.code)};return(0,r.jsxs)(`div`,{part:`form-page`,className:`w-full flex-1 flex flex-col relative ${p?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,style:_,children:[(0,r.jsx)(`div`,{part:`form-header`,className:`sticky top-0 z-30 px-4 sm:px-6 py-3 border-b backdrop-blur-xl transition-colors ${p?`bg-zinc-900/85 border-zinc-800`:`bg-white/85 border-slate-200/80`}`,children:(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto flex items-center justify-between gap-3`,children:[(0,r.jsxs)(`button`,{part:`button button-secondary back-button`,type:`button`,onClick:i,className:`inline-flex items-center gap-2 text-sm font-semibold rounded-full pl-2.5 pr-4 py-2 border transition-colors cursor-pointer ${p?`bg-zinc-800 border-zinc-700 hover:bg-zinc-700 text-zinc-200`:`bg-white border-slate-200 hover:bg-slate-50 text-slate-700 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`,children:[(0,r.jsx)(O,{size:16}),(0,r.jsx)(`span`,{children:`All forms`})]}),(0,r.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[v&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{part:`form-type-name`,title:tt,className:`hidden sm:inline-block truncate max-w-[16rem] text-xs font-semibold px-3 py-1.5 rounded-full ${p?`bg-zinc-800 text-zinc-200`:`bg-slate-100 text-slate-700`}`,children:tt}),!b&&(0,r.jsx)(`span`,{part:`form-type-price`,className:`shrink-0 text-xs font-bold px-3 py-1.5 rounded-full tabular-nums`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:Tt})]}),o===`popup`&&(0,r.jsxs)(`div`,{className:`flex items-center gap-1.5 ml-2 border-l pl-2 ${p?`border-zinc-700`:`border-slate-200`}`,children:[(0,r.jsx)(`button`,{onClick:c,className:`p-1.5 opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,title:s?`Minimize`:`Expand`,children:s?(0,r.jsx)(Be,{size:16}):(0,r.jsx)(ze,{size:16})}),(0,r.jsx)(`button`,{onClick:l,className:`p-1.5 opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:18})})]})]})]})}),(0,r.jsx)(`div`,{className:`w-full flex-1 overflow-y-auto`,children:(0,r.jsxs)(`form`,{part:`form`,onSubmit:Y,className:`max-w-3xl mx-auto w-full px-4 sm:px-6 py-8 sm:py-10 space-y-5`,children:[(0,r.jsxs)(`div`,{part:`form-intro`,className:`px-1`,children:[(0,r.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-wider`,style:{color:R},children:b?`Abstract submission`:`Registration form`}),(0,r.jsx)(`h2`,{part:`form-title`,className:`mt-1.5 text-2xl sm:text-3xl font-bold tracking-tight ${p?`text-white`:`text-slate-900`}`,style:Q,children:tt})]}),d&&Object.keys(d).length>0&&(0,r.jsxs)(`div`,{className:`text-sm px-4 py-3 rounded-2xl flex items-center gap-2.5 ${p?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-800 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(re,{size:16,className:`shrink-0`}),(0,r.jsx)(`span`,{className:`font-medium`,children:`We restored your previously saved progress.`})]}),(0,r.jsxs)(`div`,{part:`notice`,className:`rounded-2xl p-4 flex items-start gap-3`,style:{backgroundColor:`color-mix(in srgb, ${R} ${p?14:7}%, transparent)`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${R} 20%, transparent)`},children:[(0,r.jsx)(`div`,{className:`shrink-0 mt-0.5`,style:{color:R},children:(0,r.jsx)(De,{size:18})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{part:`notice-title`,className:`text-xs font-bold uppercase tracking-wider`,style:{color:R},children:`Before you submit`}),(0,r.jsxs)(`p`,{className:`text-sm mt-0.5 leading-relaxed ${p?`text-zinc-300`:`text-slate-600`}`,children:[`Ensure you are a registered delegate. Fields marked `,(0,r.jsx)(`span`,{className:`text-red-500 font-semibold`,children:`*`}),` are required.`]})]})]}),(0,r.jsx)(`div`,{part:`form-card`,className:`rounded-3xl border overflow-hidden divide-y ${p?`bg-zinc-900 border-zinc-800 divide-zinc-800`:`bg-white border-slate-200/80 divide-slate-100 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:Oe.map(e=>Ye(e))}),!b&&ke.length>0&&(0,r.jsxs)(`div`,{part:`addons-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)($e,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h3`,{part:`addons-title`,className:`text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,style:Q,children:`Add-ons`}),(0,r.jsx)(`p`,{className:`text-xs ${p?`text-zinc-400`:`text-slate-500`}`,children:Ae.length>0||je.length>0?`Optional extras — charges are added to your total.`:`Included with this registration.`})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 pb-5 sm:pb-6 space-y-2`,children:[Ae.map(e=>{let t=Ne.includes(e.name);return(0,r.jsxs)(`label`,{part:t?`addon addon-selected`:`addon`,className:`p-3.5 rounded-2xl border flex items-center gap-3 cursor-pointer transition-all ${t?``:p?`border-zinc-800 bg-zinc-900 hover:border-zinc-700`:`border-slate-200 bg-white hover:border-slate-300`}`,style:t?{borderColor:R,backgroundColor:`color-mix(in srgb, ${R} ${p?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>Le(e.name),className:`w-4 h-4 rounded cursor-pointer shrink-0`,style:{accentColor:R}}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[13px] font-bold tabular-nums`,style:{color:R},children:Number(e.price)>0?`+ ${X(Number(e.price))}`:`Free`})]},e.name)}),je.map(e=>at(e)),Me.map(e=>(0,r.jsxs)(`div`,{part:`addon addon-included`,className:`p-3.5 rounded-2xl border flex items-center gap-3 ${p?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsx)(re,{size:16,className:`text-emerald-500 shrink-0`}),(0,r.jsx)(`span`,{className:`flex-1 min-w-0 text-sm font-semibold leading-snug ${p?`text-zinc-300`:`text-slate-700`}`,children:e.name}),(0,r.jsx)(`span`,{className:`shrink-0 text-[11px] font-semibold px-2.5 py-1 rounded-full ${p?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:`Included`})]},e.name))]})]}),V&&(0,r.jsxs)(`div`,{part:`accompany-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)(ot,{size:17})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{part:`accompany-title`,className:`text-sm font-semibold ${p?`text-zinc-100`:`text-slate-900`}`,style:Q,children:`Accompanying people`}),(0,r.jsxs)(`p`,{className:`text-xs ${p?`text-zinc-400`:`text-slate-500`}`,children:[U>0?`${X(U)} per guest`:`No extra charge`,Re?` · up to ${Re}`:``]})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 pb-5 sm:pb-6 space-y-3`,children:[W.map((e,t)=>(0,r.jsxs)(`div`,{part:`accompany-guest`,className:`rounded-2xl border p-4 ${p?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50/70`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-3`,children:[(0,r.jsxs)(`span`,{className:`text-xs font-bold uppercase tracking-wider ${p?`text-zinc-400`:`text-slate-500`}`,children:[`Guest `,t+1]}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>q(t),title:`Remove guest`,className:`shrink-0 p-1.5 rounded-lg cursor-pointer transition-colors ${p?`text-zinc-500 hover:text-red-400`:`text-slate-400 hover:text-red-500`}`,children:(0,r.jsx)(et,{size:15})})]}),(0,r.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:H.map(n=>Qe(n,e,t))})]},t)),(0,r.jsxs)(`button`,{type:`button`,onClick:Ve,disabled:!G,style:{borderColor:R,color:R},className:`w-full h-12 rounded-2xl border border-dashed text-sm font-semibold flex items-center justify-center gap-2 transition-opacity hover:opacity-80 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed`,children:[(0,r.jsx)(rt,{size:16}),G?`Add guest`:`Limit of ${Re} reached`]})]})]}),!b&&dt>0&&(0,r.jsxs)(`div`,{part:`summary-card`,className:`rounded-3xl border overflow-hidden ${p?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 px-5 sm:px-8 pt-5 sm:pt-6 pb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${R} 12%, transparent)`,color:R},children:(0,r.jsx)(Ze,{size:17})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{className:`text-base font-semibold leading-tight ${p?`text-white`:`text-slate-900`}`,style:Q,children:`Order summary`}),(0,r.jsx)(`p`,{className:`text-xs mt-0.5 ${p?`text-zinc-400`:`text-slate-500`}`,children:`This is what you will be asked to pay at checkout.`})]})]}),(0,r.jsxs)(`div`,{part:`summary-lines`,className:`px-5 sm:px-8 pb-4 space-y-2.5 text-sm`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`span`,{className:`min-w-0 truncate ${p?`text-zinc-400`:`text-slate-500`}`,children:tt}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X(st)})]}),Z>0&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsx)(`span`,{className:p?`text-zinc-400`:`text-slate-500`,children:`Add-ons`}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X(Z)})]}),$>0&&(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,r.jsxs)(`span`,{className:p?`text-zinc-400`:`text-slate-500`,children:[`Accompanying `,W.length===1?`person`:`people`,` x `,W.length]}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums font-medium ${p?`text-zinc-200`:`text-slate-700`}`,children:X($)})]}),St>0&&(0,r.jsxs)(`div`,{part:`summary-discount`,className:`flex items-center justify-between gap-3 pt-2.5 border-t border-dashed ${p?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsxs)(`span`,{className:`min-w-0 truncate font-semibold ${p?`text-emerald-400`:`text-emerald-600`}`,children:[`Discount (`,yt.code,`)`]}),(0,r.jsxs)(`span`,{className:`shrink-0 tabular-nums font-semibold ${p?`text-emerald-400`:`text-emerald-600`}`,children:[`- `,X(St)]})]})]}),(0,r.jsxs)(`div`,{part:`coupon`,className:`px-5 sm:px-8 pb-5`,children:[yt?(0,r.jsxs)(`div`,{className:`flex items-center gap-3 p-3.5 rounded-2xl border border-dashed ${p?`border-emerald-900 bg-emerald-950/30`:`border-emerald-200 bg-emerald-50/60`}`,children:[(0,r.jsx)(re,{size:16,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsxs)(`p`,{className:`text-sm font-semibold ${p?`text-emerald-200`:`text-emerald-800`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:yt.code}),` applied`]}),(0,r.jsxs)(`p`,{className:`text-xs mt-0.5 ${p?`text-emerald-500/80`:`text-emerald-700/80`}`,children:[_t(yt,v?.currency),` — you save `,X(St),`.`]})]}),(0,r.jsx)(`button`,{type:`button`,onClick:()=>Dt(``),className:`shrink-0 text-xs font-semibold px-3 py-1.5 rounded-full border cursor-pointer transition-colors ${p?`border-zinc-700 text-zinc-300 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-600 hover:bg-slate-50`}`,children:`Remove`})]}):(0,r.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-2`,children:[(0,r.jsx)(`input`,{part:`input coupon-input`,type:`text`,value:L,onChange:e=>{ue(e.target.value),fe(null)},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),Ot())},placeholder:`Have a coupon code?`,"aria-label":`Coupon code`,className:`flex-1 h-11 px-4 text-sm rounded-xl border uppercase tracking-wider transition-all focus:outline-none focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)] ${p?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 placeholder:normal-case`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 placeholder:normal-case`}`}),(0,r.jsx)(`button`,{type:`button`,onClick:Ot,className:`shrink-0 h-11 px-6 text-sm font-semibold rounded-xl border cursor-pointer transition-colors ${p?`border-zinc-700 text-zinc-200 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-700 hover:bg-slate-50`}`,children:`Apply`})]}),de&&(0,r.jsx)(`p`,{part:`coupon-error`,role:`alert`,className:`mt-2 text-xs font-medium text-red-500`,children:de}),!yt&>.length>0&&(0,r.jsxs)(`div`,{className:`mt-3`,children:[(0,r.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-wider ${p?`text-zinc-500`:`text-slate-400`}`,children:`Running offers`}),(0,r.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:gt.map(e=>(0,r.jsxs)(`button`,{type:`button`,onClick:()=>Dt(e.code),className:`inline-flex items-center gap-2 text-xs font-semibold px-3 py-1.5 rounded-full border cursor-pointer transition-colors ${p?`bg-zinc-950 border-emerald-900 text-emerald-200 hover:bg-emerald-950/40`:`bg-white border-emerald-200 text-emerald-700 hover:bg-emerald-50`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:e.code}),(0,r.jsx)(`span`,{className:p?`text-zinc-700`:`text-slate-300`,children:`|`}),(0,r.jsx)(`span`,{children:_t(e,v?.currency)})]},e.code))})]})]}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-8 py-4 border-t flex items-center justify-between gap-3 ${p?`border-zinc-800 bg-zinc-950/40`:`border-slate-100 bg-slate-50/70`}`,children:[(0,r.jsx)(`span`,{className:`text-sm font-semibold ${p?`text-zinc-300`:`text-slate-600`}`,children:`Total payable`}),(0,r.jsx)(`span`,{part:`summary-total`,className:`text-lg font-bold tabular-nums`,style:{color:R},children:X(wt)})]})]}),(0,r.jsxs)(`div`,{className:`pt-2 pb-10`,children:[he&&(0,r.jsx)(`div`,{part:`form-error`,role:`alert`,className:`mb-3 text-sm font-medium text-red-500 text-center`,children:he}),(0,r.jsxs)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:C!==null||T!==null,style:{background:`linear-gradient(135deg, ${R}, color-mix(in srgb, ${R} 80%, black))`,boxShadow:`0 12px 28px -12px color-mix(in srgb, ${R} 70%, transparent)`},className:`group w-full h-14 px-8 text-base font-semibold text-white rounded-2xl hover:brightness-110 active:scale-[0.99] transition-all cursor-pointer flex items-center justify-center gap-2.5 disabled:opacity-50 disabled:cursor-not-allowed`,children:[(0,r.jsx)(`span`,{children:b?`Submit Abstract`:`Complete Registration`}),(0,r.jsx)(ne,{size:18,className:`transition-transform group-hover:translate-x-0.5`})]}),(0,r.jsx)(`p`,{className:`mt-3 text-center text-xs ${p?`text-zinc-500`:`text-slate-400`}`,children:`Please review your details before submitting.`})]})]})})]})},Ct=({qrUrl:e,schema:t,amount:i,currency:a,registrationNumber:o,apiClient:s,primaryColor:c,isDark:l,onSubmitted:u})=>{let[d,f]=(0,n.useState)({}),[p,m]=(0,n.useState)({}),[h,g]=(0,n.useState)(null),[_,v]=(0,n.useState)(!1),[y,b]=(0,n.useState)(null),x=`w-full px-3 py-2.5 rounded-lg border text-sm outline-none transition-colors ${l?`bg-zinc-900 border-zinc-700 text-white placeholder-zinc-500 focus:border-zinc-500`:`bg-white border-gray-300 text-gray-900 placeholder-gray-400 focus:border-gray-500`}`,S=async(e,t)=>{g(e.id),b(null);try{let n=await s.uploadFile(t,null,null,e.label),r=n?.data?.asset_id||n?.asset_id;if(!r)throw Error(`Upload response missing asset_id`);f(t=>({...t,[e.id]:r})),m(n=>({...n,[e.id]:t.name}))}catch(e){b(e?.message||`File upload failed. Please try again.`)}finally{g(null)}};return(0,r.jsxs)(`div`,{part:`custom-qr`,className:`w-full max-w-sm text-left`,children:[e&&(0,r.jsxs)(`div`,{className:`flex flex-col items-center p-4 mb-5 rounded-xl border ${l?`bg-zinc-900 border-zinc-700`:`bg-gray-50 border-gray-200`}`,children:[(0,r.jsx)(`img`,{part:`custom-qr-image`,src:e,alt:`Payment QR code`,className:`w-44 h-44 object-contain rounded-lg bg-white p-2`}),i&&(0,r.jsxs)(`p`,{className:`mt-3 text-lg font-bold ${l?`text-white`:`text-gray-900`}`,style:Q,children:[a,` `,i]}),(0,r.jsx)(`p`,{className:`mt-1 text-xs text-center ${l?`text-zinc-400`:`text-gray-500`}`,children:`Scan the code to pay, then fill in the details below.`})]}),(0,r.jsx)(`div`,{className:`space-y-4`,children:t.map(e=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`label`,{className:`block text-xs font-bold mb-1.5 ${l?`text-zinc-300`:`text-gray-700`}`,children:[e.label,e.is_required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-1`,children:`*`})]}),e.type===`file`?(0,r.jsxs)(`label`,{part:`custom-qr-file`,className:`flex items-center gap-2 px-3 py-2.5 rounded-lg border border-dashed cursor-pointer text-sm transition-colors ${l?`border-zinc-700 text-zinc-300 hover:border-zinc-500`:`border-gray-300 text-gray-600 hover:border-gray-500`}`,children:[h===e.id?(0,r.jsx)(Me,{size:15,className:`animate-spin shrink-0`}):d[e.id]?(0,r.jsx)(re,{size:15,className:`shrink-0`,style:{color:c}}):(0,r.jsx)(nt,{size:15,className:`shrink-0`}),(0,r.jsx)(`span`,{className:`truncate`,children:h===e.id?`Uploading…`:p[e.id]||`Choose a file`}),(0,r.jsx)(`input`,{type:`file`,className:`hidden`,disabled:h===e.id||_,onChange:t=>{let n=t.target.files?.[0];n&&S(e,n)}})]}):(0,r.jsx)(`input`,{type:e.type===`number`?`number`:`text`,className:x,value:d[e.id]??``,disabled:_,onChange:t=>f(n=>({...n,[e.id]:t.target.value}))})]},e.id))}),y&&(0,r.jsx)(`p`,{part:`custom-qr-error`,className:`mt-3 text-sm text-red-500`,children:y}),(0,r.jsxs)(`button`,{part:`button button-primary`,type:`button`,onClick:async()=>{let e=t.find(e=>e.is_required&&!String(d[e.id]??``).trim());if(e){b(`${e.label} is required.`);return}if(!o){b(`Registration number missing — please reload and try again.`);return}v(!0),b(null);try{await s.submitCustomQrPayment(o,d),u(d)}catch(e){b(e?.message||`Could not submit your payment details. Please try again.`)}finally{v(!1)}},disabled:_||!!h,style:{backgroundColor:c},className:`mt-5 w-full flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg text-white shadow-md transition-opacity hover:opacity-90 disabled:opacity-60 disabled:cursor-not-allowed cursor-pointer`,children:[_&&(0,r.jsx)(Me,{size:16,className:`animate-spin`}),(0,r.jsx)(`span`,{children:_?`Submitting…`:`I have paid`})]})]})},wt=new Set([`salutation`,`name`,`email`,`phone`]),Tt=new Set([`salutation`,`name`,`email`,`phone`]),Et=e=>(e||[]).flatMap(e=>e?.options?.length?Et(e.options):e?.name?[e]:[]),Dt=(e,t)=>{let n=new Set,r=Array.isArray(t)?t:[],i=new Set(r.filter(e=>typeof e==`string`).map(e=>e.trim())),a=(e,t)=>{for(let r of e||[]){let e=(t||[]).find(e=>e&&typeof e==`object`&&String(e.name||``).trim()===r?.name);if(r?.options?.length){a(r.options,e?.options||[]);continue}let o=r?.label??r?.name;o&&(r.purchased||e||i.has(o))&&n.add(o)}};return a(e,r),n},Ot=(e,t)=>e?.status?e.required===!1&&Number(e.amount||0)<=0?`not_required`:e.status===`paid`?`paid`:e.status===`pending`||e.status===`created`?`pending`:e.status:e?.state?e.state:e?.required===!1?`not_required`:t===`confirmed`?`paid`:`pending`,kt=e=>{let t=[];e?.base_amount!=null&&t.push({label:[e.type||`Registration`,e.tier].filter(Boolean).join(` · `),amount:e.base_amount});for(let n of e?.items||[]){let e=Array.isArray(n.options)?n.options.filter(Boolean):[];t.push({label:e.length?`${n.name} (${e.join(`, `)})`:n.name,amount:n.price})}return e?.accompany?.count&&t.push({label:`Accompanying guests × ${e.accompany.count}`,amount:e.accompany.total}),e?.discount&&t.push({label:`Discount · ${e.discount.code}`,amount:e.discount.amount,sign:`−`}),t},At=({apiClient:e,baseUrl:t=``,storage:i,logger:a,primaryColor:o,isDark:s=!1,isWidgetPage:c=!1,onEvent:l,onError:u})=>{let[d,f]=(0,n.useState)(()=>i.getToken()?`profile`:`login`),[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)(!1),[_,v]=(0,n.useState)(null),[y,b]=(0,n.useState)(null),[x,S]=(0,n.useState)(null),[C,w]=(0,n.useState)(``),[T,E]=(0,n.useState)(``),[ee,D]=(0,n.useState)(``),[te,k]=(0,n.useState)(``),[A,M]=(0,n.useState)(``),[P,F]=(0,n.useState)(``),[ie,ae]=(0,n.useState)(``),[se,le]=(0,n.useState)(!1),[I,L]=(0,n.useState)(null),[ue,de]=(0,n.useState)({}),[fe,pe]=(0,n.useState)([]),[R,ge]=(0,n.useState)({}),[ve,be]=(0,n.useState)(null),[Se,we]=(0,n.useState)(null),[Ee,De]=(0,n.useState)(null),[z,ke]=(0,n.useState)(null),[je,Me]=(0,n.useState)(!1),[Ne,Fe]=(0,n.useState)(!1),[B,V]=(0,n.useState)({}),[U,W]=(0,n.useState)(!1),[ze,G]=(0,n.useState)(null),[Be,K]=(0,n.useState)({}),[Ve,q]=(0,n.useState)({}),[Ue,J]=(0,n.useState)(null),[Ke,qe]=(0,n.useState)(`details`),[Je,Xe]=(0,n.useState)({}),[Ze,Qe]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=i.getToken();e&&Y(e)},[]);let Y=async t=>{m(!0),b(null);try{let n=await e.portalGetProfile(t),r=n?.data||n||{};L(r);let o=r.registration||{},s=o.custom_data||{},c=o.email||r.email||``,u=null;if(c)try{let t=await e.getDraftByEmail(c);u=t?.data||t,a.log(`Portal resume draft data loaded by email:`,u)}catch(e){a.log(`No draft found for email in portal`,e)}else{let t=i.getXrefId();if(t)try{let n=await e.getDraft(t);u=n?.data||n}catch{}}let d=u?.custom_data||{};o.name?D(o.name):u?.name?D(u.name):r.name&&D(r.name);let p=0,m={},h=[...r.editable_fields||[]];L({...r,editable_fields:h});let g={};o.asset_id&&(g.asset_id=String(o.asset_id)),o.photo_id&&(g.photo_id=String(o.photo_id)),s.asset_id&&(g.asset_id=String(s.asset_id)),s.photo_id&&(g.photo_id=String(s.photo_id)),r.asset_id&&(g.asset_id=String(r.asset_id)),h.forEach(e=>{if(e.type===`file`){let t=o[`${e.id}_asset_id`]||s[`${e.id}_asset_id`]||o.asset_id||s.asset_id||r.asset_id;t&&(g[e.id]=String(t))}}),ge(e=>({...g,...e}));let _=o.asset_id||o.photo_id||s.asset_id||s.photo_id||r.asset_id;_&&be(String(_)),h.length>0?h.forEach(e=>{let t=e.label||e.name||e.id,n=ut(e.id,e.label),r=dt(e.label,e.id),i=!!e.builtin||Tt.has(e.id),a=``;if(i?t&&o[t]!==void 0&&o[t]!==null&&o[t]!==``?a=o[t]:o[r]!==void 0&&o[r]!==null&&o[r]!==``?a=o[r]:o[n]!==void 0&&o[n]!==null&&o[n]!==``?a=o[n]:o[e.id]!==void 0&&o[e.id]!==null&&o[e.id]!==``?a=o[e.id]:t&&s[t]!==void 0&&s[t]!==null&&s[t]!==``?a=s[t]:s[r]!==void 0&&s[r]!==null&&s[r]!==``?a=s[r]:s[n]!==void 0&&s[n]!==null&&s[n]!==``?a=s[n]:s[e.id]!==void 0&&s[e.id]!==null&&s[e.id]!==``&&(a=s[e.id]):s[n]!==void 0&&s[n]!==null&&s[n]!==``?a=s[n]:s[e.id]!==void 0&&s[e.id]!==null&&s[e.id]!==``&&(a=s[e.id]),u){let t=i?u[n]??u[e.id]??d[n]??d[e.id]??(e.id===`salutation`?u.salutation||u.title:void 0)??(e.id===`name`?u.name||u.fullName||u.full_name:void 0)??(e.id===`email`?u.email:void 0)??(e.id===`phone`?u.phone||u.mobile||u.phoneNumber:void 0):d[n]??d[e.id];t!=null&&t!==``&&(a=t,p++)}m[e.id]=a}):Object.entries(r).forEach(([e,t])=>{e.toLowerCase()!==`token`&&(m[e]=t)}),de(m),p>0&&Me(!0);let v=[...Dt(r.addons?.items||[],r.registration?.custom_data?.selected_items)];u?.selected_items&&Array.isArray(u.selected_items)&&u.selected_items.forEach(e=>{let t=typeof e==`string`?e:e?.name;t&&!v.includes(t)&&v.push(t)}),pe(v),f(`profile`),l?.(`attendee_profile_loaded`,{profile:r,draft:u})}catch(e){a.error(`Failed to load profile`,e),e?.status===401||e?.status===403?(i.clearToken(),f(`login`)):b(e?.message||`Could not load your profile. Please try again.`)}finally{m(!1)}},tt=async t=>{if(t.preventDefault(),!C.trim()||!T){b(`Please enter both your identifier and password.`);return}m(!0),b(null),S(null);try{let t=await e.portalLogin({identifier:C.trim(),password:T}),n=t?.data?.token||t?.token;if(!n)throw Error(t?.message||`No authentication token received.`);(t?.data?.name||t?.name)&&D(t.data?.name||t.name),i.setToken(n),l?.(`attendee_logged_in`,{identifier:C,response:t}),await Y(n)}catch(e){a.error(`Login failed`,e);let t=e.message||`Login failed. Please check your credentials.`;b(t),u?.({type:`login_error`,message:t,error:e})}finally{m(!1)}},X=async t=>{t.preventDefault();let n=(te||C).trim();if(!n){b(`Please enter your registration number or email to receive a code.`);return}le(!0),b(null),S(null);try{await e.portalRequestPasswordReset(n),S(`A verification code has been sent to your registered email.`),l?.(`password_reset_code_requested`,{identifier:n}),f(`reset`)}catch(e){a.error(`Failed to send reset code`,e);let t=e.message||`Failed to send code. Please verify your identifier.`;b(t),u?.({type:`portal_error`,message:t,error:e})}finally{le(!1)}},rt=async t=>{t.preventDefault();let n=(te||C).trim();if(!n){b(`Please enter your registration number or email.`);return}if(!A.trim()){b(`Please enter the verification code sent to your email.`);return}if(!P){b(`Please enter a new password.`);return}if(P!==ie){b(`New password and confirm password do not match.`);return}m(!0),b(null),S(null);try{let t=await e.portalConfirmPasswordReset({identifier:n,code:A.trim(),new_password:P}),r=t?.data?.token||t?.token;(t?.data?.name||t?.name)&&D(t.data?.name||t.name),l?.(`password_reset_success`,{identifier:n,response:t}),r?(i.setToken(r),M(``),F(``),ae(``),await Y(r)):(w(n),E(``),M(``),F(``),ae(``),f(`login`),S(`Password updated successfully! Please login with your new password.`))}catch(e){a.error(`Password reset failed`,e);let t=e.message||`Failed to update password. Please check the code.`;b(t),u?.({type:`portal_error`,message:t,error:e})}finally{m(!1)}},it=()=>{i.clearToken(),L(null),de({}),pe([]),ge({}),be(null),De(null),ke(null),D(``),E(``),Me(!1),Fe(!1),V({}),q({}),K({}),J(null),Xe({}),qe(`details`),b(null),f(`login`),S(`Logged out successfully.`),l?.(`attendee_logged_out`,{})},at=(e,t)=>L(n=>{if(!n)return n;let r=(n.editable_fields||[]).find(t=>t.id===e),i={...n.file_answers||{}};return[e,r?ut(r.id,r.label):e].forEach(e=>{t?i[e]=t:delete i[e]}),{...n,file_answers:i}}),st=async(t,n)=>{let r=i.getToken();if(!r){b(`Session expired. Please log in again.`);return}let o=lt(ue[t])||I?.file_answers?.[t]?.id||``;v(t),b(null),S(null);try{let i=await e.uploadFile(n,r),s=i?.data?.serve_url||i?.serve_url||``,c=i?.data?.asset_id||i?.asset_id;if(!c&&!s)throw Error(`Upload response missing asset_id`);de(e=>({...e,[t]:s||String(c)})),c&&(ge(e=>({...e,[t]:String(c)})),be(String(c)));let u=String(c||lt(s));if(at(t,{id:u,file_name:n.name,serve_url:s||null,text:``}),S(`File "${n.name}" uploaded successfully!`),l?.(`portal_file_uploaded`,{fieldId:t,serveUrl:s,assetId:c,response:i}),o&&o!==u)try{await e.portalDeleteFile(r,o),l?.(`portal_file_deleted`,{assetId:o,fieldId:t})}catch(e){a.error(`Could not delete replaced file`,e)}}catch(e){a.error(`File upload failed`,e);let t=e.message||`File upload failed. Please try again.`;b(t),u?.({type:`file_upload_error`,message:t,error:e})}finally{v(null)}},ct=async t=>{let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=ue[t],o=lt(r)||R[t]||ve;we(t),b(null),S(null);try{o&&(a.log(`Deleting asset ${o} for field ${t}...`),await e.portalDeleteFile(n,o),a.log(`Asset ${o} deleted successfully.`),l?.(`portal_file_deleted`,{assetId:o,fieldId:t})),de(e=>({...e,[t]:``})),ge(e=>{let n={...e};return delete n[t],n}),ve===o&&be(null),at(t,null),S(`File removed successfully.`)}catch(e){a.error(`Failed to delete file`,e);let t=e.message||`Failed to delete file. Please try again.`;b(t),u?.({type:`file_delete_error`,message:t,error:e})}finally{we(null)}},$=(e,t)=>{t||pe(t=>t.includes(e)?t.filter(t=>t!==e):mt(e,t)?t:[...t,e])},mt=(e,t=fe)=>{let n=e=>e?.options?.length?e.options.some(n):t.includes(e?.label??e?.name),r=t=>(t||[]).some(t=>{if(!t?.options?.length||!Et([t]).some(t=>(t.label??t.name)===e))return!1;let i=Number(t.max)||0;return i&&t.options.filter(n).length>=i||r(t.options)});return r(I?.addons?.items||[])},ht=async t=>{t.preventDefault();let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=I?.locked_fields||[],o=pt((I?.editable_fields||[]).filter(e=>!r.includes(e.id)&&!r.includes(ut(e.id,e.label))),e=>ue[e.id]);if(o){S(null),b(o);return}g(!0),b(null),S(null);try{let t=I?.editable_fields||[],r={...I?.registration?.custom_data||{}},i={};if(t.forEach(e=>{let t=ue[e.id],n=e.label||e.name||e.id,a=dt(e.label,e.id),o=ut(e.id,e.label),s=!!e.builtin||Tt.has(e.id);if(e.type===`file`){let s=typeof t==`string`?t:t?.serve_url||t?.url||``;delete r[n],delete r[a],r[o]=s,i[e.id]=s}else s?(i[o]=t,o!==e.id&&(i[e.id]=t)):(r[o]=t,o!==e.id&&(r[e.id]=t),i[e.id]=t)}),i.custom_data=r,i.addons=fe,typeof window<`u`){let e=new URL(window.location.href);e.searchParams.delete(`rn`),i.success_url=e.toString()}let a=await e.portalUpdateProfile(n,i);l?.(`attendee_profile_updated`,{payload:i,response:a});let o=a?.data?.addon_checkout||a?.addon_checkout;if(o?.custom_qr){ke({qr_url:o.custom_qr.qr_url??null,schema:o.custom_qr.schema||[],amount:o.amount??null,currency:o.currency??null}),S(`Add-ons updated! Scan the QR code below to pay for them.`),l?.(`addon_custom_qr_opened`,{order_number:o.order_number}),await Y(n);return}let s=a?.data?.addon_checkout?.payment_url||a?.addon_checkout?.payment_url||a?.data?.payment_url||a?.payment_url;if(s&&typeof s==`string`&&s.trim()!==``){De(s),S(`Add-ons updated! Opening payment page in a new tab...`),l?.(`addon_payment_opened`,{payment_url:s}),window.open(s,`_blank`,`noopener,noreferrer`),await Y(n);return}S(`Profile updated successfully!`),await Y(n)}catch(e){a.error(`Failed to update profile`,e);let t=e.message||`Failed to update profile. Please try again.`;b(t),u?.({type:`profile_update_error`,message:t,error:e})}finally{g(!1)}},gt=()=>{let e=I?.review_submission;if(!e)return;let t=e.custom_data||{},n={},r={};(e.editable_fields||[]).forEach(i=>{i.id===`name`?n[i.id]=e.name||``:i.id===`phone`?n[i.id]=e.phone||``:i.id===`registration_type`?n[i.id]=e.registration_type||``:n[i.id]=t[i.id]??t[ut(i.id,i.label)]??``,i.type===`file`&&(r[i.id]=i.current_file?.text||``)}),V(n),q(r),K({}),Fe(!0)},_t=e=>{if(Be[e.id])return Be[e.id];let t=e.current_file;return t&&!t.serve_url&&t.text?`text`:`file`},vt=async(t,n)=>{if(!i.getToken()){b(`Session expired. Please log in again.`);return}let r=(I?.review_submission?.editable_fields||[]).find(e=>e.id===t),o=r?.current_file?.id,s=I?.review_submission?.email||I?.registration?.email||null;G(t),b(null),S(null);try{if(o)try{await e.deleteFile(o,null,s)}catch(e){a.error(`Could not delete replaced submission file`,e)}let i=await e.uploadFile(n,null,s,r?.label),c=i?.data?.asset_id||i?.asset_id;if(!c)throw Error(`Upload response missing asset_id`);V(e=>({...e,[t]:String(c)}));let u=i?.data?.serve_url||i?.serve_url||null;L(e=>e?.review_submission?{...e,review_submission:{...e.review_submission,editable_fields:(e.review_submission.editable_fields||[]).map(e=>e.id===t?{...e,current_file:{id:String(c),file_name:n.name,serve_url:u,text:``}}:e)}}:e),S(`File "${n.name}" uploaded successfully!`),l?.(`portal_submission_file_uploaded`,{fieldId:t,assetId:c,response:i})}catch(e){a.error(`Submission file upload failed`,e);let t=e.message||`File upload failed. Please try again.`;b(t),u?.({type:`file_upload_error`,message:t,error:e})}finally{G(null)}},yt=async t=>{let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=(Ve[t]||``).trim();if(!r)return;let o=(I?.review_submission?.editable_fields||[]).find(e=>e.id===t),s=Number(o?.word_limit)||0;if(s&&ft(r)>s){S(null),b(`${o?.label||`This answer`} is over the ${s}-word limit.`);return}G(t),b(null),S(null);try{let i=await e.portalUpdateSubmission(n,{[t]:{text:r}}),a=i?.data||i;L(e=>({...e,review_submission:a}));let o=(a?.editable_fields||[]).find(e=>e.id===t)?.current_file?.id;o&&V(e=>({...e,[t]:String(o)})),S(`Text answer saved!`),l?.(`portal_submission_text_saved`,{fieldId:t})}catch(e){a.error(`Submission text answer failed`,e);let t=e.message||`Could not save your answer. Please try again.`;b(t),u?.({type:`submission_text_error`,message:t,error:e})}finally{G(null)}},xt=async t=>{t.preventDefault();let n=i.getToken();if(!n){b(`Session expired. Please log in again.`);return}let r=pt((I?.review_submission?.editable_fields||[]).filter(e=>e.id!==`registration_type`),e=>B[e.id]);if(r){S(null),b(r);return}W(!0),b(null),S(null);try{let t=await e.portalUpdateSubmission(n,B),r=t?.data||t;L(e=>({...e,review_submission:r})),Fe(!1),S(`Your submission was updated successfully!`),l?.(`attendee_submission_updated`,{payload:B,response:t})}catch(e){a.error(`Failed to update submission`,e);let t=e.message||`Failed to update submission. Please try again.`;b(t),u?.({type:`submission_update_error`,message:t,error:e})}finally{W(!1)}},St=e=>wt.has(e.id)?e.id:ut(e.id,e.label),At=(e,t)=>(wt.has(t.id)?e[t.id]:(e.custom_data||{})[St(t)])??``,jt=(e,t)=>Xe(n=>wt.has(e.id)?{...n,[e.id]:t}:{...n,custom_data:{...n.custom_data||{},[St(e)]:t}}),Mt=e=>{J(e.id),b(null),Xe({id:e.id,salutation:e.salutation||``,name:e.name||``,email:e.email||``,phone:e.phone||``,custom_data:{...e.custom_data||{}}})},Nt=async()=>{let t=i.getToken();if(!t){b(`Session expired. Please log in again.`);return}let n=pt(I?.accompany_fields||[],e=>At(Je,e));if(n){S(null),b(n);return}Qe(!0),b(null),S(null);try{let n=await e.portalUpdateProfile(t,{accompanying:[Je]});J(null),S(`Accompanying person updated.`),l?.(`attendee_accompanying_updated`,{payload:Je,response:n}),await Y(t)}catch(e){a.error(`Failed to update accompanying person`,e);let t=e.message||`Could not update this person. Please try again.`;b(t),u?.({type:`accompanying_update_error`,message:t,error:e})}finally{Qe(!1)}},Pt=()=>(0,r.jsxs)(`div`,{className:`absolute inset-0 pointer-events-none overflow-hidden z-0 select-none`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 pointer-events-none`,style:{background:s?`linear-gradient(180deg, rgba(9,9,11,0.5) 0%, rgba(9,9,11,0.7) 100%)`:`linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(248,250,252,0.2) 100%)`}}),(0,r.jsx)(`div`,{className:`absolute -top-16 -right-16 w-72 h-72 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 16%, transparent) 0%, color-mix(in srgb, ${o} 3%, transparent) 60%, transparent 80%)`}}),(0,r.jsx)(`div`,{className:`absolute top-1/3 -left-20 w-80 h-80 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 12%, transparent) 0%, color-mix(in srgb, ${o} 2%, transparent) 55%, transparent 75%)`}}),(0,r.jsx)(`div`,{className:`absolute -bottom-10 right-1/4 w-64 h-64 rounded-full blur-3xl pointer-events-none transition-all duration-700`,style:{background:`radial-gradient(circle, color-mix(in srgb, ${o} 9%, transparent) 0%, transparent 70%)`}}),!s&&(0,r.jsx)(`div`,{className:`absolute inset-0 opacity-[0.03]`,style:{backgroundImage:`radial-gradient(${o} 1px, transparent 1px)`,backgroundSize:`16px 16px`}})]}),Ft=e=>{let t=(e.label||e.id||``).toLowerCase(),n=e.type;return n===`email`||t.includes(`email`)||t.includes(`mail`)?(0,r.jsx)(H,{size:13,className:`shrink-0`,style:{color:o}}):n===`phone`||t.includes(`phone`)||t.includes(`mobile`)||t.includes(`contact`)?(0,r.jsx)(We,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`salutation`)||t.includes(`title`)||t.includes(`prefix`)?(0,r.jsx)(Ye,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`name`)||t.includes(`attendee`)?(0,r.jsx)(Z,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`designat`)||t.includes(`role`)||t.includes(`position`)||t.includes(`profession`)?(0,r.jsx)(j,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`specialis`)||t.includes(`specializ`)||t.includes(`department`)||t.includes(`degree`)?(0,r.jsx)(Ce,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`organi`)||t.includes(`institute`)||t.includes(`hospital`)||t.includes(`company`)||t.includes(`college`)?(0,r.jsx)(N,{size:13,className:`shrink-0`,style:{color:o}}):t.includes(`city`)||t.includes(`state`)||t.includes(`country`)||t.includes(`address`)?(0,r.jsx)(Re,{size:13,className:`shrink-0`,style:{color:o}}):n===`file`?(0,r.jsx)(xe,{size:13,className:`shrink-0`,style:{color:o}}):(0,r.jsx)(ye,{size:13,className:`shrink-0`,style:{color:o}})},It=(e,t=`w-full`,n=[])=>{if(!e)return null;let i=n.includes(e.id)||n.includes(ut(e.id,e.label)),a=ue[e.id]??``,o=`vx-profile-${e.id}`,c=`w-full min-h-11 px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${i?s?`bg-zinc-800/60 text-zinc-500 border-zinc-800 cursor-not-allowed`:`bg-slate-50 text-slate-500 border-slate-200 cursor-not-allowed`:s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`;return(0,r.jsxs)(`div`,{className:`${t} px-2 mb-4`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1.5`,children:[(0,r.jsxs)(`label`,{part:`field-label`,htmlFor:o,className:`flex items-center gap-1.5 text-[13px] font-semibold ${s?`text-zinc-200`:`text-slate-800`}`,children:[(0,r.jsx)(`span`,{className:s?`text-zinc-500`:`text-slate-400`,children:Ft(e)}),(0,r.jsx)(`span`,{children:e.label}),e.required&&(0,r.jsx)(`span`,{className:`text-red-500 font-semibold`,children:`*`})]}),i?(0,r.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] font-semibold px-2 py-0.5 rounded-full ${s?`text-zinc-400 bg-zinc-800`:`text-slate-500 bg-slate-100`}`,children:[(0,r.jsx)(Pe,{size:10}),` Locked`]}):null]}),e.type===`file`?Lt(e,i,a):(0,r.jsx)(bt,{field:e,id:o,value:a,disabled:i,onChange:t=>de({...ue,[e.id]:t}),className:c,isDark:s,placeholder:e.placeholder||`Enter ${(e.label||``).toLowerCase()}`})]},e.id)},Lt=(e,t,n)=>{let i=_===e.id,a=e.label||e.name||e.id,c=I?.file_answers?.[e.id],l=typeof n==`string`?/^https?:\/\//i.test(n)?n:``:n?.serve_url||n?.url||``,u=c?.serve_url||l,d=c?.text||``,f=c?.file_name||(typeof n==`string`?u:n?.file_name||u);return(0,r.jsx)(`div`,{className:`space-y-2`,children:(0,r.jsxs)(`div`,{part:`upload`,className:`p-4 rounded-2xl border border-dashed transition-all ${s?`bg-zinc-950/60 border-zinc-700 hover:border-zinc-600`:`bg-slate-50 border-slate-300 hover:border-[color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,r.jsx)(`div`,{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border`,style:{backgroundColor:s?`rgba(255,255,255,0.06)`:`color-mix(in srgb, ${o} 8%, white)`,borderColor:s?`rgba(255,255,255,0.12)`:`color-mix(in srgb, ${o} 20%, white)`,color:o},children:(0,r.jsx)(xe,{size:16})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`p`,{className:`text-xs font-bold ${s?`text-zinc-200`:`text-gray-900`}`,children:a}),(0,r.jsx)(`p`,{className:`text-2xs font-medium ${s?`text-zinc-400`:`text-gray-500`}`,children:d?`Answered with text`:n?`Document attached`:`Choose a file to upload`})]})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-2`,children:(u.trim()!==``||d)&&(0,r.jsxs)(r.Fragment,{children:[u.trim()!==``&&(0,r.jsxs)(`a`,{href:u,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1.5 py-1.5 px-3 rounded-lg text-xs font-semibold text-white shadow-xs transition-opacity hover:opacity-90 shrink-0`,style:{backgroundColor:o},title:`Open file in new tab`,children:[(0,r.jsx)(ye,{size:13}),(0,r.jsx)(`span`,{children:`View`}),(0,r.jsx)(_e,{size:11})]}),!t&&(0,r.jsxs)(`button`,{type:`button`,disabled:Se===e.id||i,onClick:()=>ct(e.id),className:`flex items-center gap-1 py-1.5 px-2.5 rounded-lg text-xs font-semibold border backdrop-blur-sm transition-colors cursor-pointer ${s?`border-red-900/60 bg-red-950/50 text-red-400 hover:bg-red-900/60`:`border-red-200 bg-red-50/80 text-red-600 hover:bg-red-100`}`,title:`Remove file`,children:[(0,r.jsx)(et,{size:13}),(0,r.jsx)(`span`,{children:Se===e.id?`Deleting...`:`Delete`})]})]})})]}),d?(0,r.jsx)(`div`,{className:`mt-2 pt-2 border-t ${s?`border-zinc-800`:`border-gray-200`}`,children:(0,r.jsx)(`p`,{className:`text-2xs whitespace-pre-wrap break-words m-0 max-h-48 overflow-y-auto ${s?`text-zinc-300`:`text-gray-700`}`,children:d})}):n?(0,r.jsxs)(`div`,{className:`mt-2 pt-2 border-t text-2xs truncate flex items-center gap-1.5 ${s?`border-zinc-800 text-zinc-300`:`border-gray-200 text-gray-700 font-medium`}`,children:[(0,r.jsx)(re,{size:12,className:`text-emerald-500 shrink-0`}),(0,r.jsxs)(`span`,{className:`truncate`,children:[`Attached: `,f]})]}):null,!t&&(0,r.jsx)(`div`,{className:`mt-3 pt-3 border-t ${s?`border-zinc-800`:`border-slate-200`}`,children:(0,r.jsxs)(`label`,{className:`cursor-pointer relative`,children:[(0,r.jsx)(`input`,{type:`file`,className:`hidden`,style:{display:`none`},tabIndex:-1,disabled:i,onChange:t=>{let n=t.target.files?.[0];n&&st(e.id,n),t.target.value=``}}),(0,r.jsxs)(`div`,{className:`inline-flex items-center gap-1.5 py-1.5 px-3 rounded-lg text-xs font-semibold border transition-all shadow-2xs ${s?`border-zinc-700 hover:border-zinc-600 text-zinc-200 bg-zinc-800 hover:bg-zinc-750`:`border-gray-300 hover:border-gray-400 text-gray-800 bg-white hover:bg-gray-50`}`,children:[(0,r.jsx)(nt,{size:13,style:{color:o}}),(0,r.jsx)(`span`,{children:i?`Uploading...`:n?`Replace File`:`Choose File`})]})]})})]})})};if(d===`profile`&&!I&&!p&&y)return(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[Pt(),(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-3 relative z-10`,children:[(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),(0,r.jsx)(`button`,{part:`button button-primary`,type:`button`,onClick:()=>{let e=i.getToken();e?Y(e):f(`login`)},className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white cursor-pointer`,style:{backgroundColor:o},children:`Try again`})]})]});if(d===`profile`&&!I){let e=`vx-skeleton rounded-full`,t=`rounded-3xl border p-5 sm:p-6 ${s?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`;return(0,r.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:`Loading your profile…`}),Pt(),(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-5 relative z-10`,children:[(0,r.jsxs)(`div`,{className:t,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-12 h-12 sm:w-14 sm:h-14 rounded-2xl shrink-0`}),(0,r.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-5 w-48 max-w-full`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-64 max-w-full`})]})]}),(0,r.jsx)(`div`,{className:`mt-5 pt-5 border-t grid grid-cols-2 sm:grid-cols-3 gap-4 ${s?`border-zinc-800`:`border-slate-100`}`,children:[0,1,2].map(t=>(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-2.5 w-20`}),(0,r.jsx)(`div`,{className:`${e} h-4 w-28`})]},t))})]}),(0,r.jsxs)(`div`,{className:t,children:[(0,r.jsx)(`div`,{className:`${e} h-4 w-32`}),(0,r.jsx)(`div`,{className:`mt-6 grid gap-4 md:grid-cols-2`,children:[0,1,2,3].map(t=>(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-3 w-24`}),(0,r.jsx)(`div`,{className:`vx-skeleton h-11 w-full rounded-xl`})]},t))})]})]})]})}if(d===`profile`){let n=I?.registration||{},a=I?.editable_fields||[],u=I?.locked_fields||[],d=(Array.isArray(I?.payment)?I.payment:I?.payment?[I.payment]:[]).map(e=>({...e,state:Ot(e,n.status)})).filter(e=>e.state!==`not_required`),f=d.filter(e=>e.state===`pending`),p=d[0]?.currency||``,m=e=>e.reduce((e,t)=>e+Number(t.amount||0),0),g=I?.addons?.items||[],v=Dt(g,I?.registration?.custom_data?.selected_items),C=fe.some(e=>!v.has(e)),w=(e,t=!1)=>{if(e?.options?.length){let n=e.price!=null&&e.price!==``,i=n&&Number(e.price)||0;return(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-1 pt-1`,children:[(0,r.jsxs)(`span`,{className:`text-xs font-bold uppercase tracking-wider ${s?`text-zinc-300`:`text-slate-600`}`,children:[e.name,Number(e.max)>0&&(0,r.jsxs)(`span`,{className:`ml-2 font-medium normal-case tracking-normal ${s?`text-zinc-500`:`text-slate-400`}`,children:[`up to `,e.max]})]}),n&&(0,r.jsx)(`span`,{className:`text-[13px] font-bold tabular-nums shrink-0`,style:{color:o},children:t?`Included`:i>0?`${e.currency} ${i.toLocaleString()}`:`Free`})]}),(0,r.jsx)(`div`,{className:`space-y-2 pl-3`,children:e.options.map(e=>w(e,t||n))})]},e.name)}let n=e.label??e.name,i=v.has(n),a=fe.includes(n),c=!i&&!a&&mt(n);return(0,r.jsxs)(`label`,{className:`p-3.5 rounded-2xl border flex items-center gap-3 transition-all ${c?`opacity-50`:``} ${i?s?`bg-zinc-950/60 border-zinc-800 cursor-default`:`bg-slate-50 border-slate-200 cursor-default`:a?`cursor-pointer`:s?`border-zinc-800 bg-zinc-900 hover:border-zinc-700 cursor-pointer`:`border-slate-200 bg-white hover:border-slate-300 cursor-pointer`}`,style:a&&!i?{borderColor:o,backgroundColor:`color-mix(in srgb, ${o} ${s?16:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`input`,{type:`checkbox`,checked:a,disabled:i||c,onChange:()=>$(n,i),className:`w-4 h-4 rounded cursor-pointer shrink-0 disabled:cursor-default`,style:{accentColor:o}}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold leading-snug ${s?`text-white`:`text-slate-900`}`,children:e.name}),(0,r.jsx)(`div`,{className:`text-[13px] font-semibold mt-0.5 tabular-nums`,style:{color:o},children:t?`Included`:`${e.currency} ${Number(e.price).toLocaleString()}`})]}),i&&(0,r.jsxs)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold flex items-center gap-1 shrink-0 ${s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(re,{size:12}),` Purchased`]})]},e.name)},T=I?.badge||null,E=I?.accompanying||[],D=I?.accompany_fields||[],te=`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`,O=I?.review_submission||null,k=ee||`Attendee`,ne=k.split(/\s+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()).join(``)||`A`,A=`rounded-3xl border p-5 sm:p-6 ${s?`bg-zinc-900 border-zinc-800 text-white`:`bg-white border-slate-200/80 text-slate-900 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_-16px_rgba(15,23,42,0.12)]`}`,j=s?`text-zinc-400`:`text-slate-500`,M=`text-base font-semibold tracking-tight ${s?`text-white`:`text-slate-900`}`,N=[{label:`Registration no.`,value:n.registration_number||`N/A`,mono:!0},{label:`Registration type`,value:n.registration_type||`N/A`},...d.length>0?[{label:`Payment`,value:f.length?`Pending · ${p} ${m(f).toLocaleString()}`:`Paid · ${p} ${m(d.filter(e=>e.state===`paid`)).toLocaleString()}`,capitalize:!0}]:[]],P=[{key:`details`,label:`Details`,icon:Z,count:0},...g.length>0?[{key:`addons`,label:`Add-ons`,icon:$e,count:Et(g).length}]:[],...T?[{key:`badge`,label:`Badge`,icon:Te,count:0}]:[],...E.length>0?[{key:`guests`,label:`Guests`,icon:ot,count:E.length}]:[],...d.length>0?[{key:`payments`,label:`Payments`,icon:Ge,count:d.length}]:[],...O?[{key:`submission`,label:`Submission`,icon:ye,count:0}]:[]],F=P.some(e=>e.key===Ke)?Ke:`details`,ie=e=>{qe(e),b(null),S(null)};return(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-hidden min-h-0`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,style:c?void 0:{overflow:`clip`},onScroll:c?void 0:e=>{e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0)},children:[Pt(),(0,r.jsx)(`div`,{className:`${c?`w-full flex-1`:`flex-1 overflow-y-auto min-h-0 overscroll-contain`} relative z-10`,children:(0,r.jsxs)(`div`,{className:`max-w-3xl mx-auto w-full px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} space-y-5`,children:[(0,r.jsxs)(`div`,{part:`portal-card profile-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 sm:gap-4 min-w-0`,children:[(0,r.jsx)(`div`,{className:`w-12 h-12 sm:w-14 sm:h-14 rounded-2xl flex items-center justify-center shrink-0 text-base sm:text-lg font-bold text-white`,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 75%, black))`},"aria-hidden":`true`,children:ne}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,r.jsx)(`h3`,{part:`portal-title`,style:Q,className:`text-lg sm:text-xl font-bold tracking-tight break-words ${s?`text-white`:`text-slate-900`}`,children:k}),n.status&&(0,r.jsx)(`span`,{className:`px-2.5 py-0.5 rounded-full text-[11px] font-semibold capitalize ${s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:n.status})]}),(0,r.jsx)(`p`,{className:`text-[13px] mt-0.5 ${j}`,children:`Manage your registration and details`})]})]}),(0,r.jsxs)(`button`,{part:`button button-secondary logout-button`,onClick:it,className:`shrink-0 inline-flex items-center justify-center gap-1.5 h-9 w-9 sm:w-auto sm:px-3.5 text-[13px] font-semibold rounded-full border transition-colors cursor-pointer ${s?`text-zinc-300 border-zinc-700 hover:bg-zinc-800 hover:text-red-300`:`text-slate-600 border-slate-200 bg-white hover:bg-red-50 hover:text-red-600 hover:border-red-200`}`,title:`Logout`,"aria-label":`Logout`,children:[(0,r.jsx)(Le,{size:14}),(0,r.jsx)(`span`,{className:`hidden sm:inline`,children:`Logout`})]})]}),(0,r.jsx)(`dl`,{className:`mt-5 pt-5 border-t grid grid-cols-2 ${N.length===3?`sm:grid-cols-3`:`sm:grid-cols-2`} gap-4 ${s?`border-zinc-800`:`border-slate-100`}`,children:N.map(e=>(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:e.label}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold break-words ${e.mono?`font-mono`:``} ${e.capitalize?`capitalize`:``} ${s?`text-white`:`text-slate-900`}`,children:e.value})]},e.label))}),n.status===`pending`&&f.length>0&&(0,r.jsxs)(`div`,{part:`provisional-note`,role:`note`,className:`mt-4 flex items-start gap-2 rounded-xl px-3.5 py-2.5 text-[13px] leading-relaxed ${s?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(oe,{size:15,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:`This is a temporary registration number. Your registration will be confirmed once your payment is verified.`})]})]}),P.length>1&&(0,r.jsx)(`div`,{part:`portal-tabs`,role:`tablist`,className:`${c?``:`sticky top-0`} z-20 flex gap-1 p-1 rounded-2xl border overflow-x-auto backdrop-blur-xl ${s?`bg-zinc-900/90 border-zinc-800`:`bg-white/90 border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_8px_24px_-14px_rgba(15,23,42,0.18)]`}`,style:{scrollbarWidth:`none`},children:P.map(e=>{let t=e.icon,n=e.key===F;return(0,r.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n,part:`portal-tab${n?` portal-tab-active`:``}`,onClick:()=>ie(e.key),className:`flex-1 min-w-fit inline-flex items-center justify-center gap-1.5 h-10 px-3.5 rounded-xl text-[13px] font-semibold whitespace-nowrap transition-all cursor-pointer ${n?`text-white shadow-sm`:s?`text-zinc-400 hover:text-white hover:bg-zinc-800`:`text-slate-500 hover:text-slate-900 hover:bg-slate-100`}`,style:n?{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`}:void 0,children:[(0,r.jsx)(t,{size:15}),(0,r.jsx)(`span`,{children:e.label}),e.count>0&&(0,r.jsx)(`span`,{className:`min-w-[18px] h-[18px] px-1 rounded-full text-[10.5px] font-bold inline-flex items-center justify-center tabular-nums ${n?`bg-white/25 text-white`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.count})]},e.key)})}),(F===`details`||F===`addons`)&&(0,r.jsxs)(`form`,{onSubmit:ht,className:`space-y-5`,children:[F===`details`&&(a.length===0?(0,r.jsx)(`div`,{className:`${A} text-center text-sm ${j}`,children:`No editable fields configured.`}):(0,r.jsxs)(`div`,{part:`portal-card details-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3 mb-5`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your details`}),(0,r.jsx)(`p`,{className:`text-[13px] mt-0.5 ${j}`,children:`Keep your information up to date.`})]}),je&&(0,r.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full shrink-0 ${s?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(re,{size:11}),` Draft restored`]})]}),(0,r.jsx)(`div`,{className:`flex flex-wrap -mx-2 -mb-4`,children:a.map(e=>It(e,e.type===`file`||e.width===`full`?`w-full`:`w-full md:w-1/2`,u))})]})),F===`addons`&&g.length>0&&(0,r.jsxs)(`div`,{part:`portal-card addons-card`,className:A,children:[(0,r.jsx)(`div`,{className:`flex items-start justify-between gap-3 mb-4`,children:(0,r.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)($e,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Add-ons`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Select items to add to your registration`})]})]})}),(0,r.jsx)(`div`,{className:`space-y-2`,children:g.map(e=>w(e))})]}),(0,r.jsx)(`div`,{className:`pt-1 pb-6`,children:(0,r.jsx)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:h||_!==null||F===`addons`&&!C,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${o} 70%, transparent)`},className:`w-full h-12 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed`,children:h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),(0,r.jsx)(`span`,{children:`Saving...`})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(He,{size:16}),(0,r.jsx)(`span`,{children:F===`addons`?`Update add-ons`:`Save changes`})]})})})]}),F===`badge`&&T&&(0,r.jsxs)(`div`,{part:`portal-card badge-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(Te,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your badge`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`View or download your event badge.`})]})]}),(0,r.jsx)(`div`,{className:`rounded-2xl border overflow-hidden ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:(0,r.jsx)(`img`,{src:T,alt:`Your event badge`,className:`w-full max-h-96 object-contain`})}),(0,r.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2.5`,children:[(0,r.jsxs)(`a`,{href:T,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(_e,{size:13}),(0,r.jsx)(`span`,{children:`View badge`})]}),(0,r.jsxs)(`a`,{href:T,download:!0,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white`,style:{backgroundColor:o},children:[(0,r.jsx)(he,{size:13}),(0,r.jsx)(`span`,{children:`Download badge`})]})]})]}),F===`guests`&&E.length>0&&(0,r.jsxs)(`div`,{part:`portal-card accompanying-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(ot,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Accompanying people`}),(0,r.jsxs)(`p`,{className:`text-[13px] ${j}`,children:[E.length,` registered with you, each with their own badge.`]})]})]}),(0,r.jsx)(`div`,{className:`space-y-3`,children:E.map(e=>(0,r.jsxs)(`div`,{part:`accompanying-person`,className:`rounded-2xl border p-4 ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3 flex-wrap`,children:[(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold ${s?`text-white`:`text-slate-900`}`,children:[e.salutation,e.name].filter(Boolean).join(` `)}),(0,r.jsx)(`div`,{className:`text-xs mt-0.5 truncate ${j}`,children:[e.registration_number,e.email].filter(Boolean).join(` · `)})]}),(0,r.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[(0,r.jsx)(`span`,{className:`text-[11px] font-semibold px-2.5 py-1 rounded-full ${e.status===`confirmed`?`bg-emerald-100 text-emerald-700`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-200 text-slate-600`}`,children:e.status}),D.length>0&&Ue!==e.id&&(0,r.jsxs)(`button`,{type:`button`,onClick:()=>Mt(e),className:`inline-flex items-center gap-1.5 h-8 px-3 rounded-full text-xs font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(Z,{size:12}),(0,r.jsx)(`span`,{children:`Edit`})]})]})]}),Ue===e.id&&(0,r.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[D.map(t=>{let n=e.file_answers?.[St(t)];return(0,r.jsxs)(`label`,{className:`block`,children:[(0,r.jsxs)(`span`,{className:`block text-xs font-semibold mb-1.5 ${s?`text-zinc-300`:`text-slate-700`}`,children:[t.label,t.required&&(0,r.jsx)(`span`,{className:`text-red-500 ml-0.5`,children:`*`})]}),t.type===`file`?(0,r.jsx)(`p`,{className:`text-[13px] m-0 whitespace-pre-wrap break-words max-h-48 overflow-y-auto ${j}`,children:n?.serve_url?(0,r.jsx)(`a`,{href:n.serve_url,target:`_blank`,rel:`noopener noreferrer`,style:{color:o},children:n.file_name||`View file`}):n?.text||`—`}):(0,r.jsx)(bt,{field:t,value:At(Je,t),onChange:e=>jt(t,e),className:te,isDark:s})]},t.id)}),(0,r.jsxs)(`div`,{className:`flex flex-wrap gap-2.5 pt-1`,children:[(0,r.jsxs)(`button`,{type:`button`,disabled:Ze,onClick:Nt,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white disabled:opacity-60`,style:{backgroundColor:o},children:[(0,r.jsx)(re,{size:13}),(0,r.jsx)(`span`,{children:Ze?`Saving...`:`Save changes`})]}),(0,r.jsx)(`button`,{type:`button`,disabled:Ze,onClick:()=>J(null),className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:`Cancel`})]})]}),e.badge&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`div`,{className:`mt-3 rounded-xl border overflow-hidden ${s?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`img`,{src:e.badge,alt:`${e.name} badge`,className:`w-full max-h-64 object-contain`})}),(0,r.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2.5`,children:[(0,r.jsxs)(`a`,{href:e.badge,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors ${s?`text-zinc-200 border-zinc-700 hover:bg-zinc-800`:`text-slate-700 border-slate-200 bg-white hover:bg-slate-50`}`,children:[(0,r.jsx)(_e,{size:13}),(0,r.jsx)(`span`,{children:`View badge`})]}),(0,r.jsxs)(`a`,{href:e.badge,download:!0,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white`,style:{backgroundColor:o},children:[(0,r.jsx)(he,{size:13}),(0,r.jsx)(`span`,{children:`Download badge`})]})]})]})]},e.id))})]}),F===`payments`&&d.length>0&&(0,r.jsxs)(`div`,{part:`portal-card payments-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(Ge,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Payments`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Every order on your registration, with receipts.`})]})]}),(0,r.jsx)(`div`,{className:`space-y-2`,children:d.map((e,t)=>{let n=e.state===`paid`,i=kt(e.pricing_breakdown);return(0,r.jsxs)(`div`,{className:`p-3.5 rounded-2xl border flex items-center gap-3 ${s?`border-zinc-800 bg-zinc-950/60`:`border-slate-200 bg-slate-50`}`,children:[(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`div`,{className:`text-sm font-semibold leading-snug truncate ${s?`text-white`:`text-slate-900`}`,children:e.order_number||`Registration fee`}),e.amount&&(0,r.jsx)(`div`,{className:`text-[13px] font-semibold mt-0.5 tabular-nums`,style:{color:o},children:[e.currency,Number(e.amount).toLocaleString()].filter(Boolean).join(` `)}),i.length>0&&(0,r.jsx)(`div`,{className:`mt-1.5 space-y-0.5`,children:i.map((t,n)=>(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[12px] ${j}`,children:[(0,r.jsx)(`span`,{className:`truncate`,children:t.label}),(0,r.jsxs)(`span`,{className:`tabular-nums shrink-0`,children:[t.sign,e.currency,` `,Number(t.amount).toLocaleString()]})]},n))})]}),(0,r.jsx)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold capitalize shrink-0 ${n?s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`:e.state===`pending`?s?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`:s?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.state}),e.receipt_url&&(0,r.jsxs)(`a`,{href:e.receipt_url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[12.5px] font-semibold hover:underline underline-offset-4 shrink-0`,style:{color:o},children:[(0,r.jsx)(`span`,{children:`Receipt`}),(0,r.jsx)(_e,{size:11})]})]},e.order_number||t)})})]}),F===`submission`&&O&&(0,r.jsxs)(`div`,{part:`portal-card submission-card`,className:A,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(ye,{size:17})}),(0,r.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Your submission`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:O.registration_type_label||`Abstract submission`})]}),(0,r.jsx)(`span`,{className:`px-2.5 py-1 rounded-full text-[11px] font-semibold capitalize shrink-0 ${O.verdict===`accepted`?s?`bg-emerald-950/70 text-emerald-300`:`bg-emerald-50 text-emerald-700`:O.verdict===`rejected`?s?`bg-red-950/60 text-red-300`:`bg-red-50 text-red-700`:s?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`}`,children:O.verdict})]}),(0,r.jsxs)(`dl`,{className:`grid grid-cols-2 gap-4`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:`Submission no.`}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold font-mono ${s?`text-white`:`text-slate-900`}`,children:O.submission_number||`N/A`})]}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`dt`,{className:`text-[11px] font-semibold uppercase tracking-wider ${s?`text-zinc-500`:`text-slate-400`}`,children:`Status`}),(0,r.jsx)(`dd`,{className:`mt-1 text-sm font-semibold capitalize ${s?`text-white`:`text-slate-900`}`,children:O.status})]})]}),Ne?(0,r.jsxs)(`form`,{onSubmit:xt,className:`mt-4 pt-4 border-t space-y-3.5 ${s?`border-zinc-800`:`border-slate-100`}`,children:[(O.editable_fields||[]).map(e=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`label`,{className:`block text-[13px] font-semibold mb-1.5 ${s?`text-zinc-200`:`text-slate-800`}`,children:[e.label,e.required&&(0,r.jsx)(`span`,{className:`text-red-500`,children:` *`})]}),e.type===`file`?(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`button`,{type:`button`,disabled:ze===e.id,onClick:()=>K(t=>({...t,[e.id]:_t(e)===`file`?`text`:`file`})),className:`mb-1.5 text-[12px] font-semibold underline disabled:opacity-50 ${s?`text-zinc-400`:`text-slate-500`}`,children:_t(e)===`file`?`Send text instead`:`Send file instead`}),_t(e)===`file`?(0,r.jsxs)(`div`,{children:[e.current_file?.serve_url&&(0,r.jsx)(`a`,{href:e.current_file.serve_url,target:`_blank`,rel:`noopener noreferrer`,className:`block mb-2 text-[12.5px] font-medium underline ${s?`text-zinc-300`:`text-slate-600`}`,children:`View current file`}),(0,r.jsx)(`input`,{type:`file`,disabled:ze===e.id,onChange:t=>{let n=t.target.files?.[0];n&&vt(e.id,n)},className:`w-full text-[13px] ${j}`}),ze===e.id&&(0,r.jsx)(`p`,{className:`mt-1 text-[12.5px] ${j}`,children:`Uploading…`})]}):(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`textarea`,{rows:4,disabled:ze===e.id,value:Ve[e.id]??``,placeholder:`Enter your answer...`,onChange:t=>q({...Ve,[e.id]:t.target.value}),className:`w-full px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none resize-y ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`}),(()=>{let t=Number(e.word_limit)||0,n=ft(Ve[e.id]),i=t>0&&n>t;return(0,r.jsxs)(`div`,{className:`mt-1.5 flex items-center justify-between gap-2`,children:[(0,r.jsx)(`button`,{type:`button`,disabled:ze===e.id||!(Ve[e.id]||``).trim()||i,onClick:()=>yt(e.id),className:`inline-flex items-center h-8 px-3.5 rounded-full text-[12.5px] font-semibold text-white disabled:opacity-50 cursor-pointer`,style:{backgroundColor:o},children:ze===e.id?`Saving…`:`Save text answer`}),t>0&&(0,r.jsxs)(`span`,{className:`text-2xs font-medium ${i?`text-red-500`:j}`,children:[n,`/`,t,` words`,i?` — over the limit`:``]})]})})()]})]}):e.id===`registration_type`?(0,r.jsxs)(`select`,{value:B[e.id]??``,required:e.required,onChange:t=>V({...B,[e.id]:t.target.value}),className:`w-full h-11 px-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white`:`bg-white border-slate-200 text-slate-900`}`,children:[(0,r.jsxs)(`option`,{value:``,children:[`Select `,e.label,`...`]}),(O.registration_types||[]).map(e=>(0,r.jsx)(`option`,{value:e.id,children:e.label},e.id))]}):(0,r.jsx)(bt,{field:e,value:B[e.id]??``,onChange:t=>V({...B,[e.id]:t}),className:`w-full min-h-11 px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400`}`,isDark:s,placeholder:e.placeholder||`Enter ${(e.label||``).toLowerCase()}`})]},e.id)),(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5 pt-1`,children:[(0,r.jsx)(`button`,{type:`submit`,disabled:U,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0 cursor-pointer disabled:opacity-60`,style:{backgroundColor:o},children:U?`Saving...`:`Save changes`}),(0,r.jsx)(`button`,{type:`button`,disabled:U,onClick:()=>Fe(!1),className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold border transition-colors cursor-pointer ${s?`text-zinc-300 border-zinc-700 hover:bg-zinc-800`:`text-slate-600 border-slate-200 bg-white hover:bg-slate-50`}`,children:`Cancel`})]})]}):(0,r.jsxs)(`div`,{className:`mt-4 pt-4 border-t flex items-center justify-between gap-3 flex-wrap ${s?`border-zinc-800`:`border-slate-100`}`,children:[(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:O.editable?`You can still edit your answers until a reviewer picks this up.`:`This submission has been assigned to a reviewer and can no longer be edited.`}),O.editable&&(0,r.jsx)(`button`,{type:`button`,onClick:gt,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0 cursor-pointer`,style:{backgroundColor:o},children:`Edit submission`})]})]}),z&&(0,r.jsxs)(`div`,{part:`portal-card addon-qr-card`,className:`${A} flex flex-col items-center`,children:[(0,r.jsxs)(`div`,{className:`w-full flex items-center gap-3 mb-4`,children:[(0,r.jsx)(`div`,{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(me,{size:17})}),(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h4`,{className:M,style:Q,children:`Pay for your add-ons`}),(0,r.jsx)(`p`,{className:`text-[13px] ${j}`,children:`Scan the code to pay, then tell us about the transfer.`})]})]}),(0,r.jsx)(Ct,{qrUrl:!z.qr_url||/^https?:\/\//i.test(z.qr_url)?z.qr_url:`${t.replace(/\/$/,``)}${z.qr_url}`,schema:z.schema||[],amount:z.amount,currency:z.currency,registrationNumber:n.registration_number||null,apiClient:e,primaryColor:o,isDark:s,onSubmitted:e=>{ke(null),b(null),S(`We have your payment details. Your add-ons are confirmed once the transfer is verified.`),l?.(`addon_custom_qr_submitted`,{registration_number:n.registration_number,answers:e});let t=i.getToken();t&&Y(t)}})]}),Ee&&(0,r.jsxs)(`div`,{className:`p-4 rounded-2xl flex flex-wrap items-center justify-between gap-3 text-sm`,style:{backgroundColor:`color-mix(in srgb, ${o} ${s?14:7}%, transparent)`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${o} 22%, transparent)`},children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2.5 ${s?`text-zinc-200`:`text-slate-700`}`,children:[(0,r.jsx)(me,{size:17,className:`shrink-0`,style:{color:o}}),(0,r.jsx)(`span`,{children:`Payment page opened in a new tab. If it didn't open:`})]}),(0,r.jsxs)(`a`,{href:Ee,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 h-9 px-4 rounded-full text-[13px] font-semibold text-white shrink-0`,style:{backgroundColor:o},children:[(0,r.jsx)(`span`,{children:`Complete payment`}),(0,r.jsx)(_e,{size:12})]})]}),y&&(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),x&&(0,r.jsxs)(`div`,{role:`status`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(ce,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:x})]})]})})]})}let Rt=`w-full h-11 pl-10 pr-3.5 text-sm font-medium rounded-xl border transition-all focus:outline-none ${s?`bg-zinc-950 border-zinc-700 text-white placeholder:text-zinc-500 hover:border-zinc-600 focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_20%,transparent)]`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 hover:border-slate-300 shadow-[0_1px_2px_rgba(15,23,42,0.04)] focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)]`}`,zt=(0,r.jsxs)(`svg`,{className:`animate-spin h-4 w-4 text-white`,fill:`none`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,r.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,r.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]}),Bt=e=>{f(e),b(null),S(null)},Vt=({id:e,label:t,icon:n,type:i=`text`,value:a,onChange:o,placeholder:c,autoComplete:l,aside:u})=>(0,r.jsxs)(`div`,{children:[(0,r.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1.5`,children:[(0,r.jsx)(`label`,{part:`field-label`,htmlFor:e,className:`block text-[13px] font-semibold ${s?`text-zinc-200`:`text-slate-800`}`,children:t}),u]}),(0,r.jsxs)(`div`,{className:`relative`,children:[(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none ${s?`text-zinc-500`:`text-slate-400`}`,children:(0,r.jsx)(n,{size:16})}),(0,r.jsx)(`input`,{part:`input`,id:e,type:i,required:!0,value:a,autoComplete:l,onChange:e=>o(e.target.value),placeholder:c,className:Rt})]})]}),Ht=()=>(0,r.jsxs)(r.Fragment,{children:[y&&(0,r.jsxs)(`div`,{role:`alert`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-red-950/50 text-red-300 ring-1 ring-inset ring-red-900`:`bg-red-50 text-red-700 ring-1 ring-inset ring-red-200/80`}`,children:[(0,r.jsx)(oe,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:y})]}),x&&(0,r.jsxs)(`div`,{role:`status`,className:`p-3.5 rounded-xl flex items-start gap-2.5 text-sm ${s?`bg-emerald-950/50 text-emerald-300 ring-1 ring-inset ring-emerald-900`:`bg-emerald-50 text-emerald-700 ring-1 ring-inset ring-emerald-200/80`}`,children:[(0,r.jsx)(ce,{size:17,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:x})]})]}),Ut=(e,t,n)=>(0,r.jsx)(`button`,{part:`button button-primary submit-button`,type:`submit`,disabled:e,style:{background:`linear-gradient(135deg, ${o}, color-mix(in srgb, ${o} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${o} 70%, transparent)`},className:`group w-full h-11 px-4 text-white text-sm font-semibold rounded-xl hover:brightness-110 active:scale-[0.99] transition-all flex items-center justify-center gap-2 cursor-pointer disabled:opacity-60 disabled:cursor-not-allowed`,children:e?(0,r.jsxs)(r.Fragment,{children:[zt,(0,r.jsx)(`span`,{children:n})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{children:t}),(0,r.jsx)(ne,{size:16,className:`transition-transform group-hover:translate-x-0.5`})]})}),Wt=({icon:e,title:t,subtitle:n,onBack:i,children:a})=>(0,r.jsxs)(`div`,{className:`flex flex-col ${c?`w-full flex-1`:`h-full overflow-y-auto`} relative bg-transparent ${s?`text-white`:`text-slate-900`}`,children:[Pt(),(0,r.jsxs)(`div`,{className:`px-4 sm:px-6 ${c?`py-8 sm:py-10`:`py-5`} flex-1 max-w-[400px] mx-auto w-full flex flex-col justify-center relative z-10`,children:[i&&(0,r.jsxs)(`button`,{part:`button button-link back-button`,type:`button`,onClick:i,className:`self-start inline-flex items-center gap-1.5 mb-4 text-sm font-semibold transition-colors cursor-pointer ${s?`text-zinc-400 hover:text-white`:`text-slate-500 hover:text-slate-900`}`,children:[(0,r.jsx)(O,{size:16}),(0,r.jsx)(`span`,{children:`Back to login`})]}),(0,r.jsxs)(`div`,{part:`portal-card`,className:`p-6 sm:p-7 rounded-3xl border space-y-5 ${s?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.18)]`}`,children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`div`,{className:`w-10 h-10 rounded-xl flex items-center justify-center mb-4`,style:{backgroundColor:`color-mix(in srgb, ${o} 12%, transparent)`,color:o},children:(0,r.jsx)(e,{size:19})}),(0,r.jsx)(`h3`,{part:`portal-title`,style:Q,className:`text-xl font-bold tracking-tight ${s?`text-white`:`text-slate-900`}`,children:t}),(0,r.jsx)(`p`,{className:`text-[13px] mt-1 leading-relaxed ${s?`text-zinc-400`:`text-slate-500`}`,children:n})]}),Ht(),a]})]})]}),Gt=`font-semibold hover:underline underline-offset-4 cursor-pointer`;return Wt(d===`request_code`?{icon:H,title:`Get verification code`,subtitle:`We will email a verification code to your registered address.`,onBack:()=>Bt(`login`),children:(0,r.jsxs)(`form`,{onSubmit:X,className:`space-y-4`,children:[Vt({id:`vx-portal-code-identifier`,label:`Registration number or email`,icon:H,value:te||C,onChange:e=>{k(e),w(e)},placeholder:`e.g. attendee@example.com or REG12345`,autoComplete:`username`}),Ut(se,`Send verification code`,`Sending code...`),(0,r.jsxs)(`p`,{className:`text-center text-[13px] ${s?`text-zinc-400`:`text-slate-500`}`,children:[`Already have a code?`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>Bt(`reset`),className:Gt,style:{color:o},children:`Set your password`})]})]})}:d===`reset`?{icon:Oe,title:`Set your password`,subtitle:`Enter the code from your email and choose a new password.`,onBack:()=>Bt(`login`),children:(0,r.jsxs)(`form`,{onSubmit:rt,className:`space-y-4`,children:[Vt({id:`vx-portal-reset-identifier`,label:`Registration number or email`,icon:H,value:te||C,onChange:e=>{k(e),w(e)},placeholder:`e.g. attendee@example.com or REG12345`,autoComplete:`username`}),Vt({id:`vx-portal-reset-code`,label:`Verification code`,icon:Ae,value:A,onChange:M,placeholder:`Enter code from email`,autoComplete:`one-time-code`,aside:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(te||C),Bt(`request_code`)},className:`text-xs font-semibold hover:underline underline-offset-4 cursor-pointer`,style:{color:o},children:`Get code on email`})}),Vt({id:`vx-portal-reset-password`,label:`New password`,icon:Pe,type:`password`,value:P,onChange:F,placeholder:`Enter new password`,autoComplete:`new-password`}),Vt({id:`vx-portal-reset-confirm`,label:`Confirm password`,icon:Pe,type:`password`,value:ie,onChange:ae,placeholder:`Re-enter new password`,autoComplete:`new-password`}),Ut(p,`Set new password`,`Updating password...`)]})}:{icon:Ie,title:`Attendee login`,subtitle:`Sign in with your email or registration number.`,children:(0,r.jsxs)(`form`,{onSubmit:tt,className:`space-y-4`,children:[Vt({id:`vx-portal-login-identifier`,label:`Email or registration number`,icon:H,value:C,onChange:w,placeholder:`Enter email or registration number`,autoComplete:`username`}),Vt({id:`vx-portal-login-password`,label:`Password`,icon:Pe,type:`password`,value:T,onChange:E,placeholder:`Enter password`,autoComplete:`current-password`,aside:(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`reset`)},className:`text-xs font-semibold hover:underline underline-offset-4 cursor-pointer`,style:{color:o},children:`Forgot password?`})}),Ut(p,`Login`,`Logging in...`),(0,r.jsxs)(`p`,{className:`pt-4 border-t text-center text-[13px] ${s?`border-zinc-800 text-zinc-400`:`border-slate-100 text-slate-500`}`,children:[`First time here?`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`request_code`)},className:Gt,style:{color:o},children:`Get code`}),` `,`or`,` `,(0,r.jsx)(`button`,{type:`button`,onClick:()=>{k(C),Bt(`reset`)},className:Gt,style:{color:o},children:`generate password`})]})]})})};function jt(e,t,n){if(!e)return;let r=t?`rgba(9,9,11,0.88)`:`rgba(248,250,252,0.88)`;return{backgroundImage:`linear-gradient(${r}, ${r}), url(${e})`,backgroundSize:`cover`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundAttachment:n?`fixed`:`scroll`}}function Mt(e){if(!e)return`bottom-right`;switch(e){case`bottom-left`:case`left-bottom`:return`bottom-left`;case`top-right`:case`right-top`:return`top-right`;case`top-left`:case`left-top`:return`top-left`;default:return`bottom-right`}}var Nt=e=>{switch(e){case`bottom-left`:return{bottom:`20px`,left:`20px`,top:`auto`,right:`auto`};case`top-right`:return{top:`20px`,right:`20px`,bottom:`auto`,left:`auto`};case`top-left`:return{top:`20px`,left:`20px`,bottom:`auto`,right:`auto`};default:return{bottom:`20px`,right:`20px`,top:`auto`,left:`auto`}}},Pt=e=>{switch(e){case`bottom-left`:return`bottom-5 left-5`;case`top-right`:return`top-5 right-5`;case`top-left`:return`top-5 left-5`;default:return`bottom-5 right-5`}},Ft=e=>{let t=new Set,n=e=>{e?.options?.length?e.options.forEach(n):e?.name&&e?.mode!==`included`&&t.add(e.label??e.name)};return(Array.isArray(e?.items)?e.items:[]).forEach(n),t},It=e=>(Array.isArray(e)?e:[]).flatMap(e=>typeof e==`string`?[e]:e?.options?It(e.options):e?.name?[e.name]:[]),Lt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Rt=({config:e})=>{let[t,i]=(0,n.useState)(`registration`),[a,o]=(0,n.useState)(!1);(0,n.useEffect)(()=>{t===`attendee`&&o(!0)},[t]);let[s]=(0,n.useState)(()=>typeof window<`u`?new URLSearchParams(window.location.search).get(`rn`):null),[c,l]=(0,n.useState)(e.displayMode!==`popup`||!!s),[u,d]=(0,n.useState)(!1),[h,g]=(0,n.useState)([]),[_,v]=(0,n.useState)([]),[y,b]=(0,n.useState)(``),[x,S]=(0,n.useState)(null),[C,w]=(0,n.useState)(null),T=(0,n.useMemo)(()=>C&&{fields:C.fields.filter(e=>e.id!==`registration_type`)},[C]),[E,ee]=(0,n.useState)(!0),[D,te]=(0,n.useState)(``),[k,A]=(0,n.useState)(null),[j,M]=(0,n.useState)(!!s),[N,P]=(0,n.useState)(null),[F,ie]=(0,n.useState)(null),[ae,se]=(0,n.useState)(s),[ce,le]=(0,n.useState)(null),[L,de]=(0,n.useState)(null),[pe,me]=(0,n.useState)(!1),[R,he]=(0,n.useState)({amount:null,currency:null}),[ge,ve]=(0,n.useState)(null),[be,xe]=(0,n.useState)(null),[Se,Ce]=(0,n.useState)(null),[we,Te]=(0,n.useState)(!1),[Ee,De]=(0,n.useState)(()=>Mt(e.position)),[z,Oe]=(0,n.useState)(null),[ke,Ae]=(0,n.useState)(null),[je,Me]=(0,n.useState)(!1),[Ne,Pe]=(0,n.useState)(!1),Fe=(0,n.useRef)(null),B=(0,n.useRef)(null),Le=(0,n.useRef)(!1);(0,n.useEffect)(()=>{e.position&&De(Mt(e.position))},[e.position]);let V=e.themeMode===`dark`||e.theme?.mode===`dark`,H=e.theme?.primaryColor||`#2563eb`,U=!!e.isAbstract,Re=e.headerBannerImage,W=e.backgroundImage,G=(0,n.useMemo)(()=>new f(e.debug),[e.debug]),K=(0,n.useMemo)(()=>new p(e.baseUrl,e.eventSlug,G,e.timeoutMs??12e4),[e.baseUrl,e.eventSlug,G,e.timeoutMs]),q=(0,n.useMemo)(()=>new m(e.eventSlug),[e.eventSlug]),He=(0,n.useRef)(null);(0,n.useEffect)(()=>{s&&He.current!==s&&(He.current=s,K.verifyPayment(s).then(t=>{let n=!!(t?.data?.confirmed??t?.confirmed);le(n),e.onEvent?.(`payment_verified`,{registration_number:s,confirmed:n})}).catch(e=>{le(!1),G.error(`Payment verification failed`,e)}))},[s,K,G]);let Ue=(0,n.useRef)(e.displayMode),We=(0,n.useRef)(null),[J,Ge]=(0,n.useState)(null),Ke=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(e.displayMode!==`widget`)return;let t=Ke.current;t&&t.getBoundingClientRect().top<0&&t.scrollIntoView({behavior:`smooth`,block:`start`})},[e.displayMode,j,E,x]),(0,n.useEffect)(()=>{q.getXrefId()},[q]),(0,n.useEffect)(()=>{if(s)return;let e=q.getPendingCustomQr();e?.registrationNumber&&e.customQr&&(se(String(e.registrationNumber)),de(e.customQr),me(!1),he({amount:e.amountDue?.amount??null,currency:e.amountDue?.currency??null}),ve(e.regStatus??`pending`),M(!0))},[q,s]),(0,n.useEffect)(()=>{if(!c)return;let t=q.getXrefId();t&&(U?K.getReviewDraft(t):K.getDraft(t)).then(t=>{let n=t?.data||t;n&&n.registration_type&&(Ge(n),e.onEvent?.(`draft_loaded`,n))}).catch(e=>{G.log(`No draft found for this session`,e)})},[c,K,q,G,U]),(0,n.useEffect)(()=>{Ce(null)},[x]);let Je=(0,n.useMemo)(()=>{if(!J||!x||String(J.registration_type)!==String(x.id))return{};let e={...J.custom_data||{}};if(Array.isArray(J.accompanying)&&(e.accompanying=J.accompanying),Array.isArray(e.selected_items)){let t=Ft(x);e.selected_items=It(e.selected_items).filter(e=>t.has(e))}if(J.salutation&&(e.salutation=J.salutation,e.title=J.salutation),J.name){e.name=J.name,e.full_name=J.name,e.fullName=J.name;let t=J.name.trim().split(/\s+/);t.length>0&&!e.first_name&&(e.first_name=t[0]),t.length>1&&!e.last_name&&(e.last_name=t.slice(1).join(` `))}return J.email&&(e.email=J.email),J.phone&&(e.phone=J.phone,e.mobile=J.phone,e.phoneNumber=J.phone),((U?C?.fields:x?.form_schema?.fields)||[]).forEach(t=>{let n=ut(t.id,t.label);e[t.id]===void 0&&e[n]!==void 0&&(e[t.id]=e[n])}),e},[J,x,U,C]);(0,n.useEffect)(()=>()=>{We.current&&clearTimeout(We.current)},[]);let Xe=(0,n.useCallback)(t=>{We.current&&clearTimeout(We.current),We.current=setTimeout(async()=>{if(!Object.values(t).some(e=>e!==``&&e!=null))return;let n=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`selected_items`,`custom_data`,`accompanying`,`discount_code`]),r=(U?C?.fields:x?.form_schema?.fields)||[],i=new Map;r.forEach(e=>i.set(e.id,e));let a={...t.custom_data||{}};for(let[e,r]of Object.entries(t))if(!n.has(e)){let t=ut(e,i.get(e)?.label);a[t]=r}let o=String(t.email||``).trim(),s={xref_id:q.getXrefId(),salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,...!o||Lt.test(o)?{email:o}:{},phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:x?.id,custom_data:a,selected_items:t.selected_items||[],accompanying:t.accompanying||[]};try{U?await K.trackReviewProgress(s):await K.trackProgress(s),e.onEvent?.(`draft_saved`,s)}catch(e){G.error(`Failed to save draft progress`,e)}},600)},[q,K,x,e,G,U,C]);(0,n.useEffect)(()=>{Ue.current!==e.displayMode&&(Ue.current=e.displayMode,l(e.displayMode!==`popup`),d(!1))},[e.displayMode]),(0,n.useEffect)(()=>{(U?K.getReviewFormSchema():K.getFormSchema()).then(t=>{g(t?.data?.types||[]),v(t?.data?.offers||[]),U&&w({fields:t?.data?.fields||[]}),(t?.data?.event_name||t?.data?.title||t?.data?.name)&&b(t.data.event_name||t.data.title||t.data.name),e.onEvent?.(`form_loaded`,t?.data)}).catch(t=>{G.error(`Failed to load schema`,t),g([]),v([]);let n={type:`schema_load`,message:t?.message||`Failed to load event schema`,error:t};e.onEvent?.(`error`,n),e.onError?.(n)}).finally(()=>ee(!1))},[K,U]);let Qe=async(t,n)=>{We.current&&clearTimeout(We.current),ee(!0),P(null),xe(null);let r=q.getXrefId(),i=new Set([`salutation`,`title`,`name`,`fullName`,`full_name`,`firstName`,`lastName`,`email`,`phone`,`mobile`,`phoneNumber`,`registration_type`,`selected_items`,`custom_data`,`xref_id`,`accompanying`,`discount_code`]),a=(U?C?.fields:x?.form_schema?.fields)||[],o=new Map;a.forEach(e=>o.set(e.id,e));let s={...t.custom_data||{}};for(let[e,n]of Object.entries(t))if(!i.has(e)){let t=ut(e,o.get(e)?.label);s[t]=n}let c={xref_id:r,salutation:t.salutation||t.title||``,name:t.name||t.fullName||t.full_name||[t.firstName,t.lastName].filter(Boolean).join(` `)||``,email:t.email||``,phone:t.phone||t.mobile||t.phoneNumber||``,registration_type:x.id,custom_data:s,selected_items:It(t.selected_items).filter(e=>Ft(x).has(e)),accompanying:t.accompanying||[],discount_code:t.discount_code||``};try{let t=U?await K.submitReview(c):await K.submitRegistration(c);q.updateXrefId(),Ge(null),Ce(null);let n=U?null:t?.data?.payment_url||t?.payment_url||null;ie(n);let r=U?null:t?.data?.custom_qr||t?.custom_qr||null;de(r),me(!1),he({amount:t?.data?.amount??null,currency:t?.data?.currency??null}),ve(t?.data?.status||t?.status||null);let i=t?.data?.submission_number||t?.submission_number||t?.data?.registration_number||t?.registration_number||t?.data?.registration?.registration_number||t?.registration?.registration_number||null;se(i?String(i):null),Te(!1);let a=U?null:t?.data?.payment_error||t?.payment_error||null;xe(a?String(a):null),r&&i?q.setPendingCustomQr({registrationNumber:String(i),customQr:r,amountDue:{amount:t?.data?.amount??null,currency:t?.data?.currency??null},regStatus:t?.data?.status||t?.status||null}):q.clearPendingCustomQr(),n&&typeof n==`string`&&n.trim()!==``&&window.open(n,`_blank`,`noopener,noreferrer`),M(!0);let o={registrationType:x.id,payload:c,response:t,paymentUrl:n};e.onEvent?.(`submitted`,o),e.onRegister?.(o),e.onRegistered?.(o)}catch(r){G.error(`Submission failed`,r);let i=r?.message||(U?`Submission failed. Please check your information and try again.`:`Registration failed. Please check your information and try again.`),a={type:`submit_error`,message:i,error:r};e.onEvent?.(`error`,a),e.onError?.(a),P(i);let o=!!t.discount_code&&/coupon/i.test(i);if(o){let e=String(t.discount_code).toLowerCase();v(t=>t.filter(t=>String(t?.code||``).toLowerCase()!==e))}Ce({values:o?{...t,discount_code:``}:t,fileAnswers:n?.fileAnswers||{}})}finally{ee(!1)}},Y=()=>{if(M(!1),P(null),ie(null),de(null),me(!1),se(null),ve(null),le(null),he({amount:null,currency:null}),xe(null),Ce(null),q.clearPendingCustomQr(),Te(!1),S(null),Ge(null),typeof window<`u`&&new URLSearchParams(window.location.search).has(`rn`)){let e=new URL(window.location.href);e.searchParams.delete(`rn`),window.history.replaceState(window.history.state,``,e.toString())}},et=(0,n.useCallback)(e=>{if(e.stopPropagation(),e.button!==0||!Fe.current)return;let t=Fe.current.getBoundingClientRect();B.current={startX:e.clientX,startY:e.clientY,rect:t,corner:Ee},Le.current=!1,Me(!0)},[Ee]);(0,n.useEffect)(()=>{if(!je)return;let t=e=>{if(!B.current)return;let t=e.clientX-B.current.startX,n=e.clientY-B.current.startY;Le.current||Math.hypot(t,n)>5&&(Le.current=!0),Le.current&&Oe({x:t,y:n})},n=t=>{if(!B.current){Me(!1),Oe(null),Le.current=!1;return}let{rect:n,startX:r,startY:i}=B.current,a=t.clientX-r,o=t.clientY-i,s=Le.current;if(B.current=null,Me(!1),setTimeout(()=>{Le.current=!1},100),!s){Oe(null);return}let c=n.left+a,l=n.top+o,u=c+n.width/2,d=l+n.height/2,f=typeof window<`u`?window.innerWidth:1024,p=typeof window<`u`?window.innerHeight:768,m=u>=f/2,h=d>=p/2,g=h?m?`bottom-right`:`bottom-left`:m?`top-right`:`top-left`,_=m?f-n.width-20:20,v=h?p-n.height-20:20,y=c-_,b=l-v;Ae({transform:`translate3d(${y}px, ${b}px, 0)`,transition:`none`}),Oe(null),De(g),e.onEvent?.(`position_changed`,{position:g}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ae({transform:`translate3d(0, 0, 0)`,transition:`transform 0.35s cubic-bezier(0.16, 1, 0.3, 1)`}),setTimeout(()=>{Ae(null)},360)})})};return window.addEventListener(`pointermove`,t),window.addEventListener(`pointerup`,n),window.addEventListener(`pointercancel`,n),()=>{window.removeEventListener(`pointermove`,t),window.removeEventListener(`pointerup`,n),window.removeEventListener(`pointercancel`,n)}},[je,e]);let tt=async()=>{if(ae){try{await navigator.clipboard.writeText(ae)}catch{let e=document.createElement(`textarea`);e.value=ae,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e)}Te(!0),setTimeout(()=>Te(!1),2e3)}},nt=t=>!t||/^https?:\/\//i.test(t)?t:`${e.baseUrl.replace(/\/$/,``)}${t}`,X=!U&&ce!==!0&&(ge===`pending`&&Number(R.amount)>0||ce===!1),rt=()=>ae?(0,r.jsxs)(`div`,{className:`w-full max-w-xs mb-6`,children:[(0,r.jsx)(`p`,{className:`text-2xs font-bold uppercase tracking-wider mb-1.5 ${V?`text-zinc-400`:`text-gray-500`}`,children:U?`Submission Number`:X?`Temporary Registration Number`:`Registration Number`}),(0,r.jsxs)(`div`,{part:`registration-number`,className:`flex items-center gap-2 pl-4 pr-1.5 py-1.5 rounded-xl border ${V?`bg-zinc-900 border-zinc-700`:`bg-gray-50 border-gray-200`}`,children:[(0,r.jsx)(`span`,{className:`flex-1 text-left font-mono font-bold text-base select-all break-all`,children:ae}),(0,r.jsxs)(`button`,{part:`copy-button`,type:`button`,onClick:tt,className:`flex items-center gap-1 px-3 py-1.5 rounded-lg text-xs font-bold text-white shrink-0 cursor-pointer hover:opacity-90 transition-opacity`,style:{backgroundColor:H},title:`Copy registration number`,children:[we?(0,r.jsx)(re,{size:13}):(0,r.jsx)(fe,{size:13}),(0,r.jsx)(`span`,{children:we?`Copied`:`Copy`})]})]}),X&&(0,r.jsxs)(`div`,{part:`provisional-note`,role:`note`,className:`mt-2.5 flex items-start gap-2 rounded-xl px-3 py-2.5 text-left text-xs leading-relaxed ${V?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(ue,{size:14,className:`shrink-0 mt-0.5`}),(0,r.jsx)(`span`,{children:`This is a temporary registration number. Your registration will be confirmed once your payment is verified.`})]})]}):null;if(!c&&e.displayMode===`popup`){let e={...Nt(Ee),...z?{transform:`translate3d(${z.x}px, ${z.y}px, 0) scale(1.05)`,transition:`none`,userSelect:`none`}:ke?{transform:ke.transform,transition:ke.transition}:{transition:`all 0.3s cubic-bezier(0.16, 1, 0.3, 1)`}},t=Ne||je;return(0,r.jsxs)(`div`,{ref:Fe,onMouseEnter:()=>Pe(!0),onMouseLeave:()=>Pe(!1),className:`fixed ${Pt(Ee)} z-50 select-none group`,style:e,children:[(0,r.jsx)(`div`,{onPointerDown:et,className:`absolute -top-1.5 -left-1.5 w-7 h-7 rounded-full bg-slate-900 text-white shadow-lg border-2 border-white flex items-center justify-center cursor-grab active:cursor-grabbing hover:bg-black hover:scale-110 active:scale-95 transition-all duration-200 z-10 touch-none ${t?`opacity-100 scale-100 pointer-events-auto`:`opacity-0 scale-75 pointer-events-none group-hover:opacity-100 group-hover:scale-100 group-hover:pointer-events-auto`}`,title:`Hold and drag to change position`,children:(0,r.jsx)(Ve,{size:13,className:`pointer-events-none text-white`})}),(0,r.jsx)(`button`,{part:`launcher`,type:`button`,onClick:e=>{e.stopPropagation(),!je&&l(!0)},className:`w-16 h-16 rounded-full text-white shadow-xl flex items-center justify-center cursor-pointer hover:scale-105 active:scale-95 transition-transform`,style:{backgroundColor:H},title:`Click to open registration`,children:(0,r.jsx)(`span`,{className:`font-bold text-sm tracking-wide pointer-events-none`,children:`Join`})})]})}let it=e.displayMode===`fullscreen`||e.displayMode===`popup`&&u,Z=e.displayMode===`widget`,at=jt(W,V,Z),ot=`${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`} flex flex-col transition-all duration-300 ease-in-out `,st=e.theme?.fontFamily,$=!st||st===`inherit`?{}:{fontFamily:`var(--vx-font-family, ${st})`};$[`--vx-accent`]=H,it?ot+=`fixed inset-0 z-[9999] rounded-none overflow-hidden `:e.displayMode===`popup`?(ot+=`fixed ${Pt(Ee)} z-50 rounded-xl shadow-2xl border ${V?`border-zinc-800`:`border-gray-200`} overflow-hidden `,$.width=e.width||`400px`,$.height=e.height||`700px`,$.maxHeight=`90vh`,$.maxWidth=`calc(100vw - 32px)`,Object.assign($,Nt(Ee))):(ot+=`relative w-full min-h-screen border-none shadow-none rounded-none `,$.width=`100%`,$.minHeight=`100vh`);let lt=U?`Abstract Submission`:t===`registration`?y||`Registration`:`Attendee Portal`,dt=D.trim().toLowerCase(),ft=dt?h.filter(e=>[e.type,e.name,e.category,e.description,e.currency,e.price,e.tax_info,...Array.isArray(e.items)?e.items.map(e=>e?.name).filter(Boolean):[]].filter(e=>e!=null&&e!==``).join(` `).toLowerCase().includes(dt)):h,pt=_.filter(e=>!e?.registration_type),mt=`max-w-2xl mx-auto w-full rounded-3xl border overflow-hidden ${V?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.16)]`}`,vt=()=>{if(h.length===0)return null;let e=h.find(e=>String(e.id)===k)||(h.length===1?h[0]:null),t=e?e.type||e.name||e.label:``;return(0,r.jsxs)(`div`,{part:`category-panel`,className:mt,children:[(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 pt-6 sm:pt-7 pb-5 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-xl flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(ye,{size:20})}),(0,r.jsx)(`div`,{className:`min-w-0`,children:(0,r.jsx)(`h3`,{part:`list-title`,className:`text-lg sm:text-xl font-semibold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:`Choose a submission category`})})]}),(0,r.jsx)(`div`,{role:`radiogroup`,"aria-label":`Submission category`,className:`border-t divide-y ${V?`border-zinc-800 divide-zinc-800`:`border-slate-100 divide-slate-100`}`,children:h.map(t=>{let n=t.type||t.name||t.label,i=!!e&&String(e.id)===String(t.id);return(0,r.jsxs)(`button`,{part:i?`category category-active`:`category`,type:`button`,role:`radio`,"aria-checked":i,onClick:()=>A(String(t.id)),className:`group w-full flex items-center gap-4 px-5 sm:px-7 py-4 text-left transition-colors cursor-pointer outline-none focus-visible:bg-[color-mix(in_srgb,var(--vx-accent)_8%,transparent)] ${i?``:V?`hover:bg-zinc-800/60`:`hover:bg-slate-50`}`,style:i?{backgroundColor:`color-mix(in srgb, ${H} ${V?14:6}%, transparent)`}:void 0,children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:`w-5 h-5 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors ${i?``:V?`border-zinc-600`:`border-slate-300`}`,style:i?{borderColor:H}:void 0,children:i&&(0,r.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full`,style:{backgroundColor:H}})}),(0,r.jsxs)(`span`,{className:`flex-1 min-w-0`,children:[(0,r.jsx)(`span`,{className:`block text-[15px] font-semibold leading-snug ${V?`text-white`:`text-slate-900`}`,children:n}),t.description&&(0,r.jsx)(`span`,{className:`block text-[13px] mt-0.5 line-clamp-1 ${V?`text-zinc-400`:`text-slate-500`}`,children:t.description})]}),t.category&&(0,r.jsx)(`span`,{className:`hidden sm:inline-block text-[10px] font-semibold uppercase tracking-wider px-2.5 py-1 rounded-full shrink-0 ${V?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:t.category}),(0,r.jsx)(ne,{size:16,className:`shrink-0 transition-all ${i?`translate-x-0.5`:`${V?`text-zinc-600`:`text-slate-300`} group-hover:translate-x-0.5`}`,style:i?{color:H}:void 0})]},t.id)})}),(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 py-5 border-t flex flex-col-reverse sm:flex-row sm:items-center sm:justify-between gap-3 ${V?`border-zinc-800`:`border-slate-100`}`,children:[(0,r.jsx)(`p`,{className:`text-[13px] truncate ${V?`text-zinc-400`:`text-slate-500`}`,children:e?(0,r.jsxs)(r.Fragment,{children:[`Selected: `,(0,r.jsx)(`span`,{className:`font-semibold ${V?`text-zinc-200`:`text-slate-700`}`,children:t})]}):`Select a category to continue`}),(0,r.jsxs)(`button`,{part:`button button-primary continue-button`,type:`button`,disabled:!e,onClick:()=>e&&S(e),style:{background:`linear-gradient(135deg, ${H}, color-mix(in srgb, ${H} 80%, black))`,boxShadow:e?`0 10px 24px -12px color-mix(in srgb, ${H} 70%, transparent)`:void 0},className:`group shrink-0 inline-flex items-center justify-center gap-2 h-11 px-5 rounded-xl text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.99] cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:brightness-100`,children:[(0,r.jsx)(`span`,{children:`Continue to submission`}),(0,r.jsx)(ne,{size:16,className:`transition-transform group-hover:translate-x-0.5`})]})]})]})},yt=e=>(0,r.jsxs)(`div`,{part:`category-panel`,className:mt,children:[(0,r.jsxs)(`div`,{className:`px-5 sm:px-7 pt-6 sm:pt-7 pb-5 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-11 h-11 rounded-xl`}),(0,r.jsx)(`div`,{className:`${e} h-4 w-56`})]}),(0,r.jsx)(`div`,{className:`border-t divide-y ${V?`border-zinc-800 divide-zinc-800`:`border-slate-100 divide-slate-100`}`,children:[0,1,2].map(t=>(0,r.jsxs)(`div`,{className:`flex items-center gap-4 px-5 sm:px-7 py-4`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-5 h-5 rounded-full`,style:{animationDelay:`${t*90}ms`}}),(0,r.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-3.5 w-1/2`,style:{animationDelay:`${t*90}ms`}}),(0,r.jsx)(`div`,{className:`${e} h-3 w-3/4`,style:{animationDelay:`${t*90}ms`}})]})]},t))}),(0,r.jsx)(`div`,{className:`px-5 sm:px-7 py-5 border-t flex justify-end ${V?`border-zinc-800`:`border-slate-100`}`,children:(0,r.jsx)(`div`,{className:`${e} h-11 w-52`})})]}),bt=()=>{let e=`vx-skeleton rounded-full`,t=Z?6:3;return(0,r.jsxs)(`div`,{part:`page`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex flex-col ${Z?`w-full flex-1`:`h-full min-h-0`} ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,children:[(0,r.jsx)(`span`,{className:`sr-only`,children:`Loading form types…`}),(0,r.jsx)(`div`,{part:`header`,className:`relative overflow-hidden z-10 shrink-0 text-white`,style:{background:`linear-gradient(135deg, ${H} 0%, color-mix(in srgb, ${H} 76%, black) 100%)`},children:(0,r.jsxs)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-5 sm:py-6 flex items-center gap-3.5`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-2xl bg-white/15 ring-1 ring-inset ring-white/30 shrink-0`}),(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-5 w-48`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-64 max-w-[60vw]`})]})]})}),!U&&(0,r.jsx)(`div`,{part:`tabs`,className:`shrink-0 border-b ${V?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-3`,children:(0,r.jsxs)(`div`,{className:`grid grid-cols-2 gap-1 p-1 rounded-xl max-w-md ${V?`bg-zinc-800`:`bg-slate-100`}`,children:[(0,r.jsx)(`div`,{className:`h-9 rounded-lg ${V?`bg-zinc-950`:`bg-white shadow-sm`}`}),(0,r.jsx)(`div`,{className:`h-9`})]})})}),(0,r.jsx)(`div`,{part:`list`,className:`${Z?`w-full flex-1`:`overflow-hidden flex-1 min-h-0`} relative ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8 space-y-5`,children:U?yt(e):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`div`,{part:`search`,className:`flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-4 w-56`}),(0,r.jsx)(`div`,{className:`${e} h-3 w-28`})]}),(0,r.jsx)(`div`,{className:`h-10 w-full sm:w-72 rounded-xl border ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200`}`})]}),(0,r.jsx)(`div`,{part:`card-grid`,className:Z?`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`:`space-y-3`,children:Array.from({length:t},(t,n)=>{let i={animationDelay:`${n*90}ms`};return(0,r.jsxs)(`div`,{part:`card`,className:`rounded-2xl border p-5 sm:p-6 flex flex-col ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`,children:[(0,r.jsx)(`div`,{className:`vx-skeleton w-11 h-11 rounded-xl`,style:i}),(0,r.jsx)(`div`,{className:`${e} mt-5 h-5 w-3/5`,style:i}),(0,r.jsx)(`div`,{className:`${e} mt-3 h-3 w-4/5`,style:i}),(0,r.jsxs)(`div`,{className:`mt-6 pt-5 border-t border-dashed flex items-end justify-between gap-3 ${V?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsxs)(`div`,{className:`space-y-2`,children:[(0,r.jsx)(`div`,{className:`${e} h-2.5 w-20`,style:i}),(0,r.jsx)(`div`,{className:`${e} h-6 w-28`,style:i})]}),(0,r.jsx)(`div`,{className:`${e} h-10 w-28`,style:i})]})]},n)})})]})})})]})},xt=()=>{let e=!!x,t=U?ye:$e,n=e?U?`Submitting your abstract`:`Submitting your registration`:`Loading your registration`,i=x?x.type||x.name||x.label:``,a=!U&&x&&x.price!==void 0&&x.price!==null&&x.price!==``?Number(x.price)>0?[x.currency,Number(x.price).toLocaleString()].filter(Boolean).join(` `):`Free`:``;return(0,r.jsx)(`div`,{part:`screen screen-submitting`,role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`flex-1 flex items-center justify-center px-4 py-16 ${Z?`min-h-[70vh]`:`h-full`} ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsxs)(`div`,{part:`portal-card`,className:`w-full max-w-sm rounded-3xl border p-8 text-center ${V?`bg-zinc-900 border-zinc-800 shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.18)]`}`,children:[(0,r.jsxs)(`div`,{className:`relative mx-auto w-16 h-16`,children:[(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-full`,style:{boxShadow:`inset 0 0 0 4px color-mix(in srgb, ${H} 14%, transparent)`}}),(0,r.jsx)(`div`,{className:`absolute inset-0 rounded-full motion-safe:animate-spin`,style:{background:`conic-gradient(from 0deg, transparent 0deg, ${H} 300deg, transparent 360deg)`,mask:`radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))`,WebkitMask:`radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px))`}}),(0,r.jsx)(`div`,{className:`absolute inset-[10px] rounded-full flex items-center justify-center`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(t,{size:20})})]}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`mt-6 text-xl font-bold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:n}),(0,r.jsx)(`p`,{part:`screen-message`,className:`mt-1.5 text-[13px] leading-relaxed text-balance ${V?`text-zinc-400`:`text-slate-500`}`,children:`This usually takes a few seconds. Please keep this page open.`}),i&&(0,r.jsxs)(`div`,{className:`mt-5 inline-flex max-w-full items-center gap-2 rounded-full px-3 py-1.5 text-xs font-semibold ${V?`bg-zinc-800 text-zinc-200`:`bg-slate-100 text-slate-700`}`,children:[(0,r.jsx)(`span`,{className:`truncate`,children:i}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:V?`text-zinc-600`:`text-slate-300`,children:`•`}),(0,r.jsx)(`span`,{className:`shrink-0 tabular-nums`,style:{color:H},children:a})]})]}),(0,r.jsx)(`div`,{className:`mt-6 h-1 w-full overflow-hidden rounded-full ${V?`bg-zinc-800`:`bg-slate-100`}`,children:(0,r.jsx)(`div`,{className:`vx-progress-bar h-full w-2/5 rounded-full`,style:{backgroundColor:H}})})]})})};return(0,r.jsx)(`div`,{ref:Ke,part:`widget`,className:ot,style:{...$,overflow:Z?`visible`:`clip`,scrollMarginTop:Z?96:void 0},onScroll:e=>{Z||(e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0))},children:E&&!x&&!j?bt():E?xt():j?L&&!pe?(0,r.jsxs)(`div`,{part:`screen screen-custom-qr`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{part:`screen-header`,className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:H,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{part:`screen-header-title`,className:`text-xl font-bold`,style:Q,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:24})})]})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center p-6 text-center`,children:[rt(),(0,r.jsx)(Ct,{qrUrl:nt(L.qr_url),schema:L.schema||[],amount:R.amount,currency:R.currency,registrationNumber:ae,apiClient:K,primaryColor:H,isDark:V,onSubmitted:t=>{me(!0),q.clearPendingCustomQr(),e.onEvent?.(`custom_qr_submitted`,{registration_number:ae,answers:t})}}),(0,r.jsx)(`button`,{part:`button button-link`,onClick:Y,className:`mt-4 w-full max-w-sm py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Register Another Person`})]})]}):F?(0,r.jsxs)(`div`,{part:`screen screen-payment`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[(0,r.jsxs)(`div`,{part:`screen-header`,className:`p-4 shadow-sm flex justify-between items-center z-10`,style:{backgroundColor:H,color:`white`},children:[(0,r.jsxs)(`div`,{children:[(0,r.jsx)(`h2`,{part:`screen-header-title`,className:`text-xl font-bold`,style:Q,children:`Complete Payment`}),(0,r.jsx)(`p`,{className:`text-xs opacity-90 mt-0.5`,children:`Registration Submitted`})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,r.jsx)(ct,{size:24})})]})})]}),(0,r.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center`,children:[(0,r.jsx)(`div`,{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 text-2xl shadow-md`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:`💳`}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`text-2xl font-bold mb-2 ${V?`text-white`:`text-gray-900`}`,style:Q,children:`Done Your Payment First`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:`Please complete your payment in the new tab to confirm your booking and finalize your registration.`}),rt(),(0,r.jsxs)(`div`,{className:`w-full max-w-xs space-y-3`,children:[(0,r.jsxs)(`a`,{part:`button button-primary`,href:F,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center justify-center gap-2 font-bold px-5 py-3 rounded-lg transition-opacity hover:opacity-90 text-white shadow-md w-full`,style:{backgroundColor:H},children:[(0,r.jsx)(`span`,{children:`Open Payment Page`}),(0,r.jsx)(_e,{size:16})]}),(0,r.jsx)(`button`,{part:`button button-link`,onClick:Y,className:`w-full py-2.5 px-4 text-sm font-semibold transition-colors cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-500 hover:text-gray-900`}`,children:`Register Another Person`})]})]})]}):(0,r.jsxs)(`div`,{part:`screen screen-success`,className:`flex flex-col h-full items-center justify-center p-8 text-center relative ${V?`bg-black text-white`:`bg-white text-gray-900`}`,children:[e.displayMode===`popup`&&(0,r.jsx)(`div`,{className:`absolute top-4 right-4 flex items-center gap-2`,children:(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-gray-400 hover:text-gray-900`}`,children:(0,r.jsx)(ct,{size:24})})}),(0,r.jsx)(`div`,{className:`w-20 h-20 rounded-full flex items-center justify-center mb-6 text-4xl shadow-md`,style:{backgroundColor:H,color:`white`},children:`✓`}),(0,r.jsx)(`h2`,{part:`screen-title`,className:`text-3xl font-bold mb-3 ${V?`text-white`:`text-gray-900`}`,style:Q,children:U?`Abstract Submitted Successfully`:`Thank You!`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`mb-6 ${V?`text-zinc-300`:`text-gray-600`}`,children:U?`Your reference submission number is below.`:`Your registration has been successfully received.`}),rt(),be&&(0,r.jsxs)(`div`,{part:`payment-error`,role:`alert`,className:`w-full max-w-xs mb-6 flex items-start gap-2 rounded-xl px-3 py-2.5 text-left text-xs leading-relaxed ${V?`bg-amber-950/50 text-amber-200 ring-1 ring-inset ring-amber-900`:`bg-amber-50 text-amber-800 ring-1 ring-inset ring-amber-200`}`,children:[(0,r.jsx)(oe,{size:14,className:`shrink-0 mt-0.5`}),(0,r.jsxs)(`span`,{children:[`Your registration was saved under the number above, but we couldn't start the payment. Please try again later or contact the organiser to complete it.`,(0,r.jsx)(`span`,{className:`block mt-1 font-semibold`,children:be})]})]}),pe&&(0,r.jsx)(`p`,{part:`payment-status`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:`We have your payment details. Your registration is confirmed once the transfer is verified.`}),ce!==null&&(0,r.jsx)(`p`,{part:`payment-status`,className:`text-sm mb-6 max-w-xs leading-relaxed ${V?`text-zinc-300`:`text-gray-600`}`,children:ce?`Your payment is confirmed.`:`We haven't received your payment yet. If you have just paid, it will be confirmed shortly.`}),(0,r.jsx)(`button`,{part:`button button-primary`,onClick:Y,style:{backgroundColor:H},className:`text-white font-bold py-3 px-8 rounded-md hover:opacity-90 transition-opacity shadow-md cursor-pointer`,children:`Back`})]}):N?(()=>{let t=!U&&/already registered/i.test(String(N));return(0,r.jsxs)(`div`,{part:`screen screen-error`,className:`flex flex-col h-full relative overflow-y-auto ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,style:at,children:[e.displayMode===`popup`&&(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`absolute top-4 right-4 z-10 cursor-pointer ${V?`text-zinc-400 hover:text-white`:`text-slate-400 hover:text-slate-900`}`,"aria-label":`Close`,children:(0,r.jsx)(ct,{size:22})}),(0,r.jsx)(`div`,{className:`flex-1 flex items-center justify-center p-6 sm:p-10`,children:(0,r.jsxs)(`div`,{part:`error-card`,className:`w-full max-w-md rounded-3xl border p-7 sm:p-9 text-center ${V?`bg-zinc-900 border-zinc-800`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04),0_24px_48px_-24px_rgba(15,23,42,0.22)]`}`,children:[(0,r.jsx)(`div`,{className:`mx-auto mb-5 w-14 h-14 rounded-2xl flex items-center justify-center`,style:{backgroundColor:`color-mix(in srgb, ${t?H:`#f59e0b`} ${V?18:10}%, transparent)`,color:t?H:`#d97706`},children:t?(0,r.jsx)(Ie,{size:24}):(0,r.jsx)(oe,{size:26})}),(0,r.jsx)(`h3`,{part:`screen-title`,className:`text-xl sm:text-2xl font-bold tracking-tight mb-2 ${V?`text-white`:`text-slate-900`}`,style:Q,children:t?`You're already registered`:U?`We couldn't submit your abstract`:`We couldn't complete your registration`}),(0,r.jsx)(`p`,{part:`screen-message`,className:`text-sm leading-relaxed mb-7 ${V?`text-zinc-400`:`text-slate-500`}`,children:t?`This email already has a registration for this event. Log in to view or update it.`:N}),(0,r.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,r.jsx)(`button`,{part:`button button-primary`,onClick:()=>{P(null),t&&(S(null),i(`attendee`))},style:{background:`linear-gradient(135deg, ${H}, color-mix(in srgb, ${H} 80%, black))`,boxShadow:`0 10px 24px -12px color-mix(in srgb, ${H} 70%, transparent)`},className:`w-full h-12 inline-flex items-center justify-center gap-2 rounded-xl text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.99] cursor-pointer`,children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Ie,{size:16}),` Go to Attendee Login`]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O,{size:16}),` Back to the form`]})}),(0,r.jsx)(`button`,{part:`button button-secondary`,onClick:()=>{P(null),Ce(null),S(null)},className:`w-full h-11 inline-flex items-center justify-center rounded-xl text-sm font-semibold border transition-colors cursor-pointer ${V?`border-zinc-700 text-zinc-300 hover:bg-zinc-800`:`border-slate-200 text-slate-600 bg-white hover:bg-slate-50`}`,children:t?`Register someone else`:U?`Choose another category`:`Choose another ticket`})]})]})})]})})():x?(0,r.jsx)(St,{schema:U?T:x.form_schema,ticketType:x,offers:gt(_,x?.id),theme:e.theme,displayMode:e.displayMode,backgroundStyle:at,isExpanded:u,onToggleExpand:()=>d(!u),onClose:()=>l(!1),onSubmit:Qe,onChange:Xe,initialValues:Se?Se.values:Je,fileAnswers:Se?Se.fileAnswers:J?.file_answers,isDark:V,apiClient:K,storage:q,onError:e.onError,onEvent:e.onEvent,showReviewFields:U,onBack:()=>{We.current&&clearTimeout(We.current),S(null)}}):(0,r.jsxs)(`div`,{part:`page`,className:`flex flex-col ${Z?`w-full flex-1`:`h-full min-h-0`} ${V?`bg-zinc-950 text-white`:`bg-slate-50 text-slate-900`}`,children:[(0,r.jsxs)(`div`,{part:`header`,className:`relative overflow-hidden z-10 shrink-0 text-white`,style:{backgroundColor:H,background:`linear-gradient(135deg, ${H} 0%, color-mix(in srgb, ${H} 76%, black) 100%)`},children:[(0,r.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 opacity-[0.14]`,style:{backgroundImage:`radial-gradient(circle, rgba(255,255,255,0.9) 1px, transparent 1px)`,backgroundSize:`18px 18px`,maskImage:`linear-gradient(to right, transparent, black 30%, black 70%, transparent)`}}),(0,r.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute -top-24 -right-10 h-64 w-64 rounded-full bg-white/15 blur-3xl`}),Re&&(0,r.jsxs)(`div`,{className:`absolute inset-y-0 right-0 flex max-w-[65%] pointer-events-none select-none`,children:[(0,r.jsx)(`img`,{src:Re,alt:``,"aria-hidden":`true`,className:`h-full w-auto object-cover object-right`}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-0 w-2/5`,style:{background:`linear-gradient(to right, color-mix(in srgb, ${H} 80%, black) 0%, transparent 100%)`}})]}),(0,r.jsxs)(`div`,{className:`relative z-[1] max-w-6xl mx-auto w-full px-4 sm:px-6 py-5 sm:py-6 flex justify-between items-center gap-3 min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-3.5 min-w-0`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-2xl bg-white/15 ring-1 ring-inset ring-white/30 flex items-center justify-center shrink-0 shadow-[inset_0_1px_0_rgba(255,255,255,0.25)]`,children:(0,r.jsx)(Ye,{size:20,className:`text-white`})}),(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,r.jsx)(`h2`,{part:`header-title`,className:`text-lg sm:text-2xl font-bold tracking-tight leading-tight break-words`,style:Q,children:lt}),(0,r.jsxs)(`span`,{className:`hidden sm:inline-flex shrink-0 items-center gap-1.5 text-[10px] font-semibold px-2 py-0.5 rounded-full bg-white/15 ring-1 ring-inset ring-white/25 uppercase tracking-wider`,children:[(0,r.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-emerald-300`}),`Official Portal`]})]}),(0,r.jsx)(`p`,{part:`header-subtitle`,className:`text-xs sm:text-sm text-white/80 mt-0.5`,children:U?`Select a category below to submit your abstract`:t===`registration`?`Select a registration type below to begin your application`:`Registration & Profile Management`})]})]}),(0,r.jsx)(`div`,{className:`flex items-center gap-3`,children:e.displayMode===`popup`&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`button`,{onClick:()=>d(!u),title:u?`Minimize`:`Expand`,className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1`,children:u?(0,r.jsx)(Be,{size:18}):(0,r.jsx)(ze,{size:18})}),(0,r.jsx)(`button`,{onClick:()=>l(!1),className:`opacity-80 hover:opacity-100 transition-opacity cursor-pointer p-1`,children:(0,r.jsx)(ct,{size:22})})]})})]})]}),!U&&(0,r.jsx)(`div`,{part:`tabs`,className:`shrink-0 border-b ${V?`border-zinc-800 bg-zinc-900`:`border-slate-200 bg-white`}`,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-3`,children:(0,r.jsx)(`div`,{role:`tablist`,className:`grid grid-cols-2 gap-1 p-1 rounded-xl max-w-md ${V?`bg-zinc-800`:`bg-slate-100`}`,children:[{key:`registration`,label:`Registration Forms`,Icon:I},{key:`attendee`,label:`Attendee Login`,Icon:Ie}].map(({key:e,label:n,Icon:a})=>{let o=t===e;return(0,r.jsxs)(`button`,{part:o?`tab tab-active`:`tab`,role:`tab`,"aria-selected":o,type:`button`,onClick:()=>i(e),className:`inline-flex items-center justify-center gap-1.5 sm:gap-2 py-2 px-2 sm:px-3 text-[13px] sm:text-sm font-semibold rounded-lg transition-all cursor-pointer ${o?V?`bg-zinc-950 shadow-sm`:`bg-white shadow-sm ring-1 ring-slate-200/70`:V?`text-zinc-400 hover:text-zinc-200`:`text-slate-500 hover:text-slate-800`}`,style:o?{color:H}:void 0,children:[(0,r.jsx)(a,{size:15,className:`hidden sm:block shrink-0`}),(0,r.jsx)(`span`,{className:`truncate`,children:n})]},e)})})})}),(U||t===`registration`)&&(0,r.jsx)(`div`,{part:`list`,className:`${Z?`w-full flex-1`:`overflow-y-auto flex-1 min-h-0 overscroll-contain`} relative ${V?`bg-zinc-950`:`bg-slate-50`}`,style:at,children:(0,r.jsx)(`div`,{className:`max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8 space-y-5`,children:U?vt():(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(`div`,{part:`search`,className:`flex flex-col sm:flex-row sm:items-end sm:justify-between gap-3`,children:[(0,r.jsxs)(`div`,{className:`min-w-0`,children:[(0,r.jsx)(`h3`,{part:`list-title`,className:`text-base sm:text-lg font-semibold tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:U?`Choose a submission category`:`Choose your registration type`}),h.length>0&&(0,r.jsx)(`p`,{part:`list-count`,className:`text-xs mt-0.5 ${V?`text-zinc-400`:`text-slate-500`}`,children:dt?`${ft.length} of ${h.length} options`:`${h.length} ${h.length===1?`option`:`options`} available`})]}),(0,r.jsxs)(`div`,{className:`relative w-full sm:w-72`,children:[(0,r.jsx)(`input`,{part:`input search-input`,type:`text`,value:D,onChange:e=>te(e.target.value),placeholder:U?`Search categories…`:`Search registration types…`,"aria-label":`Search`,className:`w-full h-10 pl-9 pr-8 text-sm rounded-xl border transition-all focus:outline-none focus:border-(--vx-accent) focus:ring-4 focus:ring-[color-mix(in_srgb,var(--vx-accent)_15%,transparent)] ${V?`bg-zinc-900 border-zinc-700 text-white placeholder:text-zinc-500`:`bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`}`}),(0,r.jsx)(`div`,{className:`absolute inset-y-0 left-3 flex items-center pointer-events-none ${V?`text-zinc-500`:`text-slate-400`}`,children:(0,r.jsx)(qe,{size:15,className:`block`})}),D&&(0,r.jsx)(`button`,{type:`button`,onClick:()=>te(``),"aria-label":`Clear search`,className:`absolute inset-y-0 right-2.5 flex items-center cursor-pointer ${V?`text-zinc-500 hover:text-zinc-300`:`text-slate-400 hover:text-slate-600`}`,children:(0,r.jsx)(ct,{size:14})})]})]}),!U&&pt.length>0&&h.length>0&&(0,r.jsxs)(`div`,{part:`offers`,className:`rounded-2xl border border-dashed px-4 py-3.5 sm:px-5 ${V?`bg-emerald-950/30 border-emerald-900`:`bg-emerald-50/60 border-emerald-200`}`,children:[(0,r.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold ${V?`text-emerald-300`:`text-emerald-800`}`,children:[(0,r.jsx)(Ze,{size:14,className:`shrink-0`}),(0,r.jsx)(`span`,{children:pt.length===1?`Offer available`:`${pt.length} offers available`})]}),(0,r.jsx)(`div`,{className:`mt-2.5 flex flex-wrap gap-2`,children:pt.map(e=>(0,r.jsxs)(`span`,{part:`offer-chip`,className:`inline-flex items-center gap-2 text-xs font-semibold px-3 py-1.5 rounded-full border ${V?`bg-zinc-900 border-emerald-900 text-emerald-200`:`bg-white border-emerald-200 text-emerald-700`}`,children:[(0,r.jsx)(`span`,{className:`font-mono tracking-wider`,children:e.code}),(0,r.jsx)(`span`,{className:V?`text-zinc-700`:`text-slate-300`,children:`|`}),(0,r.jsx)(`span`,{children:_t(e,h[0]?.currency)}),e.ends_at&&(0,r.jsxs)(`span`,{className:`font-normal ${V?`text-zinc-500`:`text-slate-400`}`,children:[`till `,new Date(e.ends_at).toLocaleDateString()]})]},e.code))}),(0,r.jsx)(`p`,{className:`mt-2 text-[11px] ${V?`text-emerald-500/80`:`text-emerald-700/80`}`,children:`The best offer is applied automatically at checkout — you can swap it for another code there.`})]}),h.length===0?null:ft.length===0?(0,r.jsxs)(`div`,{part:`empty-state`,className:`flex flex-col items-center text-center py-16 px-6 rounded-3xl border border-dashed ${V?`bg-zinc-900/60 border-zinc-800 text-zinc-400`:`bg-white/70 border-slate-300 text-slate-500`}`,children:[(0,r.jsx)(`div`,{className:`w-12 h-12 rounded-2xl flex items-center justify-center mb-4 ${V?`bg-zinc-800`:`bg-slate-100`}`,children:(0,r.jsx)(qe,{size:20})}),(0,r.jsxs)(`p`,{className:`text-base font-semibold ${V?`text-white`:`text-slate-900`}`,children:[`No matches for “`,D.trim(),`”`]}),(0,r.jsx)(`p`,{className:`text-sm mt-1`,children:`Try a different search term.`}),(0,r.jsx)(`button`,{part:`button button-secondary`,onClick:()=>te(``),className:`mt-5 px-4 py-2 rounded-full text-sm font-semibold border cursor-pointer transition-colors ${V?`border-zinc-700 text-zinc-200 hover:bg-zinc-800`:`border-slate-200 bg-white text-slate-700 hover:bg-slate-50`}`,children:`Clear search`})]}):(0,r.jsx)(`div`,{part:`card-grid`,className:Z?`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5`:`space-y-3`,children:ft.map(e=>{let t=e.type||e.name||e.label,n=e.price!==void 0&&e.price!==null&&e.price!==``,i=n&&(Number(e.price)===0||String(e.price).toLowerCase()===`free`),a=(Array.isArray(e.items)?e.items:[]).filter(e=>e?.name).map(t=>t.mode===`optional`&&Number(t.price)>0?`${t.name} (+ ${[e.currency,Number(t.price).toLocaleString()].filter(Boolean).join(` `)})`:t.name),o=U?ye:$e,s=Number(e.price)||0,c=t=>[e.currency,t.toLocaleString()].filter(Boolean).join(` `),l=U||i||!n?null:ht(gt(_,e.id),s);return(0,r.jsxs)(`div`,{part:`card`,role:`button`,tabIndex:0,"aria-label":`Select ${t}`,onClick:()=>S(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),S(e))},className:`group relative flex flex-col rounded-2xl border p-5 sm:p-6 cursor-pointer transition-all duration-300 hover:-translate-y-1 outline-none focus-visible:ring-4 focus-visible:ring-[color-mix(in_srgb,var(--vx-accent)_25%,transparent)] hover:border-[color-mix(in_srgb,var(--vx-accent)_35%,transparent)] ${V?`bg-zinc-900 border-zinc-800 hover:shadow-[0_24px_48px_-24px_rgba(0,0,0,0.8)]`:`bg-white border-slate-200/80 shadow-[0_1px_2px_rgba(15,23,42,0.04)] hover:shadow-[0_24px_48px_-24px_color-mix(in_srgb,var(--vx-accent)_45%,transparent)]`}`,children:[(0,r.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-x-8 top-0 h-[3px] rounded-b-full opacity-0 transition-opacity duration-300 group-hover:opacity-100`,style:{background:`linear-gradient(90deg, transparent, ${H}, transparent)`}}),(0,r.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,r.jsx)(`div`,{className:`w-11 h-11 rounded-xl flex items-center justify-center shrink-0 transition-transform duration-300 group-hover:scale-105`,style:{backgroundColor:`color-mix(in srgb, ${H} 12%, transparent)`,color:H},children:(0,r.jsx)(o,{size:20})}),(e.category||e.seats_left||l)&&(0,r.jsxs)(`div`,{className:`flex flex-wrap justify-end items-center gap-1.5`,children:[l&&(0,r.jsxs)(`span`,{part:`card-offer-badge`,className:`text-[10px] font-semibold px-2.5 py-1 rounded-full flex items-center gap-1 ${V?`bg-emerald-950/60 text-emerald-300`:`bg-emerald-50 text-emerald-700`}`,children:[(0,r.jsx)(Ze,{size:10}),(0,r.jsx)(`span`,{children:_t(l,e.currency)})]}),e.category&&(0,r.jsx)(`span`,{part:`card-category`,className:`text-[10px] font-semibold uppercase tracking-wider px-2.5 py-1 rounded-full ${V?`bg-zinc-800 text-zinc-300`:`bg-slate-100 text-slate-600`}`,children:e.category}),e.seats_left&&(0,r.jsxs)(`span`,{part:`card-seats`,className:`text-[10px] font-semibold px-2.5 py-1 rounded-full flex items-center gap-1 ${V?`bg-amber-950/60 text-amber-300`:`bg-amber-50 text-amber-700`}`,children:[(0,r.jsx)(ue,{size:10}),(0,r.jsx)(`span`,{children:e.seats_left})]})]})]}),(0,r.jsx)(`h3`,{part:`card-title`,className:`mt-4 text-lg font-semibold leading-snug tracking-tight ${V?`text-white`:`text-slate-900`}`,style:Q,children:t}),e.description&&(0,r.jsx)(`p`,{part:`card-description`,className:`mt-1.5 text-sm leading-relaxed line-clamp-2 ${V?`text-zinc-400`:`text-slate-500`}`,children:e.description}),a.length>0&&(0,r.jsx)(`ul`,{part:`card-perks`,className:`mt-4 space-y-2`,children:a.map((e,t)=>(0,r.jsxs)(`li`,{className:`flex items-start gap-2 text-sm`,children:[(0,r.jsx)(`span`,{className:`mt-0.5 w-4 h-4 rounded-full flex items-center justify-center shrink-0`,style:{backgroundColor:`color-mix(in srgb, ${H} 14%, transparent)`,color:H},children:(0,r.jsx)(re,{size:10,strokeWidth:3})}),(0,r.jsx)(`span`,{className:V?`text-zinc-300`:`text-slate-600`,children:e})]},t))}),(0,r.jsx)(`div`,{className:`flex-1`}),(0,r.jsxs)(`div`,{className:`mt-6 pt-5 border-t border-dashed flex items-end justify-between gap-3 ${V?`border-zinc-800`:`border-slate-200`}`,children:[(0,r.jsx)(`div`,{className:`min-w-0`,children:n&&!U?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-wider ${V?`text-zinc-500`:`text-slate-400`}`,children:`Registration fee`}),(0,r.jsxs)(`div`,{className:`flex items-baseline gap-2 flex-wrap`,children:[(0,r.jsx)(`p`,{part:`card-price`,className:`text-2xl font-bold tracking-tight tabular-nums leading-tight`,style:{color:H},children:i?`Free`:c(l?s-l.saving:s)}),l&&(0,r.jsx)(`p`,{part:`card-price-was`,className:`text-sm font-semibold tabular-nums line-through ${V?`text-zinc-500`:`text-slate-400`}`,children:c(s)})]}),l&&(0,r.jsxs)(`p`,{part:`card-offer`,className:`text-[11px] font-semibold mt-0.5 ${V?`text-emerald-400`:`text-emerald-600`}`,children:[`Save `,c(l.saving),` with `,l.code]}),e.tax_info&&(0,r.jsx)(`p`,{part:`card-tax`,className:`text-[11px] mt-0.5 ${V?`text-zinc-500`:`text-slate-400`}`,children:e.tax_info})]}):null}),(0,r.jsxs)(`span`,{part:`button button-primary card-button`,className:`inline-flex shrink-0 items-center gap-2 h-10 pl-4 pr-1.5 rounded-full text-sm font-semibold text-white transition-shadow duration-300 group-hover:shadow-[0_8px_20px_-6px_color-mix(in_srgb,var(--vx-accent)_70%,transparent)]`,style:{backgroundColor:H},children:[U?`Submit`:`Register`,(0,r.jsx)(`span`,{className:`w-7 h-7 rounded-full bg-white/20 flex items-center justify-center transition-transform duration-300 group-hover:translate-x-0.5`,children:(0,r.jsx)(ne,{size:14})})]})]})]},e.id)})})]})})}),!U&&(a||t===`attendee`)&&(0,r.jsx)(`div`,{part:`portal`,className:`${t===`attendee`?`flex`:`hidden`} flex-col ${Z?`w-full flex-1`:`flex-1 overflow-hidden min-h-0`}`,style:{...Z?{}:{overflow:`clip`},...at},onScroll:Z?void 0:e=>{e.currentTarget.scrollTop!==0&&(e.currentTarget.scrollTop=0),e.currentTarget.scrollLeft!==0&&(e.currentTarget.scrollLeft=0)},children:(0,r.jsx)(At,{apiClient:K,baseUrl:e.baseUrl,storage:q,logger:G,primaryColor:H,isDark:V,isWidgetPage:Z,onEvent:e.onEvent,onError:e.onError})})]})})},zt=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
3
|
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-indigo-400:oklch(67.3% .182 276.935);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-fuchsia-950:oklch(29.3% .136 325.661);--color-pink-100:oklch(94.8% .028 342.258);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-\\[10px\\]{inset:10px}.inset-x-8{inset-inline:calc(var(--spacing) * 8)}.inset-y-0{inset-block:0}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.-top-16{top:calc(var(--spacing) * -16)}.-top-24{top:calc(var(--spacing) * -24)}.top-0{top:0}.top-1\\/2{top:50%}.top-1\\/3{top:33.3333%}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-18{top:calc(var(--spacing) * 18)}.-right-10{right:calc(var(--spacing) * -10)}.-right-16{right:calc(var(--spacing) * -16)}.right-0{right:0}.right-1\\/4{right:25%}.right-2\\.5{right:calc(var(--spacing) * 2.5)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-10{bottom:calc(var(--spacing) * -10)}.bottom-5{bottom:calc(var(--spacing) * 5)}.-left-1\\.5{left:calc(var(--spacing) * -1.5)}.-left-20{left:calc(var(--spacing) * -20)}.left-0{left:0}.left-2\\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-5{left:calc(var(--spacing) * 5)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mx-auto{margin-inline:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-1{margin-bottom:var(--spacing)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-7{margin-bottom:calc(var(--spacing) * 7)}.ml-0\\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-1{height:var(--spacing)}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-44{height:calc(var(--spacing) * 44)}.h-64{height:calc(var(--spacing) * 64)}.h-72{height:calc(var(--spacing) * 72)}.h-80{height:calc(var(--spacing) * 80)}.h-\\[3px\\]{height:3px}.h-\\[18px\\]{height:18px}.h-full{height:100%}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-0{min-height:0}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-\\[70vh\\]{min-height:70vh}.min-h-screen{min-height:100vh}.w-1\\.5{width:calc(var(--spacing) * 1.5)}.w-1\\/2{width:50%}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-2\\/5{width:40%}.w-3\\.5{width:calc(var(--spacing) * 3.5)}.w-3\\/4{width:75%}.w-3\\/5{width:60%}.w-4{width:calc(var(--spacing) * 4)}.w-4\\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-52{width:calc(var(--spacing) * 52)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\\[16rem\\]{max-width:16rem}.max-w-\\[60vw\\]{max-width:60vw}.max-w-\\[65\\%\\]{max-width:65%}.max-w-\\[400px\\]{max-width:400px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.min-w-\\[18px\\]{min-width:18px}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-100>:not(:last-child)){border-color:var(--color-slate-100)}:where(.divide-zinc-800>:not(:last-child)){border-color:var(--color-zinc-800)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.rounded-b-full{border-bottom-right-radius:2147483647px;border-bottom-left-radius:2147483647px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-700{border-color:var(--color-emerald-700)}.border-emerald-900{border-color:var(--color-emerald-900)}.border-fuchsia-200{border-color:var(--color-fuchsia-200)}.border-fuchsia-500{border-color:var(--color-fuchsia-500)}.border-fuchsia-600{border-color:var(--color-fuchsia-600)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-200\\/80{border-color:#e5e7ebcc}@supports (color:color-mix(in lab, red, red)){.border-gray-200\\/80{border-color:color-mix(in oklab, var(--color-gray-200) 80%, transparent)}}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-900{border-color:var(--color-gray-900)}.border-pink-100{border-color:var(--color-pink-100)}.border-pink-100\\/90{border-color:#fce7f3e6}@supports (color:color-mix(in lab, red, red)){.border-pink-100\\/90{border-color:color-mix(in oklab, var(--color-pink-100) 90%, transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-700{border-color:var(--color-red-700)}.border-red-900\\/60{border-color:#82181a99}@supports (color:color-mix(in lab, red, red)){.border-red-900\\/60{border-color:color-mix(in oklab, var(--color-red-900) 60%, transparent)}}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab, red, red)){.border-slate-200\\/80{border-color:color-mix(in oklab, var(--color-slate-200) 80%, transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-zinc-600{border-color:var(--color-zinc-600)}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-800{border-color:var(--color-zinc-800)}.bg-\\[\\#fbf7f9\\]{background-color:#fbf7f9}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-950\\/50{background-color:#46190180}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\\/50{background-color:color-mix(in oklab, var(--color-amber-950) 50%, transparent)}}.bg-amber-950\\/60{background-color:#46190199}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\\/60{background-color:color-mix(in oklab, var(--color-amber-950) 60%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\\/60{background-color:#ecfdf599}@supports (color:color-mix(in lab, red, red)){.bg-emerald-50\\/60{background-color:color-mix(in oklab, var(--color-emerald-50) 60%, transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-950\\/30{background-color:#002c224d}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/30{background-color:color-mix(in oklab, var(--color-emerald-950) 30%, transparent)}}.bg-emerald-950\\/50{background-color:#002c2280}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/50{background-color:color-mix(in oklab, var(--color-emerald-950) 50%, transparent)}}.bg-emerald-950\\/60{background-color:#002c2299}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/60{background-color:color-mix(in oklab, var(--color-emerald-950) 60%, transparent)}}.bg-emerald-950\\/70{background-color:#002c22b3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/70{background-color:color-mix(in oklab, var(--color-emerald-950) 70%, transparent)}}.bg-emerald-950\\/95{background-color:#002c22f2}@supports (color:color-mix(in lab, red, red)){.bg-emerald-950\\/95{background-color:color-mix(in oklab, var(--color-emerald-950) 95%, transparent)}}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-fuchsia-600{background-color:var(--color-fuchsia-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-50\\/80{background-color:#f9fafbcc}@supports (color:color-mix(in lab, red, red)){.bg-gray-50\\/80{background-color:color-mix(in oklab, var(--color-gray-50) 80%, transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\\/80{background-color:#fef2f2cc}@supports (color:color-mix(in lab, red, red)){.bg-red-50\\/80{background-color:color-mix(in oklab, var(--color-red-50) 80%, transparent)}}.bg-red-950\\/50{background-color:#46080980}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/50{background-color:color-mix(in oklab, var(--color-red-950) 50%, transparent)}}.bg-red-950\\/60{background-color:#46080999}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/60{background-color:color-mix(in oklab, var(--color-red-950) 60%, transparent)}}.bg-red-950\\/95{background-color:#460809f2}@supports (color:color-mix(in lab, red, red)){.bg-red-950\\/95{background-color:color-mix(in oklab, var(--color-red-950) 95%, transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\\/70{background-color:#f8fafcb3}@supports (color:color-mix(in lab, red, red)){.bg-slate-50\\/70{background-color:color-mix(in oklab, var(--color-slate-50) 70%, transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.bg-white\\/15{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.bg-white\\/20{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.bg-white\\/25{background-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.bg-white\\/25{background-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.bg-white\\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.bg-white\\/70{background-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.bg-white\\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.bg-white\\/85{background-color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.bg-white\\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-white\\/90{background-color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.bg-white\\/95{background-color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.bg-white\\/95{background-color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab, red, red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab, var(--color-zinc-800) 60%, transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab, var(--color-zinc-900) 60%, transparent)}}.bg-zinc-900\\/85{background-color:#18181bd9}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\\/85{background-color:color-mix(in oklab, var(--color-zinc-900) 85%, transparent)}}.bg-zinc-900\\/90{background-color:#18181be6}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\\/90{background-color:color-mix(in oklab, var(--color-zinc-900) 90%, transparent)}}.bg-zinc-900\\/95{background-color:#18181bf2}@supports (color:color-mix(in lab, red, red)){.bg-zinc-900\\/95{background-color:color-mix(in oklab, var(--color-zinc-900) 95%, transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/40{background-color:#09090b66}@supports (color:color-mix(in lab, red, red)){.bg-zinc-950\\/40{background-color:color-mix(in oklab, var(--color-zinc-950) 40%, transparent)}}.bg-zinc-950\\/60{background-color:#09090b99}@supports (color:color-mix(in lab, red, red)){.bg-zinc-950\\/60{background-color:color-mix(in oklab, var(--color-zinc-950) 60%, transparent)}}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-right{object-position:right}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3\\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pr-2\\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3\\.5{padding-right:calc(var(--spacing) * 3.5)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-3\\.5{padding-left:calc(var(--spacing) * 3.5)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[15px\\]{font-size:15px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-500{color:var(--color-amber-500)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-emerald-200{color:var(--color-emerald-200)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-500\\/80{color:#00bb7fcc}@supports (color:color-mix(in lab, red, red)){.text-emerald-500\\/80{color:color-mix(in oklab, var(--color-emerald-500) 80%, transparent)}}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-700\\/80{color:#007956cc}@supports (color:color-mix(in lab, red, red)){.text-emerald-700\\/80{color:color-mix(in oklab, var(--color-emerald-700) 80%, transparent)}}.text-emerald-800{color:var(--color-emerald-800)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-indigo-400{color:var(--color-indigo-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.text-white\\/60{color:#fff9}@supports (color:color-mix(in lab, red, red)){.text-white\\/60{color:color-mix(in oklab, var(--color-white) 60%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.placeholder-zinc-500::placeholder{color:var(--color-zinc-500)}.accent-\\(--vx-accent\\){accent-color:var(--vx-accent)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.opacity-\\[0\\.03\\]{opacity:.03}.opacity-\\[0\\.14\\]{opacity:.14}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_8px_24px_-14px_rgba\\(15\\,23\\,42\\,0\\.18\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 8px 24px -14px var(--tw-shadow-color,#0f172a2e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_12px_32px_-16px_rgba\\(15\\,23\\,42\\,0\\.12\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 12px 32px -16px var(--tw-shadow-color,#0f172a1f);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_24px_48px_-24px_rgba\\(15\\,23\\,42\\,0\\.16\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 24px 48px -24px var(--tw-shadow-color,#0f172a29);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_24px_48px_-24px_rgba\\(15\\,23\\,42\\,0\\.18\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 24px 48px -24px var(--tw-shadow-color,#0f172a2e);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_24px_48px_-24px_rgba\\(15\\,23\\,42\\,0\\.22\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 24px 48px -24px var(--tw-shadow-color,#0f172a38);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_24px_48px_-24px_rgba\\(0\\,0\\,0\\,0\\.8\\)\\]{--tw-shadow:0 24px 48px -24px var(--tw-shadow-color,#000c);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_1px_0_rgba\\(255\\,255\\,255\\,0\\.25\\)\\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff40);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-amber-200{--tw-ring-color:var(--color-amber-200)}.ring-amber-900{--tw-ring-color:var(--color-amber-900)}.ring-emerald-200\\/80{--tw-ring-color:#a4f4cfcc}@supports (color:color-mix(in lab, red, red)){.ring-emerald-200\\/80{--tw-ring-color:color-mix(in oklab, var(--color-emerald-200) 80%, transparent)}}.ring-emerald-900{--tw-ring-color:var(--color-emerald-900)}.ring-red-200\\/80{--tw-ring-color:#ffcacacc}@supports (color:color-mix(in lab, red, red)){.ring-red-200\\/80{--tw-ring-color:color-mix(in oklab, var(--color-red-200) 80%, transparent)}}.ring-red-900{--tw-ring-color:var(--color-red-900)}.ring-slate-200\\/70{--tw-ring-color:#e2e8f0b3}@supports (color:color-mix(in lab, red, red)){.ring-slate-200\\/70{--tw-ring-color:color-mix(in oklab, var(--color-slate-200) 70%, transparent)}}.ring-white\\/25{--tw-ring-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.ring-white\\/25{--tw-ring-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.ring-white\\/30{--tw-ring-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.ring-white\\/30{--tw-ring-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-200{--tw-contrast:contrast(200%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.select-none{-webkit-user-select:none;user-select:none}.ring-inset{--tw-ring-inset:inset}@media (hover:hover){.group-hover\\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\\:translate-x-0\\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:shadow-\\[0_8px_20px_-6px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_70\\%\\,transparent\\)\\]:is(:where(.group):hover *){--tw-shadow:0 8px 20px -6px var(--tw-shadow-color,var(--vx-accent))}@supports (color:color-mix(in lab, red, red)){.group-hover\\:shadow-\\[0_8px_20px_-6px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_70\\%\\,transparent\\)\\]:is(:where(.group):hover *){--tw-shadow:0 8px 20px -6px var(--tw-shadow-color,color-mix(in srgb,var(--vx-accent) 70%,transparent))}}.group-hover\\:shadow-\\[0_8px_20px_-6px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_70\\%\\,transparent\\)\\]:is(:where(.group):hover *){box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.placeholder\\:text-slate-400::placeholder{color:var(--color-slate-400)}.placeholder\\:text-zinc-500::placeholder{color:var(--color-zinc-500)}.placeholder\\:normal-case::placeholder{text-transform:none}@media (hover:hover){.hover\\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_35\\%\\,transparent\\)\\]:hover{border-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_35\\%\\,transparent\\)\\]:hover{border-color:color-mix(in srgb,var(--vx-accent) 35%,transparent)}}.hover\\:border-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_45\\%\\,transparent\\)\\]:hover{border-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:border-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_45\\%\\,transparent\\)\\]:hover{border-color:color-mix(in srgb,var(--vx-accent) 45%,transparent)}}.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:border-gray-500:hover{border-color:var(--color-gray-500)}.hover\\:border-red-200:hover{border-color:var(--color-red-200)}.hover\\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\\:border-zinc-500:hover{border-color:var(--color-zinc-500)}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-black:hover{background-color:var(--color-black)}.hover\\:bg-emerald-50:hover{background-color:var(--color-emerald-50)}.hover\\:bg-emerald-950\\/40:hover{background-color:#002c2266}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-emerald-950\\/40:hover{background-color:color-mix(in oklab, var(--color-emerald-950) 40%, transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\\:bg-red-900\\/60:hover{background-color:#82181a99}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-red-900\\/60:hover{background-color:color-mix(in oklab, var(--color-red-900) 60%, transparent)}}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:bg-white\\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/50:hover{background-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.hover\\:bg-zinc-700:hover{background-color:var(--color-zinc-700)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/60:hover{background-color:#27272a99}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-zinc-800\\/60:hover{background-color:color-mix(in oklab, var(--color-zinc-800) 60%, transparent)}}.hover\\:text-gray-900:hover{color:var(--color-gray-900)}.hover\\:text-red-300:hover{color:var(--color-red-300)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-red-600:hover{color:var(--color-red-600)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}.hover\\:text-slate-900:hover{color:var(--color-slate-900)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-90:hover{opacity:.9}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-\\[0_24px_48px_-24px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_45\\%\\,transparent\\)\\]:hover{--tw-shadow:0 24px 48px -24px var(--tw-shadow-color,var(--vx-accent))}@supports (color:color-mix(in lab, red, red)){.hover\\:shadow-\\[0_24px_48px_-24px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_45\\%\\,transparent\\)\\]:hover{--tw-shadow:0 24px 48px -24px var(--tw-shadow-color,color-mix(in srgb,var(--vx-accent) 45%,transparent))}}.hover\\:shadow-\\[0_24px_48px_-24px_color-mix\\(in_srgb\\,var\\(--vx-accent\\)_45\\%\\,transparent\\)\\]:hover{box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-\\[0_24px_48px_-24px_rgba\\(0\\,0\\,0\\,0\\.8\\)\\]:hover{--tw-shadow:0 24px 48px -24px var(--tw-shadow-color,#000c);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:border-\\(--vx-accent\\):focus{border-color:var(--vx-accent)}.focus\\:border-gray-500:focus{border-color:var(--color-gray-500)}.focus\\:border-zinc-500:focus{border-color:var(--color-zinc-500)}.focus\\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_15\\%\\,transparent\\)\\]:focus{--tw-ring-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_15\\%\\,transparent\\)\\]:focus{--tw-ring-color:color-mix(in srgb,var(--vx-accent) 15%,transparent)}}.focus\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_20\\%\\,transparent\\)\\]:focus{--tw-ring-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.focus\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_20\\%\\,transparent\\)\\]:focus{--tw-ring-color:color-mix(in srgb,var(--vx-accent) 20%,transparent)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:bg-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_8\\%\\,transparent\\)\\]:focus-visible{background-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:bg-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_8\\%\\,transparent\\)\\]:focus-visible{background-color:color-mix(in srgb,var(--vx-accent) 8%,transparent)}}.focus-visible\\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_25\\%\\,transparent\\)\\]:focus-visible{--tw-ring-color:var(--vx-accent)}@supports (color:color-mix(in lab, red, red)){.focus-visible\\:ring-\\[color-mix\\(in_srgb\\,var\\(--vx-accent\\)_25\\%\\,transparent\\)\\]:focus-visible{--tw-ring-color:color-mix(in srgb,var(--vx-accent) 25%,transparent)}}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:scale-\\[0\\.99\\]:active{scale:.99}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-40:disabled{opacity:.4}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}.disabled\\:opacity-70:disabled{opacity:.7}@media (hover:hover){.disabled\\:hover\\:brightness-100:disabled:hover{--tw-brightness:brightness(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-spin{animation:var(--animate-spin)}}@media (width>=40rem){.sm\\:block{display:block}.sm\\:inline{display:inline}.sm\\:inline-block{display:inline-block}.sm\\:inline-flex{display:inline-flex}.sm\\:h-14{height:calc(var(--spacing) * 14)}.sm\\:w-14{width:calc(var(--spacing) * 14)}.sm\\:w-72{width:calc(var(--spacing) * 72)}.sm\\:w-auto{width:auto}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:items-end{align-items:flex-end}.sm\\:justify-between{justify-content:space-between}.sm\\:gap-2{gap:calc(var(--spacing) * 2)}.sm\\:gap-4{gap:calc(var(--spacing) * 4)}.sm\\:p-5{padding:calc(var(--spacing) * 5)}.sm\\:p-6{padding:calc(var(--spacing) * 6)}.sm\\:p-7{padding:calc(var(--spacing) * 7)}.sm\\:p-9{padding:calc(var(--spacing) * 9)}.sm\\:p-10{padding:calc(var(--spacing) * 10)}.sm\\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\\:px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.sm\\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\\:px-7{padding-inline:calc(var(--spacing) * 7)}.sm\\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\\:py-6{padding-block:calc(var(--spacing) * 6)}.sm\\:py-8{padding-block:calc(var(--spacing) * 8)}.sm\\:py-10{padding-block:calc(var(--spacing) * 10)}.sm\\:pt-6{padding-top:calc(var(--spacing) * 6)}.sm\\:pt-7{padding-top:calc(var(--spacing) * 7)}.sm\\:pb-6{padding-bottom:calc(var(--spacing) * 6)}.sm\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media (width>=48rem){.md\\:block{display:block}.md\\:w-1\\/2{width:50%}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\\:border-fuchsia-800{border-color:var(--color-fuchsia-800)}.dark\\:border-zinc-700{border-color:var(--color-zinc-700)}.dark\\:border-zinc-800{border-color:var(--color-zinc-800)}.dark\\:bg-fuchsia-950\\/80{background-color:#4b004fcc}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-fuchsia-950\\/80{background-color:color-mix(in oklab, var(--color-fuchsia-950) 80%, transparent)}}.dark\\:bg-white{background-color:var(--color-white)}.dark\\:bg-zinc-800{background-color:var(--color-zinc-800)}.dark\\:bg-zinc-900{background-color:var(--color-zinc-900)}.dark\\:text-fuchsia-300{color:var(--color-fuchsia-300)}.dark\\:text-gray-900{color:var(--color-gray-900)}.dark\\:text-white{color:var(--color-white)}.dark\\:text-zinc-200{color:var(--color-zinc-200)}.dark\\:text-zinc-300{color:var(--color-zinc-300)}.dark\\:text-zinc-400{color:var(--color-zinc-400)}@media (hover:hover){.dark\\:hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.dark\\:hover\\:bg-zinc-900\\/50:hover{background-color:#18181b80}@supports (color:color-mix(in lab, red, red)){.dark\\:hover\\:bg-zinc-900\\/50:hover{background-color:color-mix(in oklab, var(--color-zinc-900) 50%, transparent)}}.dark\\:hover\\:text-white:hover{color:var(--color-white)}}}}:host{all:initial;font-family:inherit}.vx-skeleton{background-image:linear-gradient(90deg,currentColor 0% 50%,currentColor 100%)}@supports (color:color-mix(in lab, red, red)){.vx-skeleton{background-image:linear-gradient(90deg, color-mix(in srgb, currentColor 7%, transparent) 0%, color-mix(in srgb, currentColor 14%, transparent) 50%, color-mix(in srgb, currentColor 7%, transparent) 100%)}}.vx-skeleton{background-size:200% 100%;animation:1.4s ease-in-out infinite vx-skeleton-sweep}@keyframes vx-skeleton-sweep{0%{background-position:100% 0}to{background-position:-100% 0}}.vx-progress-bar{animation:1.3s ease-in-out infinite vx-progress-slide}@keyframes vx-progress-slide{0%{transform:translate(-100%)}to{transform:translate(250%)}}@media (prefers-reduced-motion:reduce){.vx-skeleton,.vx-progress-bar{animation:none}}@supports (appearance:base-select){select[part~=select]{appearance:base-select}select[part~=select]::picker(select){appearance:base-select}select[part~=select]::picker-icon{display:none}select[part~=select]::picker(select){border:1px solid;margin-block:6px;padding:6px}@supports (color:color-mix(in lab, red, red)){select[part~=select]::picker(select){border:1px solid color-mix(in srgb, currentColor 12%, transparent)}}select[part~=select]::picker(select){background-color:inherit;color:inherit;opacity:0;max-height:min(320px,60vh);transition:opacity .15s ease, translate .15s ease, display .15s allow-discrete, overlay .15s allow-discrete;border-radius:14px;translate:0 -4px;box-shadow:0 18px 40px -12px #0f172a38,0 4px 12px -4px #0f172a14}select[part~=select]:open::picker(select){opacity:1;translate:0}@starting-style{select[part~=select]:open::picker(select){opacity:0;translate:0 -4px}}select[part~=select] option{color:inherit;cursor:pointer;background-color:#0000;border-radius:10px;align-items:center;gap:8px;padding:10px 12px;font-size:14px;font-weight:500;display:flex}select[part~=select] option:hover,select[part~=select] option:focus-visible{background-color:var(--vx-accent,#2563eb)}@supports (color:color-mix(in lab, red, red)){select[part~=select] option:hover,select[part~=select] option:focus-visible{background-color:color-mix(in srgb, var(--vx-accent,#2563eb) 8%, transparent)}}select[part~=select] option:hover,select[part~=select] option:focus-visible{outline:none}select[part~=select] option:checked{background-color:var(--vx-accent,#2563eb)}@supports (color:color-mix(in lab, red, red)){select[part~=select] option:checked{background-color:color-mix(in srgb, var(--vx-accent,#2563eb) 12%, transparent)}}select[part~=select] option:checked{color:var(--vx-accent,#2563eb);font-weight:600}select[part~=select] option::checkmark{color:var(--vx-accent,#2563eb);order:1;margin-inline-start:auto}select[part~=select] option[value=""],select[part~=select] option[value=""]:checked{color:currentColor;background-color:#0000}@supports (color:color-mix(in lab, red, red)){select[part~=select] option[value=""],select[part~=select] option[value=""]:checked{color:color-mix(in srgb, currentColor 55%, transparent)}}select[part~=select] option[value=""],select[part~=select] option[value=""]:checked{font-weight:500}select[part~=select] option[value=""]::checkmark{display:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}`,Bt=`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif`,Vt=({children:e,useShadow:t=!0,inheritFont:a=!1})=>{let o=(0,n.useRef)(null),[s,c]=(0,n.useState)(null);return(0,n.useLayoutEffect)(()=>{if(typeof document>`u`||!o.current||!t)return;let e=o.current.shadowRoot,n=null;if(e)n=e.querySelector(`.voxket-widget-root`);else{o.current.setAttribute(`data-voxket-shadow-host`,``),o.current.style.cssText=`width: 100%; min-height: 100%; display: block; position: relative;`,e=o.current.attachShadow({mode:`open`});let t=document.createElement(`style`);t.innerText=`:host, *, *::before, *::after, ::backdrop {
|
|
4
4
|
--tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate-x: initial;
|
|
5
5
|
--tw-rotate-y: initial; --tw-rotate-z: initial; --tw-skew-x: initial;
|