@bigz-app/booking-widget 0.1.24 → 0.2.0

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/index.cjs CHANGED
@@ -591,6 +591,13 @@ const StyleProvider = ({ config, children, }) => {
591
591
  direction: ltr;
592
592
  isolation: isolate;
593
593
  }
594
+ .print-only {
595
+ display: none;
596
+ }
597
+ .print-hidden {
598
+ display: block;
599
+ }
600
+ @media print {
594
601
  `;
595
602
  // Inject CSS reset styles
596
603
  React__default.useEffect(() => {
@@ -936,6 +943,26 @@ const createRequestBody = (config, additionalData) => {
936
943
  organizationId: config.organizationId,
937
944
  };
938
945
  };
946
+ // Helper function to detect Stripe return parameters in URL
947
+ const detectStripeReturn = () => {
948
+ if (typeof window === "undefined") {
949
+ return null;
950
+ }
951
+ const urlParams = new URLSearchParams(window.location.search);
952
+ // Check for Stripe return parameters
953
+ const paymentIntent = urlParams.get("payment_intent");
954
+ const paymentIntentClientSecret = urlParams.get("payment_intent_client_secret");
955
+ const redirectStatus = urlParams.get("redirect_status");
956
+ if (paymentIntent && paymentIntentClientSecret && redirectStatus) {
957
+ return {
958
+ isStripeReturn: true,
959
+ paymentIntent,
960
+ paymentIntentClientSecret,
961
+ redirectStatus,
962
+ };
963
+ }
964
+ return null;
965
+ };
939
966
 
940
967
  var isCheckBoxInput = (element) => element.type === 'checkbox';
941
968
 
@@ -6689,15 +6716,8 @@ ZodNullable.create;
6689
6716
 
6690
6717
  function n(){return n=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t]);}return e},n.apply(this,arguments)}const r=["children","options"],o=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,n)=>(e[n.toLowerCase()]=n,e),{class:"className",for:"htmlFor"}),a={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},c=["style","script","pre"],i=["src","href","data","formAction","srcDoc","action"],u=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,l=/mailto:/i,s=/\n{2,}$/,f=/^(\s*>[\s\S]*?)(?=\n\n|$)/,_=/^ *> ?/gm,d=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,p=/^ {2,}\n/,y=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,h=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,g=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,m=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,k=/^(?:\n *)*\n/,x=/\r\n?/g,v=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,q=/^\[\^([^\]]+)]/,b=/\f/g,S=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,$=/^\s*?\[(x|\s)\]/,z=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,E=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,A=/^([^\n]+)\n *(=|-){3,} *\n/,R=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,B=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,L=/^<!--[\s\S]*?(?:-->)/,O=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,j=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,C=/^\{.*\}$/,I=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,T=/^<([^ >]+@[^ >]+)>/,M=/^<([^ >]+:\/[^ >]+)>/,w=/-([a-z])?/gi,D=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,F=/^[^\n]+(?: \n|\n{2,})/,P=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Z=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,N=/^\[([^\]]*)\] ?\[([^\]]*)\]/,G=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,U=/\t/g,V=/(^ *\||\| *$)/g,H=/^ *:-+: *$/,Q=/^ *:-+ *$/,W=/^ *-+: *$/,J="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",K=RegExp(`^([*_])\\1${J}\\1\\1(?!\\1)`),X=RegExp(`^([*_])${J}\\1(?!\\1)`),Y=RegExp(`^(==)${J}\\1`),ee=RegExp(`^(~~)${J}\\1`),ne=/^(:[a-zA-Z0-9-_]+:)/,re=/^\\([^0-9A-Za-z\s])/,te=/\\([^0-9A-Za-z\s])/g,oe=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,ae=/^\n+/,ce=/^([ \t]*)/,ie=/(?:^|\n)( *)$/,ue="(?:\\d+\\.)",le="(?:[*+-])";function se(e){return "( *)("+(1===e?ue:le)+") +"}const fe=se(1),_e=se(2);function de(e){return RegExp("^"+(1===e?fe:_e))}const pe=de(1),ye=de(2);function he(e){return RegExp("^"+(1===e?fe:_e)+"[^\\n]*(?:\\n(?!\\1"+(1===e?ue:le)+" )[^\\n]*)*(\\n|$)","gm")}const ge=he(1),me=he(2);function ke(e){const n=1===e?ue:le;return RegExp("^( *)("+n+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+n+" (?!"+n+" ))\\n*|\\s*\\n*$)")}const xe=ke(1),ve=ke(2);function qe(e,n){const r=1===n,t=r?xe:ve,o=r?ge:me,a=r?pe:ye;return {t:e=>a.test(e),o:je(function(e,n){const r=ie.exec(n.prevCapture);return r&&(n.list||!n.inline&&!n.simple)?t.exec(e=r[1]+e):null}),i:1,u(e,n,t){const c=r?+e[2]:void 0,i=e[0].replace(s,"\n").match(o);let u=false;return {items:i.map(function(e,r){const o=a.exec(e)[0].length,c=RegExp("^ {1,"+o+"}","gm"),l=e.replace(c,"").replace(a,""),s=r===i.length-1,f=-1!==l.indexOf("\n\n")||s&&u;u=f;const _=t.inline,d=t.list;let p;t.list=true,f?(t.inline=false,p=$e(l)+"\n\n"):(t.inline=true,p=$e(l));const y=n(p,t);return t.inline=_,t.list=d,y}),ordered:r,start:c}},l:(n,r,t)=>e(n.ordered?"ol":"ul",{key:t.key,start:"20"===n.type?n.start:void 0},n.items.map(function(n,o){return e("li",{key:o},r(n,t))}))}}const be=RegExp("^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),Se=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $e(e){let n=e.length;for(;n>0&&e[n-1]<=" ";)n--;return e.slice(0,n)}function ze(e,n){return e.startsWith(n)}function Ee(e,n,r){if(Array.isArray(r)){for(let n=0;n<r.length;n++)if(ze(e,r[n]))return true;return false}return r(e,n)}function Ae(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Re(e){return W.test(e)?"right":H.test(e)?"center":Q.test(e)?"left":null}function Be(e,n,r,t){const o=r.inTable;r.inTable=true;let a=[[]],c="";function i(){if(!c)return;const e=a[a.length-1];e.push.apply(e,n(c,r)),c="";}return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,n,r)=>{"|"===e.trim()&&(i(),t)?0!==n&&n!==r.length-1&&a.push([]):c+=e;}),i(),r.inTable=o,a}function Le(e,n,r){r.inline=true;const t=e[2]?e[2].replace(V,"").split("|").map(Re):[],o=e[3]?function(e,n,r){return e.trim().split("\n").map(function(e){return Be(e,n,r,true)})}(e[3],n,r):[],a=Be(e[1],n,r,!!o.length);return r.inline=false,o.length?{align:t,cells:o,header:a,type:"25"}:{children:a,type:"21"}}function Oe(e,n){return null==e.align[n]?{}:{textAlign:e.align[n]}}function je(e){return e.inline=1,e}function Ce(e){return je(function(n,r){return r.inline?e.exec(n):null})}function Ie(e){return je(function(n,r){return r.inline||r.simple?e.exec(n):null})}function Te(e){return function(n,r){return r.inline||r.simple?null:e.exec(n)}}function Me(e){return je(function(n){return e.exec(n)})}const we=/(javascript|vbscript|data(?!:image)):/i;function De(e){try{const n=decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"");if(we.test(n))return null}catch(e){return null}return e}function Fe(e){return e?e.replace(te,"$1"):e}function Pe(e,n,r){const t=r.inline||false,o=r.simple||false;r.inline=true,r.simple=true;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ze(e,n,r){const t=r.inline||false,o=r.simple||false;r.inline=false,r.simple=true;const a=e(n,r);return r.inline=t,r.simple=o,a}function Ne(e,n,r){const t=r.inline||false;r.inline=false;const o=e(n,r);return r.inline=t,o}const Ge=(e,n,r)=>({children:Pe(n,e[2],r)});function Ue(){return {}}function Ve(){return null}function He(...e){return e.filter(Boolean).join(" ")}function Qe(e,n,r){let t=e;const o=n.split(".");for(;o.length&&(t=t[o[0]],void 0!==t);)o.shift();return t||r}function We(r="",t={}){t.overrides=t.overrides||{},t.namedCodesToUnicode=t.namedCodesToUnicode?n({},a,t.namedCodesToUnicode):a;const s=t.slugify||Ae,V=t.sanitizer||De,H=t.createElement||React__default__namespace.createElement,Q=[f,h,g,t.enforceAtxHeadings?E:z,A,D,xe,ve],W=[...Q,F,R,L,j];function J(e,r,...o){const a=Qe(t.overrides,e+".props",{});return H(function(e,n){const r=Qe(n,e);return r?"function"==typeof r||"object"==typeof r&&"render"in r?r:Qe(n,e+".component",e):e}(e,t.overrides),n({},r,a,{className:He(null==r?void 0:r.className,a.className)||void 0}),...o)}function te(e){e=e.replace(S,"");let n=false;t.forceInline?n=true:t.forceBlock||(n=false===G.test(e));const r=_e(fe(n?e:$e(e).replace(ae,"")+"\n\n",{inline:n}));for(;"string"==typeof r[r.length-1]&&!r[r.length-1].trim();)r.pop();if(null===t.wrapper)return r;const o=t.wrapper||(n?"span":"div");let a;if(r.length>1||t.forceWrapper)a=r;else {if(1===r.length)return a=r[0],"string"==typeof a?J("span",{key:"outer"},a):a;a=null;}return H(o,{key:"outer"},a)}function ie(e,n){if(!n||!n.trim())return null;const r=n.match(u);return r?r.reduce(function(n,r){const t=r.indexOf("=");if(-1!==t){const a=function(e){return -1!==e.indexOf("-")&&null===e.match(O)&&(e=e.replace(w,function(e,n){return n.toUpperCase()})),e}(r.slice(0,t)).trim(),c=function(e){const n=e[0];return ('"'===n||"'"===n)&&e.length>=2&&e[e.length-1]===n?e.slice(1,-1):e}(r.slice(t+1).trim()),u=o[a]||a;if("ref"===u)return n;const l=n[u]=function(e,n,r,t){return "style"===n?function(e){const n=[];let r="",t=false,o=false,a="";if(!e)return n;for(let c=0;c<e.length;c++){const i=e[c];if('"'!==i&&"'"!==i||t||(o?i===a&&(o=false,a=""):(o=true,a=i)),"("===i&&r.endsWith("url")?t=true:")"===i&&t&&(t=false),";"!==i||o||t)r+=i;else {const e=r.trim();if(e){const r=e.indexOf(":");if(r>0){const t=e.slice(0,r).trim(),o=e.slice(r+1).trim();n.push([t,o]);}}r="";}}const c=r.trim();if(c){const e=c.indexOf(":");if(e>0){const r=c.slice(0,e).trim(),t=c.slice(e+1).trim();n.push([r,t]);}}return n}(r).reduce(function(n,[r,o]){return n[r.replace(/(-[a-z])/g,e=>e[1].toUpperCase())]=t(o,e,r),n},{}):-1!==i.indexOf(n)?t(Fe(r),e,n):(r.match(C)&&(r=Fe(r.slice(1,r.length-1))),"true"===r||"false"!==r&&r)}(e,a,c,V);"string"==typeof l&&(R.test(l)||j.test(l))&&(n[u]=te(l.trim()));}else "style"!==r&&(n[o[r]||r]=true);return n},{}):null}const ue=[],le={},se={0:{t:[">"],o:Te(f),i:1,u(e,n,r){const[,t,o]=e[0].replace(_,"").match(d);return {alert:t,children:n(o,r)}},l(e,n,r){const t={key:r.key};return e.alert&&(t.className="markdown-alert-"+s(e.alert.toLowerCase(),Ae),e.children.unshift({attrs:{},children:[{type:"27",text:e.alert}],noInnerParse:true,type:"11",tag:"header"})),J("blockquote",t,n(e.children,r))}},1:{o:Me(p),i:1,u:Ue,l:(e,n,r)=>J("br",{key:r.key})},2:{t:e=>{const n=e[0];return "-"===n||"*"===n||"_"===n},o:Te(y),i:1,u:Ue,l:(e,n,r)=>J("hr",{key:r.key})},3:{t:[" "],o:Te(g),i:0,u:e=>({lang:void 0,text:Fe($e(e[0].replace(/^ {4}/gm,"")))}),l:(e,r,t)=>J("pre",{key:t.key},J("code",n({},e.attrs,{className:e.lang?"lang-"+e.lang:""}),e.text))},4:{t:["```","~~~"],o:Te(h),i:0,u:e=>({attrs:ie("code",e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{t:["`"],o:Ie(m),i:3,u:e=>({text:Fe(e[2])}),l:(e,n,r)=>J("code",{key:r.key},e.text)},6:{t:["[^"],o:Te(v),i:0,u:e=>(ue.push({footnote:e[2],identifier:e[1]}),{}),l:Ve},7:{t:["[^"],o:Ce(q),i:1,u:e=>({target:"#"+s(e[1],Ae),text:e[1]}),l:(e,n,r)=>J("a",{key:r.key,href:V(e.target,"a","href")},J("sup",{key:r.key},e.text))},8:{t:["[ ]","[x]"],o:Ce($),i:1,u:e=>({completed:"x"===e[1].toLowerCase()}),l:(e,n,r)=>J("input",{checked:e.completed,key:r.key,readOnly:true,type:"checkbox"})},9:{t:["#"],o:Te(t.enforceAtxHeadings?E:z),i:1,u:(e,n,r)=>({children:Pe(n,e[2],r),id:s(e[2],Ae),level:e[1].length}),l:(e,n,r)=>J("h"+e.level,{id:e.id,key:r.key},n(e.children,r))},10:{o:Te(A),i:0,u:(e,n,r)=>({children:Pe(n,e[1],r),level:"="===e[2]?1:2,type:"9"})},11:{t:["<"],o:Me(R),i:1,u(e,n,r){const[,t]=e[3].match(ce),o=RegExp("^"+t,"gm"),a=e[3].replace(o,""),i=(u=a,W.some(e=>e.test(u))?Ne:Pe);var u;const l=e[1].toLowerCase(),s=-1!==c.indexOf(l),f=(s?l:e[1]).trim(),_={attrs:ie(f,e[2]),noInnerParse:s,tag:f};if(r.inAnchor=r.inAnchor||"a"===l,s)_.text=e[3];else {const e=r.inHTML;r.inHTML=true,_.children=i(n,a,r),r.inHTML=e;}return r.inAnchor=false,_},l:(e,r,t)=>J(e.tag,n({key:t.key},e.attrs),e.text||(e.children?r(e.children,t):""))},13:{t:["<"],o:Me(j),i:1,u(e){const n=e[1].trim();return {attrs:ie(n,e[2]||""),tag:n}},l:(e,r,t)=>J(e.tag,n({},e.attrs,{key:t.key}))},12:{t:["\x3c!--"],o:Me(L),i:1,u:()=>({}),l:Ve},14:{t:["!["],o:Ie(Se),i:1,u:e=>({alt:Fe(e[1]),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>J("img",{key:r.key,alt:e.alt||void 0,title:e.title||void 0,src:V(e.target,"img","src")})},15:{t:["["],o:Ce(be),i:3,u:(e,n,r)=>({children:Ze(n,e[1],r),target:Fe(e[2]),title:Fe(e[3])}),l:(e,n,r)=>J("a",{key:r.key,href:V(e.target,"a","href"),title:e.title},n(e.children,r))},16:{t:["<"],o:Ce(M),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],type:"15"})},17:{t:(e,n)=>!n.inAnchor&&!t.disableAutoLink&&(ze(e,"http://")||ze(e,"https://")),o:Ce(I),i:0,u:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},18:{t:["<"],o:Ce(T),i:0,u(e){let n=e[1],r=e[1];return l.test(r)||(r="mailto:"+r),{children:[{text:n.replace("mailto:",""),type:"27"}],target:r,type:"15"}}},20:qe(J,1),33:qe(J,2),19:{o:Te(k),i:3,u:Ue,l:()=>"\n"},21:{o:je(function(e,n){if(n.inline||n.simple||n.inHTML&&-1===e.indexOf("\n\n")&&-1===n.prevCapture.indexOf("\n\n"))return null;let r="";e.split("\n").every(e=>(e+="\n",!Q.some(n=>n.test(e))&&(r+=e,!!e.trim())));const t=$e(r);return ""===t?null:[r,,t]}),i:3,u:Ge,l:(e,n,r)=>J("p",{key:r.key},n(e.children,r))},22:{t:["["],o:Ce(P),i:0,u:e=>(le[e[1]]={target:e[2],title:e[4]},{}),l:Ve},23:{t:["!["],o:Ie(Z),i:0,u:e=>({alt:e[1]?Fe(e[1]):void 0,ref:e[2]}),l:(e,n,r)=>le[e.ref]?J("img",{key:r.key,alt:e.alt,src:V(le[e.ref].target,"img","src"),title:le[e.ref].title}):null},24:{t:e=>"["===e[0]&&-1===e.indexOf("]("),o:Ce(N),i:0,u:(e,n,r)=>({children:n(e[1],r),fallbackChildren:e[0],ref:e[2]}),l:(e,n,r)=>le[e.ref]?J("a",{key:r.key,href:V(le[e.ref].target,"a","href"),title:le[e.ref].title},n(e.children,r)):J("span",{key:r.key},e.fallbackChildren)},25:{t:["|"],o:Te(D),i:1,u:Le,l(e,n,r){const t=e;return J("table",{key:r.key},J("thead",null,J("tr",null,t.header.map(function(e,o){return J("th",{key:o,style:Oe(t,o)},n(e,r))}))),J("tbody",null,t.cells.map(function(e,o){return J("tr",{key:o},e.map(function(e,o){return J("td",{key:o,style:Oe(t,o)},n(e,r))}))})))}},27:{o:je(function(e,n){let r;return ze(e,":")&&(r=ne.exec(e)),r||oe.exec(e)}),i:4,u(e){const n=e[0];return {text:-1===n.indexOf("&")?n:n.replace(B,(e,n)=>t.namedCodesToUnicode[n]||e)}},l:e=>e.text},28:{t:["**","__"],o:Ie(K),i:2,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>J("strong",{key:r.key},n(e.children,r))},29:{t:e=>{const n=e[0];return ("*"===n||"_"===n)&&e[1]!==n},o:Ie(X),i:3,u:(e,n,r)=>({children:n(e[2],r)}),l:(e,n,r)=>J("em",{key:r.key},n(e.children,r))},30:{t:["\\"],o:Ie(re),i:1,u:e=>({text:e[1],type:"27"})},31:{t:["=="],o:Ie(Y),i:3,u:Ge,l:(e,n,r)=>J("mark",{key:r.key},n(e.children,r))},32:{t:["~~"],o:Ie(ee),i:3,u:Ge,l:(e,n,r)=>J("del",{key:r.key},n(e.children,r))}};true===t.disableParsingRawHTML&&(delete se[11],delete se[13]);const fe=function(e){var n=Object.keys(e);function r(t,o){var a=[];if(o.prevCapture=o.prevCapture||"",t.trim())for(;t;)for(var c=0;c<n.length;){var i=n[c],u=e[i];if(!u.t||Ee(t,o,u.t)){var l=u.o(t,o);if(l&&l[0]){t=t.substring(l[0].length);var s=u.u(l,r,o);o.prevCapture+=l[0],s.type||(s.type=i),a.push(s);break}c++;}else c++;}return o.prevCapture="",a}return n.sort(function(n,r){return e[n].i-e[r].i||(n<r?-1:1)}),function(e,n){return r(function(e){return e.replace(x,"\n").replace(b,"").replace(U," ")}(e),n)}}(se),_e=(de=function(e,n){return function(r,t,o){const a=e[r.type].l;return n?n(()=>a(r,t,o),r,t,o):a(r,t,o)}}(se,t.renderRule),function e(n,r={}){if(Array.isArray(n)){const t=r.key,o=[];let a=false;for(let t=0;t<n.length;t++){r.key=t;const c=e(n[t],r),i="string"==typeof c;i&&a?o[o.length-1]+=c:null!==c&&o.push(c),a=i;}return r.key=t,o}return de(n,e,r)});var de;const pe=te(r);return ue.length?J("div",null,pe,J("footer",{key:"footer"},ue.map(function(e){return J("div",{id:s(e.identifier,Ae),key:e.identifier},e.identifier,_e(fe(e.footnote,{inline:true})))}))):pe}var Markdown = n=>{let{children:t="",options:o}=n,a=function(e,n){if(null==e)return {};var r,t,o={},a=Object.keys(e);for(t=0;t<a.length;t++)n.indexOf(r=a[t])>=0||(o[r]=e[r]);return o}(n,r);return React__default__namespace.cloneElement(We(t,o),a)};
6691
6718
 
6692
- // Helper function to preprocess markdown for underline support
6693
- const preprocessMarkdown$1 = (markdown) => {
6694
- // Convert double underscores to HTML underline tags for React Markdown
6695
- return markdown.replace(/__([^_]+)__/g, "<u>$1</u>");
6696
- };
6697
- const IconCheck$1 = ({ size = 16, color = "#10b981" }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }));
6698
- const IconWave$1 = ({ size = 20, color = "#0ea5e9" }) => (jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntime.jsx("path", { d: "M2 18c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), jsxRuntime.jsx("path", { d: "M2 12c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), jsxRuntime.jsx("path", { d: "M2 6c2-2 6-2 8 0s6 2 8 0 6-2 8 0" })] }));
6699
6719
  // Portal component that renders dialog at document body level
6700
- function DialogPortal({ children, isOpen }) {
6720
+ function DialogPortal({ children, isOpen, zIndex = 999999, }) {
6701
6721
  const [portalRoot, setPortalRoot] = React__default.useState(null);
6702
6722
  React__default.useEffect(() => {
6703
6723
  if (!isOpen) {
@@ -6729,9 +6749,12 @@ function DialogPortal({ children, isOpen }) {
6729
6749
  "--bw-border-radius-small",
6730
6750
  "--bw-spacing",
6731
6751
  "--bw-spacing-large",
6752
+ "--bw-spacing-small",
6732
6753
  "--bw-font-family",
6733
6754
  "--bw-font-size",
6734
6755
  "--bw-font-size-large",
6756
+ "--bw-font-size-small",
6757
+ "--bw-font-size-xl",
6735
6758
  "--bw-shadow-lg",
6736
6759
  "--bw-shadow-md",
6737
6760
  "--bw-highlight-muted",
@@ -6759,7 +6782,7 @@ function DialogPortal({ children, isOpen }) {
6759
6782
  left: 0;
6760
6783
  width: 100%;
6761
6784
  height: 100%;
6762
- z-index: 999999;
6785
+ z-index: ${zIndex};
6763
6786
  pointer-events: none;
6764
6787
  ${cssProperties}
6765
6788
  `;
@@ -6780,7 +6803,7 @@ function DialogPortal({ children, isOpen }) {
6780
6803
  }
6781
6804
  document.body.style.overflow = "";
6782
6805
  };
6783
- }, [isOpen]);
6806
+ }, [isOpen, zIndex]);
6784
6807
  if (!isOpen || !portalRoot)
6785
6808
  return null;
6786
6809
  return ReactDOM.createPortal(jsxRuntime.jsx("div", { style: {
@@ -6789,7 +6812,8 @@ function DialogPortal({ children, isOpen }) {
6789
6812
  height: "100%",
6790
6813
  }, children: children }), portalRoot);
6791
6814
  }
6792
- function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect, }) {
6815
+ // Shared dialog wrapper component
6816
+ function DialogWrapper({ isOpen, onClose, children, maxWidth = "700px", className, zIndex = 999999, }) {
6793
6817
  // Get fallback styles from the widget container for cases where CSS variables aren't available
6794
6818
  const [fallbackStyles, setFallbackStyles] = React__default.useState({});
6795
6819
  React__default.useEffect(() => {
@@ -6826,15 +6850,10 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
6826
6850
  return () => {
6827
6851
  document.removeEventListener("keydown", handleEscape);
6828
6852
  };
6829
- }, [isOpen]);
6830
- if (!isOpen || !eventType)
6853
+ }, [isOpen, onClose]);
6854
+ if (!isOpen)
6831
6855
  return null;
6832
- const isAvailable = eventType.hasAvailableInstances;
6833
- const handleBookingClick = () => {
6834
- onEventTypeSelect(eventType);
6835
- onClose();
6836
- };
6837
- return (jsxRuntime.jsx(DialogPortal, { isOpen: isOpen, children: jsxRuntime.jsx("div", { style: fallbackStyles, children: jsxRuntime.jsx("div", { style: {
6856
+ return (jsxRuntime.jsx(DialogPortal, { isOpen: isOpen, zIndex: zIndex, children: jsxRuntime.jsx("div", { style: fallbackStyles, className: className, children: jsxRuntime.jsx("div", { style: {
6838
6857
  position: "fixed",
6839
6858
  top: 0,
6840
6859
  left: 0,
@@ -6847,11 +6866,11 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
6847
6866
  alignItems: "center",
6848
6867
  justifyContent: "center",
6849
6868
  padding: "var(--bw-spacing)",
6850
- zIndex: 999999,
6869
+ zIndex: zIndex,
6851
6870
  }, onClick: onClose, children: jsxRuntime.jsxs("div", { style: {
6852
6871
  backgroundColor: "var(--bw-surface-color)",
6853
6872
  borderRadius: "var(--bw-border-radius)",
6854
- maxWidth: "700px",
6873
+ maxWidth,
6855
6874
  width: "100%",
6856
6875
  maxHeight: "90vh",
6857
6876
  overflow: "auto",
@@ -6879,181 +6898,199 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
6879
6898
  e.currentTarget.style.backgroundColor = "var(--bw-border-color)";
6880
6899
  }, onMouseLeave: (e) => {
6881
6900
  e.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
6882
- }, children: "\u00D7" }), jsxRuntime.jsxs("div", { style: { padding: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("div", { style: {
6883
- marginBottom: "24px",
6884
- padding: "16px",
6885
- backgroundColor: "var(--bw-background-color)",
6886
- borderRadius: "var(--bw-border-radius)",
6887
- border: `1px solid var(--bw-border-color)`,
6888
- }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { style: {
6889
- fontSize: "14px",
6890
- fontWeight: "600",
6891
- color: "var(--bw-highlight-color)",
6892
- marginBottom: "8px",
6893
- fontFamily: "var(--bw-font-family)",
6894
- }, children: eventType.category.name }), jsxRuntime.jsx("h2", { style: {
6895
- fontSize: "28px",
6896
- fontWeight: "700",
6897
- color: "var(--bw-text-color)",
6898
- marginBottom: "16px",
6899
- lineHeight: "1.3",
6900
- fontFamily: "var(--bw-font-family)",
6901
- margin: "0 0 16px 0",
6902
- }, children: eventType.name })] }), eventType.highlights && eventType.highlights.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: jsxRuntime.jsx("div", { style: { marginBottom: "24px" }, children: jsxRuntime.jsx("ul", { style: {
6903
- listStyle: "none",
6904
- padding: "0",
6905
- margin: "0",
6906
- display: "flex",
6907
- flexDirection: "column",
6908
- gap: "3px",
6909
- }, children: eventType.highlights
6910
- .filter((highlight) => highlight.trim())
6911
- .map((highlight, index) => (jsxRuntime.jsxs("li", { style: {
6912
- display: "flex",
6913
- alignItems: "flex-start",
6914
- gap: "10px",
6915
- fontFamily: "var(--bw-font-family)",
6916
- fontSize: "16px",
6917
- lineHeight: "1.6",
6918
- color: "var(--bw-text-color)",
6919
- }, children: [jsxRuntime.jsx("div", { style: { marginTop: "4px", flexShrink: 0 }, children: jsxRuntime.jsx(IconCheck$1, { size: 16, color: "var(--bw-success-color)" }) }), jsxRuntime.jsx("span", { children: highlight.trim() })] }, index))) }) }) }))] }), eventType.description && (jsxRuntime.jsxs("div", { style: {
6920
- marginBottom: "24px",
6921
- color: "var(--bw-text-muted)",
6922
- fontSize: "16px",
6923
- lineHeight: "1.6",
6901
+ }, children: "\u00D7" }), children] }) }) }) }));
6902
+ }
6903
+
6904
+ // Helper function to preprocess markdown for underline support
6905
+ const preprocessMarkdown$1 = (markdown) => {
6906
+ // Convert double underscores to HTML underline tags for React Markdown
6907
+ return markdown.replace(/__([^_]+)__/g, "<u>$1</u>");
6908
+ };
6909
+ const IconCheck$1 = ({ size = 16, color = "#10b981" }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }));
6910
+ const IconWave$1 = ({ size = 20, color = "#0ea5e9" }) => (jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [jsxRuntime.jsx("path", { d: "M2 18c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), jsxRuntime.jsx("path", { d: "M2 12c2-2 6-2 8 0s6 2 8 0 6-2 8 0" }), jsxRuntime.jsx("path", { d: "M2 6c2-2 6-2 8 0s6 2 8 0 6-2 8 0" })] }));
6911
+ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect, }) {
6912
+ if (!isOpen || !eventType)
6913
+ return null;
6914
+ const isAvailable = eventType.hasAvailableInstances;
6915
+ const handleBookingClick = () => {
6916
+ onEventTypeSelect(eventType);
6917
+ onClose();
6918
+ };
6919
+ return (jsxRuntime.jsx(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: jsxRuntime.jsxs("div", { style: { padding: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("div", { style: {
6920
+ marginBottom: "24px",
6921
+ padding: "16px",
6922
+ backgroundColor: "var(--bw-background-color)",
6923
+ borderRadius: "var(--bw-border-radius)",
6924
+ border: `1px solid var(--bw-border-color)`,
6925
+ }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { style: {
6926
+ fontSize: "14px",
6927
+ fontWeight: "600",
6928
+ color: "var(--bw-highlight-color)",
6929
+ marginBottom: "8px",
6930
+ fontFamily: "var(--bw-font-family)",
6931
+ }, children: eventType.category.name }), jsxRuntime.jsx("h2", { style: {
6932
+ fontSize: "28px",
6933
+ fontWeight: "700",
6934
+ color: "var(--bw-text-color)",
6935
+ marginBottom: "16px",
6936
+ lineHeight: "1.3",
6924
6937
  fontFamily: "var(--bw-font-family)",
6925
- padding: "0px 20px",
6926
- }, children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: {
6927
- __html: `
6928
- .bw-markdown-content p {
6929
- margin: 0 0 12px 0 !important;
6930
- color: var(--bw-text-muted) !important;
6931
- font-family: var(--bw-font-family) !important;
6932
- line-height: 1.6 !important;
6933
- }
6934
- .bw-markdown-content p:last-child {
6935
- margin-bottom: 0 !important;
6936
- }
6937
- .bw-markdown-content h2 {
6938
- font-size: 20px !important;
6939
- font-weight: 700 !important;
6940
- color: var(--bw-text-color) !important;
6941
- margin: 20px 0 8px 0 !important;
6942
- line-height: 1.3 !important;
6943
- display: block !important;
6944
- }
6945
- .bw-markdown-content h3 {
6946
- font-size: 18px !important;
6947
- font-weight: 600 !important;
6948
- color: var(--bw-text-color) !important;
6949
- margin: 16px 0 8px 0 !important;
6950
- line-height: 1.3 !important;
6951
- display: block !important;
6952
- }
6953
- .bw-markdown-content strong {
6954
- font-weight: 700 !important;
6955
- color: var(--bw-text-color) !important;
6956
- }
6957
- .bw-markdown-content em {
6958
- font-style: italic !important;
6959
- }
6960
- .bw-markdown-content u {
6961
- text-decoration: underline !important;
6962
- }
6963
- .bw-markdown-content ul {
6964
- margin: 12px 0 !important;
6965
- padding-left: 24px !important;
6966
- list-style-type: disc !important;
6967
- display: block !important;
6968
- }
6969
- .bw-markdown-content ol {
6970
- margin: 12px 0 !important;
6971
- padding-left: 24px !important;
6972
- list-style-type: decimal !important;
6973
- display: block !important;
6974
- }
6975
- .bw-markdown-content li {
6976
- margin-bottom: 4px !important;
6977
- display: list-item !important;
6978
- color: var(--bw-text-muted) !important;
6979
- font-family: var(--bw-font-family) !important;
6980
- line-height: 1.6 !important;
6981
- }
6982
- .bw-markdown-content blockquote {
6983
- margin: 12px 0 !important;
6984
- padding-left: 16px !important;
6985
- border-left: 3px solid var(--bw-border-color) !important;
6986
- font-style: italic !important;
6987
- color: var(--bw-text-muted) !important;
6988
- display: block !important;
6989
- }
6990
- .bw-markdown-content a {
6991
- color: var(--bw-highlight-color) !important;
6992
- text-decoration: underline !important;
6993
- }
6994
- .bw-markdown-content a:hover {
6995
- text-decoration: none !important;
6996
- }
6997
- `,
6998
- } }), jsxRuntime.jsx("div", { className: "bw-markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), jsxRuntime.jsxs("div", { style: {
6938
+ margin: "0 0 16px 0",
6939
+ }, children: eventType.name })] }), eventType.highlights && eventType.highlights.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: jsxRuntime.jsx("div", { style: { marginBottom: "24px" }, children: jsxRuntime.jsx("ul", { style: {
6940
+ listStyle: "none",
6941
+ padding: "0",
6942
+ margin: "0",
6999
6943
  display: "flex",
7000
- justifyContent: "space-between",
7001
- alignItems: "center",
7002
- marginTop: "32px",
7003
- padding: "20px",
7004
- backgroundColor: "var(--bw-background-color)",
7005
- borderRadius: "var(--bw-border-radius)",
7006
- border: `1px solid var(--bw-border-color)`,
7007
- }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
7008
- fontWeight: "700",
7009
- color: "var(--bw-text-color)",
7010
- fontFamily: "var(--bw-font-family)",
7011
- textAlign: "left",
7012
- }, children: eventType.groupedDurations && jsxRuntime.jsx("span", { children: eventType.groupedDurations }) }), jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
7013
- fontSize: "clamp(1.72rem, 4vw, 32px)",
7014
- fontWeight: "700",
7015
- color: "var(--bw-text-color)",
7016
- fontFamily: "var(--bw-font-family)",
7017
- textAlign: "right",
7018
- }, children: jsxRuntime.jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (jsxRuntime.jsxs("button", { onClick: handleBookingClick, style: {
7019
- backgroundColor: "var(--bw-highlight-color)",
7020
- color: "white",
7021
- padding: "14px 28px",
7022
- border: "none",
7023
- borderRadius: "var(--bw-border-radius)",
7024
- fontSize: "16px",
7025
- fontWeight: "600",
7026
- fontFamily: "var(--bw-font-family)",
7027
- display: "flex",
7028
- alignItems: "center",
7029
- gap: "8px",
7030
- cursor: "pointer",
7031
- transition: "all 0.2s ease",
7032
- }, onMouseEnter: (e) => {
7033
- e.currentTarget.style.opacity = "0.9";
7034
- e.currentTarget.style.transform = "translateY(-1px)";
7035
- }, onMouseLeave: (e) => {
7036
- e.currentTarget.style.opacity = "1";
7037
- e.currentTarget.style.transform = "translateY(0)";
7038
- }, children: [jsxRuntime.jsx(IconWave$1, { size: 20, color: "white" }), "Jetzt buchen"] }))] })] }), !isAvailable && (jsxRuntime.jsx("div", { style: {
7039
- position: "absolute",
7040
- inset: 0,
7041
- backgroundColor: "rgba(0, 0, 0, 0.3)",
7042
- backdropFilter: "blur(2px)",
6944
+ flexDirection: "column",
6945
+ gap: "3px",
6946
+ }, children: eventType.highlights
6947
+ .filter((highlight) => highlight.trim())
6948
+ .map((highlight, index) => (jsxRuntime.jsxs("li", { style: {
6949
+ display: "flex",
6950
+ alignItems: "flex-start",
6951
+ gap: "10px",
6952
+ fontFamily: "var(--bw-font-family)",
6953
+ fontSize: "16px",
6954
+ lineHeight: "1.6",
6955
+ color: "var(--bw-text-color)",
6956
+ }, children: [jsxRuntime.jsx("div", { style: { marginTop: "4px", flexShrink: 0 }, children: jsxRuntime.jsx(IconCheck$1, { size: 16, color: "var(--bw-success-color)" }) }), jsxRuntime.jsx("span", { children: highlight.trim() })] }, index))) }) }) }))] }), eventType.description && (jsxRuntime.jsxs("div", { style: {
6957
+ marginBottom: "24px",
6958
+ color: "var(--bw-text-muted)",
6959
+ fontSize: "16px",
6960
+ lineHeight: "1.6",
6961
+ fontFamily: "var(--bw-font-family)",
6962
+ padding: "0px 20px",
6963
+ }, children: [jsxRuntime.jsx("style", { dangerouslySetInnerHTML: {
6964
+ __html: `
6965
+ .bw-markdown-content p {
6966
+ margin: 0 0 12px 0 !important;
6967
+ color: var(--bw-text-muted) !important;
6968
+ font-family: var(--bw-font-family) !important;
6969
+ line-height: 1.6 !important;
6970
+ }
6971
+ .bw-markdown-content p:last-child {
6972
+ margin-bottom: 0 !important;
6973
+ }
6974
+ .bw-markdown-content h2 {
6975
+ font-size: 20px !important;
6976
+ font-weight: 700 !important;
6977
+ color: var(--bw-text-color) !important;
6978
+ margin: 20px 0 8px 0 !important;
6979
+ line-height: 1.3 !important;
6980
+ display: block !important;
6981
+ }
6982
+ .bw-markdown-content h3 {
6983
+ font-size: 18px !important;
6984
+ font-weight: 600 !important;
6985
+ color: var(--bw-text-color) !important;
6986
+ margin: 16px 0 8px 0 !important;
6987
+ line-height: 1.3 !important;
6988
+ display: block !important;
6989
+ }
6990
+ .bw-markdown-content strong {
6991
+ font-weight: 700 !important;
6992
+ color: var(--bw-text-color) !important;
6993
+ }
6994
+ .bw-markdown-content em {
6995
+ font-style: italic !important;
6996
+ }
6997
+ .bw-markdown-content u {
6998
+ text-decoration: underline !important;
6999
+ }
7000
+ .bw-markdown-content ul {
7001
+ margin: 12px 0 !important;
7002
+ padding-left: 24px !important;
7003
+ list-style-type: disc !important;
7004
+ display: block !important;
7005
+ }
7006
+ .bw-markdown-content ol {
7007
+ margin: 12px 0 !important;
7008
+ padding-left: 24px !important;
7009
+ list-style-type: decimal !important;
7010
+ display: block !important;
7011
+ }
7012
+ .bw-markdown-content li {
7013
+ margin-bottom: 4px !important;
7014
+ display: list-item !important;
7015
+ color: var(--bw-text-muted) !important;
7016
+ font-family: var(--bw-font-family) !important;
7017
+ line-height: 1.6 !important;
7018
+ }
7019
+ .bw-markdown-content blockquote {
7020
+ margin: 12px 0 !important;
7021
+ padding-left: 16px !important;
7022
+ border-left: 3px solid var(--bw-border-color) !important;
7023
+ font-style: italic !important;
7024
+ color: var(--bw-text-muted) !important;
7025
+ display: block !important;
7026
+ }
7027
+ .bw-markdown-content a {
7028
+ color: var(--bw-highlight-color) !important;
7029
+ text-decoration: underline !important;
7030
+ }
7031
+ .bw-markdown-content a:hover {
7032
+ text-decoration: none !important;
7033
+ }
7034
+ `,
7035
+ } }), jsxRuntime.jsx("div", { className: "bw-markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), jsxRuntime.jsxs("div", { style: {
7036
+ display: "flex",
7037
+ justifyContent: "space-between",
7038
+ alignItems: "center",
7039
+ marginTop: "32px",
7040
+ padding: "20px",
7041
+ backgroundColor: "var(--bw-background-color)",
7042
+ borderRadius: "var(--bw-border-radius)",
7043
+ border: `1px solid var(--bw-border-color)`,
7044
+ }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
7045
+ fontWeight: "700",
7046
+ color: "var(--bw-text-color)",
7047
+ fontFamily: "var(--bw-font-family)",
7048
+ textAlign: "left",
7049
+ }, children: eventType.groupedDurations && jsxRuntime.jsx("span", { children: eventType.groupedDurations }) }), jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
7050
+ fontSize: "clamp(1.72rem, 4vw, 32px)",
7051
+ fontWeight: "700",
7052
+ color: "var(--bw-text-color)",
7053
+ fontFamily: "var(--bw-font-family)",
7054
+ textAlign: "right",
7055
+ }, children: jsxRuntime.jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (jsxRuntime.jsxs("button", { onClick: handleBookingClick, style: {
7056
+ backgroundColor: "var(--bw-highlight-color)",
7057
+ color: "white",
7058
+ padding: "14px 28px",
7059
+ border: "none",
7060
+ borderRadius: "var(--bw-border-radius)",
7061
+ fontSize: "16px",
7062
+ fontWeight: "600",
7063
+ fontFamily: "var(--bw-font-family)",
7043
7064
  display: "flex",
7044
7065
  alignItems: "center",
7045
- justifyContent: "center",
7046
- borderRadius: "var(--bw-border-radius)",
7047
- }, children: jsxRuntime.jsx("div", { style: {
7048
- backgroundColor: "rgba(255, 255, 255, 0.9)",
7049
- padding: "16px 32px",
7050
- borderRadius: "var(--bw-border-radius)",
7051
- color: "var(--bw-text-color)",
7052
- fontWeight: "600",
7053
- fontSize: "18px",
7054
- fontFamily: "var(--bw-font-family)",
7055
- boxShadow: "var(--bw-shadow-md)",
7056
- }, children: "Ausgebucht" }) }))] }) }) }) }));
7066
+ gap: "8px",
7067
+ cursor: "pointer",
7068
+ transition: "all 0.2s ease",
7069
+ }, onMouseEnter: (e) => {
7070
+ e.currentTarget.style.opacity = "0.9";
7071
+ e.currentTarget.style.transform = "translateY(-1px)";
7072
+ }, onMouseLeave: (e) => {
7073
+ e.currentTarget.style.opacity = "1";
7074
+ e.currentTarget.style.transform = "translateY(0)";
7075
+ }, children: [jsxRuntime.jsx(IconWave$1, { size: 20, color: "white" }), "Jetzt buchen"] }))] }), !isAvailable && (jsxRuntime.jsx("div", { style: {
7076
+ position: "absolute",
7077
+ inset: 0,
7078
+ backgroundColor: "rgba(0, 0, 0, 0.3)",
7079
+ backdropFilter: "blur(2px)",
7080
+ display: "flex",
7081
+ alignItems: "center",
7082
+ justifyContent: "center",
7083
+ borderRadius: "var(--bw-border-radius)",
7084
+ }, children: jsxRuntime.jsx("div", { style: {
7085
+ backgroundColor: "rgba(255, 255, 255, 0.9)",
7086
+ padding: "16px 32px",
7087
+ borderRadius: "var(--bw-border-radius)",
7088
+ color: "var(--bw-text-color)",
7089
+ fontWeight: "600",
7090
+ fontSize: "18px",
7091
+ fontFamily: "var(--bw-font-family)",
7092
+ boxShadow: "var(--bw-shadow-md)",
7093
+ }, children: "Ausgebucht" }) }))] }) }));
7057
7094
  }
7058
7095
 
7059
7096
  // Carousel navigation icons
@@ -7105,7 +7142,7 @@ const ImageCarousel = ({ images, eventName }) => {
7105
7142
  if (images.length === 0) {
7106
7143
  return jsxRuntime.jsx(EventImagePlaceholder, {});
7107
7144
  }
7108
- return (jsxRuntime.jsxs("div", { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" }, children: [jsxRuntime.jsx("div", { style: {
7145
+ return (jsxRuntime.jsxs("div", { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden", borderRadius: "inherit" }, children: [jsxRuntime.jsx("div", { style: {
7109
7146
  display: "flex",
7110
7147
  width: `${images.length * 100}%`,
7111
7148
  height: "100%",
@@ -7117,6 +7154,7 @@ const ImageCarousel = ({ images, eventName }) => {
7117
7154
  flexShrink: 0,
7118
7155
  overflow: "hidden",
7119
7156
  position: "relative",
7157
+ borderRadius: "inherit"
7120
7158
  }, children: jsxRuntime.jsx("img", { src: image, alt: `${eventName} - Bild ${index + 1}`, style: {
7121
7159
  width: "100%",
7122
7160
  height: "100%",
@@ -7125,6 +7163,7 @@ const ImageCarousel = ({ images, eventName }) => {
7125
7163
  position: "absolute",
7126
7164
  top: 0,
7127
7165
  left: 0,
7166
+ borderRadius: "inherit"
7128
7167
  } }) }, index))) }), images.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { onClick: prevImage, disabled: isTransitioning, style: {
7129
7168
  position: "absolute",
7130
7169
  left: "12px",
@@ -7601,6 +7640,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
7601
7640
  backgroundColor: "var(--bw-surface-color)",
7602
7641
  border: `1px solid var(--bw-border-color)`,
7603
7642
  borderRadius: "var(--bw-border-radius)",
7643
+ overflow: "hidden",
7604
7644
  transition: "all 0.3s ease",
7605
7645
  cursor: isAvailable ? "pointer" : "not-allowed",
7606
7646
  opacity: isAvailable ? 1 : 0.6,
@@ -9105,7 +9145,7 @@ const spinner = (borderColor) => (jsxRuntime.jsx("div", { style: {
9105
9145
  borderRadius: "50%",
9106
9146
  } }) }));
9107
9147
  // Inner component that uses the Stripe hooks
9108
- function PaymentFormInner({ config, eventDetails, formData, totalAmount, discountCode, onSuccess, onError, systemConfig, clientSecret, }) {
9148
+ function PaymentFormInner({ config, eventDetails, formData, totalAmount, discountCode, onSuccess, onError, }) {
9109
9149
  const stripe = reactStripe_umdExports.useStripe();
9110
9150
  const elements = reactStripe_umdExports.useElements();
9111
9151
  const [isLoading, setIsLoading] = React__default.useState(false);
@@ -9131,26 +9171,12 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, discoun
9131
9171
  return;
9132
9172
  }
9133
9173
  // First, confirm the payment with Stripe
9174
+ // Build return URL for Stripe redirect
9175
+ const baseUrl = window !== undefined ? window.location.href : `${config.bookingSystemUrl}/booking-success`;
9176
+ const returnUrl = new URL(baseUrl);
9134
9177
  const confirmParams = {
9135
- return_url: "https://bigz.surfschule-zingst.de/booking/success",
9178
+ return_url: returnUrl.toString(),
9136
9179
  };
9137
- // Ensure return_url is properly formatted and doesn't contain fragment identifiers
9138
- try {
9139
- const url = new URL(confirmParams.return_url);
9140
- // Remove any fragment identifiers that might cause issues
9141
- url.hash = "";
9142
- confirmParams.return_url = url.toString();
9143
- }
9144
- catch (e) {
9145
- console.warn("[PAYMENT_FORM] Invalid return_url, using fallback:", confirmParams.return_url);
9146
- // Fallback to current origin if URL parsing fails
9147
- confirmParams.return_url = window.location.origin + window.location.pathname;
9148
- }
9149
- console.log("[PAYMENT_FORM] Confirming payment with params:", {
9150
- paymentIntentId: clientSecret.split("_secret_")[0],
9151
- return_url: confirmParams.return_url,
9152
- redirect: "if_required",
9153
- });
9154
9180
  const { error, paymentIntent } = await stripe.confirmPayment({
9155
9181
  elements,
9156
9182
  confirmParams,
@@ -9168,91 +9194,15 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, discoun
9168
9194
  setPaymentError(error.message || "Zahlungsfehler");
9169
9195
  }
9170
9196
  else {
9171
- setPaymentError("Ein unerwarteter Fehler ist aufgetreten.");
9197
+ setPaymentError("Ein unerwarteter Fehler ist aufgetreten. Bitte versuche es nochmal.");
9172
9198
  }
9173
9199
  return;
9174
9200
  }
9175
9201
  // Payment succeeded, now create the booking
9176
9202
  if (paymentIntent && paymentIntent.status === "succeeded") {
9177
- // Check if we have system configuration
9178
- if (!systemConfig) {
9179
- throw new Error("System-Konfiguration nicht verfügbar. Bitte lade die Seite neu.");
9180
- }
9181
- // Determine which endpoint to use based on system mode
9182
- const isConnectMode = systemConfig.systemMode === "connect";
9183
- const endpoint = isConnectMode
9184
- ? "/booking/create-from-payment"
9185
- : "/booking-proxy/create-booking";
9186
- // Calculate if this is a deposit payment
9187
- const fullAmount = eventDetails.price * formData.participants.filter((p) => p.name.trim()).length;
9188
- const isDepositPayment = eventDetails.deposit > 0;
9189
- // Build request body based on mode
9190
- const requestData = {
9191
- // Payment info
9192
- paymentIntentId: paymentIntent.id,
9193
- paymentMethod: "card",
9194
- paymentStatus: isDepositPayment ? "deposit_paid" : "paid",
9195
- totalAmount,
9196
- depositAmount: isDepositPayment ? totalAmount : undefined,
9197
- fullAmount: fullAmount,
9198
- // Customer info
9199
- customerEmail: formData.customerEmail,
9200
- customerName: formData.customerName,
9201
- customerPhone: formData.customerPhone,
9202
- // Booking info
9203
- participants: formData.participants.filter((p) => p.name.trim()),
9204
- eventInstanceId: config.eventInstanceId || eventDetails.id,
9205
- organizationId: config.organizationId, // Ensure organization ID is always included
9206
- discountCode: discountCode?.code,
9207
- notes: "",
9208
- };
9209
- // Add mode-specific fields
9210
- if (isConnectMode) {
9211
- Object.assign(requestData, {
9212
- source: "connect",
9213
- stripeAccountType: "connect",
9214
- });
9215
- }
9216
- else {
9217
- // ApiKey mode - include required proxy fields
9218
- Object.assign(requestData, {
9219
- bookingSystemApiUrl: config.apiBaseUrl,
9220
- // apiKey would be added here if required
9221
- });
9222
- }
9223
- console.log(`[PAYMENT_FORM] Attempting booking creation via ${endpoint}`, {
9224
- mode: isConnectMode ? "connect" : "apikey",
9225
- paymentIntentId: paymentIntent.id,
9226
- eventInstanceId: requestData.eventInstanceId,
9227
- organizationId: requestData.organizationId,
9228
- participantCount: requestData.participants.length,
9229
- });
9230
- const bookingResponse = await fetch(getApiUrl(config.apiBaseUrl, endpoint), {
9231
- method: "POST",
9232
- headers: createApiHeaders(config),
9233
- body: JSON.stringify(createRequestBody(config, requestData)),
9234
- });
9235
- const bookingData = await bookingResponse.json();
9236
- if (!bookingResponse.ok) {
9237
- console.error(`[PAYMENT_FORM] Booking creation failed:`, {
9238
- status: bookingResponse.status,
9239
- error: bookingData.error,
9240
- details: bookingData.details,
9241
- paymentIntentId: paymentIntent.id,
9242
- });
9243
- throw new Error(bookingData.error || "Fehler beim Erstellen der Buchung");
9244
- }
9245
- console.log(`[PAYMENT_FORM] Booking created successfully:`, {
9246
- bookingId: bookingData.booking?.id,
9247
- orderId: bookingData.order?.id,
9248
- paymentIntentId: paymentIntent.id,
9249
- });
9250
9203
  // Booking created successfully
9251
9204
  onSuccess({
9252
- booking: bookingData.booking,
9253
- payment: "succeeded",
9254
9205
  paymentIntent: paymentIntent,
9255
- formData: formData,
9256
9206
  });
9257
9207
  }
9258
9208
  else {
@@ -9355,11 +9305,6 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
9355
9305
  setIsCreatingPaymentIntent(true);
9356
9306
  setPaymentError(null);
9357
9307
  try {
9358
- // Determine endpoint based on system mode
9359
- const isConnectMode = systemConfig.systemMode === "connect";
9360
- const endpoint = isConnectMode
9361
- ? "/booking/create-payment-intent"
9362
- : "/booking-proxy/create-payment-intent";
9363
9308
  // Build request data with validation
9364
9309
  const requestData = {
9365
9310
  eventInstanceId: config.eventInstanceId || eventDetails.id,
@@ -9368,7 +9313,10 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
9368
9313
  currency: "eur",
9369
9314
  participants: formData.participants.filter((p) => p.name?.trim()),
9370
9315
  discountCode: discountCode?.code,
9316
+ customerName: formData.customerName?.trim(),
9371
9317
  customerEmail: formData.customerEmail?.trim(),
9318
+ customerPhone: formData.customerPhone?.trim(),
9319
+ comment: formData.comment?.trim(),
9372
9320
  };
9373
9321
  // Validate required fields
9374
9322
  if (!requestData.eventInstanceId) {
@@ -9386,34 +9334,13 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
9386
9334
  if (!requestData.customerEmail) {
9387
9335
  throw new Error("Customer email is required");
9388
9336
  }
9389
- console.log("[PAYMENT_FORM] Creating payment intent:", {
9390
- endpoint,
9391
- mode: isConnectMode ? "connect" : "apikey",
9392
- amount: requestData.amount,
9393
- currency: requestData.currency,
9394
- participantCount: requestData.participants.length,
9395
- organizationId: requestData.organizationId,
9396
- eventInstanceId: requestData.eventInstanceId,
9397
- });
9398
- // Add mode-specific fields
9399
- if (!isConnectMode) {
9400
- // ApiKey mode needs additional fields
9401
- Object.assign(requestData, {
9402
- bookingSystemApiUrl: config.apiBaseUrl,
9403
- // apiKey would be added here if required
9404
- });
9405
- }
9406
- const response = await fetch(getApiUrl(config.apiBaseUrl, endpoint), {
9337
+ const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-payment-intent"), {
9407
9338
  method: "POST",
9408
9339
  headers: createApiHeaders(config),
9409
9340
  body: JSON.stringify(createRequestBody(config, requestData)),
9410
9341
  });
9411
9342
  const data = await response.json();
9412
9343
  if (response.ok) {
9413
- console.log("[PAYMENT_FORM] Payment intent created successfully:", {
9414
- hasClientSecret: !!data.clientSecret,
9415
- clientSecretPrefix: `${data.clientSecret?.substring(0, 20)}...`,
9416
- });
9417
9344
  setClientSecret(data.clientSecret);
9418
9345
  }
9419
9346
  else {
@@ -9569,6 +9496,7 @@ function Sidebar({ isOpen, onClose, title, children, width = "400px" }) {
9569
9496
  position: "absolute",
9570
9497
  inset: 0,
9571
9498
  backgroundColor: "rgba(0, 0, 0, 0.5)",
9499
+ backdropFilter: "blur(10px)",
9572
9500
  opacity: isAnimating ? 1 : 0,
9573
9501
  transition: "opacity 0.25s ease-out",
9574
9502
  }, onClick: onClose }), jsxRuntime.jsxs("div", { style: {
@@ -9915,11 +9843,11 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
9915
9843
  display: "flex",
9916
9844
  alignItems: "center",
9917
9845
  gap: "4px",
9918
- }, children: [jsxRuntime.jsx(IconMoney, { size: 20, color: "var(--bw-highlight-color)" }), " Preis:"] }), jsxRuntime.jsxs("span", { style: {
9846
+ }, children: [jsxRuntime.jsx(IconCalendar, { size: 20, color: "var(--bw-highlight-color)" }), " Uhrzeit:"] }), jsxRuntime.jsx("span", { style: {
9919
9847
  color: "var(--bw-text-color)",
9920
9848
  fontWeight: "500",
9921
9849
  fontFamily: "var(--bw-font-family)",
9922
- }, children: [formatCurrency(eventDetails.price), " pro Person"] })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxRuntime.jsxs("span", { style: {
9850
+ }, children: formatTime(eventDetails.startTime, "Europe/Berlin", "de") })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxRuntime.jsxs("span", { style: {
9923
9851
  color: "var(--bw-text-muted)",
9924
9852
  fontFamily: "var(--bw-font-family)",
9925
9853
  display: "flex",
@@ -9929,7 +9857,17 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
9929
9857
  color: "var(--bw-text-color)",
9930
9858
  fontWeight: "500",
9931
9859
  fontFamily: "var(--bw-font-family)",
9932
- }, children: [eventDetails.durationDays, " Tag", eventDetails.durationDays > 1 ? "e" : ""] })] })] })] }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("form", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("div", { style: {
9860
+ }, children: [eventDetails.durationDays, " Tag", eventDetails.durationDays > 1 ? "e" : ""] })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxRuntime.jsxs("span", { style: {
9861
+ color: "var(--bw-text-muted)",
9862
+ fontFamily: "var(--bw-font-family)",
9863
+ display: "flex",
9864
+ alignItems: "center",
9865
+ gap: "4px",
9866
+ }, children: [jsxRuntime.jsx(IconMoney, { size: 20, color: "var(--bw-highlight-color)" }), " Preis:"] }), jsxRuntime.jsxs("span", { style: {
9867
+ color: "var(--bw-text-color)",
9868
+ fontWeight: "500",
9869
+ fontFamily: "var(--bw-font-family)",
9870
+ }, children: [formatCurrency(eventDetails.price), " pro Person"] })] })] })] }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("form", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("div", { style: {
9933
9871
  backgroundColor: "var(--bw-surface-color)",
9934
9872
  border: `1px solid var(--bw-border-color)`,
9935
9873
  backdropFilter: "blur(4px)",
@@ -10086,9 +10024,10 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
10086
10024
  height: "20px",
10087
10025
  border: "1px solid var(--bw-border-color)",
10088
10026
  accentColor: "var(--bw-highlight-color)",
10089
- backgroundColor: form.getValues("acceptTerms") === true
10090
- ? "var(--bw-highlight-color)"
10091
- : "var(--bw-surface-color)",
10027
+ cursor: "pointer",
10028
+ appearance: "checkbox",
10029
+ WebkitAppearance: "checkbox",
10030
+ MozAppearance: "checkbox",
10092
10031
  } }), jsxRuntime.jsxs("label", { htmlFor: "acceptTerms", style: {
10093
10032
  fontSize: "var(--bw-font-size)",
10094
10033
  color: "var(--bw-text-muted)",
@@ -10098,7 +10037,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
10098
10037
  }, children: ["Ich akzeptiere die", " ", jsxRuntime.jsx("a", { href: eventDetails.agbUrl || "/terms", style: {
10099
10038
  color: "var(--bw-highlight-color)",
10100
10039
  textDecoration: "none",
10101
- }, target: "_blank", rel: "noopener noreferrer", children: "Allgemeinen Gesch\u00E4ftsbedingungen" }), "*"] })] }), form.formState.errors.acceptTerms && (jsxRuntime.jsx("p", { style: {
10040
+ }, target: "_blank", rel: "noopener noreferrer", children: "AGBs" }), "*"] })] }), form.formState.errors.acceptTerms && (jsxRuntime.jsx("p", { style: {
10102
10041
  color: "var(--bw-error-color)",
10103
10042
  fontSize: "var(--bw-font-size)",
10104
10043
  marginTop: "8px",
@@ -10251,6 +10190,341 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
10251
10190
  ` })] }) }));
10252
10191
  }
10253
10192
 
10193
+ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId, }) => {
10194
+ const [bookingData, setBookingData] = React__default.useState(null);
10195
+ const [eventDetails, setEventDetails] = React__default.useState(null);
10196
+ const [formData, setFormData] = React__default.useState(null);
10197
+ const [isLoading, setIsLoading] = React__default.useState(false);
10198
+ const [paymentStatus, setPaymentStatus] = React__default.useState(null);
10199
+ const fetchBookingData = async (intentId) => {
10200
+ const targetPaymentIntentId = paymentIntentId;
10201
+ // If we have payment intent ID, fetch from API
10202
+ if (targetPaymentIntentId) {
10203
+ setIsLoading(true);
10204
+ try {
10205
+ const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/get-booking-by-payment-intent"), {
10206
+ method: "POST",
10207
+ headers: createApiHeaders(config),
10208
+ body: JSON.stringify(createRequestBody(config, {
10209
+ paymentIntentId: targetPaymentIntentId,
10210
+ })),
10211
+ });
10212
+ const data = await response.json();
10213
+ if (response.ok) {
10214
+ setBookingData({
10215
+ booking: data.booking,
10216
+ order: data.order,
10217
+ payments: data.payments,
10218
+ orderItems: data.orderItems,
10219
+ stripePaymentIntent: data.stripePaymentIntent,
10220
+ });
10221
+ setEventDetails({
10222
+ id: data.booking.eventInstance.id,
10223
+ name: data.booking.eventInstance.eventType.name,
10224
+ description: data.booking.eventInstance.eventType.description,
10225
+ startTime: data.booking.eventInstance.startTime,
10226
+ endTime: data.booking.eventInstance.endTime,
10227
+ price: data.order.total / data.booking.participantCount,
10228
+ });
10229
+ setFormData({
10230
+ customerEmail: data.booking.customerEmail,
10231
+ customerName: data.booking.customerName,
10232
+ customerPhone: data.booking.customerPhone,
10233
+ participants: data.booking.participants || [],
10234
+ });
10235
+ // Set payment status from Stripe data or order status
10236
+ setPaymentStatus(data.stripePaymentIntent?.status || data.order.status);
10237
+ }
10238
+ else {
10239
+ onError?.(data.error || "Fehler beim Abrufen der Buchungsdaten");
10240
+ }
10241
+ }
10242
+ catch (err) {
10243
+ console.error("[BookingSuccessModal] Error fetching booking data:", err);
10244
+ onError?.("Ein Fehler ist bei der Verarbeitung aufgetreten.");
10245
+ }
10246
+ finally {
10247
+ setIsLoading(false);
10248
+ }
10249
+ return;
10250
+ }
10251
+ };
10252
+ React__default.useEffect(() => {
10253
+ if (isOpen) {
10254
+ fetchBookingData();
10255
+ }
10256
+ }, [isOpen, paymentIntentId, config, onError]);
10257
+ if (!isOpen)
10258
+ return null;
10259
+ // Show loading state while fetching data
10260
+ if (isLoading || !bookingData) {
10261
+ return (jsxRuntime.jsx(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: jsxRuntime.jsx("div", { style: {
10262
+ padding: "var(--bw-spacing-large)",
10263
+ textAlign: "center",
10264
+ minHeight: "200px",
10265
+ display: "flex",
10266
+ alignItems: "center",
10267
+ justifyContent: "center",
10268
+ }, children: jsxRuntime.jsx("div", { style: {
10269
+ color: "var(--bw-text-muted)",
10270
+ fontFamily: "var(--bw-font-family)",
10271
+ fontSize: "var(--bw-font-size-large)",
10272
+ }, children: "Buchungsdaten werden geladen..." }) }) }));
10273
+ }
10274
+ const booking = bookingData.booking;
10275
+ new Date(eventDetails.startTime);
10276
+ new Date(eventDetails.endTime);
10277
+ const handlePrint = () => {
10278
+ window.print();
10279
+ };
10280
+ const formatTime12 = (dateString) => {
10281
+ return formatTime(dateString, "Europe/Berlin", "de");
10282
+ };
10283
+ const formatDate12 = (dateString) => {
10284
+ return formatEventDate(dateString);
10285
+ };
10286
+ return (jsxRuntime.jsx(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: jsxRuntime.jsxs("div", { style: {
10287
+ fontFamily: "var(--bw-font-family)",
10288
+ padding: "var(--bw-spacing-large)",
10289
+ maxWidth: "100%",
10290
+ }, children: [jsxRuntime.jsxs("div", { className: "flex justify-between items-center print-hidden", style: {
10291
+ marginBottom: "var(--bw-spacing-large)",
10292
+ display: "flex",
10293
+ alignItems: "center",
10294
+ justifyContent: "space-between",
10295
+ }, children: [jsxRuntime.jsxs("h1", { className: "font-bold text-3xl flex items-center gap-2", style: {
10296
+ color: "var(--bw-text-color)",
10297
+ fontFamily: "var(--bw-font-family)",
10298
+ marginBottom: "var(--bw-spacing-large)",
10299
+ display: "flex",
10300
+ alignItems: "center",
10301
+ gap: "var(--bw-spacing-small)",
10302
+ }, children: [jsxRuntime.jsx("div", { style: {
10303
+ width: "32px",
10304
+ height: "32px",
10305
+ backgroundColor: "var(--bw-highlight-color, #10B981)",
10306
+ borderRadius: "50%",
10307
+ display: "flex",
10308
+ alignItems: "center",
10309
+ justifyContent: "center",
10310
+ color: "white",
10311
+ }, children: "\u2713" }), jsxRuntime.jsx("p", { style: {
10312
+ fontSize: "var(--bw-font-size-large)",
10313
+ fontWeight: "600",
10314
+ color: "var(--bw-highlight-color)",
10315
+ margin: "0px 10px",
10316
+ }, children: "Buchung erfolgreich erstellt!" })] }), jsxRuntime.jsx("button", { onClick: handlePrint, style: {
10317
+ backgroundColor: "transparent",
10318
+ border: `1px solid var(--bw-border-color)`,
10319
+ color: "var(--bw-text-color)",
10320
+ padding: "8px 16px",
10321
+ borderRadius: "var(--bw-border-radius)",
10322
+ cursor: "pointer",
10323
+ fontFamily: "var(--bw-font-family)",
10324
+ fontSize: "var(--bw-font-size-small)",
10325
+ }, children: "Drucken" })] }), jsxRuntime.jsxs("div", { className: "print-only print-booking-header", children: [jsxRuntime.jsx("h1", { children: "Buchungsbest\u00E4tigung" }), jsxRuntime.jsx("div", { className: "subtitle", children: "Vielen Dank f\u00FCr deine Buchung! Hier sind deine Buchungsdetails." })] }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-large)" }, children: [jsxRuntime.jsxs("div", { className: "print-booking-card", style: {
10326
+ backgroundColor: "var(--bw-surface-color)",
10327
+ border: `1px solid var(--bw-border-color)`,
10328
+ borderRadius: "var(--bw-border-radius)",
10329
+ padding: "var(--bw-spacing)",
10330
+ marginBottom: "var(--bw-spacing-large)",
10331
+ }, children: [jsxRuntime.jsx("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: jsxRuntime.jsx("h3", { style: {
10332
+ fontSize: "var(--bw-font-size-large)",
10333
+ fontWeight: "600",
10334
+ color: "var(--bw-text-color)",
10335
+ margin: "0",
10336
+ fontFamily: "var(--bw-font-family)",
10337
+ }, children: "Buchungsdetails" }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsx("div", { className: "print-section-title", children: "Buchungsdetails" }) }), jsxRuntime.jsxs("div", { className: "space-y-4 print-only:space-y-2 print-only:p-0", children: [jsxRuntime.jsxs("div", { className: "gap-4 grid grid-cols-2 print-detail-grid", style: {
10338
+ display: "grid",
10339
+ gridTemplateColumns: "1fr 1fr",
10340
+ gap: "var(--bw-spacing)",
10341
+ }, children: [jsxRuntime.jsxs("div", { className: "print-detail-item", style: { marginBottom: "span 2" }, children: [jsxRuntime.jsx("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10342
+ color: "var(--bw-text-muted)",
10343
+ fontSize: "var(--bw-font-size-small)",
10344
+ fontFamily: "var(--bw-font-family)",
10345
+ }, children: "Buchungs-ID" }), jsxRuntime.jsx("p", { className: "font-semibold print-detail-value", style: {
10346
+ fontWeight: "600",
10347
+ color: "var(--bw-text-color)",
10348
+ fontFamily: "var(--bw-font-family)",
10349
+ fontSize: "var(--bw-font-size-medium)",
10350
+ margin: "0px 0px 6px 0",
10351
+ }, children: booking.bookingHash })] }), jsxRuntime.jsxs("div", { className: "print-detail-item", children: [jsxRuntime.jsx("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10352
+ color: "var(--bw-text-muted)",
10353
+ fontSize: "var(--bw-font-size-small)",
10354
+ fontFamily: "var(--bw-font-family)",
10355
+ }, children: "Bezahl-Status" }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { className: "print-hidden", style: {
10356
+ backgroundColor: "var(--bw-success-color, #10B981)",
10357
+ color: "white",
10358
+ padding: "2px 8px",
10359
+ borderRadius: "var(--bw-border-radius-small)",
10360
+ fontSize: "var(--bw-font-size-small)",
10361
+ fontFamily: "var(--bw-font-family)",
10362
+ width: "fit-content",
10363
+ }, children: paymentStatus === "succeeded"
10364
+ ? "erfolgreich"
10365
+ : paymentStatus === "canceled" || paymentStatus === "failed"
10366
+ ? "fehlgeschlagen"
10367
+ : "in Bearbeitung" }), jsxRuntime.jsx("span", { className: "print-only print-status-badge print-status-paid", children: "Bezahlt" })] })] })] }), jsxRuntime.jsxs("div", { className: "print-detail-item print-only:col-span-2", children: [jsxRuntime.jsx("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10368
+ color: "var(--bw-text-muted)",
10369
+ fontSize: "var(--bw-font-size-small)",
10370
+ fontFamily: "var(--bw-font-family)",
10371
+ }, children: "Event" }), jsxRuntime.jsx("p", { className: "font-semibold print-detail-value", style: {
10372
+ fontWeight: "600",
10373
+ color: "var(--bw-text-color)",
10374
+ fontFamily: "var(--bw-font-family)",
10375
+ fontSize: "var(--bw-font-size-large)",
10376
+ margin: "0 0 6px 0",
10377
+ }, children: eventDetails.name })] }), jsxRuntime.jsxs("div", { className: "gap-4 grid grid-cols-2 print-detail-grid", style: {
10378
+ display: "grid",
10379
+ gridTemplateColumns: "1fr 1fr",
10380
+ gap: "var(--bw-spacing)",
10381
+ }, children: [jsxRuntime.jsxs("div", { className: "print-detail-item", children: [jsxRuntime.jsx("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10382
+ color: "var(--bw-text-muted)",
10383
+ fontSize: "var(--bw-font-size-small)",
10384
+ fontFamily: "var(--bw-font-family)",
10385
+ }, children: "Datum" }), jsxRuntime.jsx("p", { className: "print-detail-value", style: {
10386
+ fontWeight: "600",
10387
+ color: "var(--bw-text-color)",
10388
+ fontFamily: "var(--bw-font-family)",
10389
+ fontSize: "var(--bw-font-size-large)",
10390
+ margin: "0 0 6px 0",
10391
+ }, children: formatDate12(eventDetails.startTime) })] }), jsxRuntime.jsxs("div", { className: "print-detail-item", children: [jsxRuntime.jsx("div", { className: "font-medium text-muted-foreground text-sm print-detail-label", style: {
10392
+ color: "var(--bw-text-muted)",
10393
+ fontSize: "var(--bw-font-size-small)",
10394
+ fontFamily: "var(--bw-font-family)",
10395
+ }, children: "Zeit" }), jsxRuntime.jsxs("p", { className: "print-detail-value", style: {
10396
+ fontWeight: "600",
10397
+ color: "var(--bw-text-color)",
10398
+ fontFamily: "var(--bw-font-family)",
10399
+ fontSize: "var(--bw-font-size-large)",
10400
+ margin: "0 0 6px 0",
10401
+ }, children: [formatTime12(eventDetails.startTime), " - ", formatTime12(eventDetails.endTime)] })] })] })] })] }), formData.participants && formData.participants.length > 0 && (jsxRuntime.jsxs("div", { className: "print-booking-card", style: {
10402
+ border: `1px solid var(--bw-border-color)`,
10403
+ borderRadius: "var(--bw-border-radius)",
10404
+ padding: "var(--bw-spacing)",
10405
+ marginBottom: "var(--bw-spacing-large)",
10406
+ }, children: [jsxRuntime.jsx("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: jsxRuntime.jsxs("h3", { style: {
10407
+ fontSize: "var(--bw-font-size-large)",
10408
+ fontWeight: "600",
10409
+ color: "var(--bw-text-color)",
10410
+ margin: "0",
10411
+ fontFamily: "var(--bw-font-family)",
10412
+ }, children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsxs("div", { className: "print-section-title", children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsxRuntime.jsx("div", { className: "print-only:p-0", children: jsxRuntime.jsx("div", { className: "space-y-3 print-only:space-y-1", style: {
10413
+ display: "flex",
10414
+ flexDirection: "column",
10415
+ gap: "var(--bw-spacing-small)",
10416
+ }, children: formData.participants
10417
+ .filter((p) => p.name.trim())
10418
+ .map((participant, index) => (jsxRuntime.jsx("div", { className: "flex justify-between items-center bg-muted p-3 rounded-lg print-participant", style: {
10419
+ display: "flex",
10420
+ justifyContent: "space-between",
10421
+ alignItems: "center",
10422
+ backgroundColor: "var(--bw-surface-color, #f9fafb)",
10423
+ padding: "var(--bw-spacing-small)",
10424
+ borderRadius: "var(--bw-border-radius-small)",
10425
+ }, children: jsxRuntime.jsxs("div", { className: "print-participant-info", children: [jsxRuntime.jsx("div", { className: "print-participant-name", style: {
10426
+ color: "var(--bw-text-color)",
10427
+ fontFamily: "var(--bw-font-family)",
10428
+ }, children: participant.name }), participant.age && (jsxRuntime.jsxs("div", { className: "text-muted-foreground text-sm print-participant-age", style: {
10429
+ color: "var(--bw-text-muted)",
10430
+ fontSize: "var(--bw-font-size-small)",
10431
+ fontFamily: "var(--bw-font-family)",
10432
+ }, children: [participant.age, " Jahre"] }))] }) }, index))) }) })] })), jsxRuntime.jsxs("div", { className: "print-booking-card", style: {
10433
+ backgroundColor: "var(--bw-surface-color)",
10434
+ border: `1px solid var(--bw-border-color)`,
10435
+ borderRadius: "var(--bw-border-radius)",
10436
+ padding: "var(--bw-spacing)",
10437
+ marginBottom: "var(--bw-spacing-large)",
10438
+ }, children: [jsxRuntime.jsx("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: jsxRuntime.jsx("h3", { style: {
10439
+ fontSize: "var(--bw-font-size-large)",
10440
+ fontWeight: "600",
10441
+ color: "var(--bw-text-color)",
10442
+ margin: "0",
10443
+ fontFamily: "var(--bw-font-family)",
10444
+ }, children: "Zahlungs\u00FCbersicht" }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsx("div", { className: "print-section-title", children: "Zahlungs\u00FCbersicht" }) }), jsxRuntime.jsxs("div", { className: "space-y-2 print-only:p-0 print-only:space-y-1", children: [jsxRuntime.jsxs("div", { className: "print-payment-summary print-only", children: [jsxRuntime.jsxs("div", { className: "print-payment-row", children: [jsxRuntime.jsx("span", { children: "Gesamtbetrag" }), jsxRuntime.jsx("span", { children: formatCurrency(booking.total) })] }), jsxRuntime.jsxs("div", { className: "print-payment-row", children: [jsxRuntime.jsx("span", { children: "Bezahlt" }), jsxRuntime.jsx("span", { children: formatCurrency(booking.total) })] })] }), jsxRuntime.jsxs("div", { className: "print-hidden space-y-2", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: "Gesamtbetrag" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(booking.total) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: "Bezahlt" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(booking.total) })] })] })] })] }), jsxRuntime.jsxs("div", { className: "print-booking-card", style: {
10445
+ backgroundColor: "var(--bw-surface-color)",
10446
+ border: `1px solid var(--bw-border-color)`,
10447
+ borderRadius: "var(--bw-border-radius)",
10448
+ padding: "var(--bw-spacing)",
10449
+ marginBottom: "var(--bw-spacing-large)",
10450
+ }, children: [jsxRuntime.jsx("div", { className: "print-hidden", style: { marginBottom: "var(--bw-spacing)" }, children: jsxRuntime.jsx("h3", { style: {
10451
+ fontSize: "var(--bw-font-size-large)",
10452
+ fontWeight: "600",
10453
+ color: "var(--bw-text-color)",
10454
+ margin: "0",
10455
+ fontFamily: "var(--bw-font-family)",
10456
+ }, children: "Kontaktdaten" }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsx("div", { className: "print-section-title", children: "Kontaktdaten" }) }), jsxRuntime.jsxs("div", { className: "space-y-2 print-only:p-0 print-only:space-y-1", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Name:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerName })] }), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "E-Mail:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerEmail })] }), formData.customerPhone && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Telefon:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerPhone })] }))] })] }), jsxRuntime.jsx("div", { className: "print-booking-card", style: {
10457
+ backgroundColor: "var(--bw-surface-color)",
10458
+ border: `1px solid var(--bw-border-color)`,
10459
+ borderRadius: "var(--bw-border-radius)",
10460
+ padding: "var(--bw-spacing)",
10461
+ marginBottom: "var(--bw-spacing-large)",
10462
+ textAlign: "center",
10463
+ }, children: jsxRuntime.jsxs("p", { style: {
10464
+ color: "var(--bw-text-muted)",
10465
+ margin: 0,
10466
+ fontFamily: "var(--bw-font-family)",
10467
+ fontSize: "var(--bw-font-size-small)",
10468
+ textAlign: "center",
10469
+ }, children: ["Eine Best\u00E4tigungs-E-Mail wird in K\u00FCrze an ", formData.customerEmail, " gesendet."] }) }), paymentStatus && paymentStatus !== "succeeded" && (jsxRuntime.jsxs("div", { style: {
10470
+ backgroundColor: "var(--bw-warning-bg, #FEF3C7)",
10471
+ border: "1px solid var(--bw-warning-border, #F59E0B)",
10472
+ borderRadius: "var(--bw-border-radius)",
10473
+ padding: "var(--bw-spacing)",
10474
+ marginBottom: "var(--bw-spacing-large)",
10475
+ textAlign: "center",
10476
+ }, children: [jsxRuntime.jsx("p", { style: {
10477
+ color: "var(--bw-warning-text, #92400E)",
10478
+ margin: "0 0 var(--bw-spacing) 0",
10479
+ fontFamily: "var(--bw-font-family)",
10480
+ fontWeight: "600",
10481
+ }, children: "Zahlung wird noch verarbeitet" }), jsxRuntime.jsxs("p", { style: {
10482
+ color: "var(--bw-warning-text, #92400E)",
10483
+ margin: "0 0 var(--bw-spacing) 0",
10484
+ fontFamily: "var(--bw-font-family)",
10485
+ fontSize: "var(--bw-font-size-small)",
10486
+ }, children: ["Status: ", paymentStatus] }), jsxRuntime.jsx("button", { onClick: () => fetchBookingData(), disabled: isLoading, style: {
10487
+ backgroundColor: "var(--bw-warning-text, #92400E)",
10488
+ color: "white",
10489
+ padding: "8px 16px",
10490
+ border: "none",
10491
+ borderRadius: "var(--bw-border-radius)",
10492
+ fontSize: "var(--bw-font-size-small)",
10493
+ fontWeight: "600",
10494
+ cursor: isLoading ? "not-allowed" : "pointer",
10495
+ fontFamily: "var(--bw-font-family)",
10496
+ opacity: isLoading ? 0.6 : 1,
10497
+ transition: "all 0.2s ease",
10498
+ }, children: isLoading ? "Aktualisiere..." : "Status aktualisieren" })] })), jsxRuntime.jsx("div", { style: {
10499
+ textAlign: "center",
10500
+ marginTop: "var(--bw-spacing-large)",
10501
+ paddingTop: "var(--bw-spacing)",
10502
+ borderTop: `1px solid var(--bw-border-color)`,
10503
+ }, children: jsxRuntime.jsx("button", { onClick: onClose, style: {
10504
+ backgroundColor: "var(--bw-highlight-color)",
10505
+ color: "white",
10506
+ padding: "12px 32px",
10507
+ border: "none",
10508
+ borderRadius: "var(--bw-border-radius)",
10509
+ fontSize: "var(--bw-font-size)",
10510
+ fontWeight: "600",
10511
+ cursor: "pointer",
10512
+ fontFamily: "var(--bw-font-family)",
10513
+ transition: "all 0.2s ease",
10514
+ }, onMouseEnter: (e) => {
10515
+ e.currentTarget.style.opacity = "0.9";
10516
+ }, onMouseLeave: (e) => {
10517
+ e.currentTarget.style.opacity = "1";
10518
+ }, children: "Schlie\u00DFen" }) }), jsxRuntime.jsxs("div", { className: "print-only print-footer", children: [jsxRuntime.jsxs("p", { children: ["Diese Buchungsbest\u00E4tigung wurde am", " ", new Date().toLocaleString("de-DE", {
10519
+ day: "2-digit",
10520
+ month: "2-digit",
10521
+ year: "numeric",
10522
+ hour: "2-digit",
10523
+ minute: "2-digit",
10524
+ timeZone: "Europe/Berlin",
10525
+ }), " ", "erstellt."] }), jsxRuntime.jsx("p", { children: "Bei Fragen zu deiner Buchung kontaktiere uns gerne." })] })] })] }) }));
10526
+ };
10527
+
10254
10528
  const months = [
10255
10529
  "Januar",
10256
10530
  "Februar",
@@ -11328,198 +11602,6 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
11328
11602
  }
11329
11603
 
11330
11604
  // Predefined themes & Style Provider have been moved to ../styles/StyleProvider.tsx
11331
- // Success Modal Component
11332
- const BookingSuccessModal = ({ isOpen, onClose, bookingData, eventDetails, formData, config, }) => {
11333
- if (!isOpen || !bookingData)
11334
- return null;
11335
- const booking = bookingData.booking;
11336
- return (jsxRuntime.jsx("div", { style: {
11337
- position: "fixed",
11338
- top: 0,
11339
- left: 0,
11340
- right: 0,
11341
- bottom: 0,
11342
- backgroundColor: "rgba(0, 0, 0, 0.5)",
11343
- zIndex: 10000,
11344
- display: "flex",
11345
- alignItems: "center",
11346
- justifyContent: "center",
11347
- padding: "var(--bw-spacing)",
11348
- }, children: jsxRuntime.jsxs("div", { style: {
11349
- backgroundColor: "var(--bw-background-color)",
11350
- borderRadius: "var(--bw-border-radius)",
11351
- padding: "var(--bw-spacing-large)",
11352
- maxWidth: "500px",
11353
- width: "100%",
11354
- maxHeight: "90vh",
11355
- overflow: "auto",
11356
- position: "relative",
11357
- border: `1px solid var(--bw-border-color)`,
11358
- boxShadow: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
11359
- }, children: [jsxRuntime.jsx("button", { onClick: onClose, style: {
11360
- position: "absolute",
11361
- top: "var(--bw-spacing)",
11362
- right: "var(--bw-spacing)",
11363
- background: "none",
11364
- border: "none",
11365
- fontSize: "24px",
11366
- cursor: "pointer",
11367
- color: "var(--bw-text-muted)",
11368
- width: "32px",
11369
- height: "32px",
11370
- display: "flex",
11371
- alignItems: "center",
11372
- justifyContent: "center",
11373
- borderRadius: "var(--bw-border-radius-small)",
11374
- }, children: "\u00D7" }), jsxRuntime.jsxs("div", { style: {
11375
- textAlign: "center",
11376
- marginBottom: "var(--bw-spacing-large)",
11377
- }, children: [jsxRuntime.jsx("div", { style: {
11378
- width: "64px",
11379
- height: "64px",
11380
- backgroundColor: "var(--bw-success-color, #10B981)",
11381
- borderRadius: "50%",
11382
- margin: "0 auto var(--bw-spacing)",
11383
- display: "flex",
11384
- alignItems: "center",
11385
- justifyContent: "center",
11386
- fontSize: "32px",
11387
- color: "white",
11388
- }, children: "\u2713" }), jsxRuntime.jsx("h2", { style: {
11389
- fontSize: "var(--bw-font-size-xl)",
11390
- fontWeight: "700",
11391
- color: "var(--bw-text-color)",
11392
- margin: "0 0 var(--bw-spacing-small) 0",
11393
- fontFamily: "var(--bw-font-family)",
11394
- }, children: "Buchung erfolgreich!" }), jsxRuntime.jsx("p", { style: {
11395
- color: "var(--bw-text-muted)",
11396
- fontFamily: "var(--bw-font-family)",
11397
- margin: 0,
11398
- }, children: "Deine Buchung wurde erfolgreich abgeschlossen." })] }), jsxRuntime.jsxs("div", { style: {
11399
- backgroundColor: "var(--bw-surface-color)",
11400
- border: `1px solid var(--bw-border-color)`,
11401
- borderRadius: "var(--bw-border-radius)",
11402
- padding: "var(--bw-spacing)",
11403
- marginBottom: "var(--bw-spacing-large)",
11404
- }, children: [jsxRuntime.jsx("h3", { style: {
11405
- fontSize: "var(--bw-font-size-large)",
11406
- fontWeight: "600",
11407
- color: "var(--bw-text-color)",
11408
- margin: "0 0 var(--bw-spacing) 0",
11409
- fontFamily: "var(--bw-font-family)",
11410
- }, children: "Buchungsdetails" }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing)" }, children: [booking.bookingHash && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Buchungs-ID:" }), jsxRuntime.jsx("span", { style: {
11411
- color: "var(--bw-text-color)",
11412
- fontWeight: "500",
11413
- fontFamily: "monospace",
11414
- fontSize: "var(--bw-font-size-small)",
11415
- backgroundColor: "var(--bw-background-color)",
11416
- padding: "4px 8px",
11417
- borderRadius: "var(--bw-border-radius-small)",
11418
- }, children: booking.bookingHash })] })), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Event:" }), jsxRuntime.jsx("span", { style: {
11419
- color: "var(--bw-text-color)",
11420
- fontWeight: "500",
11421
- fontFamily: "var(--bw-font-family)",
11422
- textAlign: "right",
11423
- maxWidth: "60%",
11424
- }, children: eventDetails.name })] }), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Datum:" }), jsxRuntime.jsx("span", { style: {
11425
- color: "var(--bw-text-color)",
11426
- fontWeight: "500",
11427
- fontFamily: "var(--bw-font-family)",
11428
- textAlign: "right",
11429
- maxWidth: "60%",
11430
- }, children: formatDate(eventDetails.startTime) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Teilnehmer:" }), jsxRuntime.jsx("span", { style: {
11431
- color: "var(--bw-text-color)",
11432
- fontWeight: "500",
11433
- fontFamily: "var(--bw-font-family)",
11434
- }, children: booking.participantCount })] }), jsxRuntime.jsxs("div", { style: {
11435
- display: "flex",
11436
- justifyContent: "space-between",
11437
- alignItems: "center",
11438
- borderTop: `1px solid var(--bw-border-color)`,
11439
- paddingTop: "var(--bw-spacing)",
11440
- marginTop: "var(--bw-spacing)",
11441
- }, children: [jsxRuntime.jsx("span", { style: {
11442
- color: "var(--bw-text-color)",
11443
- fontWeight: "600",
11444
- fontFamily: "var(--bw-font-family)",
11445
- }, children: "Gesamtbetrag:" }), jsxRuntime.jsx("span", { style: {
11446
- color: "var(--bw-text-color)",
11447
- fontWeight: "600",
11448
- fontSize: "var(--bw-font-size-large)",
11449
- fontFamily: "var(--bw-font-family)",
11450
- }, children: formatCurrency(booking.total) })] })] })] }), formData.participants && formData.participants.length > 0 && (jsxRuntime.jsxs("div", { style: {
11451
- backgroundColor: "var(--bw-surface-color)",
11452
- border: `1px solid var(--bw-border-color)`,
11453
- borderRadius: "var(--bw-border-radius)",
11454
- padding: "var(--bw-spacing)",
11455
- marginBottom: "var(--bw-spacing-large)",
11456
- }, children: [jsxRuntime.jsx("h3", { style: {
11457
- fontSize: "var(--bw-font-size-large)",
11458
- fontWeight: "600",
11459
- color: "var(--bw-text-color)",
11460
- margin: "0 0 var(--bw-spacing) 0",
11461
- fontFamily: "var(--bw-font-family)",
11462
- }, children: "Teilnehmer" }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: formData.participants
11463
- .filter((p) => p.name.trim())
11464
- .map((participant, index) => (jsxRuntime.jsxs("div", { style: {
11465
- display: "flex",
11466
- justifyContent: "space-between",
11467
- alignItems: "center",
11468
- padding: "var(--bw-spacing-small)",
11469
- backgroundColor: "var(--bw-background-color)",
11470
- borderRadius: "var(--bw-border-radius-small)",
11471
- }, children: [jsxRuntime.jsx("span", { style: {
11472
- color: "var(--bw-text-color)",
11473
- fontFamily: "var(--bw-font-family)",
11474
- }, children: participant.name }), participant.age && (jsxRuntime.jsxs("span", { style: {
11475
- color: "var(--bw-text-muted)",
11476
- fontSize: "var(--bw-font-size-small)",
11477
- fontFamily: "var(--bw-font-family)",
11478
- }, children: [participant.age, " Jahre"] }))] }, index))) })] })), jsxRuntime.jsxs("div", { style: {
11479
- backgroundColor: "var(--bw-surface-color)",
11480
- border: `1px solid var(--bw-border-color)`,
11481
- borderRadius: "var(--bw-border-radius)",
11482
- padding: "var(--bw-spacing)",
11483
- marginBottom: "var(--bw-spacing-large)",
11484
- }, children: [jsxRuntime.jsx("h3", { style: {
11485
- fontSize: "var(--bw-font-size-large)",
11486
- fontWeight: "600",
11487
- color: "var(--bw-text-color)",
11488
- margin: "0 0 var(--bw-spacing) 0",
11489
- fontFamily: "var(--bw-font-family)",
11490
- }, children: "Kontaktdaten" }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Name:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerName })] }), jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "E-Mail:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerEmail })] }), formData.customerPhone && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Telefon:" }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerPhone })] }))] })] }), jsxRuntime.jsxs("div", { style: {
11491
- backgroundColor: "var(--bw-surface-muted-bg, rgba(59, 130, 246, 0.05))",
11492
- border: `1px solid var(--bw-border-color)`,
11493
- borderRadius: "var(--bw-border-radius)",
11494
- padding: "var(--bw-spacing)",
11495
- marginBottom: "var(--bw-spacing-large)",
11496
- textAlign: "center",
11497
- }, children: [jsxRuntime.jsx("div", { style: {
11498
- color: "var(--bw-highlight-color)",
11499
- fontSize: "24px",
11500
- marginBottom: "var(--bw-spacing-small)",
11501
- }, children: "\uD83D\uDCE7" }), jsxRuntime.jsxs("p", { style: {
11502
- color: "var(--bw-text-muted)",
11503
- margin: 0,
11504
- fontFamily: "var(--bw-font-family)",
11505
- fontSize: "var(--bw-font-size-small)",
11506
- }, children: ["Eine Best\u00E4tigungs-E-Mail wird in K\u00FCrze an ", formData.customerEmail, " gesendet."] })] }), jsxRuntime.jsx("div", { style: { textAlign: "center" }, children: jsxRuntime.jsx("button", { onClick: onClose, style: {
11507
- backgroundColor: "var(--bw-highlight-color)",
11508
- color: "white",
11509
- padding: "12px 32px",
11510
- border: "none",
11511
- borderRadius: "var(--bw-border-radius)",
11512
- fontSize: "var(--bw-font-size)",
11513
- fontWeight: "600",
11514
- cursor: "pointer",
11515
- fontFamily: "var(--bw-font-family)",
11516
- transition: "all 0.2s ease",
11517
- }, onMouseEnter: (e) => {
11518
- e.currentTarget.style.opacity = "0.9";
11519
- }, onMouseLeave: (e) => {
11520
- e.currentTarget.style.opacity = "1";
11521
- }, children: "Schlie\u00DFen" }) })] }) }));
11522
- };
11523
11605
  // Main widget component
11524
11606
  function UniversalBookingWidget({ config: baseConfig }) {
11525
11607
  // Apply URL parameter inference
@@ -11549,7 +11631,6 @@ function UniversalBookingWidget({ config: baseConfig }) {
11549
11631
  // Booking flow state
11550
11632
  const [eventDetails, setEventDetails] = React__default.useState(null);
11551
11633
  const [stripePromise, setStripePromise] = React__default.useState(null);
11552
- const [clientSecret, setClientSecret] = React__default.useState(null);
11553
11634
  // SEPARATED LOADING STATES
11554
11635
  const [isLoading, setIsLoading] = React__default.useState(true); // Only for initial widget load
11555
11636
  const [isLoadingEventInstances, setIsLoadingEventInstances] = React__default.useState(false); // For loading event instances in sidebar
@@ -11557,7 +11638,7 @@ function UniversalBookingWidget({ config: baseConfig }) {
11557
11638
  const [isLoadingShowAll, setIsLoadingShowAll] = React__default.useState(false); // For "show all events" operation
11558
11639
  const [error, setError] = React__default.useState(null);
11559
11640
  const [isSuccess, setIsSuccess] = React__default.useState(false);
11560
- const [successData, setSuccessData] = React__default.useState(null);
11641
+ const [successPaymentIntentId, setSuccessPaymentIntentId] = React__default.useState(null);
11561
11642
  const [systemConfig, setSystemConfig] = React__default.useState(null);
11562
11643
  // PERFORMANCE OPTIMIZATION: Lazy component loading
11563
11644
  const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = React__default.useState(false);
@@ -11604,6 +11685,29 @@ function UniversalBookingWidget({ config: baseConfig }) {
11604
11685
  initializeWidget();
11605
11686
  // eslint-disable-next-line react-hooks/exhaustive-deps
11606
11687
  }, [config]);
11688
+ // Handle Stripe payment return
11689
+ React__default.useEffect(() => {
11690
+ const handleStripeReturn = () => {
11691
+ const stripeReturn = detectStripeReturn();
11692
+ if (stripeReturn) {
11693
+ if (stripeReturn.redirectStatus === "succeeded") {
11694
+ // Store payment intent ID and show success modal
11695
+ setSuccessPaymentIntentId(stripeReturn.paymentIntent);
11696
+ setIsSuccess(true);
11697
+ }
11698
+ else if (stripeReturn.redirectStatus === "failed") {
11699
+ setError("Die Zahlung war nicht erfolgreich. Bitte versuche es erneut.");
11700
+ }
11701
+ else {
11702
+ setError("Die Zahlung konnte nicht abgeschlossen werden. Bitte versuche es erneut.");
11703
+ }
11704
+ }
11705
+ };
11706
+ // Only run on mount to avoid running multiple times
11707
+ if (!isLoading) {
11708
+ handleStripeReturn();
11709
+ }
11710
+ }, [isLoading]); // Only depend on isLoading to run after initial load
11607
11711
  // PERFORMANCE OPTIMIZATION: Lazy load components when needed
11608
11712
  React__default.useEffect(() => {
11609
11713
  if (currentStep === "eventInstances" && !shouldRenderInstanceSelection) {
@@ -11846,7 +11950,7 @@ function UniversalBookingWidget({ config: baseConfig }) {
11846
11950
  };
11847
11951
  const handleBookingSuccess = (result) => {
11848
11952
  setIsSuccess(true);
11849
- setSuccessData(result);
11953
+ setSuccessPaymentIntentId(result.paymentIntent.id);
11850
11954
  config.onSuccess?.(result);
11851
11955
  };
11852
11956
  const handleBookingError = (errorMessage) => {
@@ -12010,16 +12114,6 @@ function UniversalBookingWidget({ config: baseConfig }) {
12010
12114
  fontFamily: "var(--bw-font-family)",
12011
12115
  }, children: "Falls das Problem weiterhin besteht, kontaktiere bitte den Support." })] }) }) }));
12012
12116
  }
12013
- // Success state
12014
- if (isSuccess) {
12015
- return (jsxRuntime.jsx(StyleProvider, { config: config, children: jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12016
- setIsSuccess(false);
12017
- setCurrentStep("eventTypes");
12018
- // Reset lazy loading flags
12019
- setShouldRenderInstanceSelection(false);
12020
- setShouldRenderBookingForm(false);
12021
- }, bookingData: successData, eventDetails: eventDetails, formData: successData.formData, config: config }) }));
12022
- }
12023
12117
  // Main view based on view mode
12024
12118
  if (viewMode === "next-events" && showingPreview) {
12025
12119
  // Next events preview mode
@@ -12035,17 +12129,47 @@ function UniversalBookingWidget({ config: baseConfig }) {
12035
12129
  setCurrentStep("eventTypes");
12036
12130
  setShowingPreview(true);
12037
12131
  setEventDetails(null);
12038
- }, systemConfig: systemConfig }))] }));
12132
+ }, systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12133
+ setIsSuccess(false);
12134
+ setCurrentStep("eventTypes");
12135
+ setShowingPreview(true);
12136
+ // Reset state
12137
+ setSuccessPaymentIntentId(null);
12138
+ // Reset lazy loading flags
12139
+ setShouldRenderInstanceSelection(false);
12140
+ setShouldRenderBookingForm(false);
12141
+ // Clean up URL to remove Stripe parameters
12142
+ const url = new URL(window.location.href);
12143
+ url.searchParams.delete("payment_intent");
12144
+ url.searchParams.delete("payment_intent_client_secret");
12145
+ url.searchParams.delete("redirect_status");
12146
+ window.history.replaceState({}, "", url.toString());
12147
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12039
12148
  }
12040
12149
  if (viewMode === "next-events" && !showingPreview && currentStep === "eventInstances") {
12041
12150
  // Show all events for the single event type
12042
- return (jsxRuntime.jsx(StyleProvider, { config: config, children: shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
12043
- setShowingPreview(true);
12044
- setCurrentStep("eventTypes");
12045
- }, isOpen: currentStep === "eventInstances", onClose: () => {
12046
- setShowingPreview(true);
12047
- setCurrentStep("eventTypes");
12048
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })) }));
12151
+ return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
12152
+ setShowingPreview(true);
12153
+ setCurrentStep("eventTypes");
12154
+ }, isOpen: currentStep === "eventInstances", onClose: () => {
12155
+ setShowingPreview(true);
12156
+ setCurrentStep("eventTypes");
12157
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12158
+ setIsSuccess(false);
12159
+ setCurrentStep("eventTypes");
12160
+ setShowingPreview(true);
12161
+ // Reset state
12162
+ setSuccessPaymentIntentId(null);
12163
+ // Reset lazy loading flags
12164
+ setShouldRenderInstanceSelection(false);
12165
+ setShouldRenderBookingForm(false);
12166
+ // Clean up URL to remove Stripe parameters
12167
+ const url = new URL(window.location.href);
12168
+ url.searchParams.delete("payment_intent");
12169
+ url.searchParams.delete("payment_intent_client_secret");
12170
+ url.searchParams.delete("redirect_status");
12171
+ window.history.replaceState({}, "", url.toString());
12172
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12049
12173
  }
12050
12174
  if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
12051
12175
  // Button mode - show button that opens sidebar/booking directly
@@ -12075,7 +12199,22 @@ function UniversalBookingWidget({ config: baseConfig }) {
12075
12199
  setShouldRenderInstanceSelection(true);
12076
12200
  }
12077
12201
  }, children: config.buttonText ||
12078
- (isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig }))] }) }));
12202
+ (isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12203
+ setIsSuccess(false);
12204
+ setCurrentStep("eventTypes");
12205
+ setSidebarOpen(false);
12206
+ // Reset state
12207
+ setSuccessPaymentIntentId(null);
12208
+ // Reset lazy loading flags
12209
+ setShouldRenderInstanceSelection(false);
12210
+ setShouldRenderBookingForm(false);
12211
+ // Clean up URL to remove Stripe parameters
12212
+ const url = new URL(window.location.href);
12213
+ url.searchParams.delete("payment_intent");
12214
+ url.searchParams.delete("payment_intent_client_secret");
12215
+ url.searchParams.delete("redirect_status");
12216
+ window.history.replaceState({}, "", url.toString());
12217
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }) }));
12079
12218
  }
12080
12219
  // Cards mode (default) - show event type selection
12081
12220
  const cardsView = (jsxRuntime.jsx(EventTypeSelection, { eventTypes: eventTypes, onEventTypeSelect: handleEventTypeSelect, isLoading: isLoading, skeletonCount: getSkeletonCount() }));
@@ -12108,7 +12247,21 @@ function UniversalBookingWidget({ config: baseConfig }) {
12108
12247
  };
12109
12248
  };
12110
12249
  const backHandlers = getBackHandlers();
12111
- return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig }))] }));
12250
+ return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
12251
+ setIsSuccess(false);
12252
+ setCurrentStep("eventTypes");
12253
+ // Reset state
12254
+ setSuccessPaymentIntentId(null);
12255
+ // Reset lazy loading flags
12256
+ setShouldRenderInstanceSelection(false);
12257
+ setShouldRenderBookingForm(false);
12258
+ // Clean up URL to remove Stripe parameters
12259
+ const url = new URL(window.location.href);
12260
+ url.searchParams.delete("payment_intent");
12261
+ url.searchParams.delete("payment_intent_client_secret");
12262
+ url.searchParams.delete("redirect_status");
12263
+ window.history.replaceState({}, "", url.toString());
12264
+ }, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }));
12112
12265
  }
12113
12266
 
12114
12267
  // Export init function for vanilla JS usage